build_library: install libc from sysroot toolchain cache first
When building images with Bazel, cross-${abi}/glibc (and any secondary
ABIs) are built and staged into the board sysroot under
${BOARD_ROOT}/var/cache/toolchain-pkgs/cross-${abi}/ by sysroot_create.
Previously, install_libc_for_abi hardcoded PKGDIR=/var/lib/portage/pkgs,
which caused image assembly to install the host SDK's glibc binpkg
rather than the version built for the board by Bazel.
Check the sysroot toolchain package cache first, using the staged
manifest.json, before falling back to PKGDIR.
BUG=b:491765858
TEST=Tested install_libc_for_abi extracted glibc-2.43 into rootfs
TAG=agy
CONV=ab6295d5-8c73-4497-92dd-9198e2c89a8d
Change-Id: I224c3d319dc613ce40a4fb41f6412c9a55f326ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosutils/+/8355714
Reviewed-by: George Burgess <gbiv@chromium.org>
Auto-Submit: Raul Rangel <rrangel@chromium.org>
Tested-by: Raul Rangel <rrangel@chromium.org>
Commit-Queue: Raul Rangel <rrangel@chromium.org>
src/scripts directoryThis repository contains build tools and scripts written in shell (e.g., Bash). Historically, much of our build process was written in shell in this directory, however, we're currently in the process of migrating many scripts to Python in Chromite.
In general, we're not currently accepting new scripts in this directory.
If you want to host a script for yourself/local team, feel free to use the src/platform/dev/contrib/ directory instead.