summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/kernel.bbclass27
-rw-r--r--meta/conf/bitbake.conf2
-rw-r--r--meta/recipes-kernel/linux/linux-yocto.inc2
3 files changed, 14 insertions, 17 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 31e633b812..44461bccbb 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -77,6 +77,10 @@ EXTRA_OEMAKE = ""
77 77
78KERNEL_ALT_IMAGETYPE ??= "" 78KERNEL_ALT_IMAGETYPE ??= ""
79 79
80# Define where the kernel headers are installed on the target as well as where
81# they are staged.
82KERNEL_SRC_PATH = "/usr/src/kernel"
83
80KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] == ".gz" else s)(d.getVar('KERNEL_IMAGETYPE', True))}" 84KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] == ".gz" else s)(d.getVar('KERNEL_IMAGETYPE', True))}"
81 85
82kernel_do_compile() { 86kernel_do_compile() {
@@ -130,7 +134,7 @@ kernel_do_install() {
130 # Support for external module building - create a minimal copy of the 134 # Support for external module building - create a minimal copy of the
131 # kernel source tree. 135 # kernel source tree.
132 # 136 #
133 kerneldir=${D}/kernel 137 kerneldir=${D}${KERNEL_SRC_PATH}
134 install -d $kerneldir 138 install -d $kerneldir
135 139
136 # 140 #
@@ -183,23 +187,18 @@ kernel_do_install() {
183 cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o 187 cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
184 fi 188 fi
185 189
186 # Remove the following binaries which cause strip errors 190 # Remove the following binaries which cause strip or arch QA errors
187 # during do_package for cross-compiled platforms 191 # during do_package for cross-compiled platforms
188 bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff \ 192 bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff \
189 arch/powerpc/boot/mktree" 193 arch/powerpc/boot/mktree scripts/kconfig/zconf.tab.o \
194 scripts/kconfig/conf.o"
190 for entry in $bin_files; do 195 for entry in $bin_files; do
191 rm -f $kerneldir/$entry 196 rm -f $kerneldir/$entry
192 done 197 done
193} 198}
194 199
195PACKAGE_PREPROCESS_FUNCS += "kernel_package_preprocess"
196
197kernel_package_preprocess () {
198 rm -rf ${PKGD}/kernel
199}
200
201sysroot_stage_all_append() { 200sysroot_stage_all_append() {
202 sysroot_stage_dir ${D}/kernel ${SYSROOT_DESTDIR}/kernel 201 sysroot_stage_dir ${D}${KERNEL_SRC_PATH} ${SYSROOT_DESTDIR}${KERNEL_SRC_PATH}
203} 202}
204 203
205kernel_do_configure() { 204kernel_do_configure() {
@@ -247,13 +246,11 @@ EXPORT_FUNCTIONS do_compile do_install do_configure
247 246
248# kernel-base becomes kernel-${KERNEL_VERSION} 247# kernel-base becomes kernel-${KERNEL_VERSION}
249# kernel-image becomes kernel-image-${KERNEL_VERISON} 248# kernel-image becomes kernel-image-${KERNEL_VERISON}
250PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev kernel-misc" 249PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev"
251FILES = "" 250FILES = ""
252FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*" 251FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*"
253FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config*" 252FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH}"
254FILES_kernel-vmlinux = "/boot/vmlinux*" 253FILES_kernel-vmlinux = "/boot/vmlinux*"
255# misc is a package to contain files we need in staging
256FILES_kernel-misc = "/kernel/include/config /kernel/scripts /kernel/drivers/crypto /kernel/drivers/media"
257RDEPENDS_kernel = "kernel-base" 254RDEPENDS_kernel = "kernel-base"
258# Allow machines to override this dependency if kernel image files are 255# Allow machines to override this dependency if kernel image files are
259# not wanted in images as standard 256# not wanted in images as standard
@@ -469,7 +466,7 @@ python populate_packages_prepend () {
469 metapkg = "kernel-modules" 466 metapkg = "kernel-modules"
470 d.setVar('ALLOW_EMPTY_' + metapkg, "1") 467 d.setVar('ALLOW_EMPTY_' + metapkg, "1")
471 d.setVar('FILES_' + metapkg, "") 468 d.setVar('FILES_' + metapkg, "")
472 blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base', 'kernel-vmlinux', 'kernel-misc' ] 469 blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base', 'kernel-vmlinux' ]
473 for l in module_deps.values(): 470 for l in module_deps.values():
474 for i in l: 471 for i in l:
475 pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1)) 472 pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1))
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 744f4dfda8..050be2e76c 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -380,7 +380,7 @@ SDKPATHNATIVE = "${SDKPATH}/sysroots/${SDK_SYS}"
380################################################################## 380##################################################################
381 381
382OLDEST_KERNEL = "2.6.16" 382OLDEST_KERNEL = "2.6.16"
383STAGING_KERNEL_DIR = "${STAGING_DIR_HOST}/kernel" 383STAGING_KERNEL_DIR = "${STAGING_DIR_HOST}/usr/src/kernel"
384 384
385################################################################## 385##################################################################
386# Specific image creation and rootfs population info. 386# Specific image creation and rootfs population info.
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc
index 9b46e74531..973970d62a 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -4,7 +4,7 @@ LICENSE = "GPLv2"
4 4
5LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" 5LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
6 6
7INC_PR = "r3" 7INC_PR = "r4"
8 8
9# A KMACHINE is the mapping of a yocto $MACHINE to what is built 9# A KMACHINE is the mapping of a yocto $MACHINE to what is built
10# by the kernel. This is typically the branch that should be built, 10# by the kernel. This is typically the branch that should be built,