[openwrt/openwrt] ath79: move seama image recipe to the common Makefile

LEDE Commits lede-commits at lists.infradead.org
Fri Mar 29 17:05:28 PDT 2024


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/82208eb52785da3cce48cfa47849436aa77e985c

commit 82208eb52785da3cce48cfa47849436aa77e985c
Author: Shiji Yang <yangshiji66 at qq.com>
AuthorDate: Tue Mar 19 21:25:52 2024 +0800

    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 <yangshiji66 at qq.com>
---
 target/linux/ath79/image/Makefile   | 18 ++++++++++++++++++
 target/linux/ath79/image/generic.mk | 18 ------------------
 2 files changed, 18 insertions(+), 18 deletions(-)

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




More information about the lede-commits mailing list