All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Support for VirtualBox guest additions
@ 2015-08-03 20:35 Juro Bystricky
  2015-08-03 20:35 ` [PATCH 1/2] kernel-headers: linux kernel headers Juro Bystricky
                   ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: Juro Bystricky @ 2015-08-03 20:35 UTC (permalink / raw)
  To: openembedded-core, jurobystricky; +Cc: richard.purdie

In order to support VirtualBox guest additions, kernel headers need to be present 
in the VM. I am aware we already have two packages/recipes that are somewhat similar
(kernel-devsrc.bb, linux-libc-headers), but none of them is suitable for this purpose.
Besides the kernel headers, some additional files (scripts, Makefiles, .config, etc)
are also required. 

The new recipe "kernel-headers.bb" can in principle be used by other images as well.
It is not limited to the Build Appliance and hence is not a part of the Build Appliance
recipe.

Juro Bystricky (2):
  kernel-headers: linux kernel headers
  build-appliance-image: support for VirtualBox guest addtions

 .../README_vbox_guest_additions.txt                | 78 ++++++++++++++++++++++
 .../images/build-appliance-image_12.0.1.bb         |  4 +-
 meta/recipes-kernel/linux/kernel-headers.bb        | 66 ++++++++++++++++++
 3 files changed, 147 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/images/build-appliance-image/README_vbox_guest_additions.txt
 create mode 100644 meta/recipes-kernel/linux/kernel-headers.bb

-- 
1.9.1



^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 1/2] kernel-headers: linux kernel headers
  2015-08-03 20:35 [PATCH 0/2] Support for VirtualBox guest additions Juro Bystricky
@ 2015-08-03 20:35 ` Juro Bystricky
  2015-08-04  4:37   ` Christopher Larson
  2015-08-05  2:20   ` Bruce Ashfield
  2015-08-03 20:35 ` [PATCH 2/2] build-appliance-image: support for VirtualBox guest addtions Juro Bystricky
  2015-08-04 16:20 ` [PATCH 0/2] Support for VirtualBox guest additions Mark Hatle
  2 siblings, 2 replies; 28+ messages in thread
From: Juro Bystricky @ 2015-08-03 20:35 UTC (permalink / raw)
  To: openembedded-core, jurobystricky; +Cc: richard.purdie

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>
---
 meta/recipes-kernel/linux/kernel-headers.bb | 66 +++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 meta/recipes-kernel/linux/kernel-headers.bb

diff --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



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 2/2] build-appliance-image: support for VirtualBox guest addtions
  2015-08-03 20:35 [PATCH 0/2] Support for VirtualBox guest additions Juro Bystricky
  2015-08-03 20:35 ` [PATCH 1/2] kernel-headers: linux kernel headers Juro Bystricky
@ 2015-08-03 20:35 ` Juro Bystricky
  2015-08-04  4:37   ` Christopher Larson
  2015-08-04 16:20 ` [PATCH 0/2] Support for VirtualBox guest additions Mark Hatle
  2 siblings, 1 reply; 28+ messages in thread
From: Juro Bystricky @ 2015-08-03 20:35 UTC (permalink / raw)
  To: openembedded-core, jurobystricky; +Cc: richard.purdie

It is possible to run Build Appliance VM using VirtualBox.
User experience can be improved by installing VirtulaBox guest
additions. This patch installs kernel headers into the Build Appliance
VM, in order to make possible to rebuild the guest additons against the
running kernel.

The instructions on installing the guest additions are described in
the attached file README_vbox_guest_additions.txt.

[YOCTO #8074]

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
---
 .../README_vbox_guest_additions.txt                | 78 ++++++++++++++++++++++
 .../images/build-appliance-image_12.0.1.bb         |  4 +-
 2 files changed, 81 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/images/build-appliance-image/README_vbox_guest_additions.txt

diff --git a/meta/recipes-core/images/build-appliance-image/README_vbox_guest_additions.txt b/meta/recipes-core/images/build-appliance-image/README_vbox_guest_additions.txt
new file mode 100644
index 0000000..7121804
--- /dev/null
+++ b/meta/recipes-core/images/build-appliance-image/README_vbox_guest_additions.txt
@@ -0,0 +1,78 @@
+
+Installing VirtualBox Guest Additions
+======================================
+
+In order to use VirtualBox guest additions, they have to be build
+first. They may have to be rebuilt again each time the VM kernel changes,
+or each time there is a new version of VirtualBox.
+The following describes steps needed to perform on the Host and the
+Guest VM (Build Appliance).
+
+Host:
+
+    1. If you don't already have them, download the guest additions matching
+       your VirtualBox version.
+
+       http://download.virtualbox.org/virtualbox/
+
+    2. Make sure VM has a CDROM drive, usually an IDE. Place the additions
+       file into the CDROM (VirtualBox Manager: VM Settings -> Storage)
+
+Guest VM:
+
+    1. Boot VM
+
+       Find your CDROM device (most likely /dev/hda for IDE) and mount it:
+
+          # cat /proc/sys/dev/cdrom/info | grep name
+          # mount -t iso9660  /dev/<name> /media/cdrom
+
+       i.e.:
+
+          # mount -t iso9660 /dev/hda /media/cdrom
+
+    2. Build the additions.
+       This is a two step process. Step 1 needs to be done only once.
+       Step 2 must be done each time a new version of guest additions is being
+       installed.
+
+       Step 1:  Build some necessary utilities, needed for step2.
+
+          # cd /lib/modules/<xx.xx.x>-yocto-standard/build
+          # make scripts
+
+        Step 2: Build the guest additions:
+
+          # /media/cdrom/VBoxLinuxAdditions.run --nox11
+
+        This will display some warning messages about unknown system, it is safe to ignore them.
+        Note: You can check the build log log if there are any errors:
+
+          # cat /var/volatile/log/vboxadd-install.log
+
+
+    3. Check if VirtualBox additions are running:
+
+          # /etc/init.d/vboxadd status
+
+        If the additions are not running, try to manually start them:
+
+          # /etc/init.d/vboxadd start
+
+    4. Check if the guest additions actually work, in particular folder sharing:
+
+          Host: Devices->Shared Folder Settings...
+                Choose any host folder and name it to your liking ("my_shared_folder")
+
+          Guest VM:
+              Create mount point for the shared folder, i.e.:
+
+                # mkdir ~/shared_folder
+
+              Mount the shared folder: (Watch out for spelling: it's vboxsf NOT vboxfs)
+
+                # mount -t vboxsf my_shared_folder ~/shared_folder
+
+              Verify mount, should see the contents of "my_shared_folder":
+
+                # ls shared_folder
diff --git a/meta/recipes-core/images/build-appliance-image_12.0.1.bb b/meta/recipes-core/images/build-appliance-image_12.0.1.bb
index 8e71b36..a96e8a0 100644
--- a/meta/recipes-core/images/build-appliance-image_12.0.1.bb
+++ b/meta/recipes-core/images/build-appliance-image_12.0.1.bb
@@ -6,7 +6,7 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
                     file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
-IMAGE_INSTALL = "packagegroup-core-boot packagegroup-core-ssh-openssh packagegroup-self-hosted"
+IMAGE_INSTALL = "packagegroup-core-boot packagegroup-core-ssh-openssh packagegroup-self-hosted kernel-headers"
 
 IMAGE_FEATURES += "x11-base package-management splash"
 
@@ -25,6 +25,7 @@ SRCREV ?= "d01cd53429b1c20f01dac97f1b9b659cb9dc9812"
 SRC_URI = "git://git.yoctoproject.org/poky \
            file://Yocto_Build_Appliance.vmx \
            file://Yocto_Build_Appliance.vmxf \
+           file://README_vbox_guest_additions.txt \
           "
 
 IMAGE_CMD_ext3_append () {
@@ -80,6 +81,7 @@ create_bundle_files () {
 	cd ${WORKDIR}
 	mkdir -p Yocto_Build_Appliance
 	cp *.vmx* Yocto_Build_Appliance
+	cp README* Yocto_Build_Appliance
 	ln -sf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.vmdk Yocto_Build_Appliance/Yocto_Build_Appliance.vmdk
 	zip -r ${DEPLOY_DIR_IMAGE}/Yocto_Build_Appliance-${DATETIME}.zip Yocto_Build_Appliance
 	ln -sf Yocto_Build_Appliance-${DATETIME}.zip ${DEPLOY_DIR_IMAGE}/Yocto_Build_Appliance.zip 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [PATCH 2/2] build-appliance-image: support for VirtualBox guest addtions
  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
  0 siblings, 1 reply; 28+ messages in thread
From: Christopher Larson @ 2015-08-04  4:37 UTC (permalink / raw)
  To: Juro Bystricky; +Cc: richard.purdie, jurobystricky, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 401 bytes --]

On Mon, Aug 3, 2015 at 1:35 PM, Juro Bystricky <juro.bystricky@intel.com>
wrote:

> It is possible to run Build Appliance VM using VirtualBox.
> User experience can be improved by installing VirtulaBox guest
>

Typo: VirtulaBox


-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 823 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/2] kernel-headers: linux kernel headers
  2015-08-03 20:35 ` [PATCH 1/2] kernel-headers: linux kernel headers Juro Bystricky
@ 2015-08-04  4:37   ` Christopher Larson
  2015-08-04 16:06     ` Bystricky, Juro
  2015-08-05  2:20   ` Bruce Ashfield
  1 sibling, 1 reply; 28+ messages in thread
From: Christopher Larson @ 2015-08-04  4:37 UTC (permalink / raw)
  To: Juro Bystricky; +Cc: richard.purdie, jurobystricky, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 535 bytes --]

On Mon, Aug 3, 2015 at 1:35 PM, Juro Bystricky <juro.bystricky@intel.com>
wrote:

> 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.
>

Typo: kerenl


-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 961 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/2] kernel-headers: linux kernel headers
  2015-08-04  4:37   ` Christopher Larson
@ 2015-08-04 16:06     ` Bystricky, Juro
  0 siblings, 0 replies; 28+ messages in thread
From: Bystricky, Juro @ 2015-08-04 16:06 UTC (permalink / raw)
  To: Christopher Larson; +Cc: Purdie, Richard, jurobystricky, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 901 bytes --]

Thanks. I will submit a new patch.

From: kergoth@gmail.com [mailto:kergoth@gmail.com] On Behalf Of Christopher Larson
Sent: Monday, August 3, 2015 9:37 PM
To: Bystricky, Juro
Cc: openembedded-core@lists.openembedded.org; jurobystricky@hotmail.com; Purdie, Richard
Subject: Re: [OE-core] [PATCH 1/2] kernel-headers: linux kernel headers


On Mon, Aug 3, 2015 at 1:35 PM, Juro Bystricky <juro.bystricky@intel.com<mailto:juro.bystricky@intel.com>> wrote:
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.

Typo: kerenl


--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 3864 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 2/2] build-appliance-image: support for VirtualBox guest addtions
  2015-08-04  4:37   ` Christopher Larson
@ 2015-08-04 16:08     ` Bystricky, Juro
  0 siblings, 0 replies; 28+ messages in thread
From: Bystricky, Juro @ 2015-08-04 16:08 UTC (permalink / raw)
  To: Christopher Larson; +Cc: Purdie, Richard, jurobystricky, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 840 bytes --]

Thanks. I guess I type too fast. I will submit a new patch with the typo fixed.

From: kergoth@gmail.com [mailto:kergoth@gmail.com] On Behalf Of Christopher Larson
Sent: Monday, August 3, 2015 9:37 PM
To: Bystricky, Juro
Cc: openembedded-core@lists.openembedded.org; jurobystricky@hotmail.com; Purdie, Richard
Subject: Re: [OE-core] [PATCH 2/2] build-appliance-image: support for VirtualBox guest addtions


On Mon, Aug 3, 2015 at 1:35 PM, Juro Bystricky <juro.bystricky@intel.com<mailto:juro.bystricky@intel.com>> wrote:
It is possible to run Build Appliance VM using VirtualBox.
User experience can be improved by installing VirtulaBox guest

Typo: VirtulaBox


--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 3793 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/2] Support for VirtualBox guest additions
  2015-08-03 20:35 [PATCH 0/2] Support for VirtualBox guest additions Juro Bystricky
  2015-08-03 20:35 ` [PATCH 1/2] kernel-headers: linux kernel headers Juro Bystricky
  2015-08-03 20:35 ` [PATCH 2/2] build-appliance-image: support for VirtualBox guest addtions Juro Bystricky
@ 2015-08-04 16:20 ` Mark Hatle
  2015-08-04 17:25   ` Bystricky, Juro
  2 siblings, 1 reply; 28+ messages in thread
From: Mark Hatle @ 2015-08-04 16:20 UTC (permalink / raw)
  To: Juro Bystricky, openembedded-core, jurobystricky; +Cc: richard.purdie

On 8/3/15 3:35 PM, Juro Bystricky wrote:
> In order to support VirtualBox guest additions, kernel headers need to be present 
> in the VM. I am aware we already have two packages/recipes that are somewhat similar
> (kernel-devsrc.bb, linux-libc-headers), but none of them is suitable for this purpose.
> Besides the kernel headers, some additional files (scripts, Makefiles, .config, etc)
> are also required. 

linux-libc-headers is only for building applications.  kernel-devsrc is for
building modules on the target.

What do these specific modules need that are not present in kernel-devsrc?  (I
really don't want 'yet another' confusing package added to the system.)

> The new recipe "kernel-headers.bb" can in principle be used by other images as well.
> It is not limited to the Build Appliance and hence is not a part of the Build Appliance
> recipe.

I think kernel-headers is a bad name for a package.  It could be confusing.

--Mark

> Juro Bystricky (2):
>   kernel-headers: linux kernel headers
>   build-appliance-image: support for VirtualBox guest addtions
> 
>  .../README_vbox_guest_additions.txt                | 78 ++++++++++++++++++++++
>  .../images/build-appliance-image_12.0.1.bb         |  4 +-
>  meta/recipes-kernel/linux/kernel-headers.bb        | 66 ++++++++++++++++++
>  3 files changed, 147 insertions(+), 1 deletion(-)
>  create mode 100644 meta/recipes-core/images/build-appliance-image/README_vbox_guest_additions.txt
>  create mode 100644 meta/recipes-kernel/linux/kernel-headers.bb
> 



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/2] Support for VirtualBox guest additions
  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
  0 siblings, 1 reply; 28+ messages in thread
From: Bystricky, Juro @ 2015-08-04 17:25 UTC (permalink / raw)
  To: Hatle, Mark G (Wind River), openembedded-core, jurobystricky
  Cc: Purdie, Richard

I agree, the name "kernel-headers" may not be the most fortunate, "linux-headers" 
is probably more fitting.  The recipe installs the files in a similar fashion that is done by 

apt-get install linux-headers-$(uname -r)

Typical contents can be viewed for example here:
https://www.archlinux.org/packages/core/i686/linux-headers/

These files are needed to allow building  of kernel drivers against the running
Linux kernel. In a way, it is a subset of kernel-devsrc, but including
 ".config" file used for the actual running kernel.

Having these files installed, it is possible  to compile additional
kernel drivers that are not part of the kernel-devsrc .
 VirtualBox compiles some of their own drivers this way, others as well. 
