Commit Graph

78919 Commits

Author SHA1 Message Date
Hongxu Jia
2768d6f676 wic-image-minimal, oeqa/selftest/wic: run 'wic ls/cp/rm' in bitbake task
Due to commit [2255f28b57 wic: add WIC_SECTOR_SIZE variable][1] applied,
call `wic ls|cp|rm|write' in bitbake task will hung, but we have no scenario
case to cover it

After commit [scripts/wic: fix calling wic ls|cp|rm|write hung in bitbake task] applied,
this commit run `wic cp|ls|rm' in case wic.Wic2.test_wic_image_type and wic.Wic2.test_qemu,
at post function of with do_image_wic in image wic-image-minimal, and
check if file is there

$ echo 'SANITY_TESTED_DISTROS = ""' >> conf/local.conf
$ oe-selftest -r wic.Wic2.test_wic_image_type wic.Wic2.test_qemu
...
2025-06-23 15:46:22,157 - oe-selftest - INFO - Adding: "include selftest.inc" in /buildarea5/hjia/poky/build-st/conf/local.conf
2025-06-23 15:46:22,157 - oe-selftest - INFO - Adding: "include bblayers.inc" in bblayers.conf
2025-06-23 15:46:22,157 - oe-selftest - INFO - test_qemu (wic.Wic2)
The variable 'TEST_RUNQEMUPARAMS' is not defined
2025-06-23 15:56:46,319 - oe-selftest - INFO -  ... ok
2025-06-23 15:56:46,324 - oe-selftest - INFO - test_wic_image_type (wic.Wic2)
2025-06-23 15:57:17,780 - oe-selftest - INFO -  ... ok
2025-06-23 15:57:17,781 - oe-selftest - INFO - ----------------------------------------------------------------------
2025-06-23 15:57:17,781 - oe-selftest - INFO - Ran 2 tests in 655.792s
2025-06-23 15:57:17,781 - oe-selftest - INFO - OK
2025-06-23 15:57:25,743 - oe-selftest - INFO - RESULTS:
2025-06-23 15:57:25,743 - oe-selftest - INFO - RESULTS - wic.Wic2.test_qemu: PASSED (624.16s)
2025-06-23 15:57:25,744 - oe-selftest - INFO - RESULTS - wic.Wic2.test_wic_image_type: PASSED (31.46s)
2025-06-23 15:57:25,746 - oe-selftest - INFO - SUMMARY:
2025-06-23 15:57:25,746 - oe-selftest - INFO - oe-selftest () - Ran 2 tests in 655.793s
2025-06-23 15:57:25,746 - oe-selftest - INFO - oe-selftest - OK - All required tests passed (successes=2, skipped=0, failures=0, errors=0)

(From OE-Core rev: 18d774eafb7fba720882fcdb945d145b82fa1dd4)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-26 11:02:34 +01:00
Hongxu Jia
e2e709d85e scripts/wic: fix calling wic ls|cp|rm|write hung in bitbake task
While calling wic ls/cp/rm/write in bitbake task along with do_image_wic,
it hung without return.

Due to commit [2255f28b57 wic: add WIC_SECTOR_SIZE variable][1] applied,
It calls get_bitbake_var in `wic ls|cp|rm|write' to define sector size.
By default, get_bitbake_var starts a `bitbake -e' to get variables which
triggers nested bitbake in this situation

Refer `wic create', adds option --vars and --image-name to support to
read bitbake variables from <image>.env files

NOTE: This commit does not add -e for `wic write' to avoid confliction
with existed option -e/--expand

[1] 2255f28b57

(From OE-Core rev: 793732a6ac2b3788d6c6635e5a496b117bd60584)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-26 11:02:34 +01:00
Dmitry Baryshkov
3bef3d2ee1 libglvnd: drop S assignment
libglvnd recipe was sent before the OE-Core changes reworking S /
UNPACKDIR rework. Drop S assignment which is now being rejected by OE /
bitbake.

