ath79: add empty squashfs-lzma filesystem emptysquashfslzma
authorPaul Spooren <mail@aparcar.org>
Sun, 5 Feb 2023 18:38:09 +0000 (19:38 +0100)
committerPaul Spooren <mail@aparcar.org>
Mon, 6 Feb 2023 21:04:57 +0000 (22:04 +0100)
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@aparcar.org>
include/image-commands.mk
target/linux/ath79/image/Makefile
target/linux/ath79/image/empty-squashfs-lzma [new file with mode: 0755]

index 70055cc576485f706636bedb2c2601631927801c..5a2bf4a2c26e6ff69a6e2efe7096ff2287cb6927 100644 (file)
@@ -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/mksquashfs-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
index 8328be7667cf8dd675fc5b4571e1a7a61405c378..ef66363819b7268c3848b5f74273b24e26162be2 100644 (file)
@@ -60,6 +60,10 @@ 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 (executable)
index 0000000..803a766
Binary files /dev/null and b/target/linux/ath79/image/empty-squashfs-lzma differ