mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 13:06:59 +02:00
setup_board: move arm64 grub recompile to update_chroot
This commit is contained in:
parent
89e31f1e57
commit
7979650cde
21
setup_board
21
setup_board
@ -177,18 +177,6 @@ if [ "${FLAGS_skip_chroot_upgrade}" -eq "${FLAGS_FALSE}" ] ; then
|
||||
"${SRC_ROOT}/scripts"/update_chroot ${UPDATE_ARGS}
|
||||
fi
|
||||
|
||||
case "$BOARD" in
|
||||
*-host)
|
||||
die_notrace "host boards not supported by setup_board"
|
||||
;;
|
||||
arm64-usr)
|
||||
# Set grub use flags to build arm64.
|
||||
[[ ! -d /etc/portage/package.use ]] && sudo mkdir /etc/portage/package.use
|
||||
sudo_clobber "/etc/portage/package.use/grub" <<EOF
|
||||
sys-boot/grub grub_platforms_arm64
|
||||
EOF
|
||||
;;
|
||||
esac
|
||||
# Locations we will need
|
||||
COREOS_OVERLAY="${REPO_ROOT}/src/third_party/coreos-overlay"
|
||||
COREOS_CONFIG="${COREOS_OVERLAY}/coreos/config"
|
||||
@ -326,6 +314,9 @@ if [[ ${FLAGS_regen_configs} -eq ${FLAGS_FALSE} ]]; then
|
||||
${EMERGE_TOOLCHAIN_FLAGS} "${TOOLCHAIN_PKGS[@]}"
|
||||
fi
|
||||
|
||||
# Setup BOARD_ROOT for QEMU user emulation.
|
||||
setup_qemu_static "${BOARD_ROOT}"
|
||||
|
||||
if [ $FLAGS_default -eq $FLAGS_TRUE ] ; then
|
||||
echo $BOARD_VARIANT > "$GCLIENT_ROOT/src/scripts/.default_board"
|
||||
fi
|
||||
@ -342,9 +333,3 @@ if [ -n "${WORKING_ON}" ]; then
|
||||
info "Currently working on the following ebuilds for this board:"
|
||||
info "${WORKING_ON}"
|
||||
fi
|
||||
|
||||
# Setup BOARD_ROOT for QEMU user emulation.
|
||||
setup_qemu_static "${BOARD_ROOT}"
|
||||
|
||||
# Build grub platform modules if needed.
|
||||
sudo -E emerge --changed-use sys-boot/grub
|
||||
|
@ -222,6 +222,17 @@ if [[ "${FLAGS_skip_toolchain_update}" -eq "${FLAGS_FALSE}" && \
|
||||
for cross_chost in "${CROSS_CHOSTS[@]}"; do
|
||||
info "Updating cross ${cross_chost} toolchain"
|
||||
install_cross_toolchain "${cross_chost}" --quiet ${EMERGE_FLAGS}
|
||||
|
||||
# Set grub for arm64, not enabled by default since it requires the above
|
||||
# cross toolchain which isn't in the SDK by default.
|
||||
if [[ "${cross_chost}" == aarch64-* ]]; then
|
||||
if [[ ! -d /etc/portage/package.use ]]; then
|
||||
sudo mkdir /etc/portage/package.use
|
||||
fi
|
||||
sudo_clobber "/etc/portage/package.use/grub" \
|
||||
<<<"sys-boot/grub grub_platforms_arm64"
|
||||
sudo -E emerge --changed-use sys-boot/grub
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user