]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/commitdiff
linux-firmware: Hardlink any identical firmware files
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 29 Mar 2022 09:48:56 +0000 (09:48 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 30 Mar 2022 13:58:53 +0000 (13:58 +0000)
Some files are identical which is why we don't need to ship them mutiple
times. This will save about 13 MiB of disk space and presumably the same
on the compressed distro image.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/linux-firmware

index b6268a318ba8988598ad6172de1ee8838d5004f1..244274126e1c4a3838740dc1c9c70f00f85a42ae 100644 (file)
@@ -78,5 +78,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
                mv "$${file}" "$${file// /_}" || exit 1; \
        done < <(find /lib/firmware -name "* *")
 
+       # Hardlink any identical files
+       hardlink -c -vv /lib/firmware
+
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)