There are many other scenarios where you may want to add a new kernel 
driver to an already installed Linux kernel. 

Juro



> -----Original Message-----
> From: Mark Hatle [mailto:mark.hatle@windriver.com]
> Sent: Tuesday, August 4, 2015 9:20 AM
> To: Bystricky, Juro; openembedded-core@lists.openembedded.org;
> jurobystricky@hotmail.com
> Cc: Purdie, Richard
> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest additions
> 
> On 8/3/15 3:35 PM, Juro Bystricky wrote:
> > In order to support VirtualBox guest additions, kernel headers need to
> > be present in the VM. I am aware we already have two packages/recipes
> > that are somewhat similar (kernel-devsrc.bb, linux-libc-headers), but none
> of them is suitable for this purpose.
> > Besides the kernel headers, some additional files (scripts, Makefiles,
> > .config, etc) are also required.
> 
> linux-libc-headers is only for building applications.  kernel-devsrc is for
> building modules on the target.
> 
> What do these specific modules need that are not present in kernel-devsrc?
> (I really don't want 'yet another' confusing package added to the system.)
> 
> > The new recipe "kernel-headers.bb" can in principle be used by other
> images as well.
> > It is not limited to the Build Appliance and hence is not a part of
> > the Build Appliance recipe.
> 
> I think kernel-headers is a bad name for a package.  It could be confusing.
> 
> --Mark
> 
> > Juro Bystricky (2):
> >   kernel-headers: linux kernel headers
> >   build-appliance-image: support for VirtualBox guest addtions
> >
> >  .../README_vbox_guest_additions.txt                | 78
> ++++++++++++++++++++++
> >  .../images/build-appliance-image_12.0.1.bb         |  4 +-
> >  meta/recipes-kernel/linux/kernel-headers.bb        | 66
> ++++++++++++++++++
> >  3 files changed, 147 insertions(+), 1 deletion(-)  create mode 100644
> > meta/recipes-core/images/build-appliance-
> image/README_vbox_guest_addit
> > ions.txt  create mode 100644
> > meta/recipes-kernel/linux/kernel-headers.bb
> >



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/2] Support for VirtualBox guest additions
  2015-08-04 17:25   ` Bystricky, Juro
@ 2015-08-04 17:32     ` Mark Hatle
  2015-08-04 19:10       ` Bystricky, Juro
  2015-08-05  2:43       ` Bruce Ashfield
  0 siblings, 2 replies; 28+ messages in thread
From: Mark Hatle @ 2015-08-04 17:32 UTC (permalink / raw)
  To: Bystricky, Juro, openembedded-core, jurobystricky; +Cc: Purdie, Richard

On 8/4/15 12:25 PM, Bystricky, Juro wrote:
> I agree, the name "kernel-headers" may not be the most fortunate, "linux-headers" 
> is probably more fitting.  The recipe installs the files in a similar fashion that is done by 
> 
> apt-get install linux-headers-$(uname -r)
> 
> Typical contents can be viewed for example here:
> https://www.archlinux.org/packages/core/i686/linux-headers/
> 
> These files are needed to allow building  of kernel drivers against the running
> Linux kernel. In a way, it is a subset of kernel-devsrc, but including
>  ".config" file used for the actual running kernel.

Again this is part of the purpose of the existing kernel-devsrc package.  So
what is missing preventing this from working.  It likely needs to be added to
the kernel-devsrc package instead (or a sub package that is created by the
kernel-devsrc recipe.)

> Having these files installed, it is possible  to compile additional
> kernel drivers that are not part of the kernel-devsrc .
>  VirtualBox compiles some of their own drivers this way, others as well. 
> There are many other scenarios where you may want to add a new kernel 
> driver to an already installed Linux kernel. 

Yes, this was part of the design behind the kernel-devsrc, make sure the sources
and components used to build the running kernel were made available to the
target so that out-of-tree/external kernel modules could be built to match the
running system -- as well as the ability to reconfigure and rebuild the kernel
itself.

Bruce is on vacation this week and may not be around to respond, but adding yet
another package is not the right answer here.  Lets fix what may be broken in
what we have.

--Mark

> Juro
> 
> 
> 
>> -----Original Message-----
>> From: Mark Hatle [mailto:mark.hatle@windriver.com]
>> Sent: Tuesday, August 4, 2015 9:20 AM
>> To: Bystricky, Juro; openembedded-core@lists.openembedded.org;
>> jurobystricky@hotmail.com
>> Cc: Purdie, Richard
>> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest additions
>>
>> On 8/3/15 3:35 PM, Juro Bystricky wrote:
>>> In order to support VirtualBox guest additions, kernel headers need to
>>> be present in the VM. I am aware we already have two packages/recipes
>>> that are somewhat similar (kernel-devsrc.bb, linux-libc-headers), but none
>> of them is suitable for this purpose.
>>> Besides the kernel headers, some additional files (scripts, Makefiles,
>>> .config, etc) are also required.
>>
>> linux-libc-headers is only for building applications.  kernel-devsrc is for
>> building modules on the target.
>>
>> What do these specific modules need that are not present in kernel-devsrc?
>> (I really don't want 'yet another' confusing package added to the system.)
>>
>>> The new recipe "kernel-headers.bb" can in principle be used by other
>> images as well.
>>> It is not limited to the Build Appliance and hence is not a part of
>>> the Build Appliance recipe.
>>
>> I think kernel-headers is a bad name for a package.  It could be confusing.
>>
>> --Mark
>>
>>> Juro Bystricky (2):
>>>   kernel-headers: linux kernel headers
>>>   build-appliance-image: support for VirtualBox guest addtions
>>>
>>>  .../README_vbox_guest_additions.txt                | 78
>> ++++++++++++++++++++++
>>>  .../images/build-appliance-image_12.0.1.bb         |  4 +-
>>>  meta/recipes-kernel/linux/kernel-headers.bb        | 66
>> ++++++++++++++++++
>>>  3 files changed, 147 insertions(+), 1 deletion(-)  create mode 100644
>>> meta/recipes-core/images/build-appliance-
>> image/README_vbox_guest_addit
>>> ions.txt  create mode 100644
>>> meta/recipes-kernel/linux/kernel-headers.bb
>>>
> 



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/2] Support for VirtualBox guest additions
  2015-08-04 17:32     ` Mark Hatle
@ 2015-08-04 19:10       ` Bystricky, Juro
  2015-08-04 19:22         ` Mark Hatle
  2015-08-05  2:24         ` Bruce Ashfield
  2015-08-05  2:43       ` Bruce Ashfield
  1 sibling, 2 replies; 28+ messages in thread
From: Bystricky, Juro @ 2015-08-04 19:10 UTC (permalink / raw)
  To: Hatle, Mark G (Wind River), openembedded-core, jurobystricky
  Cc: Purdie, Richard

I am pretty sure initially I tried to use kernel-devsrc  to install VirtualBox guest additions.
It did not work out of the box for me, there were either files missing or they were not in expected locations.
It is possible it could  be made to work with some modified installation,  but the size is an issue 
as well: kernel-devsrc packs over 500MB (uncompressed).

The source code is only needed when you want to reconfigure/rebuild the kernel.
Out-of-tree modules generally don't need any additional source code, typically only header files.


Juro


> -----Original Message-----
> From: Mark Hatle [mailto:mark.hatle@windriver.com]
> Sent: Tuesday, August 4, 2015 10:32 AM
> To: Bystricky, Juro; openembedded-core@lists.openembedded.org;
> jurobystricky@hotmail.com
> Cc: Purdie, Richard
> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest additions
> 
> On 8/4/15 12:25 PM, Bystricky, Juro wrote:
> > I agree, the name "kernel-headers" may not be the most fortunate, "linux-
> headers"
> > is probably more fitting.  The recipe installs the files in a similar
> > fashion that is done by
> >
> > apt-get install linux-headers-$(uname -r)
> >
> > Typical contents can be viewed for example here:
> > https://www.archlinux.org/packages/core/i686/linux-headers/
> >
> > These files are needed to allow building  of kernel drivers against
> > the running Linux kernel. In a way, it is a subset of kernel-devsrc,
> > but including  ".config" file used for the actual running kernel.
> 
> Again this is part of the purpose of the existing kernel-devsrc package.  So
> what is missing preventing this from working.  It likely needs to be added to
> the kernel-devsrc package instead (or a sub package that is created by the
> kernel-devsrc recipe.)
> 
> > Having these files installed, it is possible  to compile additional
> > kernel drivers that are not part of the kernel-devsrc .
> >  VirtualBox compiles some of their own drivers this way, others as well.
> > There are many other scenarios where you may want to add a new kernel
> > driver to an already installed Linux kernel.
> 
> Yes, this was part of the design behind the kernel-devsrc, make sure the
> sources and components used to build the running kernel were made
> available to the target so that out-of-tree/external kernel modules could be
> built to match the running system -- as well as the ability to reconfigure and
> rebuild the kernel itself.
> 
> Bruce is on vacation this week and may not be around to respond, but adding
> yet another package is not the right answer here.  Lets fix what may be
> broken in what we have.
> 
> --Mark
> 
> > Juro
> >
> >
> >
> >> -----Original Message-----
> >> From: Mark Hatle [mailto:mark.hatle@windriver.com]
> >> Sent: Tuesday, August 4, 2015 9:20 AM
> >> To: Bystricky, Juro; openembedded-core@lists.openembedded.org;
> >> jurobystricky@hotmail.com
> >> Cc: Purdie, Richard
> >> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest
> >> additions
> >>
> >> On 8/3/15 3:35 PM, Juro Bystricky wrote:
> >>> In order to support VirtualBox guest additions, kernel headers need
> >>> to be present in the VM. I am aware we already have two
> >>> packages/recipes that are somewhat similar (kernel-devsrc.bb,
> >>> linux-libc-headers), but none
> >> of them is suitable for this purpose.
> >>> Besides the kernel headers, some additional files (scripts,
> >>> Makefiles, .config, etc) are also required.
> >>
> >> linux-libc-headers is only for building applications.  kernel-devsrc
> >> is for building modules on the target.
> >>
> >> What do these specific modules need that are not present in kernel-
> devsrc?
> >> (I really don't want 'yet another' confusing package added to the
> >> system.)
> >>
> >>> The new recipe "kernel-headers.bb" can in principle be used by other
> >> images as well.
> >>> It is not limited to the Build Appliance and hence is not a part of
> >>> the Build Appliance recipe.
> >>
> >> I think kernel-headers is a bad name for a package.  It could be confusing.
> >>
> >> --Mark
> >>
> >>> Juro Bystricky (2):
> >>>   kernel-headers: linux kernel headers
> >>>   build-appliance-image: support for VirtualBox guest addtions
> >>>
> >>>  .../README_vbox_guest_additions.txt                | 78
> >> ++++++++++++++++++++++
> >>>  .../images/build-appliance-image_12.0.1.bb         |  4 +-
> >>>  meta/recipes-kernel/linux/kernel-headers.bb        | 66
> >> ++++++++++++++++++
> >>>  3 files changed, 147 insertions(+), 1 deletion(-)  create mode
> >>> 100644
> >>> meta/recipes-core/images/build-appliance-
> >> image/README_vbox_guest_addit
> >>> ions.txt  create mode 100644
> >>> meta/recipes-kernel/linux/kernel-headers.bb
> >>>
> >



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/2] Support for VirtualBox guest additions
  2015-08-04 19:10       ` Bystricky, Juro
@ 2015-08-04 19:22         ` Mark Hatle
  2015-08-04 21:27           ` Bystricky, Juro
  2015-08-05  2:24         ` Bruce Ashfield
  1 sibling, 1 reply; 28+ messages in thread
From: Mark Hatle @ 2015-08-04 19:22 UTC (permalink / raw)
  To: Bystricky, Juro, openembedded-core, jurobystricky; +Cc: Purdie, Richard

On 8/4/15 2:10 PM, Bystricky, Juro wrote:
> I am pretty sure initially I tried to use kernel-devsrc  to install VirtualBox guest additions.
> It did not work out of the box for me, there were either files missing or they were not in expected locations.
> It is possible it could  be made to work with some modified installation,  but the size is an issue 
> as well: kernel-devsrc packs over 500MB (uncompressed).

This can be dealt with.  If necessary splitting into two packages, the minimal
components and 'everything else', but should still be generated from the
kernel-devsrc recipe.

But really is 500MB a problem when using the build-appliance?  (You wouldn't use
any of these on a memory constrained target anyway -- you'd pre-build any
modules elsewhere.. so that shouldn't be a consideration.)

> The source code is only needed when you want to reconfigure/rebuild the kernel.
> Out-of-tree modules generally don't need any additional source code, typically only header files.

Some out of tree modules want to get access to more then just the header files.

--Mark

> Juro
> 
> 
>> -----Original Message-----
>> From: Mark Hatle [mailto:mark.hatle@windriver.com]
>> Sent: Tuesday, August 4, 2015 10:32 AM
>> To: Bystricky, Juro; openembedded-core@lists.openembedded.org;
>> jurobystricky@hotmail.com
>> Cc: Purdie, Richard
>> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest additions
>>
>> On 8/4/15 12:25 PM, Bystricky, Juro wrote:
>>> I agree, the name "kernel-headers" may not be the most fortunate, "linux-
>> headers"
>>> is probably more fitting.  The recipe installs the files in a similar
>>> fashion that is done by
>>>
>>> apt-get install linux-headers-$(uname -r)
>>>
>>> Typical contents can be viewed for example here:
>>> https://www.archlinux.org/packages/core/i686/linux-headers/
>>>
>>> These files are needed to allow building  of kernel drivers against
>>> the running Linux kernel. In a way, it is a subset of kernel-devsrc,
>>> but including  ".config" file used for the actual running kernel.
>>
>> Again this is part of the purpose of the existing kernel-devsrc package.  So
>> what is missing preventing this from working.  It likely needs to be added to
>> the kernel-devsrc package instead (or a sub package that is created by the
>> kernel-devsrc recipe.)
>>
>>> Having these files installed, it is possible  to compile additional
>>> kernel drivers that are not part of the kernel-devsrc .
>>>  VirtualBox compiles some of their own drivers this way, others as well.
>>> There are many other scenarios where you may want to add a new kernel
>>> driver to an already installed Linux kernel.
>>
>> Yes, this was part of the design behind the kernel-devsrc, make sure the
>> sources and components used to build the running kernel were made
>> available to the target so that out-of-tree/external kernel modules could be
>> built to match the running system -- as well as the ability to reconfigure and
>> rebuild the kernel itself.
>>
>> Bruce is on vacation this week and may not be around to respond, but adding
>> yet another package is not the right answer here.  Lets fix what may be
>> broken in what we have.
>>
>> --Mark
>>
>>> Juro
>>>
>>>
>>>
>>>> -----Original Message-----
>>>> From: Mark Hatle [mailto:mark.hatle@windriver.com]
>>>> Sent: Tuesday, August 4, 2015 9:20 AM
>>>> To: Bystricky, Juro; openembedded-core@lists.openembedded.org;
>>>> jurobystricky@hotmail.com
>>>> Cc: Purdie, Richard
>>>> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest
>>>> additions
>>>>
>>>> On 8/3/15 3:35 PM, Juro Bystricky wrote:
>>>>> In order to support VirtualBox guest additions, kernel headers need
>>>>> to be present in the VM. I am aware we already have two
>>>>> packages/recipes that are somewhat similar (kernel-devsrc.bb,
>>>>> linux-libc-headers), but none
>>>> of them is suitable for this purpose.
>>>>> Besides the kernel headers, some additional files (scripts,
>>>>> Makefiles, .config, etc) are also required.
>>>>
>>>> linux-libc-headers is only for building applications.  kernel-devsrc
>>>> is for building modules on the target.
>>>>
>>>> What do these specific modules need that are not present in kernel-
>> devsrc?
>>>> (I really don't want 'yet another' confusing package added to the
>>>> system.)
>>>>
>>>>> The new recipe "kernel-headers.bb" can in principle be used by other
>>>> images as well.
>>>>> It is not limited to the Build Appliance and hence is not a part of
>>>>> the Build Appliance recipe.
>>>>
>>>> I think kernel-headers is a bad name for a package.  It could be confusing.
>>>>
>>>> --Mark
>>>>
>>>>> Juro Bystricky (2):
>>>>>   kernel-headers: linux kernel headers
>>>>>   build-appliance-image: support for VirtualBox guest addtions
>>>>>
>>>>>  .../README_vbox_guest_additions.txt                | 78
>>>> ++++++++++++++++++++++
>>>>>  .../images/build-appliance-image_12.0.1.bb         |  4 +-
>>>>>  meta/recipes-kernel/linux/kernel-headers.bb        | 66
>>>> ++++++++++++++++++
>>>>>  3 files changed, 147 insertions(+), 1 deletion(-)  create mode
>>>>> 100644
>>>>> meta/recipes-core/images/build-appliance-
>>>> image/README_vbox_guest_addit
>>>>> ions.txt  create mode 100644
>>>>> meta/recipes-kernel/linux/kernel-headers.bb
>>>>>
>>>
> 



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/2] Support for VirtualBox guest additions
  2015-08-04 19:22         ` Mark Hatle
