<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes/kernel.bbclass, branch 3.5_M1</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=3.5_M1</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=3.5_M1'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2021-12-09T13:49:51+00:00</updated>
<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>
<entry>
<title>kernel: provide virtual/kernel for all kernels</title>
<updated>2021-11-10T19:27:29+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2021-11-10T13:07:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=f7485646534e1fbf47a24ea950f6dc2d84a473c1'/>
<id>urn:sha1:f7485646534e1fbf47a24ea950f6dc2d84a473c1</id>
<content type='text'>
Since we allow the kernel package name to be varied, we should
allow those packages to provide virtua/kernel, which allows them
to be used as primary kernels.

This change drops the use of regex, since any regex would enforce
naming (and limit what can be a provider) and add complexity./

There are currently no recipes that I found, that inherit kernel
that are not kernel recipes (kernel-base, etc, provide other
facilities), so making this provides simpler shouldn't cause
problems.

Multiple kernel providers can be dealt with in the same way as
any multiple provider.

[YOCTO: #13172]

(From OE-Core rev: 365dc1471a1b67c45de58aadf29844a9ff83d30f)

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;

squash with provider

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kernel: Rework kernel make flag to variable mappings</title>
<updated>2021-10-16T16:41:59+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-10-14T16:18:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b8b59872fa4528e37610be4e87db60b7953d18a3'/>
<id>urn:sha1:b8b59872fa4528e37610be4e87db60b7953d18a3</id>
<content type='text'>
In 2017 we added changes to pass the BUILD_CFLAGS into the kernel
via BUILD_CC. This isn't really correct and the upstream kernel now has
places to pass build cflags, ldflags and more. Update our kernel
make flags to correctly use the kernel's variables. This addresses
concerns raised by kernel developers.

If this breaks some usecase please report it so we can work out how
to fix it properly.

(From OE-Core rev: 7fd06a57a1d91d8534721923f6e3951ec8220cec)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kernel: Add KERNEL_DEBUG_TIMESTAMPS variable</title>
<updated>2021-10-16T16:41:59+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-10-14T12:59:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0dc5920862dd692905347104927f7cf0b7d61376'/>
<id>urn:sha1:0dc5920862dd692905347104927f7cf0b7d61376</id>
<content type='text'>
Change the "binary reproducibility" configuration within the kernel to
work off a separate variable, defaulting to reproducible builds.

This allows kernel developers wanting timestamps in their images to enable
it easily and clearly without changing the rest of the reproduciblity
code which they likely don't need to change anyway.

(From OE-Core rev: 0725ca18af7a2835aeb9616592a45ead2ee87987)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kernel.bbclass: remove unnecessary dead code</title>
<updated>2021-09-28T16:55:04+00:00</updated>
<author>
<name>Rasmus Villemoes</name>
<email>rasmus.villemoes@prevas.dk</email>
</author>
<published>2021-09-23T09:20:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=165b089a7dd0ee3769703336eed8eb936cdfaf1e'/>
<id>urn:sha1:165b089a7dd0ee3769703336eed8eb936cdfaf1e</id>
<content type='text'>
The grep pattern seems to have been wrong ever since we stopped adding
the -ffile-prefix-map via a patch in commit 20aea61385e, because the
actual upstream gcc produces

  -ffile-prefix-map=&lt;old&gt;=&lt;new&gt;

and not

  -ffile-prefix-map=&lt;old=new&gt;

Besides, these *-prefix-map options are already used when building the
kernel due to the setting of KERNEL_CC, and the kernel build system
itself also probes for and uses at least -fmacro-prefix-map (hence
taking care of __FILE__ etc., but not necessarily things that go in
.debug_info sections).

(From OE-Core rev: 5d56de8cd653d2a3a7f4c104d50c14e22d412f66)

Signed-off-by: Rasmus Villemoes &lt;rasmus.villemoes@prevas.dk&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>base/kernel: Support zstd-compressed squashfs and cpio initramfs</title>
<updated>2021-09-01T13:06:17+00:00</updated>
<author>
<name>Zoltán Böszörményi</name>
<email>zboszor@gmail.com</email>
</author>
<published>2021-08-27T07:37:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e492d55d02a658b7c9385dee9c92fdf830b92197'/>
<id>urn:sha1:e492d55d02a658b7c9385dee9c92fdf830b92197</id>
<content type='text'>
Enable zstd PACKAGECONFIG knob for squashfs-tools and add support for zstd
compressed initramfs and squashfs.

(From OE-Core rev: fa146049eec5f9730781830270cc9dc55a2146f7)

Signed-off-by: Zoltán Böszörményi &lt;zboszor@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kernel: Use unexpanded EXTENDPKGV</title>
<updated>2021-09-01T11:07:38+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2021-08-31T13:29:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=3d2904cab5867e450f445a63e0f5e8f7938d355e'/>
<id>urn:sha1:3d2904cab5867e450f445a63e0f5e8f7938d355e</id>
<content type='text'>
EXTENDPKGV can contain AUTOINC so use an expanded form in the variables allowing
for later expansion during packaging to avoid race issues over the variable and
the build failures that can result.

(From OE-Core rev: 1f93d2426d22c74893e8daec9bb939133c5737c2)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kernel.bbclass: Use full versions for inter-package dependencies</title>
<updated>2021-08-27T10:54:34+00:00</updated>
<author>
<name>Zoltán Böszörményi</name>
<email>zboszor@gmail.com</email>
</author>
<published>2021-08-23T14:54:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=7768da3fe88619eefce38ab8f785fd95a544a794'/>
<id>urn:sha1:7768da3fe88619eefce38ab8f785fd95a544a794</id>
<content type='text'>
If the kernel configuration enables module signing but no key
is provided, then the kernel generates one during the kernel build.

The current runtime-dependency references (with only package names
without full versions) allow mixed package installations from different
rebuilds of the same kernel version.

This creates an issue because then the modules either don't work
or taint the kernel.

Tighten RDEPENDS with the full package version, i.e. use (= ${EXTENDPKGV})
markers for inter-package dependencies.

The kernel will pull in the kernel-modules subpackage of the same
exact version automatically if KERNEL_SPLIT_MODULES="0" is set.
Otherwise the situation is the same as with the old default with
one subpackage per kernel module where they have to be upgraded
manually.

(From OE-Core rev: 56428d15803733e14d6f1faf5f77eb933ef966f3)

Signed-off-by: Zoltán Böszörményi &lt;zboszor@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Allow opt-out of split kernel modules</title>
<updated>2021-08-27T10:54:33+00:00</updated>
<author>
<name>Zoltán Böszörményi</name>
<email>zboszor@gmail.com</email>
</author>
<published>2021-08-23T14:54:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e6fae346ea93a2cbb52bb2be01013aabae1215cd'/>
<id>urn:sha1:e6fae346ea93a2cbb52bb2be01013aabae1215cd</id>
<content type='text'>
For some use cases, a monolithic kernel-modules package containing
all modules built from the kernel sources may be preferred.
For one, download time is shorter and installation time is faster.

Set KERNEL_SPLIT_MODULES="0" for this in. The default is one subpackage
per module.

Also, adapt kernel.bbclass to KERNEL_SPLIT_MODULES != "1" case
Extra RDEPENDS and other inter-package references are needed in
this case.

(From OE-Core rev: 4b13409d82e9d576e32b978f7a42a143127ab894)

Signed-off-by: Zoltán Böszörményi &lt;zboszor@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
