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

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

Powered by Google App Engine
This is Rietveld 408576698