mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-22 06:01:41 +02:00
migrate to linux-headers
Rather than having a toolchain package we use for the cross-compilers and installing a different one for the target build dir, use the same package. This makes updating more logical as we only have to do it in one place. BUG=chromium-os:24928 TEST=`cbuildbot amd64-generic-full` works TEST=`cbuildbot arm-generic-full` works TEST=`cbuildbot x86-generic-full` works TEST=build_packages+build_image for x86-alex boots & works Change-Id: Ib083c3d2eae75d6f5437203990599cdc837dd9dc Reviewed-on: https://gerrit.chromium.org/gerrit/24722 Reviewed-by: Anush Elangovan <anush@google.com> Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
parent
ea82dfb4dc
commit
9377f67b55
38
chroot_version_hooks.d/40_kernel_headers
Normal file
38
chroot_version_hooks.d/40_kernel_headers
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
||||||
|
# Use of this source code is governed by a BSD-style license that can be
|
||||||
|
# found in the LICENSE file.
|
||||||
|
|
||||||
|
# Move from chromeos-base/kernel-headers to sys-kernel/linux-headers.
|
||||||
|
|
||||||
|
opkg="chromeos-base/kernel-headers"
|
||||||
|
npkg="sys-kernel/linux-headers"
|
||||||
|
|
||||||
|
export CLEAN_DELAY=0
|
||||||
|
|
||||||
|
update() {
|
||||||
|
local root=$1 board=$2 emerge
|
||||||
|
|
||||||
|
if [[ -z ${board} ]]; then
|
||||||
|
board="root"
|
||||||
|
emerge="sudo -E emerge"
|
||||||
|
else
|
||||||
|
emerge="emerge-${board}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if portageq has_version ${root} ${opkg}; then
|
||||||
|
info "Migrating ${board} from ${opkg} to ${npkg}"
|
||||||
|
${emerge} -Cq ${opkg}
|
||||||
|
fi
|
||||||
|
if ! portageq has_version ${root} ${npkg}; then
|
||||||
|
${emerge} -1gq ${npkg}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
update / &
|
||||||
|
|
||||||
|
for board_root in /build/*; do
|
||||||
|
board=${board_root##*/}
|
||||||
|
update ${board_root} ${board} &
|
||||||
|
done
|
||||||
|
|
||||||
|
wait
|
@ -582,17 +582,16 @@ else
|
|||||||
# config to make.conf.board.
|
# config to make.conf.board.
|
||||||
print_board_binhost_config | sudo_append $BOARD_ETC/make.conf.board
|
print_board_binhost_config | sudo_append $BOARD_ETC/make.conf.board
|
||||||
|
|
||||||
#
|
# Emerge the kernel headers into the board build root. Use rdeps to
|
||||||
# Emerge the kernel headers into the board build root.
|
# avoid pulling any spurious DEPEND things in that we don't care about.
|
||||||
#
|
KERNEL_EMERGE_FLAGS="--select --quiet --root-deps=rdeps"
|
||||||
KERNEL_EMERGE_FLAGS="--select --quiet"
|
|
||||||
if [[ "${FLAGS_usepkg}" -eq "${FLAGS_TRUE}" ||
|
if [[ "${FLAGS_usepkg}" -eq "${FLAGS_TRUE}" ||
|
||||||
"${FLAGS_reuse_pkgs_from_local_boards}" -eq "${FLAGS_TRUE}" ]]; then
|
"${FLAGS_reuse_pkgs_from_local_boards}" -eq "${FLAGS_TRUE}" ]]; then
|
||||||
KERNEL_EMERGE_FLAGS+=" --getbinpkg --usepkg"
|
KERNEL_EMERGE_FLAGS+=" --getbinpkg --usepkg"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo -E "${EMERGE_WRAPPER}" ${KERNEL_EMERGE_FLAGS} \
|
sudo -E "${EMERGE_WRAPPER}" ${KERNEL_EMERGE_FLAGS} \
|
||||||
chromeos-base/kernel-headers
|
sys-kernel/linux-headers
|
||||||
|
|
||||||
unset KERNEL_EMERGE_FLAGS
|
unset KERNEL_EMERGE_FLAGS
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user