From: Shiji Yang Date: Tue, 19 Mar 2024 13:25:52 +0000 (+0800) Subject: ath79: move seama image recipe to the common Makefile X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=82208eb52785da3cce48cfa47849436aa77e985c;p=openwrt%2Fstaging%2Fwigyori.git ath79: move seama image recipe to the common Makefile Move seama image recipe to the common Makefile in order for some tiny sub-target D-Link devices can share it. Signed-off-by: Shiji Yang --- diff --git a/target/linux/ath79/image/Makefile b/target/linux/ath79/image/Makefile index 8328be7667..5647200b4b 100644 --- a/target/linux/ath79/image/Makefile +++ b/target/linux/ath79/image/Makefile @@ -7,6 +7,7 @@ DEVICE_VARS += LOADER_FLASH_OFFS LOADER_TYPE DEVICE_VARS += LOADER_FLASH_MAX LOADER_KERNEL_MAGIC DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID DEVICE_VARS += RAS_BOARD RAS_ROOTFS_SIZE RAS_VERSION +DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK define Build/loader-common rm -rf $@.src @@ -87,6 +88,23 @@ define Device/loader-okli-uimage lzma | uImage lzma endef +define Device/seama + KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma + KERNEL_INITRAMFS := $$(KERNEL) | seama + IMAGES += factory.bin + SEAMA_MTDBLOCK := 1 + + # 64 bytes offset: + # - 28 bytes seama_header + # - 36 bytes of META data (4-bytes aligned) + IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs + IMAGE/sysupgrade.bin := $$(IMAGE/default) | seama | pad-rootfs | \ + check-size | append-metadata + IMAGE/factory.bin := $$(IMAGE/default) | pad-rootfs -x 64 | seama | \ + seama-seal | check-size + SEAMA_SIGNATURE := +endef + include $(SUBTARGET).mk ifeq ($(SUBTARGET),generic) diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index e7960efbaa..d56afcaac8 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -6,7 +6,6 @@ include ./common-yuncore.mk include ./common-ubnt.mk DEVICE_VARS += ADDPATTERN_ID ADDPATTERN_VERSION -DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK DEVICE_VARS += KERNEL_INITRAMFS_PREFIX DAP_SIGNATURE DEVICE_VARS += EDIMAX_HEADER_MAGIC EDIMAX_HEADER_MODEL DEVICE_VARS += ELECOM_HWID @@ -194,23 +193,6 @@ define Build/zyxel-tar-bz2 rm -rf $@.tmp endef -define Device/seama - KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma - KERNEL_INITRAMFS := $$(KERNEL) | seama - IMAGES += factory.bin - SEAMA_MTDBLOCK := 1 - - # 64 bytes offset: - # - 28 bytes seama_header - # - 36 bytes of META data (4-bytes aligned) - IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs - IMAGE/sysupgrade.bin := $$(IMAGE/default) | seama | pad-rootfs | \ - check-size | append-metadata - IMAGE/factory.bin := $$(IMAGE/default) | pad-rootfs -x 64 | seama | \ - seama-seal | check-size - SEAMA_SIGNATURE := -endef - define Device/8dev_carambola2 SOC := ar9331