Fixes: 621e9be9663e ("libglvnd: migrate from meta-oe")
(From OE-Core rev: ec3cd6a73468510e57c4cda874dc3cb20afef9c2)

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-25 07:34:20 +01:00
Richard Purdie
ea4b963d9a buildhistory: Drop BUILDHISTORY_RESET due to reliability issues
The implementation of BUILDHISTORY_RESET is problematic, particlarly given that
people are trying to create an API with it alongside BUILDHISTORY_PRESERVE
which simply doesn't exist and can't work reliably. Worse, the code paths with
this bolted on implementation are convoluted and near impossible to follow.

BUILDHISTORY_PRESERVE is effectively internal API, used to stop buildhistory
removing some files which are needed for data, or are created at different
parts of the build. Add a comment to explain what it is doing and why these files
are listed.

Commit 9f68a45aa238ae5fcdfaca71ba0e7015e9cb720e tried to "fix" preserve support
with the reset functionality but it didn't fully work and has just exposed futher
issues. There is a further fix however I can brely follow the code and in reviewing
it, I've concluded we shouldn't be doing this at all.

Due to the way BUILDHISTORY_RESET was implemented, horrible races were introduced
making it unclear what happens to the data if builds fail for example, or how sstate
interacts with the build since things get reset but stamps do not and tasks may not
rerun. It also interacts badly with any additions to the preserve list, due to
misunderstandings on what that variable does.

Having stared long and hard at the code, and really struggled to understand it, I',
of the view that "reset" for CI purposes should be done by the CI itself. The CI can
choose to remove some files or all files and decide how to handle failures. It has
to handle the buildhistory directory anyway.

Therefore drop BUILDHISTORY_RESET support, allowing the "old" codepaths to be dropped.
BUILDHISTORY_PRESERVE is better documented to hint that it is internal API and to
show what it is really for.

If we really do want some functionality list this, it needs to be implemented in a
way you can follow the code, and have tests.

(From OE-Core rev: 15c5258fd0063ace425b7e904521f1695ffb2a85)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-24 13:53:23 +01:00
Richard Purdie
838d7a5013 image_types_wic: Fix file-checksums for missing files in search path
When we tell bitbake about file-checksums, we need to tell it both the files
we look at that exist, but also the ones we looked for but aren't present.

This means that if files appear earlier in the search path, bitbake can then
do the correct things like updating the taskhash and re-running the recipe/task.

In this case, wic was only signalling file presence. This patch adds in the
files it looked at but didn't find too.

(From OE-Core rev: ef96e2efcd95785e29ff7c62b2cb76e26f46f5ec)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-24 13:53:23 +01:00
Dmitry Baryshkov
0d201a6fd7 default-providers: handle GLVND-related providers
If GLVND is enabled, then libglvnd is providing all OpenGL / ES
libraries. Tune default-providers.inc to select a correct package in
this case.

(From OE-Core rev: 28bc66ade84241f3f9b680d5c1fd8d261da4b413)

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-24 13:51:31 +01:00
Dmitry Baryshkov
717a75c170 mesa: enable glvnd if it is enabled in DISTRO_FEATURES
Let the distro to be a central authority regarding GLVND feature.
Make mesa.inc enable glvnd PACKAGECONFIG if it is enabled in
DISTRO_FEATURES.

(From OE-Core rev: 25d29420919caadae4d35e7eb0291dd3504d8552)

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-24 13:51:31 +01:00
Dmitry Baryshkov
e9d69043cf libglvnd: migrate from meta-oe
libglvnd is a vendor-neutral approach to handling OpenGL / OpenGL ES /
EGL / GLX libraries. It has been proposed and initially implemented by
NVIDIA in order to simplify coinstallation of GL drivers provided by
different vendors. Major Linux distributions (Debian, Ubuntu, Fedora,
etc.) have already switched to libglvnd.

Having libglvnd in OE-Core simplifies integration of this ABI into
distro and BSP layers (e.g. it will help meta-tegra, which currently
provides its own version of the recipe).

Import recipe for libglvnd from the meta-oe layer (changes: fix virtual
package names, add add the SUMMARY data, drop git@ from SRC_URI, require
glvnd DISTRO_FEATURE).

