mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-25 07:31:01 +02:00
setup_board: Drop needless SYSROOT when installing binpkgs
For the less common case where binpkgs are not used, restructure this so that it builds binpkgs in /usr/${CHOST} without installing them, use those binpkgs to initialize /build/${BOARD}.
This commit is contained in:
parent
8556474e6a
commit
ce2e7e8a17
23
setup_board
23
setup_board
@ -305,19 +305,28 @@ if [[ ${FLAGS_regen_configs} -eq ${FLAGS_FALSE} ]]; then
|
|||||||
EMERGE_FLAGS+=" --usepkg"
|
EMERGE_FLAGS+=" --usepkg"
|
||||||
fi
|
fi
|
||||||
EMERGE_FLAGS+=" --getbinpkg"
|
EMERGE_FLAGS+=" --getbinpkg"
|
||||||
EMERGE_TOOLCHAIN_FLAGS+=" --usepkgonly --getbinpkg --rebuilt-binaries n"
|
|
||||||
else
|
|
||||||
# When binary packages are disabled we need to make sure the cross
|
|
||||||
# sysroot includes any build dependencies for the toolchain.
|
|
||||||
info "Installing toolchain build dependencies"
|
|
||||||
install_cross_libs "${BOARD_CHOST}" ${EMERGE_FLAGS} --buildpkg=n
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
info "Installing baselayout"
|
info "Installing baselayout"
|
||||||
"${EMERGE_WRAPPER}" ${EMERGE_FLAGS} --nodeps sys-apps/baselayout
|
"${EMERGE_WRAPPER}" ${EMERGE_FLAGS} --nodeps sys-apps/baselayout
|
||||||
|
|
||||||
|
if [[ "${FLAGS_usepkg}" -ne "${FLAGS_TRUE}" ||
|
||||||
|
"${FLAGS_getbinpkg}" -ne "${FLAGS_TRUE}" ]]
|
||||||
|
then
|
||||||
|
# When binary packages are disabled we need to make sure the cross
|
||||||
|
# sysroot includes any build dependencies for the toolchain.
|
||||||
|
info "Installing toolchain build dependencies"
|
||||||
|
install_cross_libs "${BOARD_CHOST}" ${EMERGE_FLAGS} --buildpkg=n
|
||||||
|
|
||||||
|
info "Building toolchain"
|
||||||
|
"${EMERGE_WRAPPER}" --buildpkg --buildpkgonly \
|
||||||
|
--root="/usr/${BOARD_CHOST}" --sysroot="/usr/${BOARD_CHOST}" \
|
||||||
|
${EMERGE_TOOLCHAIN_FLAGS} "${TOOLCHAIN_PKGS[@]}"
|
||||||
|
fi
|
||||||
|
|
||||||
info "Installing toolchain"
|
info "Installing toolchain"
|
||||||
SYSROOT="/usr/${BOARD_CHOST}" "${EMERGE_WRAPPER}" \
|
"${EMERGE_WRAPPER}" \
|
||||||
|
--usepkgonly --getbinpkg --rebuilt-binaries n \
|
||||||
${EMERGE_TOOLCHAIN_FLAGS} "${TOOLCHAIN_PKGS[@]}"
|
${EMERGE_TOOLCHAIN_FLAGS} "${TOOLCHAIN_PKGS[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user