<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes/kernel.bbclass, branch master-uninative</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=master-uninative</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=master-uninative'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2022-04-03T09:40:31+00:00</updated>
<entry>
<title>kernel.bbclass: Use KERNEL_IMAGEDEST instead of hardcoded boot path</title>
<updated>2022-04-03T09:40:31+00:00</updated>
<author>
<name>Alessio Igor Bogani</name>
<email>alessio.bogani@elettra.eu</email>
</author>
<published>2022-04-01T11:26:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=fb1291ea5f6f0edaf6612ba7bac52136e16af462'/>
<id>urn:sha1:fb1291ea5f6f0edaf6612ba7bac52136e16af462</id>
<content type='text'>
The behaviour doesn't change because KERNEL_IMAGEDEST is defined as
'boot' in the same file (line 215).

(From OE-Core rev: b9c3db4953e4e7b423ba9ec5b618fd990c378bc1)

Signed-off-by: Alessio Igor Bogani &lt;alessio.bogani@elettra.eu&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kernel.bbclass: avoid config changes based on the availability of pahole</title>
<updated>2022-03-26T09:33:32+00:00</updated>
<author>
<name>Michael Olbrich</name>
<email>m.olbrich@pengutronix.de</email>
</author>
<published>2022-03-24T16:23:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=aceec5ee12f1fc32d66e34b047c961f2b271bc06'/>
<id>urn:sha1:aceec5ee12f1fc32d66e34b047c961f2b271bc06</id>
<content type='text'>
CONFIG_PAHOLE_HAS_SPLIT_BTF shows up in the config only when pahole is
installed on the host system. As a result, the config changes depending on
whether pahole is installed or not.

Set PAHOLE=false to ensure that it is never found.

If this is actually needed in the future, then we can add an option for
it and create a host package for pahole.

(From OE-Core rev: 43b0eca2f3fc41a0d2ba7c7679687a3e0eb54b45)

Signed-off-by: Michael Olbrich &lt;m.olbrich@pengutronix.de&gt;
[afa: ported from PTXdist 0c0cec2288 to OE-core]
Signed-off-by: Ahmad Fatoum &lt;a.fatoum@pengutronix.de&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kernel: make kernel-base recommend kernel-image, not depend</title>
<updated>2022-02-21T21:53:52+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross@burtonini.com</email>
</author>
<published>2022-02-10T11:52:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f6d963fa6d0e64d53f7ef56fd2c12d67f5811829'/>
<id>urn:sha1:f6d963fa6d0e64d53f7ef56fd2c12d67f5811829</id>
<content type='text'>
As kernel modules depend on the base kernel package, and the base kernel
recipe depends on the kernel image, it's impossible to build file system
images which contain kernel modules but not the kernel itself, such as
an initramfs.

Change the RDEPENDS to RRECOMMENDS so that the disk images can set
PACKAGE_EXCLUDE = "kernel-image-*" to remove the kernel.

(From OE-Core rev: 1c90b27d2c65cfb4f9debf0272820b6a95942f76)

Signed-off-by: Ross Burton &lt;ross.burton@arm.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kernel.bbclass: Allow initramfs to be built from a separate multiconfig</title>
<updated>2022-01-26T06:27:00+00:00</updated>
<author>
<name>Alejandro Hernandez Samaniego</name>
<email>alhe@linux.microsoft.com</email>
</author>
<published>2022-01-23T07:55:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=bedb3444e14693902f9f5eb089810a762f083460'/>
<id>urn:sha1:bedb3444e14693902f9f5eb089810a762f083460</id>
<content type='text'>
There may be a case where we want to build an initramfs image
that doesnt inherit the same DISTRO_FEATURES (or others) from
the main image being built.

For example we may want our initramfs not to inherit a certain
conf or feature, say we want to use musl for a smaller footprint,
but if we are using TCLIBC=glibc for our DISTRO (and inherently
our main image), the initramfs image would inherit that conf and
be forced to use glibc, growing in size as a side effect, currently
avoiding this is not supported.

Allow the kernel class to create a multiconfig dependency
(mcdepends) vs depends for do_bundle_initramfs and define
our INITRAMFS_IMAGE from a separate multiconfig via two
new variables:
INITRAMFS_MULTICONFIG and INITRAMFS_DEPLOY_DIR_IMAGE which
define the multiconfig where the initramfs image should be
coming from and its deploy directory respectively, these two
keep a default definition which preserves current behavior
(do_bundle_initramfs uses depends).

