From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: Bruce Ashfield <bruce.ashfield@windriver.com>,
Tom Zanussi <tom.zanussi@intel.com>,
Darren Hart <dvhart@linux.intel.com>
Subject: [meta-oe][PATCH 3/7] kernel: Add kernel headers to kernel-dev package
Date: Tue, 17 Jul 2012 14:37:56 +0200 [thread overview]
Message-ID: <1342528680-6336-3-git-send-email-Martin.Jansa@gmail.com> (raw)
In-Reply-To: <1342528680-6336-1-git-send-email-Martin.Jansa@gmail.com>
From: Darren Hart <dvhart@linux.intel.com>
[YOCTO #1614]
Add the kernel headers to the kernel-dev package. This packages what was
already built and kept in sysroots for building modules with bitbake.
Making this available on the target requires removing some additional
host binaries.
Move the location to /usr/src/kernel
Before use on the target, the user will need to:
# cd /usr/src/kernel
# make scripts
This renders the kernel-misc recipe empty, so remove it.
As we use /usr/src/kernel in several places (and I missed one in the
previous version), add a KERNEL_SRC_DIR variable and use that throughout
the class to avoid update errors in the future.
Now that we package the kernel headers, drop the
kernel_package_preprocess function which removed them from PKGD.
All *-sdk image recipes include dev-pkgs, so the kernel-dev package will
be installed by default on all such images.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Bruce Ashfield <bruce.ashfield@windriver.com>
CC: Tom Zanussi <tom.zanussi@intel.com>
CC: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
meta-oe/classes/kernel.bbclass | 27 ++++++++++++---------------
1 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/meta-oe/classes/kernel.bbclass b/meta-oe/classes/kernel.bbclass
index 722c928..4a6f660 100644
--- a/meta-oe/classes/kernel.bbclass
+++ b/meta-oe/classes/kernel.bbclass
@@ -82,6 +82,10 @@ EXTRA_OEMAKE = ""
KERNEL_ALT_IMAGETYPE ??= ""
+# Define where the kernel headers are installed on the target as well as where
+# they are staged.
+KERNEL_SRC_PATH = "/usr/src/kernel"
+
KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] == ".gz" else s)(d.getVar('KERNEL_IMAGETYPE', True))}"
kernel_do_compile() {
@@ -135,7 +139,7 @@ kernel_do_install() {
# Support for external module building - create a minimal copy of the
# kernel source tree.
#
- kerneldir=${D}/kernel
+ kerneldir=${D}${KERNEL_SRC_PATH}
install -d $kerneldir
#
@@ -188,23 +192,18 @@ kernel_do_install() {
cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
fi
- # Remove the following binaries which cause strip errors
+ # Remove the following binaries which cause strip or arch QA errors
# during do_package for cross-compiled platforms
bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff \
- arch/powerpc/boot/mktree"
+ arch/powerpc/boot/mktree scripts/kconfig/zconf.tab.o \
+ scripts/kconfig/conf.o"
for entry in $bin_files; do
rm -f $kerneldir/$entry
done
}
-PACKAGE_PREPROCESS_FUNCS += "kernel_package_preprocess"
-
-kernel_package_preprocess () {
- rm -rf ${PKGD}/kernel
-}
-
sysroot_stage_all_append() {
- sysroot_stage_dir ${D}/kernel ${SYSROOT_DESTDIR}/kernel
+ sysroot_stage_dir ${D}${KERNEL_SRC_PATH} ${SYSROOT_DESTDIR}${KERNEL_SRC_PATH}
}
kernel_do_configure() {
@@ -252,13 +251,11 @@ EXPORT_FUNCTIONS do_compile do_install do_configure
# kernel-base becomes kernel-${KERNEL_VERSION}
# kernel-image becomes kernel-image-${KERNEL_VERISON}
-PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev kernel-misc"
+PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev"
FILES = ""
FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*"
-FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config*"
+FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH}"
FILES_kernel-vmlinux = "/boot/vmlinux*"
-# misc is a package to contain files we need in staging
-FILES_kernel-misc = "/kernel/include/config /kernel/scripts /kernel/drivers/crypto /kernel/drivers/media"
RDEPENDS_kernel = "kernel-base"
# Allow machines to override this dependency if kernel image files are
# not wanted in images as standard
@@ -474,7 +471,7 @@ python populate_packages_prepend () {
metapkg = "kernel-modules"
d.setVar('ALLOW_EMPTY_' + metapkg, "1")
d.setVar('FILES_' + metapkg, "")
- blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base', 'kernel-vmlinux', 'kernel-misc' ]
+ blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base', 'kernel-vmlinux' ]
for l in module_deps.values():
for i in l:
pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1))
--
1.7.8.6
next prev parent reply other threads:[~2012-07-17 12:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-16 17:38 [RFC][meta-oe][PATCH 1/3] kernel.bbclass: Rename to machine_kernel_pr.bbclass which provides added functionality Khem Raj
2012-07-16 17:38 ` [RFC][meta-oe][PATCH 2/3] testlab.bbclass: Delete Khem Raj
2012-07-16 17:38 ` [RFC][meta-oe][PATCH 3/3] blacklist.bbclass: Move to meta-angstrom Khem Raj
2012-07-16 17:46 ` Martin Jansa
2012-07-16 17:50 ` Khem Raj
2012-07-16 17:58 ` Martin Jansa
2012-07-16 18:00 ` Khem Raj
2012-07-16 18:04 ` Martin Jansa
2012-07-18 11:25 ` Martin Jansa
2012-07-16 17:50 ` [RFC][meta-oe][PATCH 1/3] kernel.bbclass: Rename to machine_kernel_pr.bbclass which provides added functionality Martin Jansa
2012-07-16 17:55 ` Khem Raj
2012-07-17 12:39 ` Martin Jansa
2012-07-17 12:37 ` [meta-oe][PATCH 1/7] kernel: save $kerndir/tools and $kerndir/lib from pruning Martin Jansa
2012-07-17 12:37 ` [meta-oe][PATCH 2/7] recipes-kernel: make perf a standalone package Martin Jansa
2012-07-17 12:37 ` Martin Jansa [this message]
2012-07-17 12:37 ` [meta-oe][PATCH 4/7] kernel.bbclass: add non-santized kernel provides Martin Jansa
2012-07-17 12:37 ` [meta-oe][PATCH 5/7] kernel.bbclass: Dont package kxgettext.o Martin Jansa
2012-07-17 12:37 ` [meta-oe][PATCH 6/7] kernel.bbclass: add deploy link to KERNEL_IMAGETYPE Martin Jansa
2012-07-17 12:38 ` [meta-oe][PATCH 7/7] kernel.bbclass: replace os.system with subprocess.call Martin Jansa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1342528680-6336-3-git-send-email-Martin.Jansa@gmail.com \
--to=martin.jansa@gmail.com \
--cc=bruce.ashfield@windriver.com \
--cc=dvhart@linux.intel.com \
--cc=openembedded-devel@lists.openembedded.org \
--cc=tom.zanussi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.