diff options
author | Brandon Bergren <git@bdragon.rtk0.net> | 2018-05-11 23:24:34 +0000 |
---|---|---|
committer | Raptor Engineering Development Team <support@raptorengineering.com> | 2019-04-24 04:17:47 +0000 |
commit | 90b10901244df06cc83ae9fadd38ade259f98c9f (patch) | |
tree | ef5193da9d46309c8a8e621eede7ef5d1acc758f | |
parent | 115680edd445d87c453b2d877e28f6f0e7e209ff (diff) | |
download | blackbird-op-build-90b10901244df06cc83ae9fadd38ade259f98c9f.tar.gz blackbird-op-build-90b10901244df06cc83ae9fadd38ade259f98c9f.zip |
Do some extra cleanup in the skiroot.
* Throw out elf libraries for nonbootable architectures
* Throw out the c++ standard library (it's needed during build time for other pieces of the stack, but not the skiroot.)
Signed-off-by: Brandon Bergren <git@bdragon.rtk0.net>
-rw-r--r-- | openpower/configs/talos_defconfig | 2 | ||||
-rwxr-xr-x | openpower/scripts/talos-extra-cleanup | 19 |
2 files changed, 20 insertions, 1 deletions
diff --git a/openpower/configs/talos_defconfig b/openpower/configs/talos_defconfig index f057ed0b..bd59be0f 100644 --- a/openpower/configs/talos_defconfig +++ b/openpower/configs/talos_defconfig @@ -11,7 +11,7 @@ BR2_ENABLE_LOCALE_WHITELIST="C de en es fr it ja ko pt_BR ru zh_CN zh_TW" BR2_GENERATE_LOCALE="en_US.UTF-8 de_DE.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 ko_KR.UTF-8 pt_BR.UTF-8 ru_RU.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8" BR2_SYSTEM_ENABLE_NLS=y BR2_ROOTFS_OVERLAY="../openpower/overlay" -BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist" +BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist ../openpower/scripts/talos-extra-cleanup" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_GIT=y BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://scm.raptorcs.com/scm/git/talos-op-linux" diff --git a/openpower/scripts/talos-extra-cleanup b/openpower/scripts/talos-extra-cleanup new file mode 100755 index 00000000..cd7246d8 --- /dev/null +++ b/openpower/scripts/talos-extra-cleanup @@ -0,0 +1,19 @@ +#!/bin/sh + +# Extra cleanup tasks to trim some extra fat from the target. + +# If $TARGET_DIR is not set, bail immediately. +if [ -z "$TARGET_DIR" ]; then + exit 1 +fi + +# libstdc++ is not used by any skiroot binaries. +rm $TARGET_DIR/usr/lib/libstdc++* + +# libelf is needed for kexec, but no point in keeping foreign platform support. +for n in aarch64 alpha arm i386 ia64 m68k s390 sh sparc tilegx x86_64 +do + rm $TARGET_DIR/usr/lib/elfutils/libebl_${n}*.so +done + +exit 0 |