Example usage:
- Create and use multiconfig initramfscfg.conf and set
  TCLIBC=musl there, along with its TMPDIR.
- Add the following to our DISTRO.conf:
  INITRAMFS_MULTICONFIG = "initramfscfg"

  and set
  INITRAMFS_DEPLOY_DIR_IMAGE to the DEPLOY_DIR_IMAGE of the
  initramfscfg multiconfig (hence our main kernel will be
  able to grab it from there and bundle it).

This will result in our musl based initramfs bundled in our
main kernel and our main image to be glibc based.

(From OE-Core rev: 2d317b2685211f1b0d102705a63c0000df96f45f)

Signed-off-by: Alejandro Enedino Hernandez Samaniego &lt;alhe@linux.microsoft.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kernel.bbclass: use common strip()</title>
<updated>2022-01-13T13:57:26+00:00</updated>
<author>
<name>Saul Wold</name>
<email>Saul.Wold@windriver.com</email>
</author>
<published>2022-01-12T17:20:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=987d30df5bb18de3cf17d38bbb745ea65cb86266'/>
<id>urn:sha1:987d30df5bb18de3cf17d38bbb745ea65cb86266</id>
<content type='text'>
Re-use the runstrip() code from oe.packaging, for the kernel
stripping process. Since runstrip() is python the kernel do_strip()
need to be converted to Python also. The stripped kernel image
will be used for deployment in do_deploy(). This will allow the
package.bbclass to split an unstripped kernel binary for the debug
information and extended packagedata. The extended package data is
used by create-spdx.

(From OE-Core rev: e8d9caede5f08154ca615fdaba676b7a4ae05b01)

Signed-off-by: Saul Wold &lt;saul.wold@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kernel: add -dbg package</title>
<updated>2021-12-22T23:11:45+00:00</updated>
<author>
<name>Saul Wold</name>
<email>Saul.Wold@windriver.com</email>
</author>
<published>2021-12-21T19:08:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=32db0d80d7658d64c844f108c40f9f0b18d58c68'/>
<id>urn:sha1:32db0d80d7658d64c844f108c40f9f0b18d58c68</id>
<content type='text'>
Adding the dbg package allows the package bbclass to parse the
debug information which can then be used by the create_spdx bbclass

(From OE-Core rev: b35b68e4ec4a82ada20ab861d29f96cdcb21dec2)

Signed-off-by: Saul Wold &lt;saul.wold@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/kernel*: add variables to allow changing artifact extension</title>
<updated>2021-12-22T23:11:45+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@microsoft.com</email>
</author>
<published>2021-12-20T21:58:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=65e8df66d9579b609791deb74d8e1b9ec17c1115'/>
<id>urn:sha1:65e8df66d9579b609791deb74d8e1b9ec17c1115</id>
<content type='text'>
Allow .bin suffix to be removed (or changed) in the various artifact
filenames. Removing this extension is useful when trying to remove
symlinks and present only unversioned image files (especially for the
FIT image).

(From OE-Core rev: cbecc3cf06eb7359fedf3c6af281cc72178cad18)

Signed-off-by: Paul Eggleton &lt;paul.eggleton@microsoft.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/kernel*: allow disabling symlink creation</title>
<updated>2021-12-22T23:11:45+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@microsoft.com</email>
</author>
<published>2021-12-20T21:58:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a2eb528b63b0c53daab31308a6afdcb605ac5f40'/>
<id>urn:sha1:a2eb528b63b0c53daab31308a6afdcb605ac5f40</id>
<content type='text'>
Allow setting any of the *_LINK_NAME variables to empty string in order
to disable creating symlinks for kernel artifacts, as you can already
for filesystem images with IMAGE_LINK_NAME. Additionally, for the image
type named symlinks, add a KERNEL_IMAGETYPE_SYMLINK boolean variable
which you can set to 0 to disable those symlinks as well.

(From OE-Core rev: d7341f1f22c32ff6cc95d7127f26f87d7fc9c6bd)

