diff options
author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2010-10-10 17:03:15 +0200 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2010-10-10 17:03:15 +0200 |
commit | 6c4d3a24bc15fda74036a2dc764c54eddedae55b (patch) | |
tree | 1a3f2690d89f845f48f3df4396354bd0f9a014cc /mk/rootfs.mk | |
parent | 2c1de03aa3c304c8d60fb47f6f8bea91a5e054b4 (diff) | |
download | embtoolkit-6c4d3a24bc15fda74036a2dc764c54eddedae55b.tar.gz embtoolkit-6c4d3a24bc15fda74036a2dc764c54eddedae55b.tar.bz2 embtoolkit-6c4d3a24bc15fda74036a2dc764c54eddedae55b.tar.xz |
Rootfs: improve strip of rootfs binaries
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'mk/rootfs.mk')
-rw-r--r-- | mk/rootfs.mk | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/mk/rootfs.mk b/mk/rootfs.mk index 02af159..6e8cfca 100644 --- a/mk/rootfs.mk +++ b/mk/rootfs.mk @@ -52,6 +52,22 @@ ifeq ($(CONFIG_EMBTK_ROOTFS_HAVE_SQUASHFS),y) include $(EMBTK_ROOT)/mk/squashfs.mk endif +#Files to strip if requested +ifeq ($(CONFIG_EMBTK_TARGET_STRIPPED),y) +ROOTFS_STRIPPED_FILES := `find $$ROOTFS/lib -type f -name *.so*` +ROOTFS_STRIPPED_FILES += `find $$ROOTFS/usr/lib -type f -name *.so*` +ROOTFS_STRIPPED_FILES += `find $$ROOTFS/usr/lib -type f -name *.so*` +ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y) +ROOTFS_STRIPPED_FILES += `find $$ROOTFS/lib32 -type f -name *.so*` +ROOTFS_STRIPPED_FILES += `find $$ROOTFS/usr/lib32 -type f -name *.so*` +endif +ROOTFS_STRIPPED_FILES += `find $$ROOTFS/bin -type f` +ROOTFS_STRIPPED_FILES += `find $$ROOTFS/sbin -type f` +ROOTFS_STRIPPED_FILES += `find $$ROOTFS/usr/bin -type f` +ROOTFS_STRIPPED_FILES += `find $$ROOTFS/usr/sbin -type f` +ROOTFS_STRIPPED_FILES += `find $$ROOTFS/usr/libexec -type f` +endif + rootfs_build: $(call EMBTK_GENERIC_MESSAGE,"Building selected root filesystems...") @$(MAKE) rootfs_clean mkinitialrootfs $(ROOTFS_HOSTTOOLS-y) \ @@ -94,25 +110,7 @@ endif ifeq ($(CONFIG_EMBTK_TARGET_STRIPPED),y) $(call EMBTK_GENERIC_MESSAGE,"Stripping binaries as specified...") @-$(FAKEROOT_BIN) -i $(EMBTK_ROOT)/.fakeroot.001 -- \ - $(TARGETSTRIP) `find $$ROOTFS/lib -type f -name *.so*` - @-$(FAKEROOT_BIN) -i $(EMBTK_ROOT)/.fakeroot.001 -- \ - $(TARGETSTRIP) `find $$ROOTFS/usr/lib -type f -name *.so*` -ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y) - @-$(FAKEROOT_BIN) -i $(EMBTK_ROOT)/.fakeroot.001 -- \ - $(TARGETSTRIP) `find $$ROOTFS/lib32 -type f -name *.so*` - @-$(FAKEROOT_BIN) -i $(EMBTK_ROOT)/.fakeroot.001 -- \ - $(TARGETSTRIP) `find $$ROOTFS/usr/lib32 -type f -name *.so*` -endif - @-$(FAKEROOT_BIN) -i $(EMBTK_ROOT)/.fakeroot.001 -- \ - $(TARGETSTRIP) `find $$ROOTFS/bin -type f` - @-$(FAKEROOT_BIN) -i $(EMBTK_ROOT)/.fakeroot.001 -- \ - $(TARGETSTRIP) `find $$ROOTFS/sbin -type f` - @-$(FAKEROOT_BIN) -i $(EMBTK_ROOT)/.fakeroot.001 -- \ - $(TARGETSTRIP) `find $$ROOTFS/usr/bin -type f` - @-$(FAKEROOT_BIN) -i $(EMBTK_ROOT)/.fakeroot.001 -- \ - $(TARGETSTRIP) `find $$ROOTFS/usr/sbin -type f` - @-$(FAKEROOT_BIN) -i $(EMBTK_ROOT)/.fakeroot.001 -- \ - $(TARGETSTRIP) `find $$ROOTFS/usr/libexec -type f` + $(TARGETSTRIP) $(ROOTFS_STRIPPED_FILES) endif @-$(FAKEROOT_BIN) -i $(EMBTK_ROOT)/.fakeroot.001 -- \ rm -rf `find $$ROOTFS -type f -name *.la` |