mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 19:56:32 +02:00
setup_board: fix building binpkgs for toolchain dependencies
install_cross_libs installs TOOLCHAIN_PKGS deps into /usr/$BOARD_CHOST, so that TOOLCHAIN_PKGS binpkgs can be built. We also need binpkgs for the TOOLCHAIN_PKGS deps so that we can install them into /build/$BOARD later together with TOOLCHAIN_PKGS. This is where the flow is currently broken. Due to a change in semantics, --emptyroot tries to rebuild host packages as well, and dropping it leaves --onlydeps which results in no binpkgs being built because they are already installed. We can solve resolve this by reusing the dependency list generated by install_cross_libs, and explicitly building those binpkgs. It is worth remarking that this flow of building the toolchain binpkgs through setup_board is not in use in Flatcar, because we normally build toolchains with catalyst. We are interested in reviving it because we want to build everything with SLSA provenance information.
This commit is contained in:
parent
5b8bcee9e0
commit
84b0ddf67d
@ -319,9 +319,9 @@ if [[ ${FLAGS_regen_configs} -eq ${FLAGS_FALSE} ]]; then
|
||||
install_cross_libs "${BOARD_CHOST}" ${EMERGE_FLAGS} --buildpkg=n
|
||||
|
||||
info "Building toolchain dependencies"
|
||||
"${EMERGE_WRAPPER}" --buildpkg --buildpkgonly --onlydeps -e \
|
||||
"${EMERGE_WRAPPER}" --buildpkg --buildpkgonly \
|
||||
--root="/usr/${BOARD_CHOST}" --sysroot="/usr/${BOARD_CHOST}" \
|
||||
${EMERGE_TOOLCHAIN_FLAGS} "${TOOLCHAIN_PKGS[@]}"
|
||||
${EMERGE_TOOLCHAIN_FLAGS} $(< "/usr/${BOARD_CHOST}/etc/portage/cross-${BOARD_CHOST}-depends")
|
||||
info "Building toolchain"
|
||||
"${EMERGE_WRAPPER}" --buildpkg --buildpkgonly \
|
||||
--root="/usr/${BOARD_CHOST}" --sysroot="/usr/${BOARD_CHOST}" \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user