mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-09 05:56:58 +02:00
build_image: use an array for excludes
This makes a follow up commit easier to document excludes. BUG=chromium-os:22939 TEST=build_image for daisy installs same set of files Change-Id: I09a9b3fe6f8c1d1fd9dd4d094f2fb7c81ce24880 Reviewed-on: https://gerrit.chromium.org/gerrit/37377 Reviewed-by: David James <davidjames@chromium.org> Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
parent
3e759d9e7d
commit
215f906123
@ -170,10 +170,16 @@ create_base_image() {
|
||||
"--board=${BOARD} to update the version of libc installed on that board."
|
||||
fi
|
||||
|
||||
# Strip out files we don't need in the final image at runtime.
|
||||
local libc_excludes=(
|
||||
# Compile-time headers.
|
||||
'usr/include' 'sys-include'
|
||||
# Link-time objects.
|
||||
'*.[ao]'
|
||||
)
|
||||
pbzip2 -dc --ignore-trailing-garbage=1 "${LIBC_PATH}" | \
|
||||
sudo tar xpf - -C "${root_fs_dir}" ./usr/${CHOST} \
|
||||
--strip-components=3 --exclude=usr/include --exclude=sys-include \
|
||||
--exclude=*.a --exclude=*.o
|
||||
--strip-components=3 "${libc_excludes[@]/#/--exclude=}"
|
||||
|
||||
board_ctarget=$(get_ctarget_from_board "${BOARD}")
|
||||
for atom in $(portageq match / cross-$board_ctarget/gcc); do
|
||||
|
Loading…
Reference in New Issue
Block a user