mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 04:06:33 +02:00
fix(build_image): Fix baselayout install in final images.
The basic system directory structure including the lib symlinks were fixed for sysroot in the following commits but the image build uses an entirely different bit of code to do the exact same set of hacks. Port those changes to the image building code to hopefully make all happy. 2ae0c30f4ec3eb57581494151e4fe7a035af342f ac931bd088781b226a16f1fffc768edaf0f1ab94
This commit is contained in:
parent
fcb2a614b6
commit
9ed620c277
@ -163,6 +163,11 @@ create_base_image() {
|
||||
sudo mkdir -p "${root_fs_dir}/usr/share/oem"
|
||||
sudo mount --bind "${oem_fs_dir}" "${root_fs_dir}/usr/share/oem"
|
||||
|
||||
# First thing first, install baselayout with USE=build to create a
|
||||
# working directory tree. Don't use binpkgs due to the use flag change.
|
||||
sudo -E USE=build ${EMERGE_BOARD_CMD} --root="${root_fs_dir}" \
|
||||
--usepkg=n --buildpkg=n --oneshot --quiet --nodeps sys-apps/baselayout
|
||||
|
||||
# We need to install libc manually from the cross toolchain.
|
||||
# TODO: Improve this? It would be ideal to use emerge to do this.
|
||||
PKGDIR="/var/lib/portage/pkgs"
|
||||
@ -181,6 +186,8 @@ create_base_image() {
|
||||
'usr/include' 'sys-include'
|
||||
# Link-time objects.
|
||||
'*.[ao]'
|
||||
# Empty lib dirs, replaced by symlinks
|
||||
'lib'
|
||||
)
|
||||
pbzip2 -dc --ignore-trailing-garbage=1 "${LIBC_PATH}" | \
|
||||
sudo tar xpf - -C "${root_fs_dir}" ./usr/${CHOST} \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user