Revision: 6178 http://ipcop.svn.sourceforge.net/ipcop/?rev=6178&view=rev Author: gespinasse Date: 2011-12-24 08:23:34 +0000 (Sat, 24 Dec 2011) Log Message: ----------- initramfs/lib/udev was not stripped, fix that Use xargs strip instead of -exec strip as this is faster, even gain is small here than in cdrom
Hide 'File format not recognized' when trying to strip non elf files On mklibs, use -D options to omit default library path Add same directories as default but without ending/ (/lib:/usr/lib) to -L has the nice effect of removing double / on mklibs logs Modified Paths: -------------- ipcop/trunk/lfs/initramfs Modified: ipcop/trunk/lfs/initramfs =================================================================== --- ipcop/trunk/lfs/initramfs 2011-12-24 05:56:20 UTC (rev 6177) +++ ipcop/trunk/lfs/initramfs 2011-12-24 08:23:34 UTC (rev 6178) @@ -280,15 +280,16 @@ # cp /sbin/badblocks $(INITRAMFS_DIR)/bin # cp /usr/sbin/smartctl $(INITRAMFS_DIR)/usr/bin - # Strip the installer binaries - find $(INITRAMFS_DIR)/{bin,sbin} $(INITRAMFS_DIR)/usr/{bin,sbin} -maxdepth 1 -type f \ - -exec /$(TOOLS_DIR)/bin/strip --strip-all '{}' ';' + # Strip the installer binaries, ignore xargs strip error on non elf code, and filter non-elf code message + -cd $(INITRAMFS_DIR) && find {bin,sbin} usr/{bin,sbin} lib/udev -type f | \ + xargs /$(TOOLS_DIR)/bin/strip --strip-all 2>&1 | grep -v 'File format not recognized' # Install a shrinked glibc and other libs required by the programs we put on bin and usr/bin. # mklibs does both the shrinking and the stripping, so we don't have to strip libs separately # NOTE: "E: Dynamic linker not found, aborting." means the binary is not dynamically linked. Safe to ignore. # replace -v by -v -v -v for more details - /usr/bin/mklibs -v -L /usr/lib/libc_pic \ + # Use -D to omit default lib path and add /lib/:usr/lib (without ending /) to -L. This remove double / in mklibs log + /usr/bin/mklibs -v -D -L /lib:/usr/lib:/usr/lib/libc_pic \ -d $(INITRAMFS_DIR)/lib \ $(INITRAMFS_DIR)/bin/* \ $(INITRAMFS_DIR)/sbin/* \ @@ -352,7 +353,7 @@ cp -af $(INITRAMFS_DIR)/lib/udev /usr/lib/mkinitramfs/lib/ # Now shrink glibc for the initramfs - /usr/bin/mklibs -v -L /usr/lib/libc_pic \ + /usr/bin/mklibs -v -D -L /lib:/usr/lib:/usr/lib/libc_pic \ -d /usr/lib/mkinitramfs/lib \ /usr/lib/mkinitramfs/bin/* \ /usr/lib/mkinitramfs/sbin/* \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ Ipcop-svn mailing list Ipcop-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipcop-svn