@ 2015-08-04 21:27           ` Bystricky, Juro
  2015-08-04 21:31             ` Otavio Salvador
  0 siblings, 1 reply; 28+ messages in thread
From: Bystricky, Juro @ 2015-08-04 21:27 UTC (permalink / raw)
  To: Hatle, Mark G (Wind River), openembedded-core, jurobystricky
  Cc: Purdie, Richard

The Build Appliance is just one VM that can benefit from VirtualBox guest additions.
There are other VM implementations, where a small size is quite important.
All I am trying to say is, that we need to be able to recreate the same contents
as:

apt-get install linux-headers-$(uname -r)

I don't have any strong feelings regarding if an already existing recipe needs to be modified 
or we need a separate recipe.





> -----Original Message-----
> From: Mark Hatle [mailto:mark.hatle@windriver.com]
> Sent: Tuesday, August 4, 2015 12:22 PM
> To: Bystricky, Juro; openembedded-core@lists.openembedded.org;
> jurobystricky@hotmail.com
> Cc: Purdie, Richard
> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest additions
> 
> On 8/4/15 2:10 PM, Bystricky, Juro wrote:
> > I am pretty sure initially I tried to use kernel-devsrc  to install VirtualBox
> guest additions.
> > It did not work out of the box for me, there were either files missing or
> they were not in expected locations.
> > It is possible it could  be made to work with some modified
> > installation,  but the size is an issue as well: kernel-devsrc packs over 500MB
> (uncompressed).
> 
> This can be dealt with.  If necessary splitting into two packages, the minimal
> components and 'everything else', but should still be generated from the
> kernel-devsrc recipe.
> 
> But really is 500MB a problem when using the build-appliance?  (You wouldn't
> use any of these on a memory constrained target anyway -- you'd pre-build
> any modules elsewhere.. so that shouldn't be a consideration.)
> 
> > The source code is only needed when you want to reconfigure/rebuild the
> kernel.
> > Out-of-tree modules generally don't need any additional source code,
> typically only header files.
> 
> Some out of tree modules want to get access to more then just the header
> files.
> 
> --Mark
> 
> > Juro
> >
> >
> >> -----Original Message-----
> >> From: Mark Hatle [mailto:mark.hatle@windriver.com]
> >> Sent: Tuesday, August 4, 2015 10:32 AM
> >> To: Bystricky, Juro; openembedded-core@lists.openembedded.org;
> >> jurobystricky@hotmail.com
> >> Cc: Purdie, Richard
> >> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest
> >> additions
> >>
> >> On 8/4/15 12:25 PM, Bystricky, Juro wrote:
> >>> I agree, the name "kernel-headers" may not be the most fortunate,
> >>> "linux-
> >> headers"
> >>> is probably more fitting.  The recipe installs the files in a
> >>> similar fashion that is done by
> >>>
> >>> apt-get install linux-headers-$(uname -r)
> >>>
> >>> Typical contents can be viewed for example here:
> >>> https://www.archlinux.org/packages/core/i686/linux-headers/
> >>>
> >>> These files are needed to allow building  of kernel drivers against
> >>> the running Linux kernel. In a way, it is a subset of kernel-devsrc,
> >>> but including  ".config" file used for the actual running kernel.
> >>
> >> Again this is part of the purpose of the existing kernel-devsrc
> >> package.  So what is missing preventing this from working.  It likely
> >> needs to be added to the kernel-devsrc package instead (or a sub
> >> package that is created by the kernel-devsrc recipe.)
> >>
> >>> Having these files installed, it is possible  to compile additional
> >>> kernel drivers that are not part of the kernel-devsrc .
> >>>  VirtualBox compiles some of their own drivers this way, others as well.
> >>> There are many other scenarios where you may want to add a new
> >>> kernel driver to an already installed Linux kernel.
> >>
> >> Yes, this was part of the design behind the kernel-devsrc, make sure
> >> the sources and components used to build the running kernel were made
> >> available to the target so that out-of-tree/external kernel modules
> >> could be built to match the running system -- as well as the ability
> >> to reconfigure and rebuild the kernel itself.
> >>
> >> Bruce is on vacation this week and may not be around to respond, but
> >> adding yet another package is not the right answer here.  Lets fix
> >> what may be broken in what we have.
> >>
> >> --Mark
> >>
> >>> Juro
> >>>
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: Mark Hatle [mailto:mark.hatle@windriver.com]
> >>>> Sent: Tuesday, August 4, 2015 9:20 AM
> >>>> To: Bystricky, Juro; openembedded-core@lists.openembedded.org;
> >>>> jurobystricky@hotmail.com
> >>>> Cc: Purdie, Richard
> >>>> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest
> >>>> additions
> >>>>
> >>>> On 8/3/15 3:35 PM, Juro Bystricky wrote:
> >>>>> In order to support VirtualBox guest additions, kernel headers
> >>>>> need to be present in the VM. I am aware we already have two
> >>>>> packages/recipes that are somewhat similar (kernel-devsrc.bb,
> >>>>> linux-libc-headers), but none
> >>>> of them is suitable for this purpose.
> >>>>> Besides the kernel headers, some additional files (scripts,
> >>>>> Makefiles, .config, etc) are also required.
> >>>>
> >>>> linux-libc-headers is only for building applications.
> >>>> kernel-devsrc is for building modules on the target.
> >>>>
> >>>> What do these specific modules need that are not present in kernel-
> >> devsrc?
> >>>> (I really don't want 'yet another' confusing package added to the
> >>>> system.)
> >>>>
> >>>>> The new recipe "kernel-headers.bb" can in principle be used by
> >>>>> other
> >>>> images as well.
> >>>>> It is not limited to the Build Appliance and hence is not a part
> >>>>> of the Build Appliance recipe.
> >>>>
> >>>> I think kernel-headers is a bad name for a package.  It could be
> confusing.
> >>>>
> >>>> --Mark
> >>>>
> >>>>> Juro Bystricky (2):
> >>>>>   kernel-headers: linux kernel headers
> >>>>>   build-appliance-image: support for VirtualBox guest addtions
> >>>>>
> >>>>>  .../README_vbox_guest_additions.txt                | 78
> >>>> ++++++++++++++++++++++
> >>>>>  .../images/build-appliance-image_12.0.1.bb         |  4 +-
> >>>>>  meta/recipes-kernel/linux/kernel-headers.bb        | 66
> >>>> ++++++++++++++++++
> >>>>>  3 files changed, 147 insertions(+), 1 deletion(-)  create mode
> >>>>> 100644
> >>>>> meta/recipes-core/images/build-appliance-
> >>>> image/README_vbox_guest_addit
> >>>>> ions.txt  create mode 100644
> >>>>> meta/recipes-kernel/linux/kernel-headers.bb
> >>>>>
> >>>
> >



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/2] Support for VirtualBox guest additions
  2015-08-04 21:27           ` Bystricky, Juro
@ 2015-08-04 21:31             ` Otavio Salvador
  2015-08-05  2:24               ` Bruce Ashfield
  0 siblings, 1 reply; 28+ messages in thread
From: Otavio Salvador @ 2015-08-04 21:31 UTC (permalink / raw)
  To: Bystricky, Juro; +Cc: Purdie, Richard, jurobystricky, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 757 bytes --]

On Tue, Aug 4, 2015 at 6:27 PM, Bystricky, Juro <juro.bystricky@intel.com>
wrote:

> The Build Appliance is just one VM that can benefit from VirtualBox guest
> additions.
> There are other VM implementations, where a small size is quite important.
> All I am trying to say is, that we need to be able to recreate the same
> contents
> as:
>
> apt-get install linux-headers-$(uname -r)
>
> I don't have any strong feelings regarding if an already existing recipe
> needs to be modified
> or we need a separate recipe.
>

I second this request.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

[-- Attachment #2: Type: text/html, Size: 1382 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/2] kernel-headers: linux kernel headers
  2015-08-03 20:35 ` [PATCH 1/2] kernel-headers: linux kernel headers Juro Bystricky
  2015-08-04  4:37   ` Christopher Larson
@ 2015-08-05  2:20   ` Bruce Ashfield
  2015-08-26 17:55     ` Josh Cartwright
  1 sibling, 1 reply; 28+ messages in thread
From: Bruce Ashfield @ 2015-08-05  2:20 UTC (permalink / raw)
  To: Juro Bystricky
  Cc: Purdie, Richard, Juro Bystricky,
	Patches and discussions about the oe-core layer

On Mon, Aug 3, 2015 at 5:35 PM, Juro Bystricky <juro.bystricky@intel.com> wrote:
> 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.

We already have our kernel devsrc packages. This is simply creating more
copies of the same functionality.

If you have issues with devsrc .. why aren't you fixing it ? It certainly
shouldn't be left as is, while introducing something new.

Bruce

>
> 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>
> ---
>  meta/recipes-kernel/linux/kernel-headers.bb | 66 +++++++++++++++++++++++++++++
>  1 file changed, 66 insertions(+)
>  create mode 100644 meta/recipes-kernel/linux/kernel-headers.bb
>
> diff --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
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/2] Support for VirtualBox guest additions
  2015-08-04 19:10       ` Bystricky, Juro
  2015-08-04 19:22         ` Mark Hatle
@ 2015-08-05  2:24         ` Bruce Ashfield
  1 sibling, 0 replies; 28+ messages in thread
From: Bruce Ashfield @ 2015-08-05  2:24 UTC (permalink / raw)
  To: Bystricky, Juro; +Cc: Purdie, Richard, jurobystricky, openembedded-core

On Tue, Aug 4, 2015 at 4:10 PM, Bystricky, Juro
<juro.bystricky@intel.com> wrote:
> I am pretty sure initially I tried to use kernel-devsrc  to install VirtualBox guest additions.
> It did not work out of the box for me, there were either files missing or they were not in expected locations.
> It is possible it could  be made to work with some modified installation,  but the size is an issue
> as well: kernel-devsrc packs over 500MB (uncompressed).

Please give details .. not just statements of "it didn't work". The use
case you claim is one that we explicitly test with the existing packages.
So something has gone  wrong, it isn't something that should be
broken like you describe.

>
> The source code is only needed when you want to reconfigure/rebuild the kernel.
> Out-of-tree modules generally don't need any additional source code, typically only header files.

Yep, this is very well known. Check the Yocto bugzilla. We've gone back and
forth on this many times.

Bruce

>
>
> Juro
>
>
>> -----Original Message-----
>> From: Mark Hatle [mailto:mark.hatle@windriver.com]
>> Sent: Tuesday, August 4, 2015 10:32 AM
>> To: Bystricky, Juro; openembedded-core@lists.openembedded.org;
>> jurobystricky@hotmail.com
>> Cc: Purdie, Richard
>> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest additions
>>
>> On 8/4/15 12:25 PM, Bystricky, Juro wrote:
>> > I agree, the name "kernel-headers" may not be the most fortunate, "linux-
>> headers"
>> > is probably more fitting.  The recipe installs the files in a similar
>> > fashion that is done by
>> >
>> > apt-get install linux-headers-$(uname -r)
>> >
>> > Typical contents can be viewed for example here:
>> > https://www.archlinux.org/packages/core/i686/linux-headers/
>> >
>> > These files are needed to allow building  of kernel drivers against
>> > the running Linux kernel. In a way, it is a subset of kernel-devsrc,
>> > but including  ".config" file used for the actual running kernel.
>>
>> Again this is part of the purpose of the existing kernel-devsrc package.  So
>> what is missing preventing this from working.  It likely needs to be added to
>> the kernel-devsrc package instead (or a sub package that is created by the
>> kernel-devsrc recipe.)
>>
>> > Having these files installed, it is possible  to compile additional
>> > kernel drivers that are not part of the kernel-devsrc .
>> >  VirtualBox compiles some of their own drivers this way, others as well.
>> > There are many other scenarios where you may want to add a new kernel
>> > driver to an already installed Linux kernel.
>>
>> Yes, this was part of the design behind the kernel-devsrc, make sure the
>> sources and components used to build the running kernel were made
>> available to the target so that out-of-tree/external kernel modules could be
>> built to match the running system -- as well as the ability to reconfigure and
>> rebuild the kernel itself.
>>
>> Bruce is on vacation this week and may not be around to respond, but adding
>> yet another package is not the right answer here.  Lets fix what may be
>> broken in what we have.
>>
>> --Mark
>>
>> > Juro
>> >
>> >
>> >
>> >> -----Original Message-----
>> >> From: Mark Hatle [mailto:mark.hatle@windriver.com]
>> >> Sent: Tuesday, August 4, 2015 9:20 AM
>> >> To: Bystricky, Juro; openembedded-core@lists.openembedded.org;
>> >> jurobystricky@hotmail.com
>> >> Cc: Purdie, Richard
>> >> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest
>> >> additions
>> >>
>> >> On 8/3/15 3:35 PM, Juro Bystricky wrote:
>> >>> In order to support VirtualBox guest additions, kernel headers need
>> >>> to be present in the VM. I am aware we already have two
>> >>> packages/recipes that are somewhat similar (kernel-devsrc.bb,
>> >>> linux-libc-headers), but none
>> >> of them is suitable for this purpose.
>> >>> Besides the kernel headers, some additional files (scripts,
>> >>> Makefiles, .config, etc) are also required.
>> >>
>> >> linux-libc-headers is only for building applications.  kernel-devsrc
>> >> is for building modules on the target.
>> >>
>> >> What do these specific modules need that are not present in kernel-
>> devsrc?
>> >> (I really don't want 'yet another' confusing package added to the
>> >> system.)
>> >>
>> >>> The new recipe "kernel-headers.bb" can in principle be used by other
>> >> images as well.
>> >>> It is not limited to the Build Appliance and hence is not a part of
>> >>> the Build Appliance recipe.
>> >>
>> >> I think kernel-headers is a bad name for a package.  It could be confusing.
>> >>
>> >> --Mark
>> >>
>> >>> Juro Bystricky (2):
>> >>>   kernel-headers: linux kernel headers
>> >>>   build-appliance-image: support for VirtualBox guest addtions
>> >>>
>> >>>  .../README_vbox_guest_additions.txt                | 78
>> >> ++++++++++++++++++++++
>> >>>  .../images/build-appliance-image_12.0.1.bb         |  4 +-
>> >>>  meta/recipes-kernel/linux/kernel-headers.bb        | 66
>> >> ++++++++++++++++++
>> >>>  3 files changed, 147 insertions(+), 1 deletion(-)  create mode
>> >>> 100644
>> >>> meta/recipes-core/images/build-appliance-
>> >> image/README_vbox_guest_addit
>> >>> ions.txt  create mode 100644
>> >>> meta/recipes-kernel/linux/kernel-headers.bb
>> >>>
>> >
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/2] Support for VirtualBox guest additions
  2015-08-04 21:31             ` Otavio Salvador
@ 2015-08-05  2:24               ` Bruce Ashfield
  0 siblings, 0 replies; 28+ messages in thread
