Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: chromeos-base/kernel/kernel-0.0.1.ebuild

Issue 1325001: Add support for a single kernel config file (Closed)
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
2 # Distributed under the terms of the GNU General Public License v2 2 # Distributed under the terms of the GNU General Public License v2
3 3
4 EAPI=2 4 EAPI=2
5 5
6 inherit toolchain-funcs 6 inherit toolchain-funcs
7 7
8 DESCRIPTION="Chrome OS Kernel" 8 DESCRIPTION="Chrome OS Kernel"
9 HOMEPAGE="http://src.chromium.org" 9 HOMEPAGE="http://src.chromium.org"
10 LICENSE="GPL-2" 10 LICENSE="GPL-2"
11 SLOT="0" 11 SLOT="0"
12 KEYWORDS="x86 arm" 12 KEYWORDS="x86 arm"
13 IUSE="" 13 IUSE=""
14 14
15 DEPEND="sys-apps/debianutils" 15 DEPEND="sys-apps/debianutils"
16 RDEPEND="" 16 RDEPEND=""
17 17
18 kernel=${CHROMEOS_KERNEL:-"kernel/files"} 18 kernel=${CHROMEOS_KERNEL:-"kernel/files"}
19 files="${CHROMEOS_ROOT}/src/third_party/${kernel}" 19 files="${CHROMEOS_ROOT}/src/third_party/${kernel}"
20 20
21 if [ "${ARCH}" = "x86" ]; then 21 # Use a single or split kernel config as specified in the board or variant
22 config=${CHROMEOS_KERNEL_SPLITCONFIG:-"chromeos-intel-menlow"} 22 # make.conf overlay. Default to the arch specific split config if an
23 elif [ "${ARCH}" = "arm" ]; then 23 # overlay or variant does not set either CHROMEOS_KERNEL_CONFIG or
24 config=${CHROMEOS_KERNEL_SPLITCONFIG:-"qsd8650-st1"} 24 # CHROMEOS_KERNEL_SPLITCONFIG. CHROMEOS_KERNEL_CONFIG is set relative
25 # to the root of the kernel source tree.
26
27 if [ -n "${CHROMEOS_KERNEL_CONFIG}" ]; then
28 » config="${files}/${CHROMEOS_KERNEL_CONFIG}"
29 else
30 » if [ "${ARCH}" = "x86" ]; then
31 » » config=${CHROMEOS_KERNEL_SPLITCONFIG:-"chromeos-intel-menlow"}
32 » elif [ "${ARCH}" = "arm" ]; then
33 » » config=${CHROMEOS_KERNEL_SPLITCONFIG:-"qsd8650-st1"}
34 » fi
25 fi 35 fi
26 36
27 src_unpack() { 37 src_unpack() {
28 elog "Using kernel files: ${files}" 38 elog "Using kernel files: ${files}"
29 39
30 mkdir -p "${S}" 40 mkdir -p "${S}"
31 cp -ar "${files}"/* "${S}" || die 41 cp -ar "${files}"/* "${S}" || die
32 } 42 }
33 43
34 src_configure() { 44 src_configure() {
35 elog "Using kernel config: ${config}" 45 elog "Using kernel config: ${config}"
36 » chromeos/scripts/prepareconfig ${config} || die 46
47 » if [ -n "${CHROMEOS_KERNEL_CONFIG}" ]; then
48 » » cp -f "${config}" "${S}"/.config || die
49 » else
50 » » chromeos/scripts/prepareconfig ${config} || die
51 » fi
37 emake ARCH=$(tc-arch-kernel) oldconfig || die 52 emake ARCH=$(tc-arch-kernel) oldconfig || die
38 } 53 }
39 54
40 src_compile() { 55 src_compile() {
41 emake \ 56 emake \
42 ARCH=$(tc-arch-kernel) \ 57 ARCH=$(tc-arch-kernel) \
43 CROSS_COMPILE="${CHOST}-" || die 58 CROSS_COMPILE="${CHOST}-" || die
44 } 59 }
45 60
46 src_install() { 61 src_install() {
(...skipping 30 matching lines...) Expand all
77 92
78 cp -a \ 93 cp -a \
79 "${S}"/.config \ 94 "${S}"/.config \
80 "${D}/boot/config-${version}" || die 95 "${D}/boot/config-${version}" || die
81 96
82 ln -sf "vmlinuz-${version}" "${D}"/boot/vmlinuz || die 97 ln -sf "vmlinuz-${version}" "${D}"/boot/vmlinuz || die
83 ln -sf "System.map-${version}" "${D}"/boot/System.map || die 98 ln -sf "System.map-${version}" "${D}"/boot/System.map || die
84 ln -sf "config-${version}" "${D}"/boot/config || die 99 ln -sf "config-${version}" "${D}"/boot/config || die
85 fi 100 fi
86 } 101 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698