From: INAGAKI Hiroshi Date: Mon, 1 Aug 2022 04:40:10 +0000 (+0900) Subject: ath79: use ARTIFACTS for initramfs-factory of ELECOM devices X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=2e1ffc341276ed31e69af14a3d7f5c6d8e5f069c;p=openwrt%2Fstaging%2Fjow.git ath79: use ARTIFACTS for initramfs-factory of ELECOM devices Use ARTIFACTS to generate factory image of the following ELECOM devices instead of redundant recipe which generate on KERNEL_INITRAMFS. - ELECOM WRC-300GHBK2-I - ELECOM WRC-1750GHBK2-I/C Signed-off-by: INAGAKI Hiroshi --- diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 9d8b70712d..7b760abc3e 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -11,24 +11,6 @@ DEVICE_VARS += KERNEL_INITRAMFS_PREFIX DAP_SIGNATURE DEVICE_VARS += EDIMAX_HEADER_MAGIC EDIMAX_HEADER_MODEL DEVICE_VARS += OPENMESH_CE_TYPE ZYXEL_MODEL_STRING -define Build/add-elecom-factory-initramfs - $(eval edimax_model=$(word 1,$(1))) - $(eval product=$(word 2,$(1))) - - $(STAGING_DIR_HOST)/bin/mkedimaximg \ - -b -s CSYS -m $(edimax_model) \ - -f 0x70000 -S 0x01100000 \ - -i $@ -o $@.factory - - $(call Build/elecom-product-header,$(product) $@.factory) - - if [ "$$(stat -c%s $@.factory)" -le $$(($(subst k,* 1024,$(subst m, * 1024k,$(IMAGE_SIZE))))) ]; then \ - mv $@.factory $(BIN_DIR)/$(KERNEL_INITRAMFS_PREFIX)-factory.bin; \ - else \ - echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \ - fi -endef - define Build/addpattern -$(STAGING_DIR_HOST)/bin/addpattern -B $(ADDPATTERN_ID) \ -v v$(ADDPATTERN_VERSION) -i $@ -o $@.new @@ -1106,8 +1088,12 @@ define Device/elecom_wrc-1750ghbk2-i DEVICE_VENDOR := ELECOM DEVICE_MODEL := WRC-1750GHBK2-I/C IMAGE_SIZE := 15808k - KERNEL_INITRAMFS := $$(KERNEL) | pad-to 2 | \ - add-elecom-factory-initramfs RN68 WRC-1750GHBK2 +ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) + ARTIFACTS := initramfs-factory.bin + ARTIFACT/initramfs-factory.bin := append-image initramfs-kernel.bin | \ + pad-to 2 | edimax-header -b -s CSYS -m RN68 -f 0x70000 -S 0x01100000 | \ + elecom-product-header WRC-1750GHBK2 | check-size +endif DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct endef TARGET_DEVICES += elecom_wrc-1750ghbk2-i @@ -1117,8 +1103,12 @@ define Device/elecom_wrc-300ghbk2-i DEVICE_VENDOR := ELECOM DEVICE_MODEL := WRC-300GHBK2-I IMAGE_SIZE := 7616k - KERNEL_INITRAMFS := $$(KERNEL) | pad-to 2 | \ - add-elecom-factory-initramfs RN51 WRC-300GHBK2-I +ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) + ARTIFACTS := initramfs-factory.bin + ARTIFACT/initramfs-factory.bin := append-image initramfs-kernel.bin | \ + pad-to 2 | edimax-header -b -s CSYS -m RN51 -f 0x70000 -S 0x01100000 | \ + elecom-product-header WRC-300GHBK2-I | check-size +endif endef TARGET_DEVICES += elecom_wrc-300ghbk2-i