From: Bruce Ashfield @ 2015-08-05  2:24 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Purdie, Richard, jurobystricky, openembedded-core

On Tue, Aug 4, 2015 at 6:31 PM, Otavio Salvador
<otavio.salvador@ossystems.com.br> wrote:
>
>
> On Tue, Aug 4, 2015 at 6:27 PM, Bystricky, Juro <juro.bystricky@intel.com>
> wrote:
>>
>> The Build Appliance is just one VM that can benefit from VirtualBox guest
>> additions.
>> There are other VM implementations, where a small size is quite important.
>> All I am trying to say is, that we need to be able to recreate the same
>> contents
>> as:
>>
>> apt-get install linux-headers-$(uname -r)
>>
>> I don't have any strong feelings regarding if an already existing recipe
>> needs to be modified
>> or we need a separate recipe.
>
>
> I second this request.

We need to fix devsrc .. we can't create yet another recipe that does exactly
the same thing.

Either strip the functionality from devsrc or fix it.

linux-headers and linux-libc-headers are too closely named .. we need less
confusion here, not more.

Bruce

>
> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/2] Support for VirtualBox guest additions
  2015-08-04 17:32     ` Mark Hatle
  2015-08-04 19:10       ` Bystricky, Juro
@ 2015-08-05  2:43       ` Bruce Ashfield
  2015-08-05  2:48         ` Bruce Ashfield
  1 sibling, 1 reply; 28+ messages in thread
From: Bruce Ashfield @ 2015-08-05  2:43 UTC (permalink / raw)
  To: Mark Hatle; +Cc: Purdie, Richard, jurobystricky, openembedded-core

On Tue, Aug 4, 2015 at 2:32 PM, Mark Hatle <mark.hatle@windriver.com> wrote:
> On 8/4/15 12:25 PM, Bystricky, Juro wrote:
>> I agree, the name "kernel-headers" may not be the most fortunate, "linux-headers"
>> is probably more fitting.  The recipe installs the files in a similar fashion that is done by
>>
>> apt-get install linux-headers-$(uname -r)
>>
>> Typical contents can be viewed for example here:
>> https://www.archlinux.org/packages/core/i686/linux-headers/
>>
>> These files are needed to allow building  of kernel drivers against the running
>> Linux kernel. In a way, it is a subset of kernel-devsrc, but including
>>  ".config" file used for the actual running kernel.
>
> Again this is part of the purpose of the existing kernel-devsrc package.  So
> what is missing preventing this from working.  It likely needs to be added to
> the kernel-devsrc package instead (or a sub package that is created by the
> kernel-devsrc recipe.)

Peeking in on vacation.

At a minimum, we need to figure out why the existing package wasn't
able to build the use case in question here .. I've built pretty much everything
against it at one point .. so I'd like to learn more.

And yes, what we don't need is more sets of rules that copy and package
parts of the kernel build. We are already doing that in our do_shared_workdir
and that is pretty much the minimum to build against the kernel. If that
directory structure needs more for this purpose (or less), then update it.

But we need to do all of this in the existing classes, to keep everything in
one place, not more recipes that are grabbing chunks of the same source
tree.

Bruce


>
>> Having these files installed, it is possible  to compile additional
>> kernel drivers that are not part of the kernel-devsrc .
>>  VirtualBox compiles some of their own drivers this way, others as well.
>> There are many other scenarios where you may want to add a new kernel
>> driver to an already installed Linux kernel.
>
> Yes, this was part of the design behind the kernel-devsrc, make sure the sources
> and components used to build the running kernel were made available to the
> target so that out-of-tree/external kernel modules could be built to match the
> running system -- as well as the ability to reconfigure and rebuild the kernel
> itself.
>
> Bruce is on vacation this week and may not be around to respond, but adding yet
> another package is not the right answer here.  Lets fix what may be broken in
> what we have.
>
> --Mark
>
>> Juro
>>
>>
>>
>>> -----Original Message-----
>>> From: Mark Hatle [mailto:mark.hatle@windriver.com]
>>> Sent: Tuesday, August 4, 2015 9:20 AM
>>> To: Bystricky, Juro; openembedded-core@lists.openembedded.org;
>>> jurobystricky@hotmail.com
>>> Cc: Purdie, Richard
>>> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest additions
>>>
>>> On 8/3/15 3:35 PM, Juro Bystricky wrote:
>>>> In order to support VirtualBox guest additions, kernel headers need to
>>>> be present in the VM. I am aware we already have two packages/recipes
>>>> that are somewhat similar (kernel-devsrc.bb, linux-libc-headers), but none
>>> of them is suitable for this purpose.
>>>> Besides the kernel headers, some additional files (scripts, Makefiles,
>>>> .config, etc) are also required.
>>>
>>> linux-libc-headers is only for building applications.  kernel-devsrc is for
>>> building modules on the target.
>>>
>>> What do these specific modules need that are not present in kernel-devsrc?
>>> (I really don't want 'yet another' confusing package added to the system.)
>>>
>>>> The new recipe "kernel-headers.bb" can in principle be used by other
>>> images as well.
>>>> It is not limited to the Build Appliance and hence is not a part of
>>>> the Build Appliance recipe.
>>>
>>> I think kernel-headers is a bad name for a package.  It could be confusing.
>>>
>>> --Mark
>>>
>>>> Juro Bystricky (2):
>>>>   kernel-headers: linux kernel headers
>>>>   build-appliance-image: support for VirtualBox guest addtions
>>>>
>>>>  .../README_vbox_guest_additions.txt                | 78
>>> ++++++++++++++++++++++
>>>>  .../images/build-appliance-image_12.0.1.bb         |  4 +-
>>>>  meta/recipes-kernel/linux/kernel-headers.bb        | 66
>>> ++++++++++++++++++
>>>>  3 files changed, 147 insertions(+), 1 deletion(-)  create mode 100644
>>>> meta/recipes-core/images/build-appliance-
>>> image/README_vbox_guest_addit
>>>> ions.txt  create mode 100644
>>>> meta/recipes-kernel/linux/kernel-headers.bb
>>>>
>>
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/2] Support for VirtualBox guest additions
  2015-08-05  2:43       ` Bruce Ashfield
@ 2015-08-05  2:48         ` Bruce Ashfield
  2015-08-05 22:02           ` Bystricky, Juro
  0 siblings, 1 reply; 28+ messages in thread
From: Bruce Ashfield @ 2015-08-05  2:48 UTC (permalink / raw)
  To: Mark Hatle; +Cc: Purdie, Richard, jurobystricky, openembedded-core

On Tue, Aug 4, 2015 at 11:43 PM, Bruce Ashfield
<bruce.ashfield@gmail.com> wrote:
> On Tue, Aug 4, 2015 at 2:32 PM, Mark Hatle <mark.hatle@windriver.com> wrote:
>> On 8/4/15 12:25 PM, Bystricky, Juro wrote:
>>> I agree, the name "kernel-headers" may not be the most fortunate, "linux-headers"
>>> is probably more fitting.  The recipe installs the files in a similar fashion that is done by
>>>
>>> apt-get install linux-headers-$(uname -r)
>>>
>>> Typical contents can be viewed for example here:
>>> https://www.archlinux.org/packages/core/i686/linux-headers/
>>>
>>> These files are needed to allow building  of kernel drivers against the running
>>> Linux kernel. In a way, it is a subset of kernel-devsrc, but including
>>>  ".config" file used for the actual running kernel.
>>
>> Again this is part of the purpose of the existing kernel-devsrc package.  So
>> what is missing preventing this from working.  It likely needs to be added to
>> the kernel-devsrc package instead (or a sub package that is created by the
>> kernel-devsrc recipe.)
>
> Peeking in on vacation.
>
> At a minimum, we need to figure out why the existing package wasn't
> able to build the use case in question here .. I've built pretty much everything
> against it at one point .. so I'd like to learn more.
>
> And yes, what we don't need is more sets of rules that copy and package
> parts of the kernel build. We are already doing that in our do_shared_workdir
> and that is pretty much the minimum to build against the kernel. If that
> directory structure needs more for this purpose (or less), then update it.
>
> But we need to do all of this in the existing classes, to keep everything in
> one place, not more recipes that are grabbing chunks of the same source
> tree.

FYI: exiting thoughts are here:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=7095

So as you can see, we aren't offended by a 'headers' package, but it has
to make sense with the existing packages, and needs to be generating
from our existing bits of the system.

Cheers,

Bruce

>
> Bruce
>
>
>>
>>> Having these files installed, it is possible  to compile additional
>>> kernel drivers that are not part of the kernel-devsrc .
>>>  VirtualBox compiles some of their own drivers this way, others as well.
>>> There are many other scenarios where you may want to add a new kernel
>>> driver to an already installed Linux kernel.
>>
>> Yes, this was part of the design behind the kernel-devsrc, make sure the sources
>> and components used to build the running kernel were made available to the
>> target so that out-of-tree/external kernel modules could be built to match the
>> running system -- as well as the ability to reconfigure and rebuild the kernel
>> itself.
>>
>> Bruce is on vacation this week and may not be around to respond, but adding yet
>> another package is not the right answer here.  Lets fix what may be broken in
>> what we have.
>>
>> --Mark
>>
>>> Juro
>>>
>>>
>>>
>>>> -----Original Message-----
>>>> From: Mark Hatle [mailto:mark.hatle@windriver.com]
>>>> Sent: Tuesday, August 4, 2015 9:20 AM
>>>> To: Bystricky, Juro; openembedded-core@lists.openembedded.org;
>>>> jurobystricky@hotmail.com
>>>> Cc: Purdie, Richard
>>>> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest additions
>>>>
>>>> On 8/3/15 3:35 PM, Juro Bystricky wrote:
>>>>> In order to support VirtualBox guest additions, kernel headers need to
>>>>> be present in the VM. I am aware we already have two packages/recipes
>>>>> that are somewhat similar (kernel-devsrc.bb, linux-libc-headers), but none
>>>> of them is suitable for this purpose.
>>>>> Besides the kernel headers, some additional files (scripts, Makefiles,
>>>>> .config, etc) are also required.
>>>>
>>>> linux-libc-headers is only for building applications.  kernel-devsrc is for
>>>> building modules on the target.
>>>>
>>>> What do these specific modules need that are not present in kernel-devsrc?
>>>> (I really don't want 'yet another' confusing package added to the system.)
>>>>
>>>>> The new recipe "kernel-headers.bb" can in principle be used by other
>>>> images as well.
>>>>> It is not limited to the Build Appliance and hence is not a part of
>>>>> the Build Appliance recipe.
>>>>
>>>> I think kernel-headers is a bad name for a package.  It could be confusing.
>>>>
>>>> --Mark
>>>>
>>>>> Juro Bystricky (2):
>>>>>   kernel-headers: linux kernel headers
>>>>>   build-appliance-image: support for VirtualBox guest addtions
>>>>>
>>>>>  .../README_vbox_guest_additions.txt                | 78
>>>> ++++++++++++++++++++++
>>>>>  .../images/build-appliance-image_12.0.1.bb         |  4 +-
>>>>>  meta/recipes-kernel/linux/kernel-headers.bb        | 66
>>>> ++++++++++++++++++
>>>>>  3 files changed, 147 insertions(+), 1 deletion(-)  create mode 100644
>>>>> meta/recipes-core/images/build-appliance-
>>>> image/README_vbox_guest_addit
>>>>> ions.txt  create mode 100644
>>>>> meta/recipes-kernel/linux/kernel-headers.bb
>>>>>
>>>
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
>
> --
> "Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end"



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/2] Support for VirtualBox guest additions
  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
  0 siblings, 2 replies; 28+ messages in thread
From: Bystricky, Juro @ 2015-08-05 22:02 UTC (permalink / raw)
  To: Bruce Ashfield, Hatle, Mark G (Wind River)
  Cc: Purdie, Richard, jurobystricky, openembedded-core

Thanks for the link. My new understanding is that kernel-dev package
should already have essentially the same functionality as the kernel-headers package,
which makes kernel-headers package redundant.
 I tried it, but it did not work.
To be specific, I expected to see the folder "/usr/lib/modules/3.19.5-yocto-standard/build"
however, it is missing . Looking at kernel.bbclass it seems it used to exist, but succumbed to
some bitrot.

Just to make sure  we are on the same page, this is what I would like to accomplish:
http://www.cyberciti.biz/tips/build-linux-kernel-module-against-installed-kernel-source-tree.html

Juro

> -----Original Message-----
> From: Bruce Ashfield [mailto:bruce.ashfield@gmail.com]
> Sent: Tuesday, August 4, 2015 7:49 PM
> To: Hatle, Mark G (Wind River)
> Cc: Bystricky, Juro; openembedded-core@lists.openembedded.org;
> jurobystricky@hotmail.com; Purdie, Richard
> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest additions
> 
> On Tue, Aug 4, 2015 at 11:43 PM, Bruce Ashfield <bruce.ashfield@gmail.com>
> wrote:
> > On Tue, Aug 4, 2015 at 2:32 PM, Mark Hatle <mark.hatle@windriver.com>
> wrote:
> >> On 8/4/15 12:25 PM, Bystricky, Juro wrote:
> >>> I agree, the name "kernel-headers" may not be the most fortunate,
> "linux-headers"
> >>> is probably more fitting.  The recipe installs the files in a
> >>> similar fashion that is done by
> >>>
> >>> apt-get install linux-headers-$(uname -r)
> >>>
> >>> Typical contents can be viewed for example here:
> >>> https://www.archlinux.org/packages/core/i686/linux-headers/
> >>>
> >>> These files are needed to allow building  of kernel drivers against
> >>> the running Linux kernel. In a way, it is a subset of kernel-devsrc,
> >>> but including  ".config" file used for the actual running kernel.
> >>
> >> Again this is part of the purpose of the existing kernel-devsrc
> >> package.  So what is missing preventing this from working.  It likely
> >> needs to be added to the kernel-devsrc package instead (or a sub
> >> package that is created by the kernel-devsrc recipe.)
> >
> > Peeking in on vacation.
> >
> > At a minimum, we need to figure out why the existing package wasn't
> > able to build the use case in question here .. I've built pretty much
> > everything against it at one point .. so I'd like to learn more.
> >
> > And yes, what we don't need is more sets of rules that copy and
> > package parts of the kernel build. We are already doing that in our
> > do_shared_workdir and that is pretty much the minimum to build against
> > the kernel. If that directory structure needs more for this purpose (or less),
> then update it.
> >
> > But we need to do all of this in the existing classes, to keep
> > everything in one place, not more recipes that are grabbing chunks of
> > the same source tree.
> 
> FYI: exiting thoughts are here:
> 
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=7095
> 
> So as you can see, we aren't offended by a 'headers' package, but it has to
> make sense with the existing packages, and needs to be generating from our
> existing bits of the system.
> 
> Cheers,
> 
> Bruce
> 
> >
> > Bruce
> >
> >
> >>
> >>> Having these files installed, it is possible  to compile additional
> >>> kernel drivers that are not part of the kernel-devsrc .
> >>>  VirtualBox compiles some of their own drivers this way, others as well.
> >>> There are many other scenarios where you may want to add a new
> >>> kernel driver to an already installed Linux kernel.
> >>
> >> Yes, this was part of the design behind the kernel-devsrc, make sure
> >> the sources and components used to build the running kernel were made
> >> available to the target so that out-of-tree/external kernel modules
> >> could be built to match the running system -- as well as the ability
> >> to reconfigure and rebuild the kernel itself.
> >>
> >> Bruce is on vacation this week and may not be around to respond, but
> >> adding yet another package is not the right answer here.  Lets fix
> >> what may be broken in what we have.
> >>
> >> --Mark
> >>
> >>> Juro
> >>>
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: Mark Hatle [mailto:mark.hatle@windriver.com]
> >>>> Sent: Tuesday, August 4, 2015 9:20 AM
> >>>> To: Bystricky, Juro; openembedded-core@lists.openembedded.org;
> >>>> jurobystricky@hotmail.com
> >>>> Cc: Purdie, Richard
> >>>> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest
> >>>> additions
> >>>>
> >>>> On 8/3/15 3:35 PM, Juro Bystricky wrote:
> >>>>> In order to support VirtualBox guest additions, kernel headers
> >>>>> need to be present in the VM. I am aware we already have two
> >>>>> packages/recipes that are somewhat similar (kernel-devsrc.bb,
> >>>>> linux-libc-headers), but none
> >>>> of them is suitable for this purpose.
> >>>>> Besides the kernel headers, some additional files (scripts,
> >>>>> Makefiles, .config, etc) are also required.
> >>>>
> >>>> linux-libc-headers is only for building applications.
> >>>> kernel-devsrc is for building modules on the target.
> >>>>
> >>>> What do these specific modules need that are not present in kernel-
> devsrc?
> >>>> (I really don't want 'yet another' confusing package added to the
> >>>> system.)
> >>>>
> >>>>> The new recipe "kernel-headers.bb" can in principle be used by
> >>>>> other
> >>>> images as well.
> >>>>> It is not limited to the Build Appliance and hence is not a part
> >>>>> of the Build Appliance recipe.
> >>>>
> >>>> I think kernel-headers is a bad name for a package.  It could be
> confusing.
> >>>>
> >>>> --Mark
> >>>>
> >>>>> Juro Bystricky (2):
> >>>>>   kernel-headers: linux kernel headers
> >>>>>   build-appliance-image: support for VirtualBox guest addtions
> >>>>>
> >>>>>  .../README_vbox_guest_additions.txt                | 78
> >>>> ++++++++++++++++++++++
> >>>>>  .../images/build-appliance-image_12.0.1.bb         |  4 +-
> >>>>>  meta/recipes-kernel/linux/kernel-headers.bb        | 66
> >>>> ++++++++++++++++++
> >>>>>  3 files changed, 147 insertions(+), 1 deletion(-)  create mode
> >>>>> 100644
> >>>>> meta/recipes-core/images/build-appliance-
> >>>> image/README_vbox_guest_addit
> >>>>> ions.txt  create mode 100644
> >>>>> meta/recipes-kernel/linux/kernel-headers.bb
> >>>>>
> >>>
> >>
> >> --
> >> _______________________________________________
> >> Openembedded-core mailing list
> >> Openembedded-core@lists.openembedded.org
> >> http://lists.openembedded.org/mailman/listinfo/openembedded-core
> >
> >
> >
> > --
> > "Thou shalt not follow the NULL pointer, for chaos and madness await
> > thee at its end"
> 
> 
> 
> --
> "Thou shalt not follow the NULL pointer, for chaos and madness await thee
> at its end"

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/2] Support for VirtualBox guest additions
  2015-08-05 22:02           ` Bystricky, Juro
