<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes-recipe, branch nanbield</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=nanbield</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=nanbield'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2024-03-13T13:59:26+00:00</updated>
<entry>
<title>kernel.bbclass: Set pkg-config variables for building modules</title>
<updated>2024-03-13T13:59:26+00:00</updated>
<author>
<name>Munehisa Kamata</name>
<email>kamatam@amazon.com</email>
</author>
<published>2024-02-23T08:05:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=5d567f14e98dbdd2bec3233dc17943295b034ad8'/>
<id>urn:sha1:5d567f14e98dbdd2bec3233dc17943295b034ad8</id>
<content type='text'>
The pkg-config workaround has been applied for kernel image building, but
not for module building. So pkg-config variables are different between
do_compile and do_compile_kernelmodules tasks. It may unnecessary trigger
rebuilding of a few host tools at the later task.

Especially when CONFIG_DEBUG_INFO_BTF is enabled in the kernel, it may even
trigger rebuilding vmlinux at do_compile_kernelmodules due to the rebuilt
host tools such as certs/extract-cert or objtool (on x86). This eventually
creates an inconsistent set of kernel binaries.

Here is the repro steps:

 - Check out nanbield on x86
   - The unexpected rebuild happens on kirkstone or possibly earlier

 - Ensure that pahole is available (e.g. via meta-oe)

 - Set KERNEL_DEBUG to "True" to properly set up PAHOLE
   e.g.
   $ export KERNEL_DEBUG="True"
   $ export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS} KERNEL_DEBUG"

 - Enable CONFIG_DEBUG_INFO_BTF=y
   e.g.
   $ bitbake -c menuconfig virtual/kernel
    -&gt; Kernel hacking
      -&gt; Compile-time checks and compiler options
        -&gt; Generate BTF typeinfo

 - Build the kernel
   e.g.
   $ bitbake virtual/kernel

The BTF information in the resulting bzImage and kernel modules are
inconsistent, because the module's BTF information is generated using the
"second" vmlinux that doesn't have the identical BTF to the "first" vmlinux.
These modules can't be loaded at runtime due to the BTF mismatch.

This also leads to a build-id mismatch between the installed bzImage and
vmlinux since the bzImage is created from the first vmlinux, but the
installed vmlinux is the second one.

  $ eu-readelf -n tmp/work/qemux86_64-poky-linux/linux-yocto/6.5.13+git/image/boot/{bzImage*,vmlinux*} | grep "Build ID"
   Build ID: 4a0d62ee7fef0244950f0f604253729875bea493
   Build ID: fb99b3d91399dbe42bf67ddee59e0f5a0c7f74d9

To avoid the unexpected rebuilding that results in such inconsistency, set
the same pkg-config variables when building kernel and modules. For kernel
5.19 and above, simply set the HOSTPKG_CONFIG in the make command line.

(From OE-Core rev: d88e0fa7c5e6c8252f8f775996f512a37fea4818)

Signed-off-by: Munehisa Kamata &lt;kamatam@amazon.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit cd2072e5d953af981339427028e19083257e6a92)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>allarch: Fix allarch corner case</title>
<updated>2024-02-22T14:34:14+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2024-01-01T12:35:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ab7fecefc6d511f64bf236df3605df866c249b9b'/>
<id>urn:sha1:ab7fecefc6d511f64bf236df3605df866c249b9b</id>
<content type='text'>
Most of the allarch code is conditional and only set if the recipe remains marked
as allarch. The qemu wrapper handling is not handled in the same way however and
is unconditional.

Move the code to some slightly uglier inline python to allow it to be conditional
and match the way the rest of the code works.

(From OE-Core rev: 2e206eb9b43c267e939ccb3cdfa62d9666ff5efa)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit dfd704f1741dccd9a85338c5d45dee4be079064d)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>qemu.bbclass: fix a python TypeError</title>
<updated>2024-02-07T14:00:02+00:00</updated>
<author>
<name>Ming Liu</name>
<email>liu.ming50@gmail.com</email>
</author>
<published>2024-01-07T10:34:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d94ab548b0e343daf41c2341abad722aa39bb870'/>
<id>urn:sha1:d94ab548b0e343daf41c2341abad722aa39bb870</id>
<content type='text'>
QEMU_OPTIONS can be empty which will trigger a exception TypeError:
| can only concatenate str (not "NoneType") to str. Fix it by setting a
empty string.

ALso removed two useless blanks.

(From OE-Core rev: 3ccc642bb36373e81d80d41b4f213328c7bfb9cb)

Signed-off-by: Ming Liu &lt;liu.ming50@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit b619197bd52a4a99a9989e7ea6fb7032415b1e42)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>uninative-tarball.xz - reproducibility fix</title>
<updated>2024-01-31T14:10:24+00:00</updated>
<author>
<name>Robert Berger</name>
<email>oecore.mailinglist@gmail.com</email>
</author>
<published>2023-06-30T13:14:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=1a44cbee814132eabf305e644c2a10968a8415f2'/>
<id>urn:sha1:1a44cbee814132eabf305e644c2a10968a8415f2</id>
<content type='text'>
added --clamp-mtime --mtime to the tar command

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

(From OE-Core rev: 3dabf663a772b49e2f324ce5e875d6e633384559)

