summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* u-boot: Move UBOOT_INITIAL_ENV back to u-boot.incFabio Estevam2024-03-122-4/+4
| | | | | | | | | | | | | | | | | | | | Commit cc6c3e31526d ("u-boot: Move definitions to common locations") moved UBOOT_INITIAL_ENV to uboot-config.bbclass, but it should be kept at u-boot.inc because it encodes ${PN} in it, which should be set by the U-Boot recipe. Currently, whatever inherits uboot-config bbclass will fill-in its own PN, which would change the content of UBOOT_INITIAL_ENV per-package. Cc: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com> Cc: Marek Vasut <marex@denx.de> Fixes: cc6c3e31526d ("u-boot: Move definitions to common locations") (From OE-Core rev: 18b76259d27dc045f621cd512582c37e8bbab45c) Signed-off-by: Fabio Estevam <festevam@denx.de> Backported from master: 0b0c4b37d318b86f100512476ffd861e0ce1f47e Signed-off-by: Fabio Estevam <festevam@denx.de> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel.bbclass: Set pkg-config variables for building modulesMunehisa Kamata2024-03-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Backport cd2072e5d953 from the master without HOSTPKG_CONFIG setting] 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 -> Kernel hacking -> Compile-time checks and compiler options -> 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: d63af11e92094487d6e358f27283e5385937e7a8) Signed-off-by: Munehisa Kamata <kamatam@amazon.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* tzdata : Upgrade to 2024aPriyal Doshi2024-03-071-3/+3
| | | | | | | | | | (From OE-Core rev: 5f9463d8c9954944c44ca9f25702753895b02745) Signed-off-by: Priyal Doshi <pdoshi@mvista.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 5abbd0abf992ce8d11f3ae31fb1d83d97f5319fa) Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* linux-firmware: upgrade 20231030 -> 20231211Alexander Sverdlin2024-03-071-3/+4
| | | | | | | | | | (From OE-Core rev: 122be5a683affb3044b8e8d605a4bfcc79c6b4c7) Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0caafdbbf4e7dc84b919afe14f7cb8c46a9e4ac2) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* bind: Upgrade 9.18.19 -> 9.18.24Soumya Sambu2024-03-071-1/+1
| | | | | | | | | | | | | | Includes security fixes for - CVE-2023-4408, CVE-2023-5517, CVE-2023-5679, CVE-2023-50868 and CVE-2023-50387 Changelog: ========= https://gitlab.isc.org/isc-projects/bind9/-/blob/v9.18.24/CHANGES (From OE-Core rev: f7ab2e99903c93e428fbaa391c977b428c8e2953) Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* cve_check: cleanup loggingRoss Burton2024-03-071-7/+6
| | | | | | | | | | | | | | Primarily list the number of patches found, useful when debugging. Also clean up some bad escaping that caused warnings and use re.IGNORECASE instead of manually doing case-insenstive rang matches. (From OE-Core rev: 1745208bc08037497ad9de1be15a3cc4a22ceff5) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 10acc75b7f3387b968bacd51aade6a8dc11a463f) Signed-off-by: Steve Sakoman <steve@sakoman.com>
* dbus: Add missing CVE_PRODUCTDhairya Nagodra2024-03-071-1/+1
| | | | | | | | | | | | - The current recipe only contains one (out of three) valid product names for dbus package in NVD. - This could result in reporting of lesser number CVEs than actual. - Added missing names to get a proper list. (From OE-Core rev: 6488fc1a8ffa68268d9d4b71cb017eeb9a645cbe) Signed-off-by: Dhairya Nagodra <dnagodra@cisco.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* qemu: Fix CVE-2023-42467Poonam Jadhav2024-03-074-0/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. scsi-disk: allow MODE SELECT block descriptor to set the block size Link: https://github.com/qemu/qemu/commit/356c4c441ec01910314c5867c680bef80d1dd373 The MODE SELECT command can contain an optional block descriptor that can be used to set the device block size. If the block descriptor is present then update the block size on the SCSI device accordingly. This allows CDROMs to be used with A/UX which requires a CDROM drive which is capable of switching from a 2048 byte sector size to a 512 byte sector size. 2. scsi-disk: ensure block size is non-zero and changes limited to bits 8-15 Link: https://github.com/qemu/qemu/commit/55794c904df723109b228da28b5db778e0df3110 The existing code assumes that the block size can be generated from p[1] << 8 in multiple places which ignores the top and bottom 8 bits. If the block size is allowed to be set to an arbitrary value then this causes a mismatch between the value written by the guest in the block descriptor and the value subsequently read back using READ CAPACITY causing the guest to generate requests that can crash QEMU. For now restrict block size changes to bits 8-15 and also ignore requests to set the block size to 0 which causes the SCSI emulation to crash in at least one place with a divide by zero error. 3. Disallow block sizes smaller than 512 [CVE-2023-42467] Link: https://gitlab.com/qemu-project/qemu/-/commit/7cfcc79b0ab800959716738aff9419f53fc68c9c We are doing things like nb_sectors /= (s->qdev.blocksize / BDRV_SECTOR_SIZE); in the code here (e.g. in scsi_disk_emulate_mode_sense()), so if the blocksize is smaller than BDRV_SECTOR_SIZE (=512), this crashes with a division by 0 exception. Thus disallow block sizes of 256 bytes to avoid this situation. (From OE-Core rev: e9af3d328db8a32c22bb0798fa8dbb749e3f607b) Signed-off-by: Poonam Jadhav <poonam.jadhav@kpit.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* qemu: Backport fix CVE-2023-6693Vivek Kumbhar2024-03-072-0/+75
| | | | | | | | | Upstream-Status: Backport [https://gitlab.com/qemu-project/qemu/-/commit/2220e8189fb94068dbad333228659fbac819abb0] (From OE-Core rev: e993720fc31dbf94bed138b76ce33cbcd61ab9a5) Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* qemu: Fix for CVE-2024-24474Vijay Anusuri2024-03-072-0/+45
| | | | | | | | | | Upstream-Status: Backport [https://github.com/qemu/qemu/commit/77668e4b9bca03a856c27ba899a2513ddf52bb52] (From OE-Core rev: 71600de72c602e6d1ae2c3b13af6c59440affdb6) Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* glibc: ignore CVE-2023-0687Peter Marko2024-03-071-1/+1
| | | | | | | | | | | | | | This CVE was backported to glibc 2.35 branch 9 months ago. NVD recently updated CPE and it appeared in kirkstone cve reports. https://sourceware.org/git/?p=glibc.git;a=log;h=refs/heads/release/2.35/master gmon: Fix allocated buffer overflow (bug 29444) https://sourceware.org/git/?p=glibc.git;a=commit;h=f2820e478c68a73a38f81512cc38beeee220212a (From OE-Core rev: c8b30db7fcecc726fae87c8c49d4c01f0feeb2ab) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* less: Fix for CVE-2022-48624Vijay Anusuri2024-03-072-0/+42
| | | | | | | | | Upstream-Status: Backport [https://github.com/gwsw/less/commit/c6ac6de49698be84d264a0c4c0c40bb870b10144] (From OE-Core rev: 8d91ab209398a8415009bc3093d407bf8871dafd) Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* bitbake: fetch2: Ensure that git LFS objects are availablePhilip Lorenz2024-03-012-6/+90
| | | | | | | | | | | | | | | | | | | | | | | | | The current implementation only performs a git lfs fetch alongside of a regular git fetch. This causes issues when the downloaded revision is already part of the fetched repository (e.g. because of moving back in history or the updated revision already being part of the repository at the time of the initial clone). Fix this by explicitly checking whether the required LFS objects are available in the downloade directory before confirming that a downloaded repository is up-to-date. This issue previously went unnoticed as git lfs would silently fetch the missing objects during the `unpack` task. With network isolation turned on, this no longer works, and unpacking fails. (cherry picked from commit cfae1556bf671acec119a6c8bbc4b667a856b9ae) (Bitbake rev: 40fd5f4eef7460ca67f32cfce8e229e67e1ff607) Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* bitbake: tests/fetch: Add real git lfs tests and decoratorPaulo Neves2024-03-011-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added tests that verify that git-lfs works with an actual real git-lfs server. This was not previously the case because the repo in the test was a simulation of git-lfs but not a real git lfs repo. The 2 added tests are almost the same but test that the git lfs file checkout is successfult with or without the lfs=1 flag. The lfs=1 URI parameter is a quirk that triggers 2 different code paths for git lfs. lfs=1, when used on git lfs repositories triggers the git lfs downloading at the fetch bare stage. lfs query parameter unset triggers the git lfs downloading only on checkout as an implicit behavior of git. This leads to possible network access on the unpack stage and outside the DL_DIR. lfs=0 actually disables git-lfs functionality even if supported. (cherry picked from commit d2be7f7f652360f13cd66d0850f3e19ffe2afb0a) (Bitbake rev: 2a6fd774405a58f3ef2953a0dc3eca063e0cf890) Signed-off-by: Paulo Neves <paulo@myneves.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* bitbake: tests/fetch: git-lfs restore _find_git_lfsPaulo Neves2024-03-011-16/+24
| | | | | | | | | | | | | | Not restoring the mocked _find_git_lfs leads to other tests failing. (cherry picked from commit 70f848631450bd723c223227c21c60e815ee033d) (Bitbake rev: 1d5d4a46c772f44ab652f95b37f508b890828e67) Signed-off-by: Paulo Neves <paulo@myneves.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* bitbake: bitbake/lib/bs4/tests/test_tree.py: python 3.12 regexAdrian Freihofer2024-03-011-1/+1
| | | | | | | | | | | | | Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. (Bitbake rev: 7efed7bc09c56e41d3074a26388581a62f145625) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* bitbake: bitbake/codeparser.py: address ast module deprecations in py 3.12Alexander Kanavin2024-03-011-10/+10
| | | | | | | | | | | | | | Specifically: /srv/work/alex/poky/bitbake/lib/bb/codeparser.py:279: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead if isinstance(node.args[0], ast.Str): /srv/work/alex/poky/bitbake/lib/bb/codeparser.py:280: DeprecationWarning: Attribute s is deprecated and will be removed in Python 3.14; use value instead value = node.args[0].s (Bitbake rev: 6c19b6cf105ac321ec89da1a876a317020c45ab7) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* bitbake: codeparser: replace deprecated ast.Str and 's'Chris Laplante2024-03-011-2/+2
| | | | | | | | | | These have been deprecated since 3.8 (Bitbake rev: 4591011449212c8e494ea42348acb2d27a82a51b) Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* ref-manual: system-requirements: remove outdated noteMichael Opdenacker2024-03-011-6/+0
| | | | | | | | | To align this document with the version in the master branch (From yocto-docs rev: 08ce7db2aa3a38deb8f5aa59bafc78542986babb) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* ref-manual: system-requirements.rst: fix AlmaLinux variable nameMichael Opdenacker2024-03-011-1/+1
| | | | | | | (From yocto-docs rev: fb0fa6e06df46be6b4e35e5a83252277abcd64d7) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* ref-manual: system-requirements: update packages to build docsMichael Opdenacker2024-03-011-5/+5
| | | | | | | | | | | | | | | | - "git" is now required to run "set_versions.py" - Fix Ubuntu / Debian packages. The previous instructions didn't run on Debian 12 Tested on Ubuntu 22.04 and Debian 12. Reported on https://lists.yoctoproject.org/g/docs/message/4789 (From yocto-docs rev: f2a4799fa1cb6ea406d97e1b47ce888e7f5dd264) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Reported-by: <mhagans@skyviewsat.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* ref-manual: system-requirements.rst: simplify supported distro requirementsMichael Opdenacker2024-03-013-103/+48
| | | | | | | | | | | | | | | | | | - This allows to continue sharing the updated Ubuntu/Debian requirements with the brief-yoctoprojectqs/index.rst without indentation mismatches (caused by using the same macro in two different contexts: in direct text and in a bullet list). - Update poky.yaml.in to adapt the number of spaces at the beginning of lines. - brief-yoctoprojectqs/index.rst: fix bad number of spaces before quote block. (From yocto-docs rev: 488731c09bf63fadc02ddcdd94fb3374dafce528) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* manuals: updates for building on Windows (WSL 2)Michael Opdenacker2024-03-014-65/+51
| | | | | | | | | | | | | - Use the Wikipedia naming scheme: WSL 2 instead of WSLv2 - Take into account Windows Server 2019 and 2022 which are supported too. - Improve some explanations (From yocto-docs rev: e64c1154c358128d76b1b8e3a5809dbaa8dc6881) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Reviewed-by: Quentin Schulz <foss@0leil.net> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* ref-manual/system-requirements.rst: recommend buildtools for not supported ↵Michael Opdenacker2024-03-011-1/+7
| | | | | | | | | | | | distros Also minor correction to supported distribution notes (From yocto-docs rev: cb417cef74b87b53300eb05c21675b5e24a10ca7) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Suggested-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* ref-manual: system-requirements: modify anchorMichael Opdenacker2024-03-013-3/+3
| | | | | | | | | To align with the "master" branch (From yocto-docs rev: aaeb061fa8ff73496175eba59f53a19fdcf08f64) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* manuals: update references to buildtoolsMichael Opdenacker2024-03-0114-64/+78
| | | | | | | | | Also fix number of corresponding paragraphs (From yocto-docs rev: 28ee2d91fe4dd0549940dc5df1ff1d59363fcc0f) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* ref-manual: add info on buildtools-make-tarballPaul Eggleton2024-03-011-1/+25
| | | | | | | | | | | | | PENDING ON THIS OE-CORE PATCH: install-buildtools: support buildtools-make-tarball and update to 4.1 https://lists.openembedded.org/g/openembedded-core/message/171522 Cover the use case and the new provided tarball. (From yocto-docs rev: 824c075c31650b9b466ac54fdf926043927b7045) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* manuals: add minimum RAM requirementsMichael Opdenacker2024-03-013-0/+18
| | | | | | | | | | | | Measured by generating a "core-image-sato" image for a "qemux86-64" machine from an Ubuntu 22.04 VM with 4 cores. Less memory was not enough and caused Out of Memory failures. (From yocto-docs rev: 5009d3898a1649074d1fc252ed33ecbf3235ed75) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* manuals: update disk space requirementsMichael Opdenacker2024-03-013-1/+16
| | | | | | | | | | | Tests made on Poky master on March 16, 2023. Add a "Free Disk Space" section to the "System Requirements" document. (From yocto-docs rev: 6e88a53c47f15376c4eec8b34d14239dcf285da3) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* dev-manual: packages: need enough free spaceMichael Opdenacker2024-03-011-0/+7
| | | | | | | | | Enough free storage space is needed to apply package upgrades. (From yocto-docs rev: d020b170917a47487ffda3beb0a2ca223c3d37ed) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* dev-manual: packages: clarify shared PR service constraintMichael Opdenacker2024-03-011-3/+8
| | | | | | | | | | Explicit the problems previous described as "obvious". (From yocto-docs rev: af3f35801a4360cc9c3ea93a39f88596d5f44fdb) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Suggested-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* manuals: suppress excess use of "following" wordMichael Opdenacker2024-03-0136-116/+92
| | | | | | | | | | | | | | | | | | To simplify the style, replace "Following is" and "Following are" by "here is" and "here are", sounding more natural. In some cases, also go further by simplifying "Here are/is xxx" by "xxx are/is" when the "are" or "is" are not two far at the end of the sentence. In some cases too, completely remove the sentence, when it's redundant with the preceding title. (From yocto-docs rev: 2539f1b9cbf9bdd40eff93c6522dc76133debed7) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> CC: Daniel Ammann <daniel.ammann@bytesatwork.ch> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* ref-manual: release-process: grammar fixMichael Opdenacker2024-03-011-1/+1
| | | | | | | (From yocto-docs rev: d1b3e26893f258b1633f8a90cf61456b54c47433) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* dev-manual: Rephrase spdx creationSimone Weiß2024-03-011-15/+24
| | | | | | | | | | | | | Make the options more clear by providing them in a list instead of plain prosa. Also add a ref for a presentation wrt spdx 3.0 in the Yocto project. Fixes [YOCTO 7476] (From yocto-docs rev: 9e5956736a9b6e6c99967d120303d5142550fdb1) Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com> Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel: make LOCALVERSION consistent between recipesBruce Ashfield2024-03-016-8/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | The initial fix for localversion setting in 6.3+ broke older recipes and also broke recipes setting localversion in a kernel recipe, as make-mod-scripts (and other locations) can trigger a regeneration of files and don't have access to the variable. Moving the setting of this variable to the global namespace doesn't make sense, so we follow the example of the kernel-abiversion and save a kernel-localversion to the build artifacts. Recipes that may regenerate scripts/dynamic files, must depend on the do_shared_workedir of the kernel and use the helper function to read the file storing the localversion. (From OE-Core rev: cca0971a7d92d823cc0c2b16cf14a7b2ed8ecb61) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> cherry-picked from master b378eec156998eea55ba61e59103cb34fab0d07c Signed-off-by: Andreas Helbech Kleist <andreaskleist@gmail.com> Acked-by: Ryan Eatmon <reatmon@ti.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel: fix localversion in v6.3+Bruce Ashfield2024-03-012-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During testing of the v6.4 reference kernel, it was noticed that on-target modules no longer matched the magic value of the running kernel. This was due to a different localversion in the cross built kernel and the scripts / resources created on target. This was due to changes in the setlocalversion script introduced in the v6.3 series. The .scmversion file is no longer used (or packaged) to inhibit the addition of a "+" (through querying of the git status of the kernel) or the setting of a local version. We recently introduced the KERNEL_LOCALVERSION variable to allow recipes to place a value in .scmversion, so we extend the use of that variable to kernel-arch.bbclass and use it to set the exported variable LOCALVERSION. We must do it at the kernel-arch level, as the variable must be exported in any kernel build to ensure that setlocalversion always correctly sets the localversion. (From OE-Core rev: 74897e505db19a23a5b864a48a4fa97d657605c8) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> cherry-picked from master 765b13b7305c8d2f222cfc66d77c02e6a088c691 Signed-off-by: Andreas Helbech Kleist <andreaskleist@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* kernel.bbclass: introduce KERNEL_LOCALVERSIONMing Liu2024-03-012-1/+6
| | | | | | | | | | | | | | | | | Just like UBOOT_LOCALVERSION, an end user can set KERNEL_LOCALVERSION to append a string to the name of the local version of the kernel image. (From OE-Core rev: 29a0d2a49df8e24f3948a2ddf03743f0cb5d09dd) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> cherry-picked from master 229435a52f36ddec5f85fb6d5ccd42044b688397 Signed-off-by: Andreas Helbech Kleist <andreaskleist@gmail.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* scripts: python 3.12 regexAdrian Freihofer2024-03-019-38/+38
| | | | | | | | | | | | | | | | | | | | | | | All the regexes throw a warning like this: WARNING: scripts/lib/recipetool/create_buildsys.py:140: SyntaxWarning: invalid escape sequence '\s' proj_re = re.compile('project\s*\(([^)]*)\)', re.IGNORECASE) Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. (From OE-Core rev: 63998f13d5263ce19a60ed3fba1ac8b6f23558e3) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Backported from master: 24b0ba00d4f0b4d9834f7693ecb6032dfc534a80 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* meta/recipes: python 3.12 regexAdrian Freihofer2024-03-012-5/+5
| | | | | | | | | | | | | | | | | Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. (From OE-Core rev: d4e11eebdfe50acc124a87341721a12bc1c15024) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Cherry-picked from master: f2d80817baea298b953d6e14daad65087b3b50c9 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* meta/lib/oeqa: python 3.12 regexAdrian Freihofer2024-03-013-5/+5
| | | | | | | | | | | | | | | | | Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. (From OE-Core rev: 939046c5e9ddd71b941c9e389fa4a4687bfcdec0) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Cherry-picked from master: 9002850f0c2e409d3bc629e36bb360b96326bb64 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* feature-microblaze-versions.inc: python 3.12 regexAdrian Freihofer2024-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. (From OE-Core rev: 2331982cf4f4649f1ec271640f8f7d33fa6ea88d) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> feature-microblaze-versions.inc# Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Cherry-picked from master: 662f52f1713c9f070550fc0c874eb62312218ea4 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/oelib/buildhistory: git default branchAdrian Freihofer2024-03-011-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | On hosts with git defaulting to main branch the following exception occures: File .../buildhistory.py", line 99, in test_compare_dict_blobs_default blob1 = self.repo.heads.master.commit.tree.blobs[0] ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/git/util.py", line 1114, in __getattr__ return list.__getattribute__(self, attr) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'IterableList' object has no attribute 'master' Support main and master branch for these test cases. Note: setting the default branch with --initial-branch requires git version 2.28 or later. Some of the still supported host distros do not provide this feature yet. (From OE-Core rev: 095598eb7c9aa64797c8a41255fa28b695398054) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Cherry-picked from master: 7df99843d8f31d8e0c2872ff625f4a5abf28f740 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/recipetool: expect meson.bbAdrian Freihofer2024-03-011-2/+2
| | | | | | | | | | | Latest recipetool from master branch generates a pyhton3-meson.bb recipe while the older version from kirkstone generates a meson.bb. Change the test to pass with meson.bb. (From OE-Core rev: 979b216330b2f4e8ab9d4e615d4e83997d59def0) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/recipetool: downgrade meson version to not use pyproject.tomlRoss Burton2024-03-011-13/+16
| | | | | | | | | | | | | | | | | | | recipetool's pyproject.toml parsing needs tomllib (python 3.11+) or tomli (not a hard dependency), so is prone to failing depending on the host configuration. Downgrade the Meson release used for the checks to 0.52.1, which was the last release before moving to pyproject.toml. (From OE-Core rev: 24bf7bbd1fb21f84539b7a4263d76a33dbacacde) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Backported from master: 6dfe573d83687e5431841f062442b54b9fa22ff3 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa/selftest/recipetool: fix for python 3.12Adrian Freihofer2024-03-011-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | test_recipetool_create_github and test_recipetool_create_github_tarball fail because the old meson version used by these tests cases does not run on Python 3.12. The issue is in the dependencies.py which comes with meson: ERROR: build/tmp/work/recipetool-3z4osyl7/source/git/mesonbuild/ dependencies.py:777: SyntaxWarning: invalid escape sequence '\.' Use meson 1.3.1 (what is currently also used on master) as a reference for these tests. With this version of meson, recipetool creates recipes named meson_git.bb or meson_1.3.1.bb. Since this looks more reasonable than e.g. python3-meson_git.bb the test gets adapted. (From OE-Core rev: 9c1a1110a317e1d64668badb13e74e474f96a7a9) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Backported from master: 7374a8a2810a6cf027bfefefe87691a3529123ff Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* oeqa: replace deprecated assertEqualsAdrian Freihofer2024-03-013-3/+3
| | | | | | | | | | | | | | | | assertEquals is deprecated since Python 2.7: https://docs.python.org/2/library/unittest.html#deprecated-aliases It throws errors at least on Python 3.12. Replace it by assertEqual. (From OE-Core rev: a20325690a057aa7f71e5a176bfbdc03baac405c) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Backported from master: 68286d0b70cf09a0d2950b48945c9192fb8c8769 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* runqemu: add qmp socket supportRoss Burton2024-03-011-0/+11
| | | | | | | | | | | | | | | | | Add support for qmp sockets and defaults to unix:qmp.sock if unspecified (From OE-Core rev: 31de620e9d899b93c6e982d3a563bbf618ce79c6) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Backported from master: 380631797f0d63124a8c21efa93ab672dbd79283 Qemu throws many warnings without qmp and many runtime tests fail without this patch also on kirkstone. Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* populate_sdk_ext: use ConfigParser instead of SafeConfigParserRoss Burton2024-03-011-1/+1
| | | | | | | | | | | | | | | SafeConfigParser was renamed to ConfigParser in 3.2, and the SafeConfigParser alias will be removed in 3.12. (From OE-Core rev: 50815c328e677ac079d38dc8555a909f049cf5be) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Cherry-picked from master: 71b3e7f71727137b4b996cc4160c9cc1581824b8 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* scripts/runqemu: fix regex escape sequencesTrevor Gamblin2024-03-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | When invoking runqemu with Python 3.12, the following warning is encountered: |SyntaxWarning: invalid escape sequence '\.' This is because the interpreter scans the string before it is processed by the regex module, and it interprets the backslash as part of an escape sequence, but not a standard one. This will be registered as an error rather than a warning in future Python versions. To avoid the it, simply add an extra backslash so that Python doesn't misinterpret the string, while the regex parser still sees an escaped '.' character. (From OE-Core rev: 2f8982ef4c903f43867da56fcfd080a6556daa8b) Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Backported from master: 0e8a4142bb90a92d175df6b2537d24a372356f98 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
* recipetool/create_buildsys_python: use importlib instead of impChris Laplante2024-03-011-3/+2
| | | | | | | | | | | | | | | | 'imp' was deprecated in Python 3.4 and removed in 3.12. The piece of importlib we use has been around since 3.3. (From OE-Core rev: b9dcdf2346bb24866c5f3db96a3f79eba20e4662) Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Cherry-picked from master: 457f0dad87b4e45a53865b5ad2c150215bd74019 Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>