(From OE-Core rev: 621e9be9663e448dde3f6b6a02b413fd65983e6c)

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-24 13:51:31 +01:00
Dmitry Baryshkov
9941e6f292 qemux86-64: drop duplicates with default-providers.inc
default-providers.inc already includes PREFERRED_PROVIDER values for
xserver and GL libraries. Drop the same values being set in the machine
config.

(From OE-Core rev: 973875c79476b70edbef8976446de1be29d50910)

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-24 13:51:31 +01:00
Dmitry Baryshkov
fa7c6cb96b qemux86: drop duplicates with default-providers.inc
default-providers.inc already includes PREFERRED_PROVIDER values for
xserver and GL libraries. Drop the same values being set in the machine
config.

(From OE-Core rev: 589a49c7bd68465163a86e71a67f518849860804)

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-24 13:51:31 +01:00
Dmitry Baryshkov
6f014d1a53 qemu.inc: drop duplicates with default-providers.inc
default-providers.inc already includes PREFERRED_PROVIDER values for
xserver and GL libraries. Drop the same values being set in the machine
config.

(From OE-Core rev: 882e8c3cf28b33cdd6cb26ec412e63a0da8a3199)

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-24 13:51:31 +01:00
Dmitry Baryshkov
67bc6419f0 default-providers: fix GLVND providers to be selected at runtime
The virtual-{libegl,libglx}-icd names are RPROVIDES, not PROVIDES,
because they are a runtime dependency of libglvnd. Make
default-providers follow that and specify PREFERRED_RPROVIDER instead of
PREFERRED_PROVIDER for those names.

Fixes: 9d3b4c9bc403 ("mesa: sort out PROVIDES for the glvnd case")
(From OE-Core rev: c2b4971e79ece23c43639865a617ee4c248fa981)

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-24 13:51:31 +01:00
Dmitry Baryshkov
160c0711ff mesa: fix RPROVIDEd package names
The BCP for virtual runtime package names is virtual-foo. Make mesa
follow the established convention and change the names of the provied
packages to virtual-foo-icd.

Fixes: 9d3b4c9bc403 ("mesa: sort out PROVIDES for the glvnd case")
(From OE-Core rev: d69e06dbd8575e258a4542f34c5eaba413da7750)

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-24 13:51:31 +01:00
Richard Purdie
60e8db8588 ref-manual/yocto-project-supported-features: Set riscv32 maintainers as TBD
This isn't committed to by anyone at this point to mark as TBD.

(From yocto-docs rev: 6b45207c8db40ef416f12348e066601975a0ca36)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-24 11:29:26 +01:00
Ryan Eatmon
d87b8dbeb0 u-boot: Allow for customizing installed/deployed file names
When assembling all of the various filenames that are installed/deployed
from u-boot, we have been including the PV and PR in the filenames.  This
change introduces a single variable to replace these two in the
filenames.

This change should not be disruptive since the default value for the new
UBOOT_VERSION variable is "${PV}-${PR}".

In one case (UBOOT_EXTLINUX_SYMLINK [1]), PR was used without PV, this
patch assumes this was a mistake and corrects it as PR would not be of
much use alone.

[1] https://git.openembedded.org/openembedded-core/commit/?h=master-next&id=33df3a65f3e8e136811da715d0cc247ce66ae0ea

(From OE-Core rev: debc691853e2954bd325bad395b8829939afaa08)

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-23 22:13:08 +01:00
Robert Yang
2156cb9598 rpm: Update 0001-CMakeLists.txt-Fix-checking-for-CFLAGS.patch
The patch merged by upstream is different, so backport the one from upstream.

(From OE-Core rev: 65fd3c93285e0a166f0d77a92cc42680d72a6bd1)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-23 21:42:54 +01:00
Ross Burton
6091ebc9c5 oeqa/core/case: add file exists assertion
Add assertFileExists() to simply tests that want to check that a file
exists.

(From OE-Core rev: b62e53a0cff2522fef3b89de875c9526a626d7dd)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-23 21:42:54 +01:00
Ross Burton
8e70eeb0b1 files/license-hashes.csv: add more hashes
Add a slew of license hashes harvested by building some Go recipes in
meta-oe.

