summaryrefslogtreecommitdiffstats
path: root/meta-oe/classes/kernel.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/classes/kernel.bbclass')
-rw-r--r--meta-oe/classes/kernel.bbclass27
1 files changed, 12 insertions, 15 deletions
diff --git a/meta-oe/classes/kernel.bbclass b/meta-oe/classes/kernel.bbclass
index 6f1b6a4d2..d7e42f615 100644
--- a/meta-oe/classes/kernel.bbclass
+++ b/meta-oe/classes/kernel.bbclass
@@ -82,6 +82,10 @@ EXTRA_OEMAKE = ""
82 82
83KERNEL_ALT_IMAGETYPE ??= "" 83KERNEL_ALT_IMAGETYPE ??= ""
84 84
85# Define where the kernel headers are installed on the target as well as where
86# they are staged.
87KERNEL_SRC_PATH = "/usr/src/kernel"
88
85KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] == ".gz" else s)(d.getVar('KERNEL_IMAGETYPE', True))}" 89KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] == ".gz" else s)(d.getVar('KERNEL_IMAGETYPE', True))}"
86 90
87kernel_do_compile() { 91kernel_do_compile() {
@@ -135,7 +139,7 @@ kernel_do_install() {
135 # Support for external module building - create a minimal copy of the 139 # Support for external module building - create a minimal copy of the
136 # kernel source tree. 140 # kernel source tree.
137 # 141 #
138 kerneldir=${D}/kernel 142 kerneldir=${D}${KERNEL_SRC_PATH}
139 install -d $kerneldir 143 install -d $kerneldir
140 144
141 # 145 #
@@ -188,23 +192,18 @@ kernel_do_install() {
188 cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o 192 cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
189 fi 193 fi
190 194
191 # Remove the following binaries which cause strip errors 195 # Remove the following binaries which cause strip or arch QA errors
192 # during do_package for cross-compiled platforms 196 # during do_package for cross-compiled platforms
193 bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff \ 197 bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff \
194 arch/powerpc/boot/mktree" 198 arch/powerpc/boot/mktree scripts/kconfig/zconf.tab.o \
199 scripts/kconfig/conf.o"
195 for entry in $bin_files; do 200 for entry in $bin_files; do
196 rm -f $kerneldir/$entry 201 rm -f $kerneldir/$entry
197 done 202 done
198} 203}
199 204
200PACKAGE_PREPROCESS_FUNCS += "kernel_package_preprocess"
201
202kernel_package_preprocess () {
203 rm -rf ${PKGD}/kernel
204}
205
206sysroot_stage_all_append() { 205sysroot_stage_all_append() {
207 sysroot_stage_dir ${D}/kernel ${SYSROOT_DESTDIR}/kernel 206 sysroot_stage_dir ${D}${KERNEL_SRC_PATH} ${SYSROOT_DESTDIR}${KERNEL_SRC_PATH}
208} 207}
209 208
210kernel_do_configure() { 209kernel_do_configure() {
@@ -252,13 +251,11 @@ EXPORT_FUNCTIONS do_compile do_install do_configure
252 251
253# kernel-base becomes kernel-${KERNEL_VERSION} 252# kernel-base becomes kernel-${KERNEL_VERSION}
254# kernel-image becomes kernel-image-${KERNEL_VERISON} 253# kernel-image becomes kernel-image-${KERNEL_VERISON}
255PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev kernel-misc" 254PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev"
256FILES = "" 255FILES = ""
257FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*" 256FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*"
258FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config*" 257FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH}"
259FILES_kernel-vmlinux = "/boot/vmlinux*" 258FILES_kernel-vmlinux = "/boot/vmlinux*"
260# misc is a package to contain files we need in staging
261FILES_kernel-misc = "/kernel/include/config /kernel/scripts /kernel/drivers/crypto /kernel/drivers/media"
262RDEPENDS_kernel = "kernel-base" 259RDEPENDS_kernel = "kernel-base"
263# Allow machines to override this dependency if kernel image files are 260# Allow machines to override this dependency if kernel image files are
264# not wanted in images as standard 261# not wanted in images as standard
@@ -475,7 +472,7 @@ python populate_packages_prepend () {
475 metapkg = "kernel-modules" 472 metapkg = "kernel-modules"
476 d.setVar('ALLOW_EMPTY_' + metapkg, "1") 473 d.setVar('ALLOW_EMPTY_' + metapkg, "1")
477 d.setVar('FILES_' + metapkg, "") 474 d.setVar('FILES_' + metapkg, "")
478 blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base', 'kernel-vmlinux', 'kernel-misc' ] 475 blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base', 'kernel-vmlinux' ]
479 for l in module_deps.values(): 476 for l in module_deps.values():
480 for i in l: 477 for i in l:
481 pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1)) 478 pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1))