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

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

Issue 6279010: kernel: remove chromeos-base/kernel (Closed) Base URL: http://git.chromium.org/git/chromiumos-overlay.git@master
Patch Set: profile Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « chromeos-base/kernel/kernel-0.0.1-r204.ebuild ('k') | chromeos/scripts/build_packages » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=2
5
6 inherit toolchain-funcs
7
8 DESCRIPTION="Chrome OS Kernel"
9 HOMEPAGE="http://src.chromium.org"
10 LICENSE="GPL-2"
11 SLOT="0"
12 KEYWORDS="~x86 ~arm"
13 IUSE="-compat_wireless -initramfs"
14 PROVIDE="virtual/kernel"
15
16 DEPEND="sys-apps/debianutils
17 initramfs? ( chromeos-base/chromeos-initramfs )"
18 RDEPEND=""
19
20 vmlinux_text_base=${CHROMEOS_U_BOOT_VMLINUX_TEXT_BASE:-0x20008000}
21
22 # Use a single or split kernel config as specified in the board or variant
23 # make.conf overlay. Default to the arch specific split config if an
24 # overlay or variant does not set either CHROMEOS_KERNEL_CONFIG or
25 # CHROMEOS_KERNEL_SPLITCONFIG. CHROMEOS_KERNEL_CONFIG is set relative
26 # to the root of the kernel source tree.
27
28 if [ -n "${CHROMEOS_KERNEL_CONFIG}" ]; then
29 config="${S}/${CHROMEOS_KERNEL_CONFIG}"
30 else
31 if [ "${ARCH}" = "x86" ]; then
32 config=${CHROMEOS_KERNEL_SPLITCONFIG:-"chromeos-intel-menlow"}
33 fi
34 fi
35
36 # TODO(jglasgow) Need to fix DEPS file to get rid of "files"
37 CROS_WORKON_LOCALNAME="../third_party/kernel/files"
38
39 # This must be inherited *after* EGIT/CROS_WORKON variables defined
40 inherit cros-workon
41
42 # Allow override of kernel arch.
43 kernel_arch=${CHROMEOS_KERNEL_ARCH:-"$(tc-arch-kernel)"}
44
45 cross=${CHOST}-
46 # Hack for using 64-bit kernel with 32-bit user-space
47 if [ "${ARCH}" = "x86" -a "${kernel_arch}" = "x86_64" ]; then
48 cross=${CBUILD}-
49 fi
50
51 src_configure() {
52 elog "Using kernel config: ${config}"
53
54 if [ -n "${CHROMEOS_KERNEL_CONFIG}" ]; then
55 cp -f "${config}" "${S}"/.config || die
56 else
57 chromeos/scripts/prepareconfig ${config} || die
58 fi
59
60 # Use default for any options not explitly set in splitconfig
61 yes "" | emake ARCH=${kernel_arch} oldconfig || die
62
63 if use compat_wireless; then
64 "${S}"/chromeos/scripts/compat_wireless_config "${S}"
65 fi
66 }
67
68 src_compile() {
69 if use initramfs; then
70 INITRAMFS="CONFIG_INITRAMFS_SOURCE=${ROOT}/usr/bin/initramfs.cpi o.gz"
71 # We want avoid copying modules into the initramfs so we need to enable
72 # the functionality required for the initramfs here.
73
74 # TPM support to ensure proper locking.
75 INITRAMFS="$INITRAMFS CONFIG_TCG_TPM=y CONFIG_TCG_TIS=y"
76
77 # VFAT FS support for EFI System Partition updates.
78 INITRAMFS="$INITRAMFS CONFIG_NLS_CODEPAGE_437=y"
79 INITRAMFS="$INITRAMFS CONFIG_NLS_ISO8859_1=y"
80 INITRAMFS="$INITRAMFS CONFIG_FAT_FS=y CONFIG_VFAT_FS=y"
81 else
82 INITRAMFS=""
83 fi
84 emake \
85 $INITRAMFS \
86 ARCH=${kernel_arch} \
87 CROSS_COMPILE="${cross}" || die
88
89 if use compat_wireless; then
90 # compat-wireless support must be done after
91 emake M=chromeos/compat-wireless \
92 $INITRAMFS \
93 ARCH=${kernel_arch} \
94 CROSS_COMPILE="${cross}" || die
95 fi
96 }
97
98 src_install() {
99 dodir boot
100
101 emake \
102 ARCH=${kernel_arch}\
103 CROSS_COMPILE="${cross}" \
104 INSTALL_PATH="${D}/boot" \
105 install || die
106
107 emake \
108 ARCH=${kernel_arch}\
109 CROSS_COMPILE="${cross}" \
110 INSTALL_MOD_PATH="${D}" \
111 modules_install || die
112
113 if use compat_wireless; then
114 # compat-wireless modules are built+installed separately
115 # NB: the updates dir is handled specially by depmod
116 emake M=chromeos/compat-wireless \
117 ARCH=${kernel_arch}\
118 CROSS_COMPILE="${cross}" \
119 INSTALL_MOD_DIR=updates \
120 INSTALL_MOD_PATH="${D}" \
121 modules_install || die
122 fi
123
124 emake \
125 ARCH=${kernel_arch}\
126 CROSS_COMPILE="${cross}" \
127 INSTALL_MOD_PATH="${D}" \
128 firmware_install || die
129
130 if [ "${ARCH}" = "arm" ]; then
131 version=$(ls "${D}"/lib/modules)
132
133 cp -a \
134 "${S}"/arch/"${ARCH}"/boot/zImage \
135 "${D}/boot/vmlinuz-${version}" || die
136
137 cp -a \
138 "${S}"/System.map \
139 "${D}/boot/System.map-${version}" || die
140
141 cp -a \
142 "${S}"/.config \
143 "${D}/boot/config-${version}" || die
144
145 ln -sf "vmlinuz-${version}" "${D}"/boot/vmlinuz || die
146 ln -sf "System.map-${version}" "${D}"/boot/System.map || die
147 ln -sf "config-${version}" "${D}"/boot/config || die
148
149 dodir /boot
150
151 /usr/bin/mkimage -A "${ARCH}" \
152 -O linux \
153 -T kernel \
154 -C none \
155 -a ${vmlinux_text_base} \
156 -e ${vmlinux_text_base} \
157 -n kernel \
158 -d "${D}"/boot/vmlinuz \
159 "${D}"/boot/vmlinux.uimg || die
160 fi
161 }
OLDNEW
« no previous file with comments | « chromeos-base/kernel/kernel-0.0.1-r204.ebuild ('k') | chromeos/scripts/build_packages » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698