summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
Commit message (Collapse)AuthorAgeFilesLines
...
* classes/create-spdx-image-3.0: Fix SSTATE_SKIP_CREATIONJoshua Watt2024-09-041-1/+1
| | | | | | | | | Fixes SSTATE_SKIP_CREATION for do_create_image_spdx (From OE-Core rev: 97cb97c0948db0d46b92fd13ce0a4d5907e22b33) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testexport: support for executing tests over serialAndrew Oppelt2024-09-012-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uses TEST_SERIALCONTROL_CMD to open a serial connection to the target and execute commands. This is a drop in replacement for the ssh target, fully supporting the same API. Supported with testexport. To use, set the following in local.conf: - TEST_TARGET to "serial" - TEST_SERIALCONTROL_CMD to a shell command or script which connects to the serial console of the target and forwards that connection to standard input/output. - TEST_SERIALCONTROL_EXTRA_ARGS (optional) any parameters that must be passed to the serial control command. - TEST_SERIALCONTROL_PS1 (optional) A regex string representing an empty prompt on the target terminal. Example: "root@target:.*# ". This is used to find an empty shell after each command is run. This field is optional and will default to "root@{MACHINE}:.*# " if no other value is given. - TEST_SERIALCONTROL_CONNECT_TIMEOUT (optional) Specifies the timeout in seconds for the initial connection to the target. Defaults to 10 if no other value is given. The serial target does have some additional limitations over the ssh target. 1. Only supports one "run" command at a time. If two threads attempt to call "run", one will block until it finishes. This is a limitation of the serial link, since two connections cannot be opened at once. 2. For file transfer, the target needs a shell and the base32 program. The file transfer implementation was chosen to be as generic as possible, so it could support as many targets as possible. 3. Transferring files is significantly slower. On a 115200 baud serial connection, the fastest observed speed was 30kbps. This is due to overhead in the implementation due to decisions documented in #2 above. (From OE-Core rev: d817b27d73d29ba2beffa2e0a4e31a14dbe0f1bf) Signed-off-by: Andrew Oppelt <andrew.j.oppelt@boeing.com> Signed-off-by: Matthew Weber <matthew.l.weber3@boeing.com> Signed-off-by: Chuck Wolber <chuck.wolber@boeing.com> -- Tested with core-image-sato on real hardware. TEST_SERIALCONTROL_CMD was set to a bash script which connected with telnet to the target. Additionally tested with QEMU by setting TEST_SERIALCONTROL_CMD to "ssh -o StrictHostKeyChecking=no root@192.168.7.2". This imitates a serial connection to the QEMU instance. Steps: 1) Set the following in local.conf: - IMAGE_CLASSES += "testexport" - TEST_TARGET = "serial" - TEST_SERIALCONTROL_CMD="ssh -o StrictHostKeyChecking=no root@192.168.7.2" 2) Build an image - bitbake core-image-sato 3) Run the test export - bitbake -c testexport core-image-sato 4) Run the image in qemu - runqemu nographic core-image-sato 5) Navigate to the test export directory 6) Run the exported tests with target-type set to serial - ./oe-test runtime --test-data-file ./data/testdata.json --packages-manifest ./data/manifest --debug --target-type serial Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd.bbclass: Clean up empty parent directoriesPeter Kjellerstedt2024-09-011-25/+20
| | | | | | | | | | | | | | | | Previously, rm_systemd_unitdir() would remove one parent directory of ${systemd_unitdir} if it was empty after removing ${systemd_unitdir}. rm_sysvinit_initddir() would not remove any parent directory. Thus, if the only directory created in /etc was /etc/init.d, an empty /etc would remain after the cleanup and would be packaged. Simplify rm_systemd_unitdir() and rm_sysvinit_initddir() by rewriting them in shell, and use rmdir -p to remove all empty parent directories. (From OE-Core rev: 73159c0bbc636a08934f47690885d75fd37b701a) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-sign: fix counters in do_uboot_assemble_fitimagePaul Gerber2024-08-301-1/+2
| | | | | | | | | | | | Without unsetting `j` and `k` for each `UBOOT_MACHINE`, `j` and `k` are incremented in the same frequency as `i` and therefore `$j -eq $i` and `$k -eq $i` is always true for the first `type` from `UBOOT_CONFIG` and the first `binary` from `UBOOT_BINARIES`. (From OE-Core rev: 3aef55c7ceb654b0012f20618bfd6ead1ef578b6) Signed-off-by: Paul Gerber <paul.gerber@ew.tq-group.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Drop oe.qa.add_message usageRichard Purdie2024-08-291-1/+1
| | | | | | | | | | | | | | | Drop the oe.qa.add_message() usage in favour of oe.qa.handle_error() which has code allowing it to be optimised with contains usage. The patch also drops unused return values which we stopped using a while ago and drops the now unneeded function parameters, generally leading to cleaner code. The code should be functionally equivalent. (From OE-Core rev: 9b2eea9fd4eab4f5e12e955738db22091b91f698) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm: accept unspecified versions in package.jsonEnguerrand de Ribaucourt2024-08-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Our current emulation mandates that the package.json contains a version field. Some packages may not provide it when they are not published to the registry. The actual `npm pack` would allow such packages, so should we. This patch adds a default value to allow building such packages. This applies for instance to this package which doesn't declare a version: - https://github.com/cockpit-project/cockpit/blob/23701a555a5af13f998ee4c7526d27fdb5669d63/package.json#L2 v3: - Split bitbake npmsw.py modification in another commit Co-authored-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com> (From OE-Core rev: 470c4c027c2b8bbecf23aa63650a22a312de9aa6) Signed-off-by: Tanguy Raufflet <tanguy.raufflet@savoirfairelinux.com> Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scons.bbclass: Add scons class prefix to do_configureOla x Nilsson2024-08-231-2/+2
| | | | | | | | | | | While do_compile and do_install already have the scons_ prefix, do_configure did not. This was most likely an oversight from when it was converted from do_configure[noexec] = "1". (From OE-Core rev: c2213e0393fc589ac0ee1dd6e67ad624eb0a2706) Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license_image.bbclass: Rename license-incompatible to license-exceptionPeter Kjellerstedt2024-08-211-1/+1
| | | | | | | | | | | | | | | | There is currently both an incompatible-license and a license-incompatible QA message. This is very confusing. However, license-incompatible is only used to output a message when a package is included in an image despite it having a license that is normally incompatible (by using the INCOMPATIBLE_LICENSE_EXCEPTIONS variable). To better match how it is used and to distinguish it from incompatible-license, rename it to license-exception. (From OE-Core rev: d309eed66f5a4a4bce082536e51207fe65725fab) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base: inherit nopackagesMartin Jansa2024-08-201-1/+1
| | | | | | | | | | | | | | | | | | | Since this bbclass sets PACKAGES = "", inherit the nopackages class to skip the various packaging functions which wouldn't do anything anyway. This fixes errors from buildhistory changes where packages-split would be empty. e.g. meta-toolchain build now fails with: | DEBUG: Executing shell function buildhistory_list_pkg_files | find: ".../meta-toolchain/1.0/packages-split/*": No such file or directory | WARNING: exit code 1 from a shell command. | DEBUG: Python function buildhistory_emit_pkghistory finished (From OE-Core rev: 29ac598c4f754ce5cee59d3360612f661ad02191) Signed-off-by: Martin Jansa <martin.jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: remove unused CMDLINE_CONSOLEJon Mason2024-08-151-2/+0
| | | | | | | | | | | | CMDLINE_CONSOLE appears to be a legacy variable that is unused anywhere, and has not been modified the creation of the git tree. Remove it and make life simpler. (From OE-Core rev: d075b7c8f15488d98f0cda7b59de9dbed2a4f2d1) Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python_flit_core: remove python3 dependencyKonrad Weihmann2024-08-151-1/+1
| | | | | | | | | | as this is correctly set by setuptools3-base already (From OE-Core rev: 6c4705d1cc5812ef6d1b17f46899007f1709af17) Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: Use --force also with lz4,lzopNiko Mauno2024-08-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Several conversion commands already make use of 'force' option in the compression, which enables overwriting existing files without prompting. Since occasionally an existing residual destination file from a previously aborted or failed task can prevent the re-execution of the conversion command task, by enabling the 'force' option also for lz4 and lzop compression commands we can avoid following kind of BitBake failures with these compressors: | DEBUG: Executing shell function do_image_cpio | 117685 blocks | 2 blocks | example-image.cpio.lz4 already exists; do you want to overwrite (y/N) ? not overwritten | Error 20 : example-image.cpio : open file error | WARNING: exit code 20 from a shell command. ERROR: Task (.../recipes-core/images/example-image.bb:do_image_cpio) failed with exit code '1' (From OE-Core rev: 623ab22434909f10aaf613cd3032cc2a2c6e3ff9) Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo_common.bbclass: Support git repos with submodulesChris Spencer2024-08-081-1/+1
| | | | | | | | | | | This is useful for cargo dependencies specified as git repositories, where those repositories themselves have submodules that need to be checked out. (From OE-Core rev: f871d9d6094ec0001d826e4b5b3395c1842631bb) Signed-off-by: Chris Spencer <spencercw@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base: Ensure nativesdk targets have do_package_qa runRichard Purdie2024-08-041-1/+1
| | | | | | | | | | We've realised that "bitbake XXXx -c populate_sdk" doesn't actually trigger the package_qa tests to run. This means test coverage on the autobuilder was poor. Fix this and run the tests for SDKs. (From OE-Core rev: f35d9b7cc3998c88743397c5dc7e60dac8e4bbea) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool/upgrade: rename RECIPE_UPDATE_EXTRA_TASKS -> RECIPE_UPGRADE_EXTRA_TASKSAlexander Kanavin2024-08-031-1/+1
| | | | | | | | | | 'UPDATE' as a name is somewhat unfortunate as the variable is intended only for the 'devtool upgrade' operation and devtool also has an 'update-recipe' operation. (From OE-Core rev: 4467aa0661e233f44c4ce029428c67d88fccfc07) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* create-spdx-3.0/populate_sdk_base: Add SDK_CLASSES inherit mechanism to fix ↵Richard Purdie2024-07-264-2/+154
| | | | | | | | | | | | | | | | | | | | | | | tarball SPDX manifests Currently, "tarball" sdk based recipes don't generate SPDX manifests as they don't include the rootfs generation classes. Split the SPDX 3.0 image class into two so the SDK components can be included where needed. To do this, introduce an SDK_CLASSES variable similar to IMAGE_CLASSES which the SDK code can use. Migrate testsdk usage to this. Also move the image/sdk spdx classes to classes-recipe rather than the general classes directory since they'd never be included on a global level. For buildtools-tarball, it has its own testsdk functions so disable the class there as a deferred inherit would overwrite it. (From OE-Core rev: 662396533177b72cc1d83e95841b27f7e42dcb20) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* setuptools3: check for a PEP517 build system selectionRoss Burton2024-07-261-0/+14
| | | | | | | | | | | | | | | | | | | | Some recipes use setuptools3 but should be using a PEP517-compliant backend, be it the setuptools itself via python_setuptools_build_meta or an alternative backend such as flit/hatch/poetry. As we can't currently assume Python 3.11 on the build host we need to parse the pyproject.toml manually, but this should be sufficient for the limited parsing needed. This task emits a QA error if a build backend is set, and can be ignored by using INSANE_SKIP if needed. [ YOCTO #14736 ] (From OE-Core rev: a9d800f6cdfcedbe3de8366d935ee5f0c8557c06) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* create-spdx-*: Support multilibs via SPDX_MULTILIB_SSTATE_ARCHSMark Hatle2024-07-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a create-spdx-* classes is processing documents, it needs to find the document in a path that is related to the SSTATE_ARCH when a packge is generated. The SSTATE_ARCH can be affected by multilib configurations, resulting is something like armv8a-mlib. When the image (or SDK) is being generated and the components are collected, the system has no knowledge of the multilib arch and will fail to find it, such as: ERROR: meta-toolchain-1.0-r0 do_populate_sdk: No SPDX file found for package libilp32-libgcc-dbg, False sstate:libilp32-libgcc:armv8a-ilp32-mllibilp32-elf:14.1.0:r0:armv8a-ilp32:12: sstate:libilp32-libgcc::14.1.0:r0::12: Adding in the new SPDX_MULTILIB_SSTATE_ARCHS will provide a full set of SSTATE_ARCHS including ones that contain the multilib extension which will allow create-spdx-* to correctly find the document it is looking for. This would also be valuable to any other function doing a similar search through SSTATE_ARCH that may have been extended with multilib configurations. (From OE-Core rev: f1499c36c1054fc90f7b7268cc95285f2eca72f7) Signed-off-by: Mark Hatle <mark.hatle@amd.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* tclibc-picolibc: Adds a new TCLIBC variant to build with picolibc as C libraryAlejandro Hernandez Samaniego2024-07-262-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enables usage of TCLIBC=picolibc extending OE functionality to build and use picolibc based toolchains to build baremetal applications. Picolibc is a set of standard C libraries, both libc and libm, designed for smaller embedded systems with limited ROM and RAM. Picolibc includes code from Newlib and AVR Libc, but adresses some of newlibs concerns, it retains newlibs directory structure, math, string and locale implementations, but removed the GPL bits used to build the library, swiches old C style code for C18 and replaces autotools with meson. This patch adds a picolibc recipe for the C library, a picolibc-helloworld recipe that contains an example application and a testcase that builds it. Picolibc can be built for ARM and RISCV architectures, its been tested both for 32 and 64 bits, the provided example recipe produces the following output: hello, world Runqemu does not automatically show any output since it hides QEMU stderr which is where the QEMU monitors output is directed to when using semihosting, but, manually running the same QEMU command does work properly. (From OE-Core rev: c7535ecaccb72ef21a61f9aec5c68e61fb4f6fb6) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: fix external dtb checkAdrian Freihofer2024-07-261-1/+1
| | | | | | | | | | | | If EXTERNAL_KERNEL_DEVICETREE and dtb_image_sect are empty variables dtb_path ends up as "/" which is available on most Unix systems but probably not the dtb_path which is needed here. Checking for a file makes more sense and also solves the issue with the "/". (From OE-Core rev: c8f629b6991449cc6726f48a607d9e1bd50807ee) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: fix intentationAdrian Freihofer2024-07-261-32/+32
| | | | | | | | | | | white space changes only. - python part should be 4 spaces, not 8. - use tabs for shell (From OE-Core rev: 000079a973e8c97d496ca721259437880a7ea70d) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: add original package name to RPROVIDES for -image and -baseMartin Jansa2024-07-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * -image and -base change PKG to: PKG:${KERNEL_PACKAGE_NAME}-image = "${KERNEL_PACKAGE_NAME}-image-${@legitimize_package_name(d.getVar(KERNEL_VERSION))}" PKG:${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-${@legitimize_package_name(d.getVar(KERNEL_VERSION))}" * but only when debian.bbclass is inheritted they add the original package name into RPROVIDES by: https://git.openembedded.org/openembedded-core/commit/?id=3409c4379559afbb1d1d29045582995147a33bbc * fixes the build if some packagegroup or something RDEPENDS on kernel-image or kernel-base and the DISTRO doesn't inherit debian.bbclass * as shown in pkgdata: linux-raspberrypi $ egrep "^(PKG:)|(RPRO)" 6.6.36+git-*/pkgdata/runtime/kernel-image 6.6.36+git-debian/pkgdata/runtime/kernel-image:RPROVIDES:kernel-image: kernel-image (=6.6.36+git@PRSERV_PV_AUTOINC@+733366844f_769634f344) 6.6.36+git-debian/pkgdata/runtime/kernel-image:PKG:kernel-image: kernel-image-6.6.36-v8 6.6.36+git-without-debian/pkgdata/runtime/kernel-image:PKG:kernel-image: kernel-image-6.6.36-v8 linux-raspberrypi $ egrep "^(PKG:)|(RPRO)" 6.6.36+git-*/pkgdata/runtime/kernel-image-image 6.6.36+git-debian/pkgdata/runtime/kernel-image-image:RPROVIDES:kernel-image-image: kernel-image-image (=6.6.36+git@PRSERV_PV_AUTOINC@+733366844f_769634f344) 6.6.36+git-debian/pkgdata/runtime/kernel-image-image:PKG:kernel-image-image: kernel-image-image-6.6.36-v8 6.6.36+git-without-debian/pkgdata/runtime/kernel-image-image:PKG:kernel-image-image: kernel-image-image-6.6.36-v8 (From OE-Core rev: 05498781657a3f8b38b000f91594ecd78850ce47) Signed-off-by: Martin Jansa <martin.jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Fix TESTIMAGE_FAILED_QA_ARTIFACTS settingRichard Purdie2024-07-181-1/+1
| | | | | | | | | MCNAME isn't defined outside our mcextend ptest images so use a wildcard in TESTIMAGE_FAILED_QA_ARTIFACTS instead. This unbreaks the value in other images. (From OE-Core rev: e7af85a7b7b966685a9eeaba11628dc10c1ea44b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/kernel.bbclass: update CVE_PRODUCTMarta Rybczynska2024-07-181-1/+4
| | | | | | | | | | | Add linux:linux to CVE_PRODUCT. linux:linux is used by the kernel CNA in raw CVE entries. We can't use just linux, because of conflicts with CPE entries of multiple distributions. (From OE-Core rev: 27404c4ef815f41aac994e9f390776a8bf4f9553) Signed-off-by: Marta Rybczynska <marta.rybczynska@syslinbit.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes-recipe/multilib_script: Expand before splittingJoshua Watt2024-07-181-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | multilib_script.bbclass was unable to work correctly in the case where e.g. a PACKAGECONFIG removed the script that it was intended to rename (as an example, the "trace" PACKAGECONFIG in cairo). The way to fix this would be to do something like: MULTILIB_SCRIPTS = "${@bb.utils.contains('PACKAGECONFIG', 'trace', '${PN}-perf-utils:${bindir}/cairo-trace', '', d)}" but this is not possible because the variable is not expanded before being split. To fix this, change the class to expand the variable before splitting. There are two cases to be considered that could possibly break: 1) If the RHS of the ":" contains a ":", which is accounted for by limiting the splitting to 1 split, which will leave the ":" in the RHS in tact. Of note, this works because ":" isn't valid in a package name 2) If the RHS of the ":" contained whitespace, however this would have broken the mv command written to multilibscript_rename(), so this isn't occurring in practice. (From OE-Core rev: b9c992e69f3f44051610386ce4f743e224750694) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes-recipe/baremetal-image: Add image file manifestJoshua Watt2024-07-131-3/+29
| | | | | | | | | | | Downstream tasks may want to know what image files were written so write out a manifest in do_image_complete. The format of the manifest is the same as the one in image.bbclass (From OE-Core rev: 4c4f1e020533c26f90e95960745f6de90d77e64e) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes-recipe: nospdx: Add classJoshua Watt2024-07-131-0/+13
| | | | | | | | | Adds a class that allows recipes to opt out of generating SPDX (From OE-Core rev: 170277da0dc34e3f797451473ebfbde82922f593) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes-recipe/image_types: Add SPDX_IMAGE_PURPOSE to imagesJoshua Watt2024-07-132-0/+3
| | | | | | | | | | Adds the variable overrides to set the SPDX image purpose for various image types (From OE-Core rev: e1a8f59462d88c92dfdb3632ca95ded094c9472a) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes-recipe/image: Add image file manifestJoshua Watt2024-07-131-0/+58
| | | | | | | | | | | | Downstream tasks may want to know what image files were written by the do_image family of tasks (e.g. SPDX) so have each task write out a manifest file that describes the files it produced, then aggregate them in do_image_complete (From OE-Core rev: 5e55ed4c5b9d5af3c96b82805af34af1512fc3d1) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: fix handling of empty default dtbAdrian Freihofer2024-07-131-1/+1
| | | | | | | | | | | Fix error in run.do_assemble_fitimage_initramfs.2779256: line 238: [: =: unary operator expected if FIT_CONF_DEFAULT_DTB is empty. (From OE-Core rev: 19a6eea0951404403dcb5d0deeda8558b1337f82) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testexport: fallback for empty IMAGE_LINK_NAMEKonrad Weihmann2024-07-081-1/+1
| | | | | | | | | | | | if IMAGE_LINK_NAME is set empty to disable the symlinking for image artifacts in deploy, testexport fails, as the path assembly is incorrect. In that case fallback to IMAGE_NAME (From OE-Core rev: 0c1d098e6dd08fa3a5aafca656457ac6badcef89) Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemuboot: Trigger write_qemuboot_conf task on changes of kernel image realpathWeisser, Pascal.ext2024-07-041-1/+2
| | | | | | | | | | | | | | | | | | | The qemuboot.conf file contains the realpath of the kernel image referenced by QB_DEFAULT_KERNEL. So, it must be recreated in case the realpath of the referenced kernel image changes. The variables KERNEL_IMAGE_NAME and KERNEL_IMAGE_BIN_EXT determine the realpath of the kernel image relative to DEPLOY_DIR_IMAGE. Adding both of them to the vardeps of the write_qemuboot_conf task triggers the write_qemuboot_conf task in case the realpath of the kernel image referenced by QB_DEFAULT_KERNEL changes. Fixes: [YOCTO 15525] (From OE-Core rev: f8b3975a9ce36ea7af5fd76243a823da2842415b) Signed-off-by: "Weisser, Pascal" <pascal.weisser.ext@karlstorz.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext.bclass: make sure OECORE_NATIVE_SYSROOT is exported.Gauthier HADERER2024-07-021-1/+1
| | | | | | | | | | | | | | Fixes bug 15464. OECORE_NATIVE_SYSROOT is correctly set up and exported in the SDK's environment file. But it's then unset in buildtools/environment-setup-*. The value is restored in the SDK's environment file but is not exported again. (From OE-Core rev: 825c996b7995d3ad510933b1a88229831ca5ea29) Signed-off-by: Gauthier HADERER <ghaderer@wyplay.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: fallback for empty IMAGE_LINK_NAMEKonrad Weihmann2024-07-021-2/+2
| | | | | | | | | | | | if IMAGE_LINK_NAME is set empty to disable the symlinking for image artifacts in deploy, testimage fails, as the path assembly is incorrect. In that case fallback to IMAGE_NAME (From OE-Core rev: c7a4e7e294992acc589c62adcaf6cd32659f2f9b) Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native/nativesdk: Stop overriding unprefixed *FLAGS variablesRichard Purdie2024-07-012-10/+0
| | | | | | | | | | | | | | | | | | | | We're currently encouraging an "arms race" with the FLAGS variables since a recipe might want to set a specific flag for all variants but to do so, += won't work due to the assignment in the native/nativesdk class files. This means recipes are using append. Since the default variables are constructed out of TARGET_XXX variables and we redefine these, there is no need to re-define the un-prefixed variables. If we drop that, the += appends and similar work and recipes don't have to resort to append. Change the classes and cleanup a number of recipes to adapt to the change. This change will result in some flags appearing to some native/nativesdk variants but that is probably what was originally expected anyway. (From OE-Core rev: a157b2f9d93428ca21265cc860a3b58b3698b3aa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo: remove True option to getVar callsPeter Marko2024-06-272-11/+11
| | | | | | | | | | Layer cleanup similar to https://git.openembedded.org/openembedded-core/commit/?id=26c74fd10614582e177437608908eb43688ab510 (From OE-Core rev: 9a2ed52473a3e4eb662509824ef8e59520ebdefb) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: Update data layouts for 32-bit arm targetsTronje Krabbe2024-06-261-2/+2
| | | | | | | | | | | | | | | | | | | | update the rust data layout to sync with LLVM [1] fixes the following build error: error: data-layout for target `arm-poky-linux-gnueabi`, `e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64`, differs from LLVM target's `armv7-unknown-linux-gnueabihf` default layout, `e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64` meta-rust issue report with rust 1.76 [2] [1] https://github.com/llvm/llvm-project/commit/308e82ecebeef1342004637db9fdf11567a299b3 [2]: https://github.com/meta-rust/meta-rust/issues/444 (From OE-Core rev: 802376953ed9f1b3e64b3cf57374c58d7ac68d88) Signed-off-by: Tronje Krabbe <tkrabbe@jusst.de> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devicetree.bbclass: switch away from S = WORKDIRAndrey Zhizhikin2024-06-241-1/+2
| | | | | | | | | | | | | | Since the change done in commit 32cba1cc916a ("insane: Error for S == WORKDIR"), usage of WORKDIR is not allowed anymore. Switch S from WORKDIR to UNPACKDIR as implemented in commit d9328e3b0b06 ("recipes: Switch away from S = WORKDIR"). (From OE-Core rev: 7a06069a041a908c1d190f8fb7dd923b86217703) Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/kernel: No symlink in postinst without KERNEL_IMAGETYPE_SYMLINKJörg Sommer2024-06-241-2/+4
| | | | | | | | | | | | | | | | | | | | | | The commit “Use a copy of image for kernel*.rpm if fs doesn't support symlinks” [1] added postinst and postrm scripts to the kernel package which create a symlink after package installation. This should not happen if `KERNEL_IMAGETYPE_SYMLINK` is not `1`. Background: The u-boot implementation of jffs2 does not support symlinks. Using a hardlink or removing `${KERNEL_VERSION}` from the file name fails, because the current postinst script replaces the file with the symlink. [1] 8b6b95106a5d4f1f6d34209ec5c475c900270ecd Cc: Bruce Ashfield <bruce.ashfield@gmail.com> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Yanfei Xu <yanfei.xu@windriver.com> (From OE-Core rev: 6a763401862d9ee96749ad18378b6344778c2c66) Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base: add 7zip archive type for SDKBenjamin Szőke2024-06-181-1/+5
| | | | | | | | | | Added 7zip support and options and extension/type parameter for it to able to make any custom archive type for SDK archive. (From OE-Core rev: 02bbc736cf4f097a78afed4c7614000bd058ef3f) Signed-off-by: Benjamin Szőke <egyszeregy@freemail.hu> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo-update-recipe-crates: add RECIPE_UPDATE_EXTRA_TASKSTim Orling2024-06-131-0/+2
| | | | | | | | | | | | | | | When we upgrade a recipe that inherits cargo-update-recipe-crates and the upstream Cargo.toml/Cargo.lock have been changed, we need to run the update_crates task or else the devtool upgrade (and therefore AUH upgrade) will fail. Add "do_update_crates" task to RECIPE_UPDATE_EXTRA_TASKS for all recipes that inherit this class. (From OE-Core rev: 0156ab3e009fa789c629f6c0ab06fcf21add94f8) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* linuxloader: add -armhf on arm only for TARGET_FPU 'hard'Jonas Gorski2024-06-111-1/+1
| | | | | | | | | | | | | | | | There are two types of soft FPU options for arm, soft and softfp, and if using the latter the wrong dynamic loader will be used. E.g. go will link against ld-linux-armhf.so.3, but libc6 will only ship a ld-linux.so.3, so go programs will fail to start. Fix this by instead checking for TARGET_FPU being 'hard' and then applying the suffix. (From OE-Core rev: 07b4c7a2bd23f8645810e13439e814caaaf9cd94) Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake-qemu.bbclass: fix if criterionKai Kang2024-06-101-1/+1
| | | | | | | | | | | It always executes the scripts whether 'qemu-usermode' in 'MACHINE_FEATURES' or not. Fix the criterion to make it work. (From OE-Core rev: 9e163246dcbbd2187c9ba28432c613b0d6c850c6) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools/libtool: Drop libtool sysroot patch as not neededRichard Purdie2024-06-041-8/+1
| | | | | | | | | | | | | libtool auto detects the sysroot from gcc's parameters or configuration so we don't need to pass in this configuration separately to libtool. Whilst the option names do conflict with gcc/binutils, that is an issue for those projects to resolve, not us. Upstream libtool did reject the patch. We can drop this patch and simplify our code. (From OE-Core rev: 7c8553f81bccc3e8c2bb1116ee1e89f5f8af4c9e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig/populate_sdk_ext: Improve unihash cache handlingRichard Purdie2024-06-041-8/+0
| | | | | | | | | | | | | | | | | | Copying in the bb_unihashes cache file was at best a hack and creates a number of challenges. One is staying in sync with bitbake since it may not have saved the most recent version of the file. A second is a determinism problem since there may be more entries in the file than the SDK should have had access to. To improve the situation, add code to write the data into the locked-sigs.inc file such that even when locked-sigs aren't used, the right hash mappings are injected by the get_cached_unihash call. The functions in copy_buildsystem need to be updated to preserve data they're not editting. (From OE-Core rev: 11373def3171e75b3b74ef694da213dd21f3064c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: fix incorrect debug message for defconfig in WORKDIRQuentin Schulz2024-06-031-1/+1
| | | | | | | | | | | | | | | | Right before this message is printed, the in-tree defconfig is checked against the one in WORKDIR. If it is different, and therefore either provided through SRC_URI or patched, then the message is printed. Therefore, the debug message is incorrect and should say that a patched defconfig was detected and overwritten. Fixes: 004da4c6c602 ("kernel-yocto: split meta data gathering into patch and config phases") Cc: Bruce Ashfield <bruce.ashfield@gmail.com> (From OE-Core rev: f25717bff291ca225a70e63d3266656d8e643531) Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* siteconfig: Drop siteconfig class/code/supportRichard Purdie2024-05-313-24/+1
| | | | | | | | | | | The siteconfig code was only used for 5 cache values. The complexity added to sstate to support this code was considerable and the runtime much more significant than any benefit the cache files would have added. Drop the support for this which was only used minimally for ncurses and zlib. (From OE-Core rev: f3766dc038f7ba9780ddaf5eb8d27385ea31d7d0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: image_types: quote variable assignment needed by dashMartin Hundeb?ll2024-05-301-1/+1
| | | | | | | | | | | | | | | | | The change in commit 39fc503036 ("classes: image_types: apply EXTRA_IMAGECMD:squashfs* in oe_mksquashfs()") assigns $@ to a local variable without quoting it. While this works with bash, it fails with dash. Here, only the first token of $@ is assigned to the variable, and the reamining tokens are passed as arguments to the "local" keyword. Fix it by adding the missing quotes. (From OE-Core rev: 14ca134f9f72d518c9180156a8efac19f8bb3ab0) Signed-off-by: Martin Hundebøll <martin@geanix.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd.bbclass: Clarify error messageKhem Raj2024-05-281-1/+1
| | | | | | | | | | | | | | | | When this error is triggered, its a bit vague in specifying where the issue is e.g. ERROR: nbd-3.26.1-r0 do_package: nbd does not appear in package list, please add it Some packages may intentionally remove PN from packages and find it confusing as to why the system is still asking this to be in PACKAGES (From OE-Core rev: 025a5e4529dff37a6423d305b12b7a51ceedd9e5) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* newlib: Use mcmodel=medany for RISCV64Alejandro Hernandez Samaniego2024-05-281-1/+1
| | | | | | | | | | | | | | | | | | It was previously discovered that mcmodel=medany should be used for RISCV64, however this was only being set for the applications themselves, but not for newlib, this meant that we ended up with C library that used a code model and an application that used another one which is not something we want. Pass mcmodel=medany when building newlib for RISCV64 as well. Also, s/CFLAGS/TARGET_CFLAGS to standarize across recipes, the variable expansion provides no functional difference at this point. (From OE-Core rev: 3ed0a2fab5dbc37dd352ead8846da6aae5de5c20) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>