From: Juro Bystricky <juro.bystricky@intel.com>
To: openembedded-core@lists.openembedded.org, jurobystricky@hotmail.com
Cc: richard.purdie@intel.com
Subject: [PATCH 1/2] kernel-headers: linux kernel headers
Date: Mon, 3 Aug 2015 13:35:27 -0700 [thread overview]
Message-ID: <1438634128-4347-2-git-send-email-juro.bystricky@intel.com> (raw)
In-Reply-To: <1438634128-4347-1-git-send-email-juro.bystricky@intel.com>
Header files and scripts for building modules for Linux kernel.
A set of files is needed to allow building new Linux kernel modules
against an already installed Linux kernel. The files include various
header files, script files, Makefiles, source code files for several
utility programs and Linux kerenl .config file.
The files may be needed by programs such as:
dkms, nvidia-304xx-dkms, virtualbox, acpi_call, audit,
bbswitch, ipsec-tools, nvidia-304xx, nvidia-340xx, openssh,
r8168, rt3562sta, sysprof, tp_smapi, vhba-module, kmod, ...
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
---
| 66 +++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
create mode 100644 meta/recipes-kernel/linux/kernel-headers.bb
--git a/meta/recipes-kernel/linux/kernel-headers.bb b/meta/recipes-kernel/linux/kernel-headers.bb
new file mode 100644
index 0000000..4be5153
--- /dev/null
+++ b/meta/recipes-kernel/linux/kernel-headers.bb
@@ -0,0 +1,66 @@
+SUMMARY = "Linux kernel headers"
+DESCRIPTION = "Files needed to allow building Linux kernel modules against the installed Linux kernel."
+
+SECTION = "kernel"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+
+inherit module-base linux-kernel-base
+
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+INHIBIT_PACKAGE_STRIP = "1"
+
+# Install the files once the kernel is done with them.
+do_install[depends] += "virtual/kernel:do_compile"
+do_install[depends] += "virtual/kernel:do_populate_sysroot"
+
+# Only install is needed
+do_fetch[noexec] = "1"
+do_unpack[noexec] = "1"
+do_patch[noexec] = "1"
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+do_populate_sysroot[noexec] = "1"
+
+S = "${STAGING_KERNEL_DIR}"
+
+do_install() {
+ kerneldir=${D}/lib/modules/${KERNEL_VERSION}/build
+ install -d $kerneldir
+
+ cp -a ${STAGING_KERNEL_BUILDDIR}/.config $kerneldir
+ cp -aR ${STAGING_KERNEL_BUILDDIR}/include $kerneldir
+ cp -aR ${STAGING_KERNEL_BUILDDIR}/arch $kerneldir
+
+ cd ${S}
+
+ rsync -avm \
+ --include="*/" \
+ --include="Makefile*" \
+ --include="Kconfig*" \
+ --include="Kbuild*" \
+ --include="Module.symvers" \
+ --include=".config" \
+ --include="*.h" \
+ --exclude="*" \
+ . $kerneldir
+
+ rsync -avm \
+ --exclude="*.o" \
+ --exclude=".debug" \
+ ./scripts $kerneldir
+
+ # As of Linux kernel version 3.0.1, the clean target removes
+ # arch/powerpc/lib/crtsavres.o which is present in
+ # KBUILD_LDFLAGS_MODULE, making it required to build external modules.
+ if [ ${ARCH} = "powerpc" ]; then
+ mkdir -p $kerneldir/arch/powerpc/lib/
+ cp ${B}/arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
+ fi
+}
+
+PACKAGES = "${PN}"
+FILES_${PN} = "/lib/modules/${KERNEL_VERSION}/build/"
+RDEPENDS_${PN} = "python bash gawk perl"
+
--
1.9.1
next prev parent reply other threads:[~2015-08-03 20:39 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-03 20:35 [PATCH 0/2] Support for VirtualBox guest additions Juro Bystricky
2015-08-03 20:35 ` Juro Bystricky [this message]
2015-08-04 4:37 ` [PATCH 1/2] kernel-headers: linux kernel headers Christopher Larson
2015-08-04 16:06 ` Bystricky, Juro
2015-08-05 2:20 ` Bruce Ashfield
2015-08-26 17:55 ` Josh Cartwright
2015-08-26 17:57 ` Bruce Ashfield
2015-08-26 18:11 ` Josh Cartwright
2015-08-03 20:35 ` [PATCH 2/2] build-appliance-image: support for VirtualBox guest addtions Juro Bystricky
2015-08-04 4:37 ` Christopher Larson
2015-08-04 16:08 ` Bystricky, Juro
2015-08-04 16:20 ` [PATCH 0/2] Support for VirtualBox guest additions Mark Hatle
2015-08-04 17:25 ` Bystricky, Juro
2015-08-04 17:32 ` Mark Hatle
2015-08-04 19:10 ` Bystricky, Juro
2015-08-04 19:22 ` Mark Hatle
2015-08-04 21:27 ` Bystricky, Juro
2015-08-04 21:31 ` Otavio Salvador
2015-08-05 2:24 ` Bruce Ashfield
2015-08-05 2:24 ` Bruce Ashfield
2015-08-05 2:43 ` Bruce Ashfield
2015-08-05 2:48 ` Bruce Ashfield
2015-08-05 22:02 ` Bystricky, Juro
2015-08-06 2:09 ` Bruce Ashfield
2015-08-06 2:20 ` Khem Raj
2015-08-07 22:13 ` Bystricky, Juro
2015-08-08 1:09 ` Bruce Ashfield
2015-08-08 17:36 ` Bystricky, Juro
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=1438634128-4347-2-git-send-email-juro.bystricky@intel.com \
--to=juro.bystricky@intel.com \
--cc=jurobystricky@hotmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=richard.purdie@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox