[5/5] linux-firmware: Hardlink any identical firmware files

Message ID 20220329094856.482837-5-michael.tremer@ipfire.org
State Accepted
Commit beffabaca363582d5c310aecfd5bda099e85b0d2
Headers
Series [1/5] linux-firmware: Don't ship Marvell Prestera Firmware |

Commit Message

Michael Tremer March 29, 2022, 9:48 a.m. UTC
  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 | 3 +++
 1 file changed, 3 insertions(+)
  

Patch

diff --git a/lfs/linux-firmware b/lfs/linux-firmware
index b6268a318..244274126 100644
--- a/lfs/linux-firmware
+++ b/lfs/linux-firmware
@@ -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)