Re: [OE-core] [PATCH v4] kernel: Add support for multiple kernel packages

2017-08-08 Thread Haris Okanovic



On 08/03/2017 11:18 AM, Ovidiu-Adrian Vancea wrote:

On Thu, 2017-07-27 at 11:01 -0700, Rees, Kevron wrote:

On Wed, Jul 19, 2017 at 8:56 AM, Wold, Saul 
wrote:

On Tue, 2017-07-18 at 08:34 -0500, Haris Okanovic wrote:


On 07/17/2017 03:31 PM, Wold, Saul wrote:


On Wed, 2017-07-05 at 12:33 -0500, Haris Okanovic wrote:


Some distros may want to provide alternate kernel "flavors"
via
feeds
or
within bootable images. For example, readily available builds
which
provide certain diagnostic features can enable developers and
testers
to
more quickly resolve issues by avoiding lengthy kernel
builds.

This change allows for building multiple flavors of the
kernel
and
module packages by templatizing kernel package names via a
new
KERNEL_PACKAGE_NAME variable in kernel.bbclass. It defaults
to
the
old
name of "kernel", but can be overridden by certain recipes
providing
alternate kernel flavors.

To maintain compatibility, recipes providing alternate kernel
flavors
cannot be the "preferred provider" for virtual/kernel. This
is
because
OE puts the preferred provider's build and source at
"tmp-glibc/work-shared/$MACHINE/kernel-build-artifacts/" and
"tmp-glibc/work-shared/$MACHINE/kernel-source/" instead of
"tmp-glibc/work/*/$PN/" like other recipes. Therefore,
recipes
using
the
default KERNEL_PACKAGE_NAME="kernel" follows the old
semantics --
build
in the old location and may be preferred provider -- while
recipes
using
all other KERNEL_PACKAGE_NAME's build from the normal WORKDIR
and
don't
provide "virtual/kernel".

Testing:
   1. Prepended `KERNEL_PACKAGE_NAME = "tiny-linux"` to
  linux-yocto-tiny_4.9.bb so that it may build alongside
  the main kernel.
   2. `bitbake linux-yocto linux-yocto-tiny` to build both
kernel
flavors.
   3. Verified image and modules IPKs exist for both:
  tmp-glibc/deploy/ipk/qemux86/kernel-* for linux-yocto
  tmp-glibc/deploy/ipk/qemux86/tiny-linux* for linux-
yocto-
tiny
   4. Verified linux-yocto is the "preferred provider", and
was
built
in
  shared directory: tmp-glibc/work-shared/qemux86/kernel-*
   5. Appended `CORE_IMAGE_BASE_INSTALL += "tiny-linux"` to
  core-image-base.bb to include both kernel flavors.
   6. `bitbake core-image-base` to build an image.
   7. Verified image contains two bzImage's under /boot/, with
  "yocto-standard" selected to boot via symlink.

Discussion thread:
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.ope
nembedded.org_pipermail_openembedded-2Dcore_2015-
2DDe=DwICAg=I_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA
=35FLeGKBmrBGMHAhCV37-B4ddgcjLZXUChuxj5DD6Sk=-J-
ERX3BXdjXgeeIE_ZNE7GozSVtUpP3Wt6FV_jtLtM=z_ITagkjX7-
q9KHaytBdqTZeJYksmYYjciSiELDYIGE=
cemb
er/thread.html#114122

Signed-off-by: Ioan-Adrian Ratiu 
Signed-off-by: Gratian Crisan 
Signed-off-by: Haris Okanovic 
Coauthored-by: Gratian Crisan 
Coauthored-by: Haris Okanovic 
Coauthored-by: Josh Hernstrom 
---
[PATCH v2] Change STAGING_KERNEL_DIR and
STAGING_KERNEL_BUILDDIR
to
the
"work" directory in alternate kernel builds, instead of
"work-
shared",
so
that the two builds don't clobber each other.

[PATCH v3] An updated version of this change rebased onto the
current
OE-core master. Changes:
   * Remove PREFERRED_PROVIDER check in linux-yocto.inc in
alternate
 kernel builds, since alternate kernels aren't the
 PREFERRED_PROVIDER for virtual/kernel by definition.
   * Remove "virtual/kernel" from PROVIDES in alternate kernel
builds.

[PATCH v4] Another rebase onto master; no functional change.
Improved description and testing steps.


So I finally had a chance to get back to this and test build
with
it, I
saw the following WARNING, which lead to the ERROR:

