[openwrt/openwrt] ath79: add empty squashfs-lzma filesystem

LEDE Commits lede-commits at lists.infradead.org
Mon May 8 11:04:12 PDT 2023


aparcar pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/91e3419a33f3f0baa2fb25680f5c9a7b2240102b

commit 91e3419a33f3f0baa2fb25680f5c9a7b2240102b
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Sun Feb 5 19:38:09 2023 +0100

    ath79: add empty squashfs-lzma filesystem
    
    The filesystem is currently created on every build to trick the boot
    loader of some FRITZ! devices into accepting the image. Sadly the
    resulting squashfs-lzma filesystem is not reproducible. To fix this,
    create a squashfs filesystem once and include it into the repository.
    
    Creation happend as shown below
    
        rm -rf empty_dir
        mkdir empty_dir
        ./staging_dir/host/bin/mksquashfs-lzma \
            empty_dir/ empty-squashfs-lzma \
            -noappend -root-owned -be -nopad -b 65536 -fixed-time 0
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 include/image-commands.mk                    |  10 ----------
 target/linux/ath79/image/Makefile            |   3 +++
 target/linux/ath79/image/empty-squashfs-lzma | Bin 0 -> 150 bytes
 3 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/include/image-commands.mk b/include/image-commands.mk
index 0c13f30fef..e1951672e6 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -103,16 +103,6 @@ define Build/append-rootfs
 	dd if=$(IMAGE_ROOTFS) >> $@
 endef
 
-define Build/append-squashfs-fakeroot-be
-	rm -rf $@.fakefs $@.fakesquashfs
-	mkdir $@.fakefs
-	$(STAGING_DIR_HOST)/bin/mksquashfs3-lzma \
-		$@.fakefs $@.fakesquashfs \
-		-noappend -root-owned -be -nopad -b 65536 \
-		$(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
-	cat $@.fakesquashfs >> $@
-endef
-
 define Build/append-squashfs4-fakeroot
 	rm -rf $@.fakefs $@.fakesquashfs
 	mkdir $@.fakefs
diff --git a/target/linux/ath79/image/Makefile b/target/linux/ath79/image/Makefile
index 8328be7667..02fd26bfd8 100644
--- a/target/linux/ath79/image/Makefile
+++ b/target/linux/ath79/image/Makefile
@@ -60,6 +60,9 @@ define Build/relocate-kernel
 	rm -rf $@.relocate
 endef
 
+define Build/append-squashfs-fakeroot-be
+	cat ./empty-squashfs-lzma >> $@
+endef
 
 define Device/Default
   DEVICE_DTS_DIR := ../dts
diff --git a/target/linux/ath79/image/empty-squashfs-lzma b/target/linux/ath79/image/empty-squashfs-lzma
new file mode 100755
index 0000000000..803a7661a7
Binary files /dev/null and b/target/linux/ath79/image/empty-squashfs-lzma differ




More information about the lede-commits mailing list