Make 'make fill-kfs' more minimalist
authorAndrew Waterman <waterman@cs.berkeley.edu>
Wed, 27 Mar 2013 23:43:07 +0000 (16:43 -0700)
committerAndrew Waterman <waterman@cs.berkeley.edu>
Wed, 27 Mar 2013 23:43:07 +0000 (16:43 -0700)
GNUmakefile

index 0c67d05..8cabb7b 100644 (file)
@@ -186,8 +186,10 @@ install-libs:
        done
 
 fill-kfs: install-libs
-       @rm -rf $(FIRST_INITRAMFS_PATH)/lib
-       @cp -R $(GCC_ROOT)/$(TARGET_ARCH)-ros/lib $(FIRST_INITRAMFS_PATH)
+       @mkdir -p $(FIRST_INITRAMFS_PATH)/lib
+       @cp $(addprefix $(GCC_ROOT)/$(TARGET_ARCH)-ros/lib/, \
+         libc.so.6 ld.so.1 libm.so libgcc_s.so.1) $(FIRST_INITRAMFS_PATH)/lib
+       @$(STRIP) --strip-unneeded $(FIRST_INITRAMFS_PATH)/lib/libc.so.6
 endif
 
 userclean: