[source] build: move lzma2eva build step to image-commands.mk

LEDE Commits lede-commits at lists.infradead.org
Sat Jun 24 13:38:01 PDT 2017


mkresin pushed a commit to source.git, branch master:
https://git.lede-project.org/8e0d7d6574139e1ab4f99926e2cd09f6959d1073

commit 8e0d7d6574139e1ab4f99926e2cd09f6959d1073
Author: Mathias Kresin <dev at kresin.me>
AuthorDate: Sat Mar 25 19:18:37 2017 +0100

    build: move lzma2eva build step to image-commands.mk
    
    Move it to image-commands.mk so that it can used by other targets with
    eva based boards as well.
    
    Signed-off-by: Mathias Kresin <dev at kresin.me>
---
 include/image-commands.mk          | 5 +++++
 target/linux/lantiq/image/Makefile | 7 ++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/include/image-commands.mk b/include/image-commands.mk
index c1d8982..093b93d 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -44,6 +44,11 @@ define Build/buffalo-dhp-image
 	mv $@.new $@
 endef
 
+define Build/eva-image
+	$(STAGING_DIR_HOST)/bin/lzma2eva $(KERNEL_LOADADDR) $(KERNEL_LOADADDR) $@ $@.new
+	mv $@.new $@
+endef
+
 define Build/netgear-chk
 	$(STAGING_DIR_HOST)/bin/mkchkimg \
 		-o $@.new \
diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile
index 1b194b3..e0f58af 100644
--- a/target/linux/lantiq/image/Makefile
+++ b/target/linux/lantiq/image/Makefile
@@ -20,9 +20,8 @@ else
   UBIFS_OPTS := -m 2048 -e 126KiB -c 4096
 endif
 
-define Build/eva-image
-	lzma2eva $(KERNEL_LOADADDR) $(KERNEL_LOADADDR) $@ $@.new
-	( dd if=$@.new bs=64k conv=sync; cat ./eva.dummy.squashfs; ) > $@
+define Build/append-avm-fakeroot
+	cat ./eva.dummy.squashfs >> $@
 endef
 
 define Build/dgn3500-sercom-footer
@@ -104,6 +103,8 @@ endef
 
 define Device/AVM
   KERNEL := kernel-bin | append-dtb | lzma | eva-image
+  IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-avm-fakeroot | \
+	append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
 endef
 
 ifeq ($(SUBTARGET),ase)



More information about the lede-commits mailing list