@ 2015-08-06  2:09             ` Bruce Ashfield
  2015-08-06  2:20             ` Khem Raj
  1 sibling, 0 replies; 28+ messages in thread
From: Bruce Ashfield @ 2015-08-06  2:09 UTC (permalink / raw)
  To: Bystricky, Juro; +Cc: Purdie, Richard, jurobystricky, openembedded-core

On Wed, Aug 5, 2015 at 6:02 PM, Bystricky, Juro
<juro.bystricky@intel.com> wrote:
> Thanks for the link. My new understanding is that kernel-dev package
> should already have essentially the same functionality as the kernel-headers package,
> which makes kernel-headers package redundant.
>  I tried it, but it did not work.
> To be specific, I expected to see the folder "/usr/lib/modules/3.19.5-yocto-standard/build"
> however, it is missing . Looking at kernel.bbclass it seems it used to exist, but succumbed to
> some bitrot.

What release are you using ? master ? I just want to talk about the right
organization of the code.

and yes, the /usr/lib/modules/* path did exist, but with the move to
kernel-devsrc,
it appears to have been broken. Nothing is creating the directory, or a symlink
to point the convenience (or nothing that I can see from my scan).

As you can see from the mix of recipes/classes and the manipulations
of the parts of the tree .. that there are still some issues with the packaging
and we need to sort that out first, and then see if anything new really does
need to be created.

Rather than kernel-dev, you should be using kernel-devsrc in master, and we can
work to make kernel-devsrc have a smaller footprint with some additional
packaging changes (if required), but the full package should meet your current
need.

You said you tried it (kernel-devsrc), what errors did you run into there ?

>
> Just to make sure  we are on the same page, this is what I would like to accomplish:
> http://www.cyberciti.biz/tips/build-linux-kernel-module-against-installed-kernel-source-tree.html

Yep. This is what we test, so I'm still interested in the details of what broke
for you, if you have a recipe or captured output, I'd be interested in
seeing it,
so I can debug further.

I've built the entire kernel, modules, and thinks like the ATI / nvidia modules
against an installed kernel-dev package, so it did work as intended in those
cases .. that being said, me saying "it worked for me", isn't what I'm claiming
is the complete answer :)

I'm just away from my development machines at the moment, so I can't easily
spawn test builds for another 4 or 5 days.

Bruce

>
> Juro
>
>> -----Original Message-----
>> From: Bruce Ashfield [mailto:bruce.ashfield@gmail.com]
>> Sent: Tuesday, August 4, 2015 7:49 PM
>> To: Hatle, Mark G (Wind River)
>> Cc: Bystricky, Juro; openembedded-core@lists.openembedded.org;
>> jurobystricky@hotmail.com; Purdie, Richard
>> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest additions
>>
>> On Tue, Aug 4, 2015 at 11:43 PM, Bruce Ashfield <bruce.ashfield@gmail.com>
>> wrote:
>> > On Tue, Aug 4, 2015 at 2:32 PM, Mark Hatle <mark.hatle@windriver.com>
>> wrote:
>> >> On 8/4/15 12:25 PM, Bystricky, Juro wrote:
>> >>> I agree, the name "kernel-headers" may not be the most fortunate,
>> "linux-headers"
>> >>> is probably more fitting.  The recipe installs the files in a
>> >>> similar fashion that is done by
>> >>>
>> >>> apt-get install linux-headers-$(uname -r)
>> >>>
>> >>> Typical contents can be viewed for example here:
>> >>> https://www.archlinux.org/packages/core/i686/linux-headers/
>> >>>
>> >>> These files are needed to allow building  of kernel drivers against
>> >>> the running Linux kernel. In a way, it is a subset of kernel-devsrc,
>> >>> but including  ".config" file used for the actual running kernel.
>> >>
>> >> Again this is part of the purpose of the existing kernel-devsrc
>> >> package.  So what is missing preventing this from working.  It likely
>> >> needs to be added to the kernel-devsrc package instead (or a sub
>> >> package that is created by the kernel-devsrc recipe.)
>> >
>> > Peeking in on vacation.
>> >
>> > At a minimum, we need to figure out why the existing package wasn't
>> > able to build the use case in question here .. I've built pretty much
>> > everything against it at one point .. so I'd like to learn more.
>> >
>> > And yes, what we don't need is more sets of rules that copy and
>> > package parts of the kernel build. We are already doing that in our
>> > do_shared_workdir and that is pretty much the minimum to build against
>> > the kernel. If that directory structure needs more for this purpose (or less),
>> then update it.
>> >
>> > But we need to do all of this in the existing classes, to keep
>> > everything in one place, not more recipes that are grabbing chunks of
>> > the same source tree.
>>
>> FYI: exiting thoughts are here:
>>
>> https://bugzilla.yoctoproject.org/show_bug.cgi?id=7095
>>
>> So as you can see, we aren't offended by a 'headers' package, but it has to
>> make sense with the existing packages, and needs to be generating from our
>> existing bits of the system.
>>
>> Cheers,
>>
>> Bruce
>>
>> >
>> > Bruce
>> >
>> >
>> >>
>> >>> Having these files installed, it is possible  to compile additional
>> >>> kernel drivers that are not part of the kernel-devsrc .
>> >>>  VirtualBox compiles some of their own drivers this way, others as well.
>> >>> There are many other scenarios where you may want to add a new
>> >>> kernel driver to an already installed Linux kernel.
>> >>
>> >> Yes, this was part of the design behind the kernel-devsrc, make sure
>> >> the sources and components used to build the running kernel were made
>> >> available to the target so that out-of-tree/external kernel modules
>> >> could be built to match the running system -- as well as the ability
>> >> to reconfigure and rebuild the kernel itself.
>> >>
>> >> Bruce is on vacation this week and may not be around to respond, but
>> >> adding yet another package is not the right answer here.  Lets fix
>> >> what may be broken in what we have.
>> >>
>> >> --Mark
>> >>
>> >>> Juro
>> >>>
>> >>>
>> >>>
>> >>>> -----Original Message-----
>> >>>> From: Mark Hatle [mailto:mark.hatle@windriver.com]
>> >>>> Sent: Tuesday, August 4, 2015 9:20 AM
>> >>>> To: Bystricky, Juro; openembedded-core@lists.openembedded.org;
>> >>>> jurobystricky@hotmail.com
>> >>>> Cc: Purdie, Richard
>> >>>> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest
>> >>>> additions
>> >>>>
>> >>>> On 8/3/15 3:35 PM, Juro Bystricky wrote:
>> >>>>> In order to support VirtualBox guest additions, kernel headers
>> >>>>> need to be present in the VM. I am aware we already have two
>> >>>>> packages/recipes that are somewhat similar (kernel-devsrc.bb,
>> >>>>> linux-libc-headers), but none
>> >>>> of them is suitable for this purpose.
>> >>>>> Besides the kernel headers, some additional files (scripts,
>> >>>>> Makefiles, .config, etc) are also required.
>> >>>>
>> >>>> linux-libc-headers is only for building applications.
>> >>>> kernel-devsrc is for building modules on the target.
>> >>>>
>> >>>> What do these specific modules need that are not present in kernel-
>> devsrc?
>> >>>> (I really don't want 'yet another' confusing package added to the
>> >>>> system.)
>> >>>>
>> >>>>> The new recipe "kernel-headers.bb" can in principle be used by
>> >>>>> other
>> >>>> images as well.
>> >>>>> It is not limited to the Build Appliance and hence is not a part
>> >>>>> of the Build Appliance recipe.
>> >>>>
>> >>>> I think kernel-headers is a bad name for a package.  It could be
>> confusing.
>> >>>>
>> >>>> --Mark
>> >>>>
>> >>>>> Juro Bystricky (2):
>> >>>>>   kernel-headers: linux kernel headers
>> >>>>>   build-appliance-image: support for VirtualBox guest addtions
>> >>>>>
>> >>>>>  .../README_vbox_guest_additions.txt                | 78
>> >>>> ++++++++++++++++++++++
>> >>>>>  .../images/build-appliance-image_12.0.1.bb         |  4 +-
>> >>>>>  meta/recipes-kernel/linux/kernel-headers.bb        | 66
>> >>>> ++++++++++++++++++
>> >>>>>  3 files changed, 147 insertions(+), 1 deletion(-)  create mode
>> >>>>> 100644
>> >>>>> meta/recipes-core/images/build-appliance-
>> >>>> image/README_vbox_guest_addit
>> >>>>> ions.txt  create mode 100644
>> >>>>> meta/recipes-kernel/linux/kernel-headers.bb
>> >>>>>
>> >>>
>> >>
>> >> --
>> >> _______________________________________________
>> >> Openembedded-core mailing list
>> >> Openembedded-core@lists.openembedded.org
>> >> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>> >
>> >
>> >
>> > --
>> > "Thou shalt not follow the NULL pointer, for chaos and madness await
>> > thee at its end"
>>
>>
>>
>> --
>> "Thou shalt not follow the NULL pointer, for chaos and madness await thee
>> at its end"



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/2] Support for VirtualBox guest additions
  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
  1 sibling, 1 reply; 28+ messages in thread
From: Khem Raj @ 2015-08-06  2:20 UTC (permalink / raw)
  To: Bystricky, Juro; +Cc: Purdie, Richard, jurobystricky, openembedded-core

On Wed, Aug 5, 2015 at 3:02 PM, Bystricky, Juro
<juro.bystricky@intel.com> wrote:
> Thanks for the link. My new understanding is that kernel-dev package
> should already have essentially the same functionality as the kernel-headers package,
> which makes kernel-headers package redundant.
>  I tried it, but it did not work.
> To be specific, I expected to see the folder "/usr/lib/modules/3.19.5-yocto-standard/build"
> however, it is missing . Looking at kernel.bbclass it seems it used to exist, but succumbed to
> some bitrot.
>

have you thought of looking at the guest additions package and see if
it could be doing something
that can be fixed ? what you need here is kernel development files on
target I assume, that should be easier than
cross-build scenario which we have not fixed completely. I think this
additional headers package is redundant.
you could get by fixing the existing kernel-headers package ( for
target) if anything is missing.

How is guest additions compiled ? is it during build or dynamically on target ?

> Just to make sure  we are on the same page, this is what I would like to accomplish:
> http://www.cyberciti.biz/tips/build-linux-kernel-module-against-installed-kernel-source-tree.html
>
> Juro
>
>> -----Original Message-----
>> From: Bruce Ashfield [mailto:bruce.ashfield@gmail.com]
>> Sent: Tuesday, August 4, 2015 7:49 PM
>> To: Hatle, Mark G (Wind River)
>> Cc: Bystricky, Juro; openembedded-core@lists.openembedded.org;
>> jurobystricky@hotmail.com; Purdie, Richard
>> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest additions
>>
>> On Tue, Aug 4, 2015 at 11:43 PM, Bruce Ashfield <bruce.ashfield@gmail.com>
>> wrote:
>> > On Tue, Aug 4, 2015 at 2:32 PM, Mark Hatle <mark.hatle@windriver.com>
>> wrote:
>> >> On 8/4/15 12:25 PM, Bystricky, Juro wrote:
>> >>> I agree, the name "kernel-headers" may not be the most fortunate,
>> "linux-headers"
>> >>> is probably more fitting.  The recipe installs the files in a
>> >>> similar fashion that is done by
>> >>>
>> >>> apt-get install linux-headers-$(uname -r)
>> >>>
>> >>> Typical contents can be viewed for example here:
>> >>> https://www.archlinux.org/packages/core/i686/linux-headers/
>> >>>
>> >>> These files are needed to allow building  of kernel drivers against
>> >>> the running Linux kernel. In a way, it is a subset of kernel-devsrc,
>> >>> but including  ".config" file used for the actual running kernel.
>> >>
>> >> Again this is part of the purpose of the existing kernel-devsrc
>> >> package.  So what is missing preventing this from working.  It likely
>> >> needs to be added to the kernel-devsrc package instead (or a sub
>> >> package that is created by the kernel-devsrc recipe.)
>> >
>> > Peeking in on vacation.
>> >
>> > At a minimum, we need to figure out why the existing package wasn't
>> > able to build the use case in question here .. I've built pretty much
>> > everything against it at one point .. so I'd like to learn more.
>> >
>> > And yes, what we don't need is more sets of rules that copy and
>> > package parts of the kernel build. We are already doing that in our
>> > do_shared_workdir and that is pretty much the minimum to build against
>> > the kernel. If that directory structure needs more for this purpose (or less),
>> then update it.
>> >
>> > But we need to do all of this in the existing classes, to keep
>> > everything in one place, not more recipes that are grabbing chunks of
>> > the same source tree.
>>
>> FYI: exiting thoughts are here:
>>
>> https://bugzilla.yoctoproject.org/show_bug.cgi?id=7095
>>
>> So as you can see, we aren't offended by a 'headers' package, but it has to
>> make sense with the existing packages, and needs to be generating from our
>> existing bits of the system.
>>
>> Cheers,
>>
>> Bruce
>>
>> >
>> > Bruce
>> >
>> >
>> >>
>> >>> Having these files installed, it is possible  to compile additional
>> >>> kernel drivers that are not part of the kernel-devsrc .
>> >>>  VirtualBox compiles some of their own drivers this way, others as well.
>> >>> There are many other scenarios where you may want to add a new
>> >>> kernel driver to an already installed Linux kernel.
>> >>
>> >> Yes, this was part of the design behind the kernel-devsrc, make sure
>> >> the sources and components used to build the running kernel were made
>> >> available to the target so that out-of-tree/external kernel modules
>> >> could be built to match the running system -- as well as the ability
>> >> to reconfigure and rebuild the kernel itself.
>> >>
>> >> Bruce is on vacation this week and may not be around to respond, but
>> >> adding yet another package is not the right answer here.  Lets fix
>> >> what may be broken in what we have.
>> >>
>> >> --Mark
>> >>
>> >>> Juro
>> >>>
>> >>>
>> >>>
>> >>>> -----Original Message-----
>> >>>> From: Mark Hatle [mailto:mark.hatle@windriver.com]
>> >>>> Sent: Tuesday, August 4, 2015 9:20 AM
>> >>>> To: Bystricky, Juro; openembedded-core@lists.openembedded.org;
>> >>>> jurobystricky@hotmail.com
>> >>>> Cc: Purdie, Richard
>> >>>> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest
>> >>>> additions
>> >>>>
>> >>>> On 8/3/15 3:35 PM, Juro Bystricky wrote:
>> >>>>> In order to support VirtualBox guest additions, kernel headers
>> >>>>> need to be present in the VM. I am aware we already have two
>> >>>>> packages/recipes that are somewhat similar (kernel-devsrc.bb,
>> >>>>> linux-libc-headers), but none
>> >>>> of them is suitable for this purpose.
>> >>>>> Besides the kernel headers, some additional files (scripts,
>> >>>>> Makefiles, .config, etc) are also required.
>> >>>>
>> >>>> linux-libc-headers is only for building applications.
>> >>>> kernel-devsrc is for building modules on the target.
>> >>>>
>> >>>> What do these specific modules need that are not present in kernel-
>> devsrc?
>> >>>> (I really don't want 'yet another' confusing package added to the
>> >>>> system.)
>> >>>>
>> >>>>> The new recipe "kernel-headers.bb" can in principle be used by
>> >>>>> other
>> >>>> images as well.
>> >>>>> It is not limited to the Build Appliance and hence is not a part
>> >>>>> of the Build Appliance recipe.
>> >>>>
>> >>>> I think kernel-headers is a bad name for a package.  It could be
>> confusing.
>> >>>>
>> >>>> --Mark
>> >>>>
>> >>>>> Juro Bystricky (2):
>> >>>>>   kernel-headers: linux kernel headers
>> >>>>>   build-appliance-image: support for VirtualBox guest addtions
>> >>>>>
>> >>>>>  .../README_vbox_guest_additions.txt                | 78
>> >>>> ++++++++++++++++++++++
>> >>>>>  .../images/build-appliance-image_12.0.1.bb         |  4 +-
>> >>>>>  meta/recipes-kernel/linux/kernel-headers.bb        | 66
>> >>>> ++++++++++++++++++
>> >>>>>  3 files changed, 147 insertions(+), 1 deletion(-)  create mode
>> >>>>> 100644
>> >>>>> meta/recipes-core/images/build-appliance-
>> >>>> image/README_vbox_guest_addit
>> >>>>> ions.txt  create mode 100644
>> >>>>> meta/recipes-kernel/linux/kernel-headers.bb
>> >>>>>
>> >>>
>> >>
>> >> --
>> >> _______________________________________________
>> >> Openembedded-core mailing list
>> >> Openembedded-core@lists.openembedded.org
>> >> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>> >
>> >
>> >
>> > --
>> > "Thou shalt not follow the NULL pointer, for chaos and madness await
>> > thee at its end"
>>
>>
>>
>> --
>> "Thou shalt not follow the NULL pointer, for chaos and madness await thee
>> at its end"
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/2] Support for VirtualBox guest additions
  2015-08-06  2:20             ` Khem Raj
@ 2015-08-07 22:13               ` Bystricky, Juro
  2015-08-08  1:09                 ` Bruce Ashfield
  0 siblings, 1 reply; 28+ messages in thread
From: Bystricky, Juro @ 2015-08-07 22:13 UTC (permalink / raw)
  To: Khem Raj; +Cc: Purdie, Richard, jurobystricky, openembedded-core

The guest additions basically use standard out-of-tree kernel device driver 
build  (as described http://www.cyberciti.biz/tips/build-linux-kernel-module-against-installed-kernel-source-tree.html)

The build relies on the existence of  "/lib/modules/<kernel-version>/build",  containing (or symlink to) a necessary set
of  kernel development files. This is not really VirtualBox guest additions specific, it seems to be a common
packaging/install convention when installing  kernel development files via

apt-get install linux-headers-$(uname -r)

The  actual development files, AFAIK they can be installed in one of two ways:
1. Full kernel source tree (over 500MB)
2. Subset of the full kernel sources ("kernel-headers" or "linux-headers").
 These are  basically header files, Makefiles, scripts, .config, firware  and such. About 100MB.

The full set is provided by kernel-devsrc.
The subset should be provided by kernel-dev (but is not)

At some point kernel-dev provided the symlink , "/lib/modules/<kernel-version>/build".
The symlink  does not exist anymore. However, kernel.bbclass still contains some references to the 
/lib/modules/${KERNEL_VERSION}/build  in FILES_kernel-dev 






> -----Original Message-----
> From: Khem Raj [mailto:raj.khem@gmail.com]
> Sent: Wednesday, August 5, 2015 7:20 PM
> To: Bystricky, Juro
> Cc: Bruce Ashfield; Hatle, Mark G (Wind River); Purdie, Richard;
> jurobystricky@hotmail.com; openembedded-
> core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest additions
> 
> On Wed, Aug 5, 2015 at 3:02 PM, Bystricky, Juro <juro.bystricky@intel.com>
> wrote:
> > Thanks for the link. My new understanding is that kernel-dev package
> > should already have essentially the same functionality as the
> > kernel-headers package, which makes kernel-headers package redundant.
> >  I tried it, but it did not work.
> > To be specific, I expected to see the folder "/usr/lib/modules/3.19.5-yocto-
> standard/build"
> > however, it is missing . Looking at kernel.bbclass it seems it used to
> > exist, but succumbed to some bitrot.
> >
> 
> have you thought of looking at the guest additions package and see if it could
> be doing something that can be fixed ? what you need here is kernel
> development files on target I assume, that should be easier than cross-build
> scenario which we have not fixed completely. I think this additional headers
> package is redundant.
> you could get by fixing the existing kernel-headers package ( for
> target) if anything is missing.
> 
> How is guest additions compiled ? is it during build or dynamically on target ?
> 
> > Just to make sure  we are on the same page, this is what I would like to
> accomplish:
> > http://www.cyberciti.biz/tips/build-linux-kernel-module-against-instal
> > led-kernel-source-tree.html
> >
> > Juro
> >
> >> -----Original Message-----
> >> From: Bruce Ashfield [mailto:bruce.ashfield@gmail.com]
> >> Sent: Tuesday, August 4, 2015 7:49 PM
> >> To: Hatle, Mark G (Wind River)
> >> Cc: Bystricky, Juro; openembedded-core@lists.openembedded.org;
> >> jurobystricky@hotmail.com; Purdie, Richard
> >> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest
> >> additions
> >>
> >> On Tue, Aug 4, 2015 at 11:43 PM, Bruce Ashfield
> >> <bruce.ashfield@gmail.com>
> >> wrote:
> >> > On Tue, Aug 4, 2015 at 2:32 PM, Mark Hatle
> >> > <mark.hatle@windriver.com>
> >> wrote:
> >> >> On 8/4/15 12:25 PM, Bystricky, Juro wrote:
> >> >>> I agree, the name "kernel-headers" may not be the most fortunate,
> >> "linux-headers"
> >> >>> is probably more fitting.  The recipe installs the files in a
> >> >>> similar fashion that is done by
> >> >>>
> >> >>> apt-get install linux-headers-$(uname -r)
> >> >>>
> >> >>> Typical contents can be viewed for example here:
> >> >>> https://www.archlinux.org/packages/core/i686/linux-headers/
> >> >>>
> >> >>> These files are needed to allow building  of kernel drivers
> >> >>> against the running Linux kernel. In a way, it is a subset of
> >> >>> kernel-devsrc, but including  ".config" file used for the actual running
> kernel.
> >> >>
> >> >> Again this is part of the purpose of the existing kernel-devsrc
> >> >> package.  So what is missing preventing this from working.  It
> >> >> likely needs to be added to the kernel-devsrc package instead (or
> >> >> a sub package that is created by the kernel-devsrc recipe.)
> >> >
> >> > Peeking in on vacation.
> >> >
> >> > At a minimum, we need to figure out why the existing package wasn't
> >> > able to build the use case in question here .. I've built pretty
> >> > much everything against it at one point .. so I'd like to learn more.
> >> >
> >> > And yes, what we don't need is more sets of rules that copy and
> >> > package parts of the kernel build. We are already doing that in our
> >> > do_shared_workdir and that is pretty much the minimum to build
> >> > against the kernel. If that directory structure needs more for this
> >> > purpose (or less),
> >> then update it.
> >> >
> >> > But we need to do all of this in the existing classes, to keep
> >> > everything in one place, not more recipes that are grabbing chunks
> >> > of the same source tree.
> >>
> >> FYI: exiting thoughts are here:
> >>
> >> https://bugzilla.yoctoproject.org/show_bug.cgi?id=7095
> >>
> >> So as you can see, we aren't offended by a 'headers' package, but it
> >> has to make sense with the existing packages, and needs to be
> >> generating from our existing bits of the system.
> >>
> >> Cheers,
> >>
> >> Bruce
> >>
> >> >
> >> > Bruce
> >> >
> >> >
> >> >>
> >> >>> Having these files installed, it is possible  to compile
> >> >>> additional kernel drivers that are not part of the kernel-devsrc .
> >> >>>  VirtualBox compiles some of their own drivers this way, others as
> well.
> >> >>> There are many other scenarios where you may want to add a new
> >> >>> kernel driver to an already installed Linux kernel.
> >> >>
> >> >> Yes, this was part of the design behind the kernel-devsrc, make
> >> >> sure the sources and components used to build the running kernel
> >> >> were made available to the target so that out-of-tree/external
> >> >> kernel modules could be built to match the running system -- as
> >> >> well as the ability to reconfigure and rebuild the kernel itself.
> >> >>
> >> >> Bruce is on vacation this week and may not be around to respond,
> >> >> but adding yet another package is not the right answer here.  Lets
> >> >> fix what may be broken in what we have.
> >> >>
> >> >> --Mark
> >> >>
> >> >>> Juro
> >> >>>
> >> >>>
> >> >>>
> >> >>>> -----Original Message-----
> >> >>>> From: Mark Hatle [mailto:mark.hatle@windriver.com]
> >> >>>> Sent: Tuesday, August 4, 2015 9:20 AM
> >> >>>> To: Bystricky, Juro; openembedded-core@lists.openembedded.org;
> >> >>>> jurobystricky@hotmail.com
> >> >>>> Cc: Purdie, Richard
> >> >>>> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest
> >> >>>> additions
> >> >>>>
> >> >>>> On 8/3/15 3:35 PM, Juro Bystricky wrote:
> >> >>>>> In order to support VirtualBox guest additions, kernel headers
> >> >>>>> need to be present in the VM. I am aware we already have two
> >> >>>>> packages/recipes that are somewhat similar (kernel-devsrc.bb,
> >> >>>>> linux-libc-headers), but none
> >> >>>> of them is suitable for this purpose.
> >> >>>>> Besides the kernel headers, some additional files (scripts,
> >> >>>>> Makefiles, .config, etc) are also required.
> >> >>>>
> >> >>>> linux-libc-headers is only for building applications.
> >> >>>> kernel-devsrc is for building modules on the target.
> >> >>>>
> >> >>>> What do these specific modules need that are not present in
> >> >>>> kernel-
> >> devsrc?
> >> >>>> (I really don't want 'yet another' confusing package added to
> >> >>>> the
> >> >>>> system.)
> >> >>>>
> >> >>>>> The new recipe "kernel-headers.bb" can in principle be used by
> >> >>>>> other
> >> >>>> images as well.
> >> >>>>> It is not limited to the Build Appliance and hence is not a
> >> >>>>> part of the Build Appliance recipe.
> >> >>>>
> >> >>>> I think kernel-headers is a bad name for a package.  It could be
> >> confusing.
> >> >>>>
> >> >>>> --Mark
> >> >>>>
> >> >>>>> Juro Bystricky (2):
> >> >>>>>   kernel-headers: linux kernel headers
> >> >>>>>   build-appliance-image: support for VirtualBox guest addtions
> >> >>>>>
> >> >>>>>  .../README_vbox_guest_additions.txt                | 78
> >> >>>> ++++++++++++++++++++++
> >> >>>>>  .../images/build-appliance-image_12.0.1.bb         |  4 +-
> >> >>>>>  meta/recipes-kernel/linux/kernel-headers.bb        | 66
> >> >>>> ++++++++++++++++++
> >> >>>>>  3 files changed, 147 insertions(+), 1 deletion(-)  create mode
> >> >>>>> 100644
> >> >>>>> meta/recipes-core/images/build-appliance-
> >> >>>> image/README_vbox_guest_addit
> >> >>>>> ions.txt  create mode 100644
> >> >>>>> meta/recipes-kernel/linux/kernel-headers.bb
> >> >>>>>
> >> >>>
> >> >>
> >> >> --
> >> >> _______________________________________________
> >> >> Openembedded-core mailing list
> >> >> Openembedded-core@lists.openembedded.org
> >> >> http://lists.openembedded.org/mailman/listinfo/openembedded-
> core
> >> >
> >> >
> >> >
> >> > --
> >> > "Thou shalt not follow the NULL pointer, for chaos and madness
> >> > await thee at its end"
> >>
> >>
> >>
> >> --
> >> "Thou shalt not follow the NULL pointer, for chaos and madness await
> >> thee at its end"
> > --
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/2] Support for VirtualBox guest additions
  2015-08-07 22:13               ` Bystricky, Juro
@ 2015-08-08  1:09                 ` Bruce Ashfield
  2015-08-08 17:36                   ` Bystricky, Juro
  0 siblings, 1 reply; 28+ messages in thread
From: Bruce Ashfield @ 2015-08-08  1:09 UTC (permalink / raw)
  To: Bystricky, Juro; +Cc: Purdie, Richard, jurobystricky, openembedded-core

On Fri, Aug 7, 2015 at 6:13 PM, Bystricky, Juro
<juro.bystricky@intel.com> wrote:
> The guest additions basically use standard out-of-tree kernel device driver
> build  (as described http://www.cyberciti.biz/tips/build-linux-kernel-module-against-installed-kernel-source-tree.html)
>
> The build relies on the existence of  "/lib/modules/<kernel-version>/build",  containing (or symlink to) a necessary set
> of  kernel development files. This is not really VirtualBox guest additions specific, it seems to be a common
> packaging/install convention when installing  kernel development files via
>
> apt-get install linux-headers-$(uname -r)
>
> The  actual development files, AFAIK they can be installed in one of two ways:
> 1. Full kernel source tree (over 500MB)
> 2. Subset of the full kernel sources ("kernel-headers" or "linux-headers").
>  These are  basically header files, Makefiles, scripts, .config, firware  and such. About 100MB.
>
> The full set is provided by kernel-devsrc.
> The subset should be provided by kernel-dev (but is not)
>
> At some point kernel-dev provided the symlink , "/lib/modules/<kernel-version>/build".
> The symlink  does not exist anymore. However, kernel.bbclass still contains some references to the
> /lib/modules/${KERNEL_VERSION}/build  in FILES_kernel-dev
>

Can you update the bugzilla that I referenced with the details ? We can use that
bug to tweak our existing packages/recipes (versus adding something new).

Bruce

>
>
>
>
>
>> -----Original Message-----
>> From: Khem Raj [mailto:raj.khem@gmail.com]
>> Sent: Wednesday, August 5, 2015 7:20 PM
>> To: Bystricky, Juro
>> Cc: Bruce Ashfield; Hatle, Mark G (Wind River); Purdie, Richard;
>> jurobystricky@hotmail.com; openembedded-
>> core@lists.openembedded.org
>> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest additions
>>
>> On Wed, Aug 5, 2015 at 3:02 PM, Bystricky, Juro <juro.bystricky@intel.com>
>> wrote:
>> > Thanks for the link. My new understanding is that kernel-dev package
>> > should already have essentially the same functionality as the
>> > kernel-headers package, which makes kernel-headers package redundant.
>> >  I tried it, but it did not work.
>> > To be specific, I expected to see the folder "/usr/lib/modules/3.19.5-yocto-
>> standard/build"
>> > however, it is missing . Looking at kernel.bbclass it seems it used to
>> > exist, but succumbed to some bitrot.
>> >
>>
>> have you thought of looking at the guest additions package and see if it could
>> be doing something that can be fixed ? what you need here is kernel
>> development files on target I assume, that should be easier than cross-build
>> scenario which we have not fixed completely. I think this additional headers
>> package is redundant.
>> you could get by fixing the existing kernel-headers package ( for
>> target) if anything is missing.
>>
>> How is guest additions compiled ? is it during build or dynamically on target ?
>>
>> > Just to make sure  we are on the same page, this is what I would like to
>> accomplish:
>> > http://www.cyberciti.biz/tips/build-linux-kernel-module-against-instal
>> > led-kernel-source-tree.html
>> >
>> > Juro
>> >
>> >> -----Original Message-----
>> >> From: Bruce Ashfield [mailto:bruce.ashfield@gmail.com]
>> >> Sent: Tuesday, August 4, 2015 7:49 PM
>> >> To: Hatle, Mark G (Wind River)
>> >> Cc: Bystricky, Juro; openembedded-core@lists.openembedded.org;
>> >> jurobystricky@hotmail.com; Purdie, Richard
>> >> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest
>> >> additions
>> >>
>> >> On Tue, Aug 4, 2015 at 11:43 PM, Bruce Ashfield
>> >> <bruce.ashfield@gmail.com>
>> >> wrote:
>> >> > On Tue, Aug 4, 2015 at 2:32 PM, Mark Hatle
>> >> > <mark.hatle@windriver.com>
>> >> wrote:
>> >> >> On 8/4/15 12:25 PM, Bystricky, Juro wrote:
>> >> >>> I agree, the name "kernel-headers" may not be the most fortunate,
>> >> "linux-headers"
>> >> >>> is probably more fitting.  The recipe installs the files in a
>> >> >>> similar fashion that is done by
>> >> >>>
>> >> >>> apt-get install linux-headers-$(uname -r)
>> >> >>>
>> >> >>> Typical contents can be viewed for example here:
>> >> >>> https://www.archlinux.org/packages/core/i686/linux-headers/
>> >> >>>
>> >> >>> These files are needed to allow building  of kernel drivers
>> >> >>> against the running Linux kernel. In a way, it is a subset of
>> >> >>> kernel-devsrc, but including  ".config" file used for the actual running
>> kernel.
>> >> >>
>> >> >> Again this is part of the purpose of the existing kernel-devsrc
>> >> >> package.  So what is missing preventing this from working.  It
>> >> >> likely needs to be added to the kernel-devsrc package instead (or
>> >> >> a sub package that is created by the kernel-devsrc recipe.)
>> >> >
>> >> > Peeking in on vacation.
>> >> >
>> >> > At a minimum, we need to figure out why the existing package wasn't
>> >> > able to build the use case in question here .. I've built pretty
>> >> > much everything against it at one point .. so I'd like to learn more.
>> >> >
>> >> > And yes, what we don't need is more sets of rules that copy and
>> >> > package parts of the kernel build. We are already doing that in our
>> >> > do_shared_workdir and that is pretty much the minimum to build
>> >> > against the kernel. If that directory structure needs more for this
>> >> > purpose (or less),
>> >> then update it.
>> >> >
>> >> > But we need to do all of this in the existing classes, to keep
>> >> > everything in one place, not more recipes that are grabbing chunks
>> >> > of the same source tree.
>> >>
>> >> FYI: exiting thoughts are here:
>> >>
>> >> https://bugzilla.yoctoproject.org/show_bug.cgi?id=7095
>> >>
>> >> So as you can see, we aren't offended by a 'headers' package, but it
>> >> has to make sense with the existing packages, and needs to be
>> >> generating from our existing bits of the system.
>> >>
>> >> Cheers,
>> >>
>> >> Bruce
>> >>
>> >> >
>> >> > Bruce
>> >> >
>> >> >
>> >> >>
>> >> >>> Having these files installed, it is possible  to compile
>> >> >>> additional kernel drivers that are not part of the kernel-devsrc .
>> >> >>>  VirtualBox compiles some of their own drivers this way, others as
>> well.
>> >> >>> There are many other scenarios where you may want to add a new
>> >> >>> kernel driver to an already installed Linux kernel.
>> >> >>
>> >> >> Yes, this was part of the design behind the kernel-devsrc, make
>> >> >> sure the sources and components used to build the running kernel
>> >> >> were made available to the target so that out-of-tree/external
>> >> >> kernel modules could be built to match the running system -- as
>> >> >> well as the ability to reconfigure and rebuild the kernel itself.
>> >> >>
>> >> >> Bruce is on vacation this week and may not be around to respond,
>> >> >> but adding yet another package is not the right answer here.  Lets
>> >> >> fix what may be broken in what we have.
>> >> >>
>> >> >> --Mark
>> >> >>
>> >> >>> Juro
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>> -----Original Message-----
>> >> >>>> From: Mark Hatle [mailto:mark.hatle@windriver.com]
>> >> >>>> Sent: Tuesday, August 4, 2015 9:20 AM
>> >> >>>> To: Bystricky, Juro; openembedded-core@lists.openembedded.org;
>> >> >>>> jurobystricky@hotmail.com
>> >> >>>> Cc: Purdie, Richard
>> >> >>>> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest
>> >> >>>> additions
>> >> >>>>
>> >> >>>> On 8/3/15 3:35 PM, Juro Bystricky wrote:
>> >> >>>>> In order to support VirtualBox guest additions, kernel headers
>> >> >>>>> need to be present in the VM. I am aware we already have two
>> >> >>>>> packages/recipes that are somewhat similar (kernel-devsrc.bb,
>> >> >>>>> linux-libc-headers), but none
>> >> >>>> of them is suitable for this purpose.
>> >> >>>>> Besides the kernel headers, some additional files (scripts,
>> >> >>>>> Makefiles, .config, etc) are also required.
>> >> >>>>
>> >> >>>> linux-libc-headers is only for building applications.
>> >> >>>> kernel-devsrc is for building modules on the target.
>> >> >>>>
>> >> >>>> What do these specific modules need that are not present in
>> >> >>>> kernel-
>> >> devsrc?
>> >> >>>> (I really don't want 'yet another' confusing package added to
>> >> >>>> the
>> >> >>>> system.)
>> >> >>>>
>> >> >>>>> The new recipe "kernel-headers.bb" can in principle be used by
>> >> >>>>> other
>> >> >>>> images as well.
>> >> >>>>> It is not limited to the Build Appliance and hence is not a
>> >> >>>>> part of the Build Appliance recipe.
>> >> >>>>
>> >> >>>> I think kernel-headers is a bad name for a package.  It could be
>> >> confusing.
>> >> >>>>
>> >> >>>> --Mark
>> >> >>>>
>> >> >>>>> Juro Bystricky (2):
>> >> >>>>>   kernel-headers: linux kernel headers
>> >> >>>>>   build-appliance-image: support for VirtualBox guest addtions
>> >> >>>>>
>> >> >>>>>  .../README_vbox_guest_additions.txt                | 78
>> >> >>>> ++++++++++++++++++++++
>> >> >>>>>  .../images/build-appliance-image_12.0.1.bb         |  4 +-
>> >> >>>>>  meta/recipes-kernel/linux/kernel-headers.bb        | 66
>> >> >>>> ++++++++++++++++++
>> >> >>>>>  3 files changed, 147 insertions(+), 1 deletion(-)  create mode
>> >> >>>>> 100644
>> >> >>>>> meta/recipes-core/images/build-appliance-
>> >> >>>> image/README_vbox_guest_addit
>> >> >>>>> ions.txt  create mode 100644
>> >> >>>>> meta/recipes-kernel/linux/kernel-headers.bb
>> >> >>>>>
>> >> >>>
>> >> >>
>> >> >> --
>> >> >> _______________________________________________
>> >> >> Openembedded-core mailing list
>> >> >> Openembedded-core@lists.openembedded.org
>> >> >> http://lists.openembedded.org/mailman/listinfo/openembedded-
>> core
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > "Thou shalt not follow the NULL pointer, for chaos and madness
>> >> > await thee at its end"
>> >>
>> >>
>> >>
>> >> --
>> >> "Thou shalt not follow the NULL pointer, for chaos and madness await
>> >> thee at its end"
>> > --
>> > _______________________________________________
>> > Openembedded-core mailing list
>> > Openembedded-core@lists.openembedded.org
>> > http://lists.openembedded.org/mailman/listinfo/openembedded-core



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/2] Support for VirtualBox guest additions
  2015-08-08  1:09                 ` Bruce Ashfield
@ 2015-08-08 17:36                   ` Bystricky, Juro
  0 siblings, 0 replies; 28+ messages in thread
From: Bystricky, Juro @ 2015-08-08 17:36 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: Purdie, Richard, jurobystricky, openembedded-core

Done.
 https://bugzilla.yoctoproject.org/show_bug.cgi?id=7095

> -----Original Message-----
> From: Bruce Ashfield [mailto:bruce.ashfield@gmail.com]
> Sent: Friday, August 7, 2015 6:09 PM
> To: Bystricky, Juro
> Cc: Khem Raj; Hatle, Mark G (Wind River); Purdie, Richard;
> jurobystricky@hotmail.com; openembedded-
> core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest additions
> 
> On Fri, Aug 7, 2015 at 6:13 PM, Bystricky, Juro <juro.bystricky@intel.com>
> wrote:
> > The guest additions basically use standard out-of-tree kernel device
> > driver build  (as described
> > http://www.cyberciti.biz/tips/build-linux-kernel-module-against-instal
> > led-kernel-source-tree.html)
> >
> > The build relies on the existence of
> > "/lib/modules/<kernel-version>/build",  containing (or symlink to) a
> > necessary set of  kernel development files. This is not really
> > VirtualBox guest additions specific, it seems to be a common
> > packaging/install convention when installing  kernel development files
> > via
> >
> > apt-get install linux-headers-$(uname -r)
> >
> > The  actual development files, AFAIK they can be installed in one of two
> ways:
> > 1. Full kernel source tree (over 500MB) 2. Subset of the full kernel
> > sources ("kernel-headers" or "linux-headers").
> >  These are  basically header files, Makefiles, scripts, .config, firware  and
> such. About 100MB.
> >
> > The full set is provided by kernel-devsrc.
> > The subset should be provided by kernel-dev (but is not)
> >
> > At some point kernel-dev provided the symlink , "/lib/modules/<kernel-
> version>/build".
> > The symlink  does not exist anymore. However, kernel.bbclass still
> > contains some references to the /lib/modules/${KERNEL_VERSION}/build
> > in FILES_kernel-dev
> >
> 
> Can you update the bugzilla that I referenced with the details ? We can use
> that bug to tweak our existing packages/recipes (versus adding something
> new).
> 
> Bruce
> 
> >
> >
> >
> >
> >
> >> -----Original Message-----
> >> From: Khem Raj [mailto:raj.khem@gmail.com]
> >> Sent: Wednesday, August 5, 2015 7:20 PM
> >> To: Bystricky, Juro
> >> Cc: Bruce Ashfield; Hatle, Mark G (Wind River); Purdie, Richard;
> >> jurobystricky@hotmail.com; openembedded-
> core@lists.openembedded.org
> >> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest
> >> additions
> >>
> >> On Wed, Aug 5, 2015 at 3:02 PM, Bystricky, Juro
> >> <juro.bystricky@intel.com>
> >> wrote:
> >> > Thanks for the link. My new understanding is that kernel-dev
> >> > package should already have essentially the same functionality as
> >> > the kernel-headers package, which makes kernel-headers package
> redundant.
> >> >  I tried it, but it did not work.
> >> > To be specific, I expected to see the folder
> >> > "/usr/lib/modules/3.19.5-yocto-
> >> standard/build"
> >> > however, it is missing . Looking at kernel.bbclass it seems it used
> >> > to exist, but succumbed to some bitrot.
> >> >
> >>
> >> have you thought of looking at the guest additions package and see if
> >> it could be doing something that can be fixed ? what you need here is
> >> kernel development files on target I assume, that should be easier
> >> than cross-build scenario which we have not fixed completely. I think
> >> this additional headers package is redundant.
> >> you could get by fixing the existing kernel-headers package ( for
> >> target) if anything is missing.
> >>
> >> How is guest additions compiled ? is it during build or dynamically on
> target ?
> >>
> >> > Just to make sure  we are on the same page, this is what I would
> >> > like to
> >> accomplish:
> >> > http://www.cyberciti.biz/tips/build-linux-kernel-module-against-ins
> >> > tal
> >> > led-kernel-source-tree.html
> >> >
> >> > Juro
> >> >
> >> >> -----Original Message-----
> >> >> From: Bruce Ashfield [mailto:bruce.ashfield@gmail.com]
> >> >> Sent: Tuesday, August 4, 2015 7:49 PM
> >> >> To: Hatle, Mark G (Wind River)
> >> >> Cc: Bystricky, Juro; openembedded-core@lists.openembedded.org;
> >> >> jurobystricky@hotmail.com; Purdie, Richard
> >> >> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox guest
> >> >> additions
> >> >>
> >> >> On Tue, Aug 4, 2015 at 11:43 PM, Bruce Ashfield
> >> >> <bruce.ashfield@gmail.com>
> >> >> wrote:
> >> >> > On Tue, Aug 4, 2015 at 2:32 PM, Mark Hatle
> >> >> > <mark.hatle@windriver.com>
> >> >> wrote:
> >> >> >> On 8/4/15 12:25 PM, Bystricky, Juro wrote:
> >> >> >>> I agree, the name "kernel-headers" may not be the most
> >> >> >>> fortunate,
> >> >> "linux-headers"
> >> >> >>> is probably more fitting.  The recipe installs the files in a
> >> >> >>> similar fashion that is done by
> >> >> >>>
> >> >> >>> apt-get install linux-headers-$(uname -r)
> >> >> >>>
> >> >> >>> Typical contents can be viewed for example here:
> >> >> >>> https://www.archlinux.org/packages/core/i686/linux-headers/
> >> >> >>>
> >> >> >>> These files are needed to allow building  of kernel drivers
> >> >> >>> against the running Linux kernel. In a way, it is a subset of
> >> >> >>> kernel-devsrc, but including  ".config" file used for the
> >> >> >>> actual running
> >> kernel.
> >> >> >>
> >> >> >> Again this is part of the purpose of the existing kernel-devsrc
> >> >> >> package.  So what is missing preventing this from working.  It
> >> >> >> likely needs to be added to the kernel-devsrc package instead
> >> >> >> (or a sub package that is created by the kernel-devsrc recipe.)
> >> >> >
> >> >> > Peeking in on vacation.
> >> >> >
> >> >> > At a minimum, we need to figure out why the existing package
> >> >> > wasn't able to build the use case in question here .. I've built
> >> >> > pretty much everything against it at one point .. so I'd like to learn
> more.
> >> >> >
> >> >> > And yes, what we don't need is more sets of rules that copy and
> >> >> > package parts of the kernel build. We are already doing that in
> >> >> > our do_shared_workdir and that is pretty much the minimum to
> >> >> > build against the kernel. If that directory structure needs more
> >> >> > for this purpose (or less),
> >> >> then update it.
> >> >> >
> >> >> > But we need to do all of this in the existing classes, to keep
> >> >> > everything in one place, not more recipes that are grabbing
> >> >> > chunks of the same source tree.
> >> >>
> >> >> FYI: exiting thoughts are here:
> >> >>
> >> >> https://bugzilla.yoctoproject.org/show_bug.cgi?id=7095
> >> >>
> >> >> So as you can see, we aren't offended by a 'headers' package, but
> >> >> it has to make sense with the existing packages, and needs to be
> >> >> generating from our existing bits of the system.
> >> >>
> >> >> Cheers,
> >> >>
> >> >> Bruce
> >> >>
> >> >> >
> >> >> > Bruce
> >> >> >
> >> >> >
> >> >> >>
> >> >> >>> Having these files installed, it is possible  to compile
> >> >> >>> additional kernel drivers that are not part of the kernel-devsrc .
> >> >> >>>  VirtualBox compiles some of their own drivers this way,
> >> >> >>> others as
> >> well.
> >> >> >>> There are many other scenarios where you may want to add a
> new
> >> >> >>> kernel driver to an already installed Linux kernel.
> >> >> >>
> >> >> >> Yes, this was part of the design behind the kernel-devsrc, make
> >> >> >> sure the sources and components used to build the running
> >> >> >> kernel were made available to the target so that
> >> >> >> out-of-tree/external kernel modules could be built to match the
> >> >> >> running system -- as well as the ability to reconfigure and rebuild
> the kernel itself.
> >> >> >>
> >> >> >> Bruce is on vacation this week and may not be around to
> >> >> >> respond, but adding yet another package is not the right answer
> >> >> >> here.  Lets fix what may be broken in what we have.
> >> >> >>
> >> >> >> --Mark
> >> >> >>
> >> >> >>> Juro
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >> >>>> -----Original Message-----
> >> >> >>>> From: Mark Hatle [mailto:mark.hatle@windriver.com]
> >> >> >>>> Sent: Tuesday, August 4, 2015 9:20 AM
> >> >> >>>> To: Bystricky, Juro;
> >> >> >>>> openembedded-core@lists.openembedded.org;
> >> >> >>>> jurobystricky@hotmail.com
> >> >> >>>> Cc: Purdie, Richard
> >> >> >>>> Subject: Re: [OE-core] [PATCH 0/2] Support for VirtualBox
> >> >> >>>> guest additions
> >> >> >>>>
> >> >> >>>> On 8/3/15 3:35 PM, Juro Bystricky wrote:
> >> >> >>>>> In order to support VirtualBox guest additions, kernel
> >> >> >>>>> headers need to be present in the VM. I am aware we already
> >> >> >>>>> have two packages/recipes that are somewhat similar
> >> >> >>>>> (kernel-devsrc.bb, linux-libc-headers), but none
> >> >> >>>> of them is suitable for this purpose.
> >> >> >>>>> Besides the kernel headers, some additional files (scripts,
> >> >> >>>>> Makefiles, .config, etc) are also required.
> >> >> >>>>
> >> >> >>>> linux-libc-headers is only for building applications.
> >> >> >>>> kernel-devsrc is for building modules on the target.
> >> >> >>>>
> >> >> >>>> What do these specific modules need that are not present in
> >> >> >>>> kernel-
> >> >> devsrc?
> >> >> >>>> (I really don't want 'yet another' confusing package added to
> >> >> >>>> the
> >> >> >>>> system.)
> >> >> >>>>
> >> >> >>>>> The new recipe "kernel-headers.bb" can in principle be used
> >> >> >>>>> by other
> >> >> >>>> images as well.
> >> >> >>>>> It is not limited to the Build Appliance and hence is not a
> >> >> >>>>> part of the Build Appliance recipe.
> >> >> >>>>
> >> >> >>>> I think kernel-headers is a bad name for a package.  It could
> >> >> >>>> be
> >> >> confusing.
> >> >> >>>>
> >> >> >>>> --Mark
> >> >> >>>>
> >> >> >>>>> Juro Bystricky (2):
> >> >> >>>>>   kernel-headers: linux kernel headers
> >> >> >>>>>   build-appliance-image: support for VirtualBox guest
> >> >> >>>>> addtions
> >> >> >>>>>
> >> >> >>>>>  .../README_vbox_guest_additions.txt                | 78
> >> >> >>>> ++++++++++++++++++++++
> >> >> >>>>>  .../images/build-appliance-image_12.0.1.bb         |  4 +-
> >> >> >>>>>  meta/recipes-kernel/linux/kernel-headers.bb        | 66
> >> >> >>>> ++++++++++++++++++
> >> >> >>>>>  3 files changed, 147 insertions(+), 1 deletion(-)  create
> >> >> >>>>> mode
> >> >> >>>>> 100644
> >> >> >>>>> meta/recipes-core/images/build-appliance-
> >> >> >>>> image/README_vbox_guest_addit
> >> >> >>>>> ions.txt  create mode 100644
> >> >> >>>>> meta/recipes-kernel/linux/kernel-headers.bb
> >> >> >>>>>
> >> >> >>>
> >> >> >>
> >> >> >> --
> >> >> >> _______________________________________________
> >> >> >> Openembedded-core mailing list
> >> >> >> Openembedded-core@lists.openembedded.org
> >> >> >> http://lists.openembedded.org/mailman/listinfo/openembedded-
> >> core
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > "Thou shalt not follow the NULL pointer, for chaos and madness
> >> >> > await thee at its end"
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> "Thou shalt not follow the NULL pointer, for chaos and madness
> >> >> await thee at its end"
> >> > --
> >> > _______________________________________________
> >> > Openembedded-core mailing list
> >> > Openembedded-core@lists.openembedded.org
> >> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
> 
> 
> 
> --
> "Thou shalt not follow the NULL pointer, for chaos and madness await thee
> at its end"

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/2] kernel-headers: linux kernel headers
  2015-08-05  2:20   ` Bruce Ashfield
@ 2015-08-26 17:55     ` Josh Cartwright
  2015-08-26 17:57       ` Bruce Ashfield
  0 siblings, 1 reply; 28+ messages in thread
From: Josh Cartwright @ 2015-08-26 17:55 UTC (permalink / raw)
  To: Bruce Ashfield
  Cc: Purdie, Richard, Juro Bystricky,
	Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1292 bytes --]

Hey Bruce-

(Just dug this up because it was relevant to a conversation in the
office.)

On Tue, Aug 04, 2015 at 11:20:11PM -0300, Bruce Ashfield wrote:
> On Mon, Aug 3, 2015 at 5:35 PM, Juro Bystricky <juro.bystricky@intel.com> wrote:
> > 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.
> 
> We already have our kernel devsrc packages. This is simply creating more
> copies of the same functionality.

The kernel-devsrc package contains much more than is explicitly required
just to build external kernel modules (a full kernel source tree isn't
required), and the kernel-dev package doesn't install enough.  Right
now, there is no "just enough".

> If you have issues with devsrc .. why aren't you fixing it ? It certainly
> shouldn't be left as is, while introducing something new.

I would expect this -headers package to contain a subset of what -devsrc
is currently installing; might an option be to make the -devsrc package
depend on this -headers package?

  Josh

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 484 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/2] kernel-headers: linux kernel headers
  2015-08-26 17:55     ` Josh Cartwright
@ 2015-08-26 17:57       ` Bruce Ashfield
  2015-08-26 18:11         ` Josh Cartwright
  0 siblings, 1 reply; 28+ messages in thread
From: Bruce Ashfield @ 2015-08-26 17:57 UTC (permalink / raw)
  To: Josh Cartwright
  Cc: Purdie, Richard, Juro Bystricky,
	Patches and discussions about the oe-core layer

On Wed, Aug 26, 2015 at 1:55 PM, Josh Cartwright <joshc@ni.com> wrote:
> Hey Bruce-
>
> (Just dug this up because it was relevant to a conversation in the
> office.)
>
> On Tue, Aug 04, 2015 at 11:20:11PM -0300, Bruce Ashfield wrote:
>> On Mon, Aug 3, 2015 at 5:35 PM, Juro Bystricky <juro.bystricky@intel.com> wrote:
>> > 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.
>>
>> We already have our kernel devsrc packages. This is simply creating more
>> copies of the same functionality.
>
> The kernel-devsrc package contains much more than is explicitly required
> just to build external kernel modules (a full kernel source tree isn't
> required), and the kernel-dev package doesn't install enough.  Right
> now, there is no "just enough".
>
>> If you have issues with devsrc .. why aren't you fixing it ? It certainly
>> shouldn't be left as is, while introducing something new.
>
> I would expect this -headers package to contain a subset of what -devsrc
> is currently installing; might an option be to make the -devsrc package
> depend on this -headers package?

That's the rough plan. I'm looking into changing things this week, since I
was catching up on backlog all last week.

Bruce

>
>   Josh



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 1/2] kernel-headers: linux kernel headers
  2015-08-26 17:57       ` Bruce Ashfield
@ 2015-08-26 18:11         ` Josh Cartwright
  0 siblings, 0 replies; 28+ messages in thread
From: Josh Cartwright @ 2015-08-26 18:11 UTC (permalink / raw)
  To: Bruce Ashfield
  Cc: Purdie, Richard, Juro Bystricky,
	Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 814 bytes --]

On Wed, Aug 26, 2015 at 01:57:13PM -0400, Bruce Ashfield wrote:
> On Wed, Aug 26, 2015 at 1:55 PM, Josh Cartwright <joshc@ni.com> wrote:
> > On Tue, Aug 04, 2015 at 11:20:11PM -0300, Bruce Ashfield wrote:
> >> On Mon, Aug 3, 2015 at 5:35 PM, Juro Bystricky <juro.bystricky@intel.com> wrote:
[..]
> >> If you have issues with devsrc .. why aren't you fixing it ? It certainly
> >> shouldn't be left as is, while introducing something new.
> >
> > I would expect this -headers package to contain a subset of what -devsrc
> > is currently installing; might an option be to make the -devsrc package
> > depend on this -headers package?
> 
> That's the rough plan. I'm looking into changing things this week, since I
> was catching up on backlog all last week.

Great!  Thanks for confirming.

  Josh

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 484 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2015-08-26 18:56 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-03 20:35 [PATCH 0/2] Support for VirtualBox guest additions Juro Bystricky
2015-08-03 20:35 ` [PATCH 1/2] kernel-headers: linux kernel headers Juro Bystricky
2015-08-04  4:37   ` 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

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.