[openwrt/openwrt] build: move Build/buffalo-trx to image-commands.mk

LEDE Commits lede-commits at lists.infradead.org
Wed Jun 5 12:15:36 PDT 2024


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/47d9dcd01ac57ec72e2da50957c2f3c83d357f69

commit 47d9dcd01ac57ec72e2da50957c2f3c83d357f69
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Wed Mar 27 20:38:04 2024 +0900

    build: move Build/buffalo-trx to image-commands.mk
    
    Move Build/buffalo-trx to image-commands.mk from image/mt7622.mk to use
    that definition from ramips as well.
    
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
---
 include/image-commands.mk             | 21 +++++++++++++++++++++
 target/linux/mediatek/image/mt7622.mk | 21 ---------------------
 2 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/include/image-commands.mk b/include/image-commands.mk
index c3c7a3c6dc..fed92a5793 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -231,6 +231,27 @@ define Build/buffalo-tag-dhp
 	mv $@.new $@
 endef
 
+define Build/buffalo-trx
+	$(eval magic=$(word 1,$(1)))
+	$(eval kern_bin=$(if $(1),$(IMAGE_KERNEL),$@))
+	$(eval rtfs_bin=$(word 2,$(1)))
+	$(eval apnd_bin=$(word 3,$(1)))
+	$(eval kern_size=$(if $(KERNEL_SIZE),$(KERNEL_SIZE),0x400000))
+
+	$(if $(rtfs_bin),touch $(rtfs_bin))
+	$(STAGING_DIR_HOST)/bin/otrx create $@.new \
+		$(if $(magic),-M $(magic),) \
+		-f $(kern_bin) \
+		$(if $(rtfs_bin),\
+			-a 0x20000 \
+			-b $$(( $(call exp_units,$(kern_size)) )) \
+			-f $(rtfs_bin),) \
+		$(if $(apnd_bin),\
+			-A $(apnd_bin) \
+			-a 0x20000)
+	mv $@.new $@
+endef
+
 define Build/check-size
 	@imagesize="$$(stat -c%s $@)"; \
 	limitsize="$$(($(call exp_units,$(if $(1),$(1),$(IMAGE_SIZE)))))"; \
diff --git a/target/linux/mediatek/image/mt7622.mk b/target/linux/mediatek/image/mt7622.mk
index 441e29a1dc..f91720479a 100644
--- a/target/linux/mediatek/image/mt7622.mk
+++ b/target/linux/mediatek/image/mt7622.mk
@@ -8,27 +8,6 @@ define Image/Prepare
 	echo -ne '\xde\xad\xc0\xde' > $(KDIR)/ubi_mark
 endef
 
-define Build/buffalo-trx
-	$(eval magic=$(word 1,$(1)))
-	$(eval kern_bin=$(if $(1),$(IMAGE_KERNEL),$@))
-	$(eval rtfs_bin=$(word 2,$(1)))
-	$(eval apnd_bin=$(word 3,$(1)))
-	$(eval kern_size=$(if $(KERNEL_SIZE),$(KERNEL_SIZE),0x400000))
-
-	$(if $(rtfs_bin),touch $(rtfs_bin))
-	$(STAGING_DIR_HOST)/bin/otrx create $@.new \
-		$(if $(magic),-M $(magic),) \
-		-f $(kern_bin) \
-		$(if $(rtfs_bin),\
-			-a 0x20000 \
-			-b $$(( $(call exp_units,$(kern_size)) )) \
-			-f $(rtfs_bin),) \
-		$(if $(apnd_bin),\
-			-A $(apnd_bin) \
-			-a 0x20000)
-	mv $@.new $@
-endef
-
 define Build/bl2
 	cat $(STAGING_DIR_IMAGE)/mt7622-$1-bl2.img >> $@
 endef




More information about the lede-commits mailing list