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:
Mike Frysinger 2012-05-30 14:36:01 -04:00 committed by Gerrit
parent ea82dfb4dc
commit 9377f67b55
2 changed files with 42 additions and 5 deletions

View 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

View File

@ -582,17 +582,16 @@ else
# config to make.conf.board.
print_board_binhost_config | sudo_append $BOARD_ETC/make.conf.board
#
# Emerge the kernel headers into the board build root.
#
KERNEL_EMERGE_FLAGS="--select --quiet"
# Emerge the kernel headers into the board build root. Use rdeps to
# avoid pulling any spurious DEPEND things in that we don't care about.
KERNEL_EMERGE_FLAGS="--select --quiet --root-deps=rdeps"
if [[ "${FLAGS_usepkg}" -eq "${FLAGS_TRUE}" ||
"${FLAGS_reuse_pkgs_from_local_boards}" -eq "${FLAGS_TRUE}" ]]; then
KERNEL_EMERGE_FLAGS+=" --getbinpkg --usepkg"
fi
sudo -E "${EMERGE_WRAPPER}" ${KERNEL_EMERGE_FLAGS} \
chromeos-base/kernel-headers
sys-kernel/linux-headers
unset KERNEL_EMERGE_FLAGS
fi