WARNING: Variable key FILES_${PN}-dev (${includedir}
${FILES_SOLIBSDEV}
${libdir}/*.la ${libdir}/*.o ${libdir}/pkgconfig
${datadir}/pkgconfig
${datadir}/aclocal ${base_libdir}/*.o ${libdir}/${BPN}/*.la
${base_libdir}/*.la) replaces original key FILES_linux-yocto-
dev
(/boot/System.map* /boot/Module.symvers* /boot/config*
${KERNEL_SRC_PATH}
${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build).
ERROR: linux-yocto-4.10.17+gitAUTOINC+e92bd55409_6648a34e00-r0
do_package: QA Issue: linux-yocto: Files/directories were
installed
but
not shipped in any package:
/boot/System.map-4.10.17-yocto-standard
/boot/Module.symvers-4.10.17-yocto-standard
/boot/config-4.10.17-yocto-standard
Please set FILES such that these items are packaged.
Alternatively
if
they are unneeded, avoid installing them or delete them within
do_install.
linux-yocto: 3 installed and not shipped files. [installed-vs-
shipped]
ERROR: linux-yocto-4.10.17+gitAUTOINC+e92bd55409_6648a34e00-r0
do_package: Fatal QA errors found, failing task.
ERROR: linux-yocto-4.10.17+gitAUTOINC+e92bd55409_6648a34e00-r0
do_package: Function failed: do_package

Something seems to be causing the 

Re: [OE-core] [PATCH v4] kernel: Add support for multiple kernel packages

2017-08-08 Thread Haris Okanovic



On 07/19/2017 10:56 AM, Wold, Saul wrote:

On Tue, 2017-07-18 at 08:34 -0500, Haris Okanovic wrote:


On 07/17/2017 03:31 PM, Wold, Saul wrote:


On Wed, 2017-07-05 at 12:33 -0500, Haris Okanovic wrote:


Some distros may want to provide alternate kernel "flavors" via
feeds
or
within bootable images. For example, readily available builds
which
provide certain diagnostic features can enable developers and
testers
to
more quickly resolve issues by avoiding lengthy kernel builds.

This change allows for building multiple flavors of the kernel
and
module packages by templatizing kernel package names via a new
KERNEL_PACKAGE_NAME variable in kernel.bbclass. It defaults to
the
old
name of "kernel", but can be overridden by certain recipes
providing
alternate kernel flavors.

To maintain compatibility, recipes providing alternate kernel
flavors
cannot be the "preferred provider" for virtual/kernel. This is
because
OE puts the preferred provider's build and source at
"tmp-glibc/work-shared/$MACHINE/kernel-build-artifacts/" and
"tmp-glibc/work-shared/$MACHINE/kernel-source/" instead of
"tmp-glibc/work/*/$PN/" like other recipes. Therefore, recipes
using
the
default KERNEL_PACKAGE_NAME="kernel" follows the old semantics --
build
in the old location and may be preferred provider -- while
recipes
using
all other KERNEL_PACKAGE_NAME's build from the normal WORKDIR and
don't
provide "virtual/kernel".

Testing:
   1. Prepended `KERNEL_PACKAGE_NAME = "tiny-linux"` to
  linux-yocto-tiny_4.9.bb so that it may build alongside
  the main kernel.
   2. `bitbake linux-yocto linux-yocto-tiny` to build both kernel
flavors.
   3. Verified image and modules IPKs exist for both:
  tmp-glibc/deploy/ipk/qemux86/kernel-* for linux-yocto
  tmp-glibc/deploy/ipk/qemux86/tiny-linux* for linux-yocto-
tiny
   4. Verified linux-yocto is the "preferred provider", and was
built
in
  shared directory: tmp-glibc/work-shared/qemux86/kernel-*
   5. Appended `CORE_IMAGE_BASE_INSTALL += "tiny-linux"` to
  core-image-base.bb to include both kernel flavors.
   6. `bitbake core-image-base` to build an image.
   7. Verified image contains two bzImage's under /boot/, with
  "yocto-standard" selected to boot via symlink.

Discussion thread:
http://lists.openembedded.org/pipermail/openembedded-core/2015-De
cemb
er/thread.html#114122

Signed-off-by: Ioan-Adrian Ratiu 
Signed-off-by: Gratian Crisan 
Signed-off-by: Haris Okanovic 
Coauthored-by: Gratian Crisan 
Coauthored-by: Haris Okanovic 
Coauthored-by: Josh Hernstrom 
---
[PATCH v2] Change STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR
to
the
"work" directory in alternate kernel builds, instead of "work-
shared",
so
that the two builds don't clobber each other.

[PATCH v3] An updated version of this change rebased onto the
current
OE-core master. Changes:
   * Remove PREFERRED_PROVIDER check in linux-yocto.inc in
alternate
 kernel builds, since alternate kernels aren't the
 PREFERRED_PROVIDER for virtual/kernel by definition.
   * Remove "virtual/kernel" from PROVIDES in alternate kernel
builds.

[PATCH v4] Another rebase onto master; no functional change.
Improved description and testing steps.


So I finally had a chance to get back to this and test build with
it, I
saw the following WARNING, which lead to the ERROR:

WARNING: Variable key FILES_${PN}-dev (${includedir}
${FILES_SOLIBSDEV}
${libdir}/*.la ${libdir}/*.o ${libdir}/pkgconfig
${datadir}/pkgconfig
${datadir}/aclocal ${base_libdir}/*.o ${libdir}/${BPN}/*.la
${base_libdir}/*.la) replaces original key FILES_linux-yocto-dev
(/boot/System.map* /boot/Module.symvers* /boot/config*
${KERNEL_SRC_PATH}
${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build).
ERROR: linux-yocto-4.10.17+gitAUTOINC+e92bd55409_6648a34e00-r0
do_package: QA Issue: linux-yocto: Files/directories were installed
but
not shipped in any package:
/boot/System.map-4.10.17-yocto-standard
/boot/Module.symvers-4.10.17-yocto-standard
/boot/config-4.10.17-yocto-standard
Please set FILES such that these items are packaged. Alternatively
if
they are unneeded, avoid installing them or delete them within
do_install.
linux-yocto: 3 installed and not shipped files. [installed-vs-
shipped]
ERROR: linux-yocto-4.10.17+gitAUTOINC+e92bd55409_6648a34e00-r0
do_package: Fatal QA errors found, failing task.
ERROR: linux-yocto-4.10.17+gitAUTOINC+e92bd55409_6648a34e00-r0
do_package: Function failed: do_package

Something seems to be causing the FILES_linux-yocto-dev info to be
overridden, I have not tracked down the culprit yet.



`FILES_linux-yocto-dev` is set to the default value from OE's
bitbake.conf. `FILES_kernel-dev` on the other hand is set by
kernel.bbclass; when `KERNEL_PACKAGE_NAME` expands to `kernel`.

I think the real issue here is that QA checks care about
`FILES_${PN}-dev` at all even though that 

Re: [OE-core] [PATCH v4] kernel: Add support for multiple kernel packages

2017-08-08 Thread Haris Okanovic



On 07/27/2017 01:01 PM, Rees, Kevron wrote:

On Wed, Jul 19, 2017 at 8:56 AM, Wold, Saul  wrote:

On Tue, 2017-07-18 at 08:34 -0500, Haris Okanovic wrote:


On 07/17/2017 03:31 PM, Wold, Saul wrote:


On Wed, 2017-07-05 at 12:33 -0500, Haris Okanovic wrote:


Some distros may want to provide alternate kernel "flavors" via
feeds
or
within bootable images. For example, readily available builds
which
provide certain diagnostic features can enable developers and
testers
to
more quickly resolve issues by avoiding lengthy kernel builds.

This change allows for building multiple flavors of the kernel
and
module packages by templatizing kernel package names via a new
KERNEL_PACKAGE_NAME variable in kernel.bbclass. It defaults to
the
old
name of "kernel", but can be overridden by certain recipes
providing
alternate kernel flavors.

To maintain compatibility, recipes providing alternate kernel
flavors
cannot be the "preferred provider" for virtual/kernel. This is
because
OE puts the preferred provider's build and source at
"tmp-glibc/work-shared/$MACHINE/kernel-build-artifacts/" and
"tmp-glibc/work-shared/$MACHINE/kernel-source/" instead of
"tmp-glibc/work/*/$PN/" like other recipes. Therefore, recipes
using
the
default KERNEL_PACKAGE_NAME="kernel" follows the old semantics --
build
in the old location and may be preferred provider -- while
recipes
using
all other KERNEL_PACKAGE_NAME's build from the normal WORKDIR and
don't
provide "virtual/kernel".

Testing:
   1. Prepended `KERNEL_PACKAGE_NAME = "tiny-linux"` to
  linux-yocto-tiny_4.9.bb so that it may build alongside
  the main kernel.
   2. `bitbake linux-yocto linux-yocto-tiny` to build both kernel
flavors.
   3. Verified image and modules IPKs exist for both:
  tmp-glibc/deploy/ipk/qemux86/kernel-* for linux-yocto
  tmp-glibc/deploy/ipk/qemux86/tiny-linux* for linux-yocto-
tiny
   4. Verified linux-yocto is the "preferred provider", and was
built
in
  shared directory: tmp-glibc/work-shared/qemux86/kernel-*
   5. Appended `CORE_IMAGE_BASE_INSTALL += "tiny-linux"` to
  core-image-base.bb to include both kernel flavors.
   6. `bitbake core-image-base` to build an image.
   7. Verified image contains two bzImage's under /boot/, with
  "yocto-standard" selected to boot via symlink.

Discussion thread:
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.openembedded.org_pipermail_openembedded-2Dcore_2015-2DDe=DwIBaQ=I_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA=8Bziuw3IaCGjyrSAphuGwHmVdHcVwza-srUYwL9U_Ms=EXsasUKMXo4dlk7nFW3VDV8Z06QZKhwHTWyH5F0E6-c=vJgjJOYKOYNz18XjXjP-gc0MvGMrdm1Z8EbcLuaxFqA=
cemb
er/thread.html#114122

Signed-off-by: Ioan-Adrian Ratiu 
Signed-off-by: Gratian Crisan 
Signed-off-by: Haris Okanovic 
Coauthored-by: Gratian Crisan 
Coauthored-by: Haris Okanovic 
Coauthored-by: Josh Hernstrom 
---
[PATCH v2] Change STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR
to
the
"work" directory in alternate kernel builds, instead of "work-
shared",
so
that the two builds don't clobber each other.

[PATCH v3] An updated version of this change rebased onto the
current
OE-core master. Changes:
   * Remove PREFERRED_PROVIDER check in linux-yocto.inc in
alternate
 kernel builds, since alternate kernels aren't the
 PREFERRED_PROVIDER for virtual/kernel by definition.
   * Remove "virtual/kernel" from PROVIDES in alternate kernel
builds.

[PATCH v4] Another rebase onto master; no functional change.
Improved description and testing steps.


So I finally had a chance to get back to this and test build with
it, I
saw the following WARNING, which lead to the ERROR:

WARNING: Variable key FILES_${PN}-dev (${includedir}
${FILES_SOLIBSDEV}
${libdir}/*.la ${libdir}/*.o ${libdir}/pkgconfig
${datadir}/pkgconfig
${datadir}/aclocal ${base_libdir}/*.o ${libdir}/${BPN}/*.la
${base_libdir}/*.la) replaces original key FILES_linux-yocto-dev
(/boot/System.map* /boot/Module.symvers* /boot/config*
${KERNEL_SRC_PATH}
${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build).
ERROR: linux-yocto-4.10.17+gitAUTOINC+e92bd55409_6648a34e00-r0
do_package: QA Issue: linux-yocto: Files/directories were installed
but
not shipped in any package:
/boot/System.map-4.10.17-yocto-standard
/boot/Module.symvers-4.10.17-yocto-standard
/boot/config-4.10.17-yocto-standard
Please set FILES such that these items are packaged. Alternatively
if
they are unneeded, avoid installing them or delete them within
do_install.
linux-yocto: 3 installed and not shipped files. [installed-vs-
shipped]
ERROR: linux-yocto-4.10.17+gitAUTOINC+e92bd55409_6648a34e00-r0
do_package: Fatal QA errors found, failing task.
ERROR: linux-yocto-4.10.17+gitAUTOINC+e92bd55409_6648a34e00-r0
do_package: Function failed: do_package

Something seems to be causing the FILES_linux-yocto-dev info to be
overridden, I have not tracked down the 

Re: [OE-core] [PATCH v4] kernel: Add support for multiple kernel packages

2017-08-03 Thread Ovidiu-Adrian Vancea
On Thu, 2017-07-27 at 11:01 -0700, Rees, Kevron wrote:
> On Wed, Jul 19, 2017 at 8:56 AM, Wold, Saul 
> wrote:
> > On Tue, 2017-07-18 at 08:34 -0500, Haris Okanovic wrote:
> > > 
> > > On 07/17/2017 03:31 PM, Wold, Saul wrote:
> > > > 
> > > > On Wed, 2017-07-05 at 12:33 -0500, Haris Okanovic wrote:
> > > > > 
> > > > > Some distros may want to provide alternate kernel "flavors"
> > > > > via
> > > > > feeds
> > > > > or
> > > > > within bootable images. For example, readily available builds
> > > > > which
> > > > > provide certain diagnostic features can enable developers and
> > > > > testers
> > > > > to
> > > > > more quickly resolve issues by avoiding lengthy kernel
> > > > > builds.
> > > > > 
> > > > > This change allows for building multiple flavors of the
> > > > > kernel
> > > > > and
> > > > > module packages by templatizing kernel package names via a
> > > > > new
> > > > > KERNEL_PACKAGE_NAME variable in kernel.bbclass. It defaults
> > > > > to
> > > > > the
> > > > > old
> > > > > name of "kernel", but can be overridden by certain recipes
> > > > > providing
> > > > > alternate kernel flavors.
> > > > > 
> > > > > To maintain compatibility, recipes providing alternate kernel
> > > > > flavors
> > > > > cannot be the "preferred provider" for virtual/kernel. This
> > > > > is
> > > > > because
> > > > > OE puts the preferred provider's build and source at
> > > > > "tmp-glibc/work-shared/$MACHINE/kernel-build-artifacts/" and
> > > > > "tmp-glibc/work-shared/$MACHINE/kernel-source/" instead of
> > > > > "tmp-glibc/work/*/$PN/" like other recipes. Therefore,
> > > > > recipes
> > > > > using
> > > > > the
> > > > > default KERNEL_PACKAGE_NAME="kernel" follows the old
> > > > > semantics --
> > > > > build
> > > > > in the old location and may be preferred provider -- while
> > > > > recipes
> > > > > using
> > > > > all other KERNEL_PACKAGE_NAME's build from the normal WORKDIR
> > > > > and
> > > > > don't
> > > > > provide "virtual/kernel".
> > > > > 
> > > > > Testing:
> > > > >   1. Prepended `KERNEL_PACKAGE_NAME = "tiny-linux"` to
> > > > >  linux-yocto-tiny_4.9.bb so that it may build alongside
> > > > >  the main kernel.
> > > > >   2. `bitbake linux-yocto linux-yocto-tiny` to build both
> > > > > kernel
> > > > > flavors.
> > > > >   3. Verified image and modules IPKs exist for both:
> > > > >  tmp-glibc/deploy/ipk/qemux86/kernel-* for linux-yocto
> > > > >  tmp-glibc/deploy/ipk/qemux86/tiny-linux* for linux-
> > > > > yocto-
> > > > > tiny
> > > > >   4. Verified linux-yocto is the "preferred provider", and
> > > > > was
> > > > > built
> > > > > in
> > > > >  shared directory: tmp-glibc/work-shared/qemux86/kernel-*
> > > > >   5. Appended `CORE_IMAGE_BASE_INSTALL += "tiny-linux"` to
> > > > >  core-image-base.bb to include both kernel flavors.
> > > > >   6. `bitbake core-image-base` to build an image.
> > > > >   7. Verified image contains two bzImage's under /boot/, with
> > > > >  "yocto-standard" selected to boot via symlink.
> > > > > 
> > > > > Discussion thread:
> > > > > https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.ope
> > > > > nembedded.org_pipermail_openembedded-2Dcore_2015-
> > > > > 2DDe=DwICAg=I_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA
> > > > > =35FLeGKBmrBGMHAhCV37-B4ddgcjLZXUChuxj5DD6Sk=-J-
> > > > > ERX3BXdjXgeeIE_ZNE7GozSVtUpP3Wt6FV_jtLtM=z_ITagkjX7-
> > > > > q9KHaytBdqTZeJYksmYYjciSiELDYIGE= 
> > > > > cemb
> > > > > er/thread.html#114122
> > > > > 
> > > > > Signed-off-by: Ioan-Adrian Ratiu 
> > > > > Signed-off-by: Gratian Crisan 
> > > > > Signed-off-by: Haris Okanovic 
> > > > > Coauthored-by: Gratian Crisan 
> > > > > Coauthored-by: Haris Okanovic 
> > > > > Coauthored-by: Josh Hernstrom 
> > > > > ---
> > > > > [PATCH v2] Change STAGING_KERNEL_DIR and
> > > > > STAGING_KERNEL_BUILDDIR
> > > > > to
> > > > > the
> > > > > "work" directory in alternate kernel builds, instead of
> > > > > "work-
> > > > > shared",
> > > > > so
> > > > > that the two builds don't clobber each other.
> > > > > 
> > > > > [PATCH v3] An updated version of this change rebased onto the
> > > > > current
> > > > > OE-core master. Changes:
> > > > >   * Remove PREFERRED_PROVIDER check in linux-yocto.inc in
> > > > > alternate
> > > > > kernel builds, since alternate kernels aren't the
> > > > > PREFERRED_PROVIDER for virtual/kernel by definition.
> > > > >   * Remove "virtual/kernel" from PROVIDES in alternate kernel
> > > > > builds.
> > > > > 
> > > > > [PATCH v4] Another rebase onto master; no functional change.
> > > > > Improved description and testing steps.
> > > > 
> > > > So I finally had a chance to get back to this and test build
> > > > with
> > > > it, I
> > > > saw the following WARNING, which lead to the ERROR:
> > > > 
> > > > WARNING: Variable key FILES_${PN}-dev 

Re: [OE-core] [PATCH v4] kernel: Add support for multiple kernel packages

2017-07-27 Thread Rees, Kevron
On Wed, Jul 19, 2017 at 8:56 AM, Wold, Saul  wrote:
> On Tue, 2017-07-18 at 08:34 -0500, Haris Okanovic wrote:
>>
>> On 07/17/2017 03:31 PM, Wold, Saul wrote:
>> >
>> > On Wed, 2017-07-05 at 12:33 -0500, Haris Okanovic wrote:
>> > >
>> > > Some distros may want to provide alternate kernel "flavors" via
>> > > feeds
>> > > or
>> > > within bootable images. For example, readily available builds
>> > > which
>> > > provide certain diagnostic features can enable developers and
>> > > testers
>> > > to
>> > > more quickly resolve issues by avoiding lengthy kernel builds.
>> > >
>> > > This change allows for building multiple flavors of the kernel
>> > > and
>> > > module packages by templatizing kernel package names via a new
>> > > KERNEL_PACKAGE_NAME variable in kernel.bbclass. It defaults to
>> > > the
>> > > old
>> > > name of "kernel", but can be overridden by certain recipes
>> > > providing
>> > > alternate kernel flavors.
>> > >
>> > > To maintain compatibility, recipes providing alternate kernel
>> > > flavors
>> > > cannot be the "preferred provider" for virtual/kernel. This is
>> > > because
>> > > OE puts the preferred provider's build and source at
>> > > "tmp-glibc/work-shared/$MACHINE/kernel-build-artifacts/" and
>> > > "tmp-glibc/work-shared/$MACHINE/kernel-source/" instead of
>> > > "tmp-glibc/work/*/$PN/" like other recipes. Therefore, recipes
>> > > using
>> > > the
>> > > default KERNEL_PACKAGE_NAME="kernel" follows the old semantics --
>> > > build
>> > > in the old location and may be preferred provider -- while
>> > > recipes
>> > > using
>> > > all other KERNEL_PACKAGE_NAME's build from the normal WORKDIR and
>> > > don't
>> > > provide "virtual/kernel".
>> > >
>> > > Testing:
>> > >   1. Prepended `KERNEL_PACKAGE_NAME = "tiny-linux"` to
>> > >  linux-yocto-tiny_4.9.bb so that it may build alongside
>> > >  the main kernel.
>> > >   2. `bitbake linux-yocto linux-yocto-tiny` to build both kernel
>> > > flavors.
>> > >   3. Verified image and modules IPKs exist for both:
>> > >  tmp-glibc/deploy/ipk/qemux86/kernel-* for linux-yocto
>> > >  tmp-glibc/deploy/ipk/qemux86/tiny-linux* for linux-yocto-
>> > > tiny
>> > >   4. Verified linux-yocto is the "preferred provider", and was
>> > > built
>> > > in
>> > >  shared directory: tmp-glibc/work-shared/qemux86/kernel-*
>> > >   5. Appended `CORE_IMAGE_BASE_INSTALL += "tiny-linux"` to
>> > >  core-image-base.bb to include both kernel flavors.
>> > >   6. `bitbake core-image-base` to build an image.
>> > >   7. Verified image contains two bzImage's under /boot/, with
>> > >  "yocto-standard" selected to boot via symlink.
>> > >
>> > > Discussion thread:
>> > > http://lists.openembedded.org/pipermail/openembedded-core/2015-De
>> > > cemb
>> > > er/thread.html#114122
>> > >
>> > > Signed-off-by: Ioan-Adrian Ratiu 
>> > > Signed-off-by: Gratian Crisan 
>> > > Signed-off-by: Haris Okanovic 
>> > > Coauthored-by: Gratian Crisan 
>> > > Coauthored-by: Haris Okanovic 
>> > > Coauthored-by: Josh Hernstrom 
>> > > ---
>> > > [PATCH v2] Change STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR
>> > > to
>> > > the
>> > > "work" directory in alternate kernel builds, instead of "work-
>> > > shared",
>> > > so
>> > > that the two builds don't clobber each other.
>> > >
>> > > [PATCH v3] An updated version of this change rebased onto the
>> > > current
>> > > OE-core master. Changes:
>> > >   * Remove PREFERRED_PROVIDER check in linux-yocto.inc in
>> > > alternate
>> > > kernel builds, since alternate kernels aren't the
>> > > PREFERRED_PROVIDER for virtual/kernel by definition.
>> > >   * Remove "virtual/kernel" from PROVIDES in alternate kernel
>> > > builds.
>> > >
>> > > [PATCH v4] Another rebase onto master; no functional change.
>> > > Improved description and testing steps.
>> >
>> > So I finally had a chance to get back to this and test build with
>> > it, I
>> > saw the following WARNING, which lead to the ERROR:
>> >
>> > WARNING: Variable key FILES_${PN}-dev (${includedir}
>> > ${FILES_SOLIBSDEV}
>> > ${libdir}/*.la ${libdir}/*.o ${libdir}/pkgconfig
>> > ${datadir}/pkgconfig
>> > ${datadir}/aclocal ${base_libdir}/*.o ${libdir}/${BPN}/*.la
>> > ${base_libdir}/*.la) replaces original key FILES_linux-yocto-dev
>> > (/boot/System.map* /boot/Module.symvers* /boot/config*
>> > ${KERNEL_SRC_PATH}
>> > ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build).
>> > ERROR: linux-yocto-4.10.17+gitAUTOINC+e92bd55409_6648a34e00-r0
>> > do_package: QA Issue: linux-yocto: Files/directories were installed
>> > but
>> > not shipped in any package:
>> >/boot/System.map-4.10.17-yocto-standard
>> >/boot/Module.symvers-4.10.17-yocto-standard
>> >/boot/config-4.10.17-yocto-standard
>> > Please set FILES such that these items are packaged. Alternatively
>> > if
>> > they are 

Re: [OE-core] [PATCH v4] kernel: Add support for multiple kernel packages

2017-07-19 Thread Wold, Saul
On Tue, 2017-07-18 at 08:34 -0500, Haris Okanovic wrote:
> 
> On 07/17/2017 03:31 PM, Wold, Saul wrote:
> > 
> > On Wed, 2017-07-05 at 12:33 -0500, Haris Okanovic wrote:
> > > 
> > > Some distros may want to provide alternate kernel "flavors" via
> > > feeds
> > > or
> > > within bootable images. For example, readily available builds
> > > which
> > > provide certain diagnostic features can enable developers and
> > > testers
> > > to
> > > more quickly resolve issues by avoiding lengthy kernel builds.
> > > 
> > > This change allows for building multiple flavors of the kernel
> > > and
> > > module packages by templatizing kernel package names via a new
> > > KERNEL_PACKAGE_NAME variable in kernel.bbclass. It defaults to
> > > the
> > > old
> > > name of "kernel", but can be overridden by certain recipes
> > > providing
> > > alternate kernel flavors.
> > > 
> > > To maintain compatibility, recipes providing alternate kernel
> > > flavors
> > > cannot be the "preferred provider" for virtual/kernel. This is
> > > because
> > > OE puts the preferred provider's build and source at
> > > "tmp-glibc/work-shared/$MACHINE/kernel-build-artifacts/" and
> > > "tmp-glibc/work-shared/$MACHINE/kernel-source/" instead of
> > > "tmp-glibc/work/*/$PN/" like other recipes. Therefore, recipes
> > > using
> > > the
> > > default KERNEL_PACKAGE_NAME="kernel" follows the old semantics --
> > > build
> > > in the old location and may be preferred provider -- while
> > > recipes
> > > using
> > > all other KERNEL_PACKAGE_NAME's build from the normal WORKDIR and
> > > don't
> > > provide "virtual/kernel".
> > > 
> > > Testing:
> > >   1. Prepended `KERNEL_PACKAGE_NAME = "tiny-linux"` to
> > >  linux-yocto-tiny_4.9.bb so that it may build alongside
> > >  the main kernel.
> > >   2. `bitbake linux-yocto linux-yocto-tiny` to build both kernel
> > > flavors.
> > >   3. Verified image and modules IPKs exist for both:
> > >  tmp-glibc/deploy/ipk/qemux86/kernel-* for linux-yocto
> > >  tmp-glibc/deploy/ipk/qemux86/tiny-linux* for linux-yocto-
> > > tiny
> > >   4. Verified linux-yocto is the "preferred provider", and was
> > > built
> > > in
> > >  shared directory: tmp-glibc/work-shared/qemux86/kernel-*
> > >   5. Appended `CORE_IMAGE_BASE_INSTALL += "tiny-linux"` to
> > >  core-image-base.bb to include both kernel flavors.
> > >   6. `bitbake core-image-base` to build an image.
> > >   7. Verified image contains two bzImage's under /boot/, with
> > >  "yocto-standard" selected to boot via symlink.
> > > 
> > > Discussion thread:
> > > http://lists.openembedded.org/pipermail/openembedded-core/2015-De
> > > cemb
> > > er/thread.html#114122
> > > 
> > > Signed-off-by: Ioan-Adrian Ratiu 
> > > Signed-off-by: Gratian Crisan 
> > > Signed-off-by: Haris Okanovic 
> > > Coauthored-by: Gratian Crisan 
> > > Coauthored-by: Haris Okanovic 
> > > Coauthored-by: Josh Hernstrom 
> > > ---
> > > [PATCH v2] Change STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR
> > > to
> > > the
> > > "work" directory in alternate kernel builds, instead of "work-
> > > shared",
> > > so
> > > that the two builds don't clobber each other.
> > > 
> > > [PATCH v3] An updated version of this change rebased onto the
> > > current
> > > OE-core master. Changes:
> > >   * Remove PREFERRED_PROVIDER check in linux-yocto.inc in
> > > alternate
> > > kernel builds, since alternate kernels aren't the
> > > PREFERRED_PROVIDER for virtual/kernel by definition.
> > >   * Remove "virtual/kernel" from PROVIDES in alternate kernel
> > > builds.
> > > 
> > > [PATCH v4] Another rebase onto master; no functional change.
> > > Improved description and testing steps.
> > 
> > So I finally had a chance to get back to this and test build with
> > it, I
> > saw the following WARNING, which lead to the ERROR:
> > 
> > WARNING: Variable key FILES_${PN}-dev (${includedir}
> > ${FILES_SOLIBSDEV}
> > ${libdir}/*.la ${libdir}/*.o ${libdir}/pkgconfig
> > ${datadir}/pkgconfig
> > ${datadir}/aclocal ${base_libdir}/*.o ${libdir}/${BPN}/*.la
> > ${base_libdir}/*.la) replaces original key FILES_linux-yocto-dev
> > (/boot/System.map* /boot/Module.symvers* /boot/config*
> > ${KERNEL_SRC_PATH}
> > ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build).
> > ERROR: linux-yocto-4.10.17+gitAUTOINC+e92bd55409_6648a34e00-r0
> > do_package: QA Issue: linux-yocto: Files/directories were installed
> > but
> > not shipped in any package:
> >    /boot/System.map-4.10.17-yocto-standard
> >    /boot/Module.symvers-4.10.17-yocto-standard
> >    /boot/config-4.10.17-yocto-standard
> > Please set FILES such that these items are packaged. Alternatively
> > if
> > they are unneeded, avoid installing them or delete them within
> > do_install.
> > linux-yocto: 3 installed and not shipped files. [installed-vs-
> > shipped]
> > ERROR: 

Re: [OE-core] [PATCH v4] kernel: Add support for multiple kernel packages

2017-07-18 Thread Haris Okanovic



On 07/17/2017 03:31 PM, Wold, Saul wrote:

On Wed, 2017-07-05 at 12:33 -0500, Haris Okanovic wrote:

Some distros may want to provide alternate kernel "flavors" via feeds
or
within bootable images. For example, readily available builds which
provide certain diagnostic features can enable developers and testers
to
more quickly resolve issues by avoiding lengthy kernel builds.

This change allows for building multiple flavors of the kernel and
module packages by templatizing kernel package names via a new
KERNEL_PACKAGE_NAME variable in kernel.bbclass. It defaults to the
old
name of "kernel", but can be overridden by certain recipes providing
alternate kernel flavors.

To maintain compatibility, recipes providing alternate kernel flavors
cannot be the "preferred provider" for virtual/kernel. This is
because
OE puts the preferred provider's build and source at
"tmp-glibc/work-shared/$MACHINE/kernel-build-artifacts/" and
"tmp-glibc/work-shared/$MACHINE/kernel-source/" instead of
"tmp-glibc/work/*/$PN/" like other recipes. Therefore, recipes using
the
default KERNEL_PACKAGE_NAME="kernel" follows the old semantics --
build
in the old location and may be preferred provider -- while recipes
using
all other KERNEL_PACKAGE_NAME's build from the normal WORKDIR and
don't
provide "virtual/kernel".

Testing:
  1. Prepended `KERNEL_PACKAGE_NAME = "tiny-linux"` to
 linux-yocto-tiny_4.9.bb so that it may build alongside
 the main kernel.
  2. `bitbake linux-yocto linux-yocto-tiny` to build both kernel
flavors.
  3. Verified image and modules IPKs exist for both:
 tmp-glibc/deploy/ipk/qemux86/kernel-* for linux-yocto
 tmp-glibc/deploy/ipk/qemux86/tiny-linux* for linux-yocto-tiny
  4. Verified linux-yocto is the "preferred provider", and was built
in
 shared directory: tmp-glibc/work-shared/qemux86/kernel-*
  5. Appended `CORE_IMAGE_BASE_INSTALL += "tiny-linux"` to
 core-image-base.bb to include both kernel flavors.
  6. `bitbake core-image-base` to build an image.
  7. Verified image contains two bzImage's under /boot/, with
 "yocto-standard" selected to boot via symlink.

Discussion thread:
http://lists.openembedded.org/pipermail/openembedded-core/2015-Decemb
er/thread.html#114122

Signed-off-by: Ioan-Adrian Ratiu 
Signed-off-by: Gratian Crisan 
Signed-off-by: Haris Okanovic 
Coauthored-by: Gratian Crisan 
Coauthored-by: Haris Okanovic 
Coauthored-by: Josh Hernstrom 
---
[PATCH v2] Change STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR to
the
"work" directory in alternate kernel builds, instead of "work-
shared",
so
that the two builds don't clobber each other.

[PATCH v3] An updated version of this change rebased onto the current
OE-core master. Changes:
  * Remove PREFERRED_PROVIDER check in linux-yocto.inc in alternate
kernel builds, since alternate kernels aren't the
PREFERRED_PROVIDER for virtual/kernel by definition.
  * Remove "virtual/kernel" from PROVIDES in alternate kernel builds.

[PATCH v4] Another rebase onto master; no functional change.
Improved description and testing steps.


So I finally had a chance to get back to this and test build with it, I
saw the following WARNING, which lead to the ERROR:

WARNING: Variable key FILES_${PN}-dev (${includedir} ${FILES_SOLIBSDEV}
${libdir}/*.la ${libdir}/*.o ${libdir}/pkgconfig ${datadir}/pkgconfig
${datadir}/aclocal ${base_libdir}/*.o ${libdir}/${BPN}/*.la
${base_libdir}/*.la) replaces original key FILES_linux-yocto-dev
(/boot/System.map* /boot/Module.symvers* /boot/config*
${KERNEL_SRC_PATH}
${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build).
ERROR: linux-yocto-4.10.17+gitAUTOINC+e92bd55409_6648a34e00-r0
do_package: QA Issue: linux-yocto: Files/directories were installed but
not shipped in any package:
   /boot/System.map-4.10.17-yocto-standard
   /boot/Module.symvers-4.10.17-yocto-standard
   /boot/config-4.10.17-yocto-standard
Please set FILES such that these items are packaged. Alternatively if
they are unneeded, avoid installing them or delete them within
do_install.
linux-yocto: 3 installed and not shipped files. [installed-vs-shipped]
ERROR: linux-yocto-4.10.17+gitAUTOINC+e92bd55409_6648a34e00-r0
do_package: Fatal QA errors found, failing task.
ERROR: linux-yocto-4.10.17+gitAUTOINC+e92bd55409_6648a34e00-r0
do_package: Function failed: do_package

Something seems to be causing the FILES_linux-yocto-dev info to be
overridden, I have not tracked down the culprit yet.



`FILES_linux-yocto-dev` is set to the default value from OE's 
bitbake.conf. `FILES_kernel-dev` on the other hand is set by 
kernel.bbclass; when `KERNEL_PACKAGE_NAME` expands to `kernel`.


I think the real issue here is that QA checks care about 
`FILES_${PN}-dev` at all even though that particular package name isn't 
listed in `PACKAGES` variable. I.e. `FILES_${PN}-dev` should be 
disregarded since the `linux-yocto` 

Re: [OE-core] [PATCH v4] kernel: Add support for multiple kernel packages

2017-07-17 Thread Wold, Saul
On Wed, 2017-07-05 at 12:33 -0500, Haris Okanovic wrote:
> Some distros may want to provide alternate kernel "flavors" via feeds
> or
> within bootable images. For example, readily available builds which
> provide certain diagnostic features can enable developers and testers
> to
> more quickly resolve issues by avoiding lengthy kernel builds.
> 
> This change allows for building multiple flavors of the kernel and
> module packages by templatizing kernel package names via a new
> KERNEL_PACKAGE_NAME variable in kernel.bbclass. It defaults to the
> old
> name of "kernel", but can be overridden by certain recipes providing
> alternate kernel flavors.
> 
> To maintain compatibility, recipes providing alternate kernel flavors
> cannot be the "preferred provider" for virtual/kernel. This is
> because
> OE puts the preferred provider's build and source at
> "tmp-glibc/work-shared/$MACHINE/kernel-build-artifacts/" and
> "tmp-glibc/work-shared/$MACHINE/kernel-source/" instead of
> "tmp-glibc/work/*/$PN/" like other recipes. Therefore, recipes using
> the
> default KERNEL_PACKAGE_NAME="kernel" follows the old semantics --
> build
> in the old location and may be preferred provider -- while recipes
> using
> all other KERNEL_PACKAGE_NAME's build from the normal WORKDIR and
> don't
> provide "virtual/kernel".
> 
> Testing:
>  1. Prepended `KERNEL_PACKAGE_NAME = "tiny-linux"` to
> linux-yocto-tiny_4.9.bb so that it may build alongside
> the main kernel.
>  2. `bitbake linux-yocto linux-yocto-tiny` to build both kernel
> flavors.
>  3. Verified image and modules IPKs exist for both:
> tmp-glibc/deploy/ipk/qemux86/kernel-* for linux-yocto
> tmp-glibc/deploy/ipk/qemux86/tiny-linux* for linux-yocto-tiny
>  4. Verified linux-yocto is the "preferred provider", and was built
> in
> shared directory: tmp-glibc/work-shared/qemux86/kernel-*
>  5. Appended `CORE_IMAGE_BASE_INSTALL += "tiny-linux"` to
> core-image-base.bb to include both kernel flavors.
>  6. `bitbake core-image-base` to build an image.
>  7. Verified image contains two bzImage's under /boot/, with
> "yocto-standard" selected to boot via symlink.
> 
> Discussion thread:
> http://lists.openembedded.org/pipermail/openembedded-core/2015-Decemb
> er/thread.html#114122
> 
> Signed-off-by: Ioan-Adrian Ratiu 
> Signed-off-by: Gratian Crisan 
> Signed-off-by: Haris Okanovic 
> Coauthored-by: Gratian Crisan 
> Coauthored-by: Haris Okanovic 
> Coauthored-by: Josh Hernstrom 
> ---
> [PATCH v2] Change STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR to
> the
> "work" directory in alternate kernel builds, instead of "work-
> shared",
> so
> that the two builds don't clobber each other.
> 
> [PATCH v3] An updated version of this change rebased onto the current
> OE-core master. Changes:
>  * Remove PREFERRED_PROVIDER check in linux-yocto.inc in alternate
>    kernel builds, since alternate kernels aren't the
>    PREFERRED_PROVIDER for virtual/kernel by definition.
>  * Remove "virtual/kernel" from PROVIDES in alternate kernel builds.
> 
> [PATCH v4] Another rebase onto master; no functional change.
> Improved description and testing steps.

So I finally had a chance to get back to this and test build with it, I
saw the following WARNING, which lead to the ERROR:

WARNING: Variable key FILES_${PN}-dev (${includedir} ${FILES_SOLIBSDEV}
${libdir}/*.la ${libdir}/*.o ${libdir}/pkgconfig ${datadir}/pkgconfig
${datadir}/aclocal ${base_libdir}/*.o ${libdir}/${BPN}/*.la
${base_libdir}/*.la) replaces original key FILES_linux-yocto-dev
(/boot/System.map* /boot/Module.symvers* /boot/config*
${KERNEL_SRC_PATH}
${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build).
ERROR: linux-yocto-4.10.17+gitAUTOINC+e92bd55409_6648a34e00-r0
do_package: QA Issue: linux-yocto: Files/directories were installed but
not shipped in any package:
  /boot/System.map-4.10.17-yocto-standard
  /boot/Module.symvers-4.10.17-yocto-standard
  /boot/config-4.10.17-yocto-standard
Please set FILES such that these items are packaged. Alternatively if
they are unneeded, avoid installing them or delete them within
do_install.
linux-yocto: 3 installed and not shipped files. [installed-vs-shipped]
ERROR: linux-yocto-4.10.17+gitAUTOINC+e92bd55409_6648a34e00-r0
do_package: Fatal QA errors found, failing task.
ERROR: linux-yocto-4.10.17+gitAUTOINC+e92bd55409_6648a34e00-r0
do_package: Function failed: do_package

Something seems to be causing the FILES_linux-yocto-dev info to be
overridden, I have not tracked down the culprit yet.

Sau!

> ---
>  meta/classes/kernel-module-split.bbclass  |  9 ++--
>  meta/classes/kernel.bbclass   | 85 ++---
> --
>  meta/conf/documentation.conf  |  1 +
>  meta/recipes-kernel/linux/linux-dtb.inc   |  2 +-
>  meta/recipes-kernel/linux/linux-yocto.inc |  2 +-
>  5 files changed, 59