Signed-off-by: Paul Eggleton &lt;paul.eggleton@microsoft.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kernel: improve transformation from KERNEL_IMAGETYPE_FOR_MAKE</title>
<updated>2021-12-09T13:49:51+00:00</updated>
<author>
<name>Mike Crowe</name>
<email>mac@mcrowe.com</email>
</author>
<published>2021-10-07T13:17:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=37b0f34817928a6a0ac31f8dc12cb9debe2ff920'/>
<id>urn:sha1:37b0f34817928a6a0ac31f8dc12cb9debe2ff920</id>
<content type='text'>
In 526bdd88ccd758204452579333ba188e29270bde the imageType loop in
kernel_do_deploy was changed to use KERNEL_IMAGETYPE_FOR_MAKE rather
than KERNEL_IMAGETYPES. This broke the special handling for fitImage
immediately below because KERNEL_IMAGETYPE_FOR_MAKE never contains
fitImage.

It has always been my understanding that KERNEL_IMAGETYPE_FOR_MAKE
controlled what was passed to make, but KERNEL_IMAGETYPE controlled what
was installed/deployed. When the two are different then it's the
responsibility of whoever set KERNEL_IMAGETYPE_FOR_MAKE to ensure that
whatever comes out of the kernel build system has been transformed in to
the requested form by the time of installation. This is what happens for
kernel.bbclass's own support for vmlinux.gz.

I think this means that for KERNEL_IMAGETYPE vmlinux.gz, kernel.bbclass
is responsible for generating vmlinux.gz.initramfs[1] so that
kernel_do_deploy can deploy it. This means that the change in
526bdd88ccd758204452579333ba188e29270bde can be reverted, fixing
KERNEL_IMAGETYPE = "fitImage".

In addition, it ought to be possible for recipes and other classes that
use kernel.bbclass to hook into this mechanism by setting
KERNEL_IMAGETYPE_FOR_MAKE and performing their own transformations.

do_bundle_initramfs calls kernel_do_compile and we don't want it to
transform vmlinux to vmlinux.gz at that point, since it will fight
against the careful renaming and preserving that do_bundle_initramfs
does. Let's separate the transformation out of kernel_do_compile to a
new do_transform_kernel task that can be run at the right time. This
means that it's also logical to perform the equivalent translation for
the kernel with the initramfs in a separate
do_transform_bundled_initramfs task too.

This leaves two clear customisation points for recipes and other classes
to hook into the process and perform their transformations:
do_transform_kernel and do_transform_bundled_initramfs.

(I care about this because our recipes that use kernel.bbclass also set
KERNEL_IMAGETYPE_FOR_MAKE and transform vmlinux into a form suitable for
our bootloader after do_compile and do_bundle_initramfs into the format
matching KERNEL_IMAGETYPE. I'm unable to successfully bundle an
initramfs after 526bdd88ccd758204452579333ba188e29270bde, but I didn't
want to just revert that change to reintroduce the bug that it was
fixing.)

I can't say that I'm entirely happy with this change, but I'm unsure
what to do to improve it. I find the way that both the bare kernel and
the one with the initramfs both get deployed to be confusing, and a
waste of build time. I would like to not actually generate a publishable
kernel image at all during do_compile when an initramfs is in use, but I
suspect that this would affect valid use cases that I'm not aware of.

(From OE-Core rev: 10a4a132e87e835726bf5da81a60f6f509b90765)

Signed-off-by: Mike Crowe &lt;mac@mcrowe.com&gt;

[1] It could be argued that this should be vmlinux.initramfs.gz, but
that would require another special case in kernel_do_deploy and the
filename is only visible within this class and the recipes that use it
anyway.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kernel: export native PKGCONFIG variables</title>
<updated>2021-11-26T17:01:08+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2021-11-23T04:22:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ace63e94e346637b116a0365b89fbfd2ff1a393b'/>
<id>urn:sha1:ace63e94e346637b116a0365b89fbfd2ff1a393b</id>
<content type='text'>
In a similar manner to cml1.bbclass, we export the pkg-config
variables to allow a direct call to pkg-config access to the
native sysroot versus the target sysroot.

The kernel doesn't use pkg-config for target configuration,
and has many explicit calls to pkg-config, without the
possibility of easy override to pkg-config-native.

The calls to pkg-config could be made cross friendly via
replacement with make variables, but until that effort is
undertaken upstream, we need a bridge approach.

In particular, this is required for dtschema validation,
which is a requirement in kernel 5.16+

(From OE-Core rev: 9172d61c57e23682c3d2c25701cbd53c84d01a27)

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