Signed-off-by: Robert Berger &lt;Robert.Berger@ReliableEmbeddedSystems.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 2ef7c63871ab4fb62a9cea45a23a78bf9d541e4a)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>testimage: Drop target_dumper and most of monitor_dumper</title>
<updated>2024-01-04T14:09:44+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2023-12-19T16:04:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0fdd3151749c31064079041c9e43e14d3ade6206'/>
<id>urn:sha1:0fdd3151749c31064079041c9e43e14d3ade6206</id>
<content type='text'>
The target_dumper code is basically broken. It has been reading binary files
over the text base serial communication and runs at every command failure which
makes no sense. Each run might overwrite files from the previous run and the
output appears corrupted due to confusion from the binary data.

For now, remove the commands and the target dumper code as the command
and execution point are problematic. Also remove the same pieces of the monitor
code but leave the command list since in theory this can be moved to a more
useful place in the code.

(From OE-Core rev: 4c7aa982a996b23a4c5100c5a5a9390e26e5fe46)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit a24d787987dccc95fdd95b7e85bf525a1c55b285)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>kernel-arch: use ccache only for compiler</title>
<updated>2024-01-04T14:09:43+00:00</updated>
<author>
<name>Javier Tia</name>
<email>javier.tia@linaro.org</email>
</author>
<published>2023-11-21T13:26:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d5d85421f2fe9445152bf8a533268578a32ed8f4'/>
<id>urn:sha1:d5d85421f2fe9445152bf8a533268578a32ed8f4</id>
<content type='text'>
Attempting to use it with other tools is not beneficial, only with the
compiler. Confirmation from ccache's maintainer [1].

[1] https://github.com/ccache/ccache/discussions/1346#discussioncomment-7616180

(From OE-Core rev: 4fe3ec1b7e1d034b236816166d58801a4b0e8d70)

Signed-off-by: Javier Tia &lt;javier.tia@linaro.org&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 47fa8d81083f1ef594f8fe6fcab3e227e9607b3f)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>sed -i destroys symlinks</title>
<updated>2024-01-04T14:09:43+00:00</updated>
<author>
<name>Joakim Tjernlund</name>
<email>joakim.tjernlund@infinera.com</email>
</author>
<published>2023-11-14T13:28:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d2d9fd706364e9901a5575ffa0e7579383cff01e'/>
<id>urn:sha1:d2d9fd706364e9901a5575ffa0e7579383cff01e</id>
<content type='text'>
If /etc/passwd is a symlink, sed -i on same file will replace the
symlink with a new file. Prevent that by adding --follow-symlinks
option to sed

(From OE-Core rev: 7b4343a30a02d8f8664ac4c4bc09e5acfb4fa60e)

Signed-off-by: Joakim Tjernlund &lt;joakim.tjernlund@infinera.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
(cherry picked from commit 6ec004b2e7b4342465af8e5e6cc66041834821a0)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>testimage: Exclude wtmp from target-dumper commands</title>
<updated>2023-12-22T15:23:26+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2023-12-19T14:29:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=958a1ab3d0a987983fcda888bab167943d3ae3f4'/>
<id>urn:sha1:958a1ab3d0a987983fcda888bab167943d3ae3f4</id>
<content type='text'>
wtmp is filled with binary data which the run_serial command can't cope with.
Catting this results in confusion of the serial interface and potentially large
backlogs of data in the buffers which can hang qemu.

Exclude the problematic files from the command.

(From OE-Core rev: 1a14503ff5b4bc8192ae1b0d22622b8aefb718be)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 599ac08a6f6fb3f6a89a897c8e06367c63c2f979)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>meson: use correct targets for rust binaries</title>
<updated>2023-12-15T13:54:00+00:00</updated>
<author>
<name>Dmitry Baryshkov</name>
<email>dbaryshkov@gmail.com</email>
</author>
<published>2023-11-04T18:54:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=825972095a52ed5a6f67c044dc83df31ede19410'/>
<id>urn:sha1:825972095a52ed5a6f67c044dc83df31ede19410</id>
<content type='text'>
Follow the example of rust and cargo classes and pass RUST_HOST_SYS and
RUST_BUILD_SYS to rustc's --target argument instead of bare HOST_SYS and
BUILD_SYS.

(From OE-Core rev: ea5e46a627dc7385c4d7732299618b6392b7a407)

Signed-off-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
(cherry picked from commit 1471c6c076f544ccd6f0722c82878311199881a7)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
<entry>
<title>kernel-yocto: improve metadata patching</title>
<updated>2023-12-15T13:54:00+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2023-11-08T14:16:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e96278affc93601cc385beeabc90c83df2a428bd'/>
<id>urn:sha1:e96278affc93601cc385beeabc90c83df2a428bd</id>
<content type='text'>
The ability to patch the kernel-yocto metadata was added to support
debug and easier test cycles on kernel-cache provided fragments. As
such, it was very simple and has limited functionality.

That being said, it is an available feature and can be improved to
handle patches that fail to apply.

The main kernel patching is already handled by the kern-tools, so
we extend the patching of the meta-data to same tools and inherit
more functinality from the scripts.

[YOCTO #15266]

(From OE-Core rev: 98d981ba1bf903da441df22f298633bedbd718da)

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit e867addd6c2f508f7a95e72222e750d37f3d19d8)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
</content>
</entry>
</feed>