(From OE-Core rev: b281340ac099058e3483419366c25c9e28839aef)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-23 21:42:54 +01:00
Ross Burton
18319c08ad lib/oe/go: document map_arch, and raise an error on unknown architecture
Add a comment explaining what this function does and where the values
come from.

If the architecture isn't know, instead of returning an empty string
which could fail mysteriously, raise a KeyError so it fails quickly.

(From OE-Core rev: 025414c16319b068df1cd757ad9a3c987a6b871d)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-23 21:42:54 +01:00
Richard Purdie
81ad1de523 selftest/buildhistory: Move test cases to common location
Having the test cases split in different places makes no sense. Move them
all to the place you'd expect to find them. Drop the base class as it
is no longer needed.

(From OE-Core rev: c5a8a1dc637206fa398c639c49531f709e5b002f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-23 21:42:54 +01:00
Richard Purdie
b52d2a985c libarchive: upgrade 3.7.9 -> 3.8.1
Includes bugfixes for issues introduced in 3.8.0

License-Update: Public Domain file changed from libarchive/archive_getdate.c
    to libarchive/archive_parse_date.c
    c26f037745

(From OE-Core rev: 49d07ca1e4f41e33e82666dadbaedcec7f2822cd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-23 21:42:54 +01:00
Enrico Jörns
17fc330236 barebox: upgrade 2025.04.0 -> 2025.06.0
Changes in 2025.06.0
--------------------

* Fixed FIT image decompression regression introduced in 2025.05.0
* Fixed filesystem unmount issues caused by incorrect reference counting
* Fixed unmount failures after using findmnt
* Added eMMC HS200 support for i.MX with generic SDHCI/MCI rework

Changelog: https://lore.barebox.org/barebox/aEwKEf9V0V9tbD5p@pengutronix.de/

Migration Guide:
https://barebox.org/doc/latest/migration-guides/migration-2025.06.0.html

Changes in 2025.05.0
--------------------

* RPMB support added for eMMC, enabling AVB persistent value storage
* New commands: 'tree', 'truncate', 'varinfo' (variable inspection)
* Added board support: STM32MP1-based Linux Automation TAC, FairyTux 2,
  Protonic MECT1S
* Unified Beaglebone build now produces MLO first‐stage image
* TLSF allocator becomes the default, replacing dlmalloc
* Various filesystem, CI, and driver cleanups and improvements

Changelog: https://lore.barebox.org/barebox/aC2N-bXXRByPYqiM@pengutronix.de/

Migration Guide:
https://barebox.org/doc/latest/migration-guides/migration-2025.05.0.html

(From OE-Core rev: 92e73233efc9f4954251567a23b67531702e078d)

Signed-off-by: Enrico Jörns <ejo@pengutronix.de>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-23 21:42:54 +01:00
Peter Marko
e869572d24 glibc: stable 2.41 branch updates
$ git log --oneline 5b4c4617016d28569106549dff6f9fec73eed5ce..0c76c951620f9e12df2a89b2c684878b55bb6795
0c76c95162 ppc64le: Revert "powerpc: Optimized strcmp for power10" (CVE-2025-5702)
b48d7ab036 ppc64le: Revert "powerpc : Add optimized memchr for POWER10" (Bug 33059)
55cdcadf73 ppc64le: Revert "powerpc: Fix performance issues of strcmp power10" (CVE-2025-5702)
84bdbf8a6f ppc64le: Revert "powerpc: Optimized strncmp for power10" (CVE-2025-5745)
d952c6efaa sparc: Fix argument passing to __libc_start_main (BZ 32981)
515d4166f4 elf: Fix subprocess status handling for tst-dlopen-sgid (bug 32987)
899dd3ab2f x86_64: Fix typo in ifunc-impl-list.c.
624285af3b elf: Test case for bug 32976 (CVE-2025-4802)
2ca34d7627 support: Use const char * argument in support_capture_subprogram_self_sgid
dab44a3b2b elf: Keep using minimal malloc after early DTV resize (bug 32412)
5cf17ebc65 hurd: Fix tst-stack2 test build on Hurd

test results:
            Before After  Diff
FAIL           140   142    +2
PASS          5846  5846     0
UNSUPPORTED    243   243     0
XFAIL           16    16     0
XPASS            4     4     0

failed test changes:
-elf/tst-audit21
+elf/tst-audit-tlsdesc-dlopen2
+elf/tst-dlopen-sgid
-malloc/tst-free-errno-malloc-hugetlb1
+malloc/tst-free-errno
+malloc/tst-malloc-tcache-leak
-nptl/tst-mutex10
+nptl/tst-mutexpi8-static

(From OE-Core rev: 6909a0b598fdb86c0cfa1f6e9ef90ed42bb3069c)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-23 21:42:54 +01:00
Richard Purdie
b88519519f bitbake: toaster/tests: Fix automated testing failures
The display window scrolling mechanism we were using was failing in one case
and needed in another. After trying various approaches, this one with
window.scrollTo seems to work and fixes the test failures.

(Bitbake rev: f1175778108a559e1dd0d55cb68f42816c86f393)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-21 15:35:49 +01:00
Richard Purdie
5049bc18a8 poky: Update version/codename post release to whinlatter
(From meta-yocto rev: 69a795323a5edf42bcc8f002eb33666d78165d33)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-21 15:09:53 +01:00
Richard Purdie
5e22c4e351 ref-manual/yocto-project-supported-features: Update to match current status
A few items were in the wrong sections or needed clarification, tweak accordinly.

(From yocto-docs rev: 85e58c4fc5d1be9a2ea9ed6b813d0168e3162dab)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 14:28:27 +01:00
Richard Purdie
448af7ef00 layer.conf: Update to whinlatter release series
Since there are currently multiple breaking changes, update to a new
release series for the next release so layers can show compatibility
correctly.

(From meta-yocto rev: a67bb58ee119d68c4b72bf954b4eb613612a8cc6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 13:07:15 +01:00
Richard Purdie
ec157ae344 layer.conf: Update to whinlatter release series
Since there are currently multiple breaking changes, update to a new
release series for the next release so layers can show compatibility
correctly.

(From OE-Core rev: 75eb26e71dba4096d5632b7f6b13db4f13aa6d7f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 13:07:15 +01:00
Alexander Kanavin
842ef50329 meta-poky: set S from UNPACKDIR in recipes that use only local files
There is no need to have two assignments; also setting S from
UNPACKDIR (and not vice versa) is more logical as unpack
task comes first, and tasks that come after unpack use S to access
unpack results.

(From meta-yocto rev: 9fb052b0f19bdd4e1b1625865c41ab8a35d7b669)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 12:29:47 +01:00
Alexander Kanavin
dc9faa3cdc meta: remove consecutive blank lines
Some of them were introduced by mass-removal of S = WORKDIR/git assignments;
rather than try to fix up (or redo) just these, I've run this sed command over
the whole tree:

sed -i -z -E 's/([ \t\f\v\r]*\n){3,}/\n\n/g' `find . -name *.bb -o -name *.inc`

The rationale is that more than one empty line is wasting vertical screen space, and
does nothing for readability.

(From OE-Core rev: cedc4ff7c9bcfb22a20e43e47f9759f4007a4f1a)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 12:07:27 +01:00
Alexander Kanavin
0ad5fb3431 base.bbclass: drop compatibility moving of sources into workdir
Potentially there could be a grace period for fixing recipes (with warnings, etc),
on the other hand, changes to git unpacking destination would already
break various layers, so we might as well make this a hard qa error and drop
the magic at the same time.

I commit to sending fixes for layers included in autobuilder testing
(meta-oe/arm/intel/virt/agl/aws/mingw/etc).

SOURCE_BASEDIR is at the same time adjusted to be calculated relative
to UNPACKDIR (previously it only worked if S was set to
WORKDIR/something/otherthing, and that is no longer working). It is also
no longer removed from the filesystem, as content of unpackdir is managed elsewhere.

(From OE-Core rev: 53e9ea30aaf48292307b4cff6964bead74c69fff)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 12:07:27 +01:00
Alexander Kanavin
4dd321f8b8 insane/do_qa_unpack: add checks that ensure S is set correctly
The checks are fatal, as this avoids rather more cryptic errors further
down the build. Example:

ERROR: gnu-config-native-20240823+git-r0 do_unpack: Recipes that set S = "${WORKDIR}/git" or S = "${UNPACKDIR}/git" should remove that assignment, as S set by bitbake.conf in oe-core now works.
ERROR: perlcross-native-1.6.2-r0 do_unpack: S should be set relative to UNPACKDIR, e.g. replace WORKDIR with UNPACKDIR in "S = ${WORKDIR}/perl-cross-${PV}"

Dropping the S = ${WORKDIR}/git assignment (addressing the first error) can be done
with a single sed command when there is a lot of recipes:

sed -i "/^S = \"\${WORKDIR}\/git\"/d" `find . -name *.bb -o -name *.inc -o -name *.bbclass`

Replacing WORKDIR with UNPACKDIR can be done similarly, but should be done after
the removals:

sed -i "s/^S = \"\${WORKDIR}\//S = \"\${UNPACKDIR}\//g" `find . -name *.bb -o -name *.inc -o -name *.bbclass`

(From OE-Core rev: 46480a5e66747a673041fe4452a0ab14a1736d5e)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 12:07:26 +01:00
Alexander Kanavin
4547232c71 recipetool/devtool: calculate source paths relative to UNPACKDIR
Now that recipes default to S in UNPACKDIR, recipetool and devtool should
do the same.

There was some discussion about changing devtool to simply setting
UNPACKDIR via bbappend to a workspace and running unpack task directly;
currently it has a bunch of convoluted path calculations, substitutions,
moving source trees around and and special casing (devtool-source.bbclass
in particular is an unpleasant hack).

This should definitely be done; but right now we can simply tweak existing
code which at least doesn't make it worse.

(From OE-Core rev: c326ca8aeb2bf0f7719e43921d10efd5dedc7b2a)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 12:07:26 +01:00
Alexander Kanavin
efb0410d38 meta: set S from UNPACKDIR in recipes that use only local files
There is no need to have two assignments; also setting S from
UNPACKDIR (and not vice versa) is more logical as unpack
task comes first, and tasks that come after unpack use S to access
unpack results.

Also adjust reference test data in selftest/recipeutils to reflect changes in test recipes.

(From OE-Core rev: f64b7e5fb3181734c8dde87b27e872a026261a74)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 12:07:26 +01:00
Alexander Kanavin
e1f059f34e meta: set S to be in UNPACKDIR in recipes that explicitly set S
(From OE-Core rev: 7321cc17ae5483f17fe9cdffea7b62acd9d9c3a2)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 12:07:26 +01:00
Alexander Kanavin
910442fedc gcc/clang: set S to be in UNPACKDIR
This and some further commits allows removing the 'backwards
compatibility magic' in do_unpack that moves unpacked sources
to where S is set to.

(From OE-Core rev: 6b2f14cd2d110113f1065bdc818ec4e9dbd4b054)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 12:07:26 +01:00
Alexander Kanavin
fc0f1b61c6 bitbake.conf: set S to be in UNPACKDIR rather than WORKDIR
This transitions most of the recipes to have their sources
in UNPACKDIR, which over time will allow more simple and logical
source code handling in various pieces of the Yocto project.

(From OE-Core rev: 50439f56b2d94769de928c70eebdfd4b47794fb4)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 12:07:26 +01:00
Alexander Kanavin
92dfe6e2f5 bitbake.conf: set UNPACKDIR to just 'sources' and not 'sources-unpack'
This is shorter and doesn't include the unnecessary task name, just the
result of it: source trees and files.

(From OE-Core rev: f19ea21c8ebf8ce211b14e69b27c82faf080185a)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 12:07:26 +01:00
Alexander Kanavin
f59a7df3fe meta: remove S in recipes that fetch from git via setting BB_GIT_DEFAULT_DESTSUFFIX
Removing all the S = ${WORKDIR}/git assignments works because BB_GIT_DEFAULT_DESTSUFFIX
is set to match S from bitbake.conf (which itself is set to match typical tarball
releases).

A few recipes are setting S to a sub-directory of the git tree and need
to be adjusted accordingly.

bzip2 recipe is fetching a tarball and separately cloning tests;
adjust the recipe to put the latter into 'bzip2-tests', instead of 'git'.

devupstream.bbclass no longer needs to rewrite S, and is adjusted accordingly.

Adjust scripts/lib/recipetool/append.py to not hardcode 'git' as unpack
destination.

Adjust kernel-yocto.bbclass to use the git unpack variable instead
of hardcoding 'git' (there's also removal of repetition of
string constants and a correction of workdir/unpackdir mismatch in
one of the if-else branches).

Ensure build-appliance-image recipe does not use 'git' as checkout directory for
poky repo, but rather explicitly name it 'poky'.

Ensure reproducible.py code that looks for git repositories does not
hardcode 'git' but uses the destination set by BB_GIT_DEFAULT_DESTSUFFIX.

Ensure recipetool does not write out unneeded S settings into newly
created recipes that fetch from git.

Adjust selftest to not hardcode 'git' as unpack directory.

(From OE-Core rev: f80c07019ddadaf9c5fb890faabfda7920ecd15e)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 12:07:26 +01:00
Alexander Kanavin
724b86c08a lib/bbconfigbuild/configfragments: add support for listing and enabling built-in fragments
Sample output:

$ bitbake-config-build enable-fragment machine/qemuarm
Fragment machine/qemuarm added to /srv/storage/alex/yocto/build-64-alt/conf/auto.conf.

$ bitbake-config-build list-fragments
Available built-in fragments:
machine/...	Sets MACHINE = ...
distro/...	Sets DISTRO = ...

Enabled built-in fragments:
machine/qemuarm	Sets MACHINE = "qemuarm"

... (standard on-disk fragments output follows)

(From OE-Core rev: 47cb11db810bef36e791af84be1d680fd99301c7)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 12:03:37 +01:00
Alexander Kanavin
41de71e062 bitbake.conf: enable built-in fragments for MACHINE and DISTRO
Please see the patch for bitbake for rationale. With this
setting in place, it's possible to set

OE_FRAGMENTS += "distro/poky machine/qemuarm"

and bitbake will interpret that as

DISTRO = "poky"
MACHINE = "qemuarm"

(From OE-Core rev: e959f916b4d2bb8af2e6a04116de9430bbde0c9f)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 12:03:37 +01:00
Alexander Kanavin
941ac7d256 bitbake: parse/ast: add support for 'built-in' fragments
When reviewing proposed fragments to add settings for DISTRO and MACHINE,
RP noted that such fragments only add clutter and overhead, and there's
no need to maintain them as separate files.

Rather when bitbake sees 'fragmentvar/fragmentvalue' it can expand that into
FRAGMENTVAR = "fragmentvalue".

To achieve that, 'addfragments' directive is extended with a parameter
that sets the name of the variable that holds definitions of such
built-in fragments, for example like this:

"machine:MACHINE distro:DISTRO"

Then each enabled fragment name is matched against these definitions and the
respective variable is set, e.g. 'machine/qemuarm' would match
'machine:MACHINE' and result in MACHINE set to 'qemuarm'.

This happens before any fragment files are looked up on disk,
and no such lookup happens if there was a match, which should prevent
possible misuse of the feature. So the builtin fragment definition
is also an allowlist for them.

Please also see the patches for oe-core that show an application of the feature.

(Bitbake rev: 3b9d7bea915dc7f10e845854f1dae325743f9456)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 12:03:37 +01:00
Alexander Kanavin
be8123d8df bitbake: fetch2/git: allow overriding default unpack directory with a variable
This will allow setting the variable in oe-core such that it matches
S, which in turn will allow dropping S from almost all git:// fetching recipes,
and not having to set it in newly written ones.

(Bitbake rev: 378db0fdd95f8704fccd852452555bfddcad384d)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 12:03:37 +01:00
Ross Burton
55c4f54106 oeqa/utils/command: fast-path get_bb_var()
get_bb_var() currently end up calling 'bitbake -e' and parsing the whole
output. However if postconfig isn't set then we can speed this up by
just calling bitbake-getvar.

The complication with failing bitbake-getvar calls is because we need to
be careful to return None instead of the empty string when the variable
doesn't exist.

(From OE-Core rev: fafe77879aa6225aa8b5187ff590bb4998cbf987)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 09:52:28 +01:00
Mark Hatle
d56b141a4e rust-target-config.bbclass: Update for new riscv TUNE_FEATURES
Add the new TUNE_FEATURES to the 'features:' list, based on matching output
with:

   rustc --target=riscv32i-unknown-none-elf -Ctarget-feature=help

Use the TUNE_RISCV_ABI instead of guessing for the ABI.

Pass the arch "as-is", since it should now be riscv32 or riscv64.

(From OE-Core rev: 88b59db87d2c65e5be0f3fee1ebf4ee64ef05f18)

Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 09:52:28 +01:00
Mark Hatle
3c5c4cfa6b riscv tunes: ISA Implementation of RISC-V tune features
This implements the following base ISAs:

* rv32i, rv64i
* rv32e, rv64i

The following ABIs:
* ilp32, ilp32e, ilp32f, ilp32d
* lp64, lp64e, lp64f, lp64d

The following ISA extension are also implemented:
* M - Integer Multiplication and Division Extension
* A - Atomic Memory Extension
* F - Single-Precision Floating-Point Extension
* D - Double-Precision Floating-Point Extension
* C - Compressed Extension
* B - Bit Manipulation Extension (implies Zba, Zbb, Zbs)
* V - Vector Operations Extension
* Zicsr - Control and Status Register Access Extension
* Zifencei - Instruction-Fetch Fence Extension
* Zba - Address bit manipulation extension
* Zbb - Basic bit manipulation extension
* Zbc - Carry-less multiplication extension
* Zbs - Single-bit manipulation extension
* Zicbom - Cache-block management extension

The existing processors tunes are preserved:
* riscv64 (rv64gc)
* riscv32 (rv32gc)
* riscv64nf (rv64imac_zicsr_zifencei)
* riscv32nf (rv32imac_zicsr_zifencei)
* riscv64nc (rv64imafd_zicsr_zifencei)

Previously defined feature 'big-endian' has been removed as it was not used.

(From OE-Core rev: bcaf298a146dfd10e4c8f44223ea083bc4baf45c)

Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 09:52:28 +01:00
Daniel Turull
63fb85ec37 Add SPDX_INCLUDE_COMPILED_SOURCES documentation
Adding documentation for the new feature to store in SPDX
only the compiled sources.

Merged in oe-core: c6a2f1fca76fae4c3ea471a0c63d0b453beea968
 - spdx: add option to include only compiled sources

CC: Antonin Godard <antonin.godard@bootlin.com>
(From yocto-docs rev: 4dbc63ed1381fe47723d6ba5b7baf2a3b7fd19aa)

Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 09:48:15 +01:00
Robert P. J. Day
7d68886200 bsp-guide: update all of section 1.8.2 to reflect current beaglebone conf file
(From yocto-docs rev: 5fc7794e9ae326eead16552726d74ea801fe535b)

Signed-off-by: "Robert P. J. Day" <rpjday@crashcourse.ca>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 09:48:15 +01:00
Robert P. J. Day
c6be4ac032 bsp-guide: update lonely "4.12" kernel reference to "6.12"
To accompany earlier updating of kernel version, update this lonely
reference to be consistent.

(From yocto-docs rev: e26c2018cd663de91ee08e0cba55eda1a4c30210)

Signed-off-by: "Robert P. J. Day" <rpjday@crashcourse.ca>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 09:48:15 +01:00
Quentin Schulz
e60c9d753c document how to use :doc: directive
Let's specify that we are only expecting "absolute" paths in the docs
directive for local document referencing.

(From yocto-docs rev: 2729250bf1068814e5106d1e71796e8a505963d7)

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-20 09:48:15 +01:00