summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
Commit message (Collapse)AuthorAgeFilesLines
* kernel-module-split.bbclass: enhance objcopy command call for kernel ↵lixiaoyong2024-03-261-2/+2
| | | | | | | | | | | | | | | | compilation with llvm Using meta-clang for llvm kernel compilation previously defaulted to the gcc objcopy tool. To improve flexibility and compatibility, $OBJCOPY is preferred over $HOST_PREFIXobjcopy in the kernel-module-split.bbclass. With $OBJCOPY already defined in bitbake.conf, the empty condition has been removed, simplifying the invocation process. (From OE-Core rev: 45366f9162e5a7707c8a46c46b115e8501d367d0) Signed-off-by: lixiaoyong <lxy204899@163.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/qemuboot: add depends on qemu-system-native and qemu-helper-nativeRoss Burton2024-03-251-0/+2
| | | | | | | | | | | | | | | | | Any image that inherits qemuboot must also add image dependencies on qemu-system-native and qemu-helper-native, otherwise the image won't be able to be booted. Currently this is done by conf/machine/include/qemu.inc, but not every machine that uses qemuboot includes that file. Move the EXTRA_IMAGEDEPENDS from qemu.inc into qemuboot.bbclass, so that the dependencies don't have to be duplicated. (From OE-Core rev: dd54cf058f632e985917ff227483995f368e6a7d) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python3_pip517: just count wheels in the directory, not subdirectoriesRoss Burton2024-03-221-1/+1
| | | | | | | | | | | | | | The install task uses a recursive find to check that it can only find one wheel, but then does a non-recursive glob to install. This can lead to false-failures if PEP517_WHEEL_PATH points at a directory with subdirectories. Solve this mismatch by making the find non-recusive. (From OE-Core rev: 0142da4768b7818b94601a89bf867e10a0ba0ec0) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: Fix check_oldest_kernelPaul Barker2024-03-181-1/+1
| | | | | | | | | | | | | | The check_oldest_kernel() function requires utsrelease.h to be generated. This file is generated during do_compile, so we need to delay calling check_oldest_kernel() until after this. With this change in place, I now see the expected warning when building Linux 5.10.y. (From OE-Core rev: 525019b30e83ea65021ca4874605589ccd2daf80) Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitImage: only include valid compatible lineChristian Taedcke2024-03-081-1/+7
| | | | | | | | | | | | | | | | | | | | Without this commit the configuration node includes the compatible line 'compatible = [00];' if EXTERNAL_KERNEL_DEVICETREE is not defined, i.e. if PREFERRED_PROVIDER_virtual/dtb is not used. This prevents u-boot from using this configuration and it prints the message "Could not find configuration node". An additional check also ensures that the written compatible line never contains an empty compatible. The functionality to add the compatible line was added in commit f4c82fb6da89 ("kernel-fitImage: add machine compatible to config section"). (From OE-Core rev: f8f3a52b2f924789552e6a3f889162ff07e0887f) Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go.bbclass: set GOPROXYJose Quaresma2024-03-081-0/+1
| | | | | | | | | | | | | | | | | | The GOPROXY is already correctly defined on the native sys root and this can be checked using the bitbake devshell: | $ go env GOPROXY | https://proxy.golang.org,direct The go_do_compile task calls the compiler directly so the GOPROXY env is not seen because it's not defined in the shell. Defining it explicitly solves this problem and was to avoid setting it in the recipes itself. (From OE-Core rev: e0919a3f7bc26b1ea9fb57740de4a9a3b9253f26) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/login: Various code improvements and fixesRichard Purdie2024-03-071-0/+1
| | | | | | | | | | | | | | | | * Allow tools to be found from the host PATH so that imagemagick from a buildtools tarball/sdk can work * Reformat the code to have imports at the start of the file and have more standard formatting and whitespace * Always save copies of the images, the space imapct is negligle compared to the debug win * Write the images to ${T} * Use bb.utils.mkdirhier() instead of more complex code * Restrict the tests to images containing matchbox-desktop (From OE-Core rev: d09989b49517830297654e4d1d150aaa8723c41a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: fix vfat image namesChristian Taedcke2024-03-061-2/+2
| | | | | | | | | | | | | | | | Remove the appended ${IMAGE_NAME_SUFFIX}, since it is already included in ${IMAGE_NAME}. In commit 26d97acc7137 ("image-artifact-names: include ${IMAGE_NAME_SUFFIX} directly in both ${IMAGE_NAME} and ${IMAGE_LINK_NAME}") ${IMAGE_NAME_SUFFIX} was included into ${IMAGE_NAME}. In this commit all other filesystems in image_types.bbclass were adapted. (From OE-Core rev: e3460853cdeae78762b31c6a846210f134bcd9ef) Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bmaptool: now part of Yocto ProjectTrevor Woerner2024-03-052-2/+2
| | | | | | | | | | | | | The bmaptool (previously: bmap-tools, bmap-tool, bmaptool) has been moved to be under the Yocto Project umbrella and is now hosted at: github.com/yoctoproject/bmaptool [RP: Added a couple of missing renames] (From OE-Core rev: 7a036b1a1ec7dcd27dbe18d4c2e703bd2a8af182) Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* goarch: disable dynamic linking globallyJose Quaresma2024-03-031-7/+7
| | | | | | | | | | | | | | | | | | | | With go-1.21 dynamic linking cause a runtime panic: | root@qemux86-64:~# go-helloworld | panic: runtime error: index out of range [0] with length 0 | | goroutine 1 [running]: | flag.init() | /usr/lib/go/src/flag/flag.go:1199 +0xf9 In my opinion, this would be a good trade-off so that we can update and leave the version 1.20 for the next LTS 5.0 since we are already quite behind on the version available upstream which already has the 1.22 available. (From OE-Core rev: 827c60b79e7fcafd14e68870f6b69dcc48ac9c39) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* u-boot: Move UBOOT_INITIAL_ENV back to u-boot.incFabio Estevam2024-03-031-4/+0
| | | | | | | | | | | | | | | | | 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: 0b0c4b37d318b86f100512476ffd861e0ce1f47e) Signed-off-by: Fabio Estevam <festevam@denx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* waf: Improve version parsing to avoid failing on warningsYoann Congal2024-03-011-2/+12
| | | | | | | | | | | | | | | | | | | | waf uses an inline tar file extracted by the tarfile module. The tarfile module may print a warning when used with default 'filter' argument[0]. When called to get the version, the first time after unpack, the output may look like: # output from lower modules (e.g: warnings from tarfile, ...) waf X.Y.Z ... This patch makes the version parsing more precise by looking at the first line matching "waf ". [0]: https://docs.python.org/3.12/library/tarfile.html#extraction-filters (From OE-Core rev: 643b799a0c11d82907dd82991c19b003fe20a8b0) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc-locale: fix ASCII compatible warning cause build failure.Xiangyu Chen2024-02-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | Some locales are not listed in glibc locales support list, but can be generated, here using ja_JP.SHIFT_JIS as an example. We can add following line into local.conf to enable and generate it: GLIBC_GENERATE_LOCALES += "en_GB.UTF-8 en_US.UTF-8 ja_JP.UTF-8 ja_JP.SHIFT_JIS" IMAGE_LINGUAS += "ja-jp en-us ja-jp.shift-jis" The localedef tool would report a warning and exit with 1, that cause build failure, error message as below: [warning] character map `SHIFT_JIS' is not ASCII compatible, locale not ISO C compliant [--no-warnings=ascii] So add a --no-warnings=ascii in libc-package.bbclass to fix build failure if someone needs those locale in yocto. (From OE-Core rev: 1048992c0d2a2bda3464185efdac5cc986a583d4) Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: create a list of failed test post actionsAlexis Lothoré2024-02-271-39/+2
| | | | | | | | | | | | | | | | | | | | | testimage is able to detect whenever a test run leads to some tests failing, and execute some actions in this case. The only action currently defined in such case is to retrieve artifacts from the target under test, as listed in TESTIMAGE_FAILED_QA_ARTIFACTS In order to be able to add multiple actions, define a central function to gather all "post actions" to run whenever a test has failed (run_failed_tests_post_actions). This function contains a table listing all functions to be called whenever a test fails. Any function in this table will be provided with bitbake internal data dictionary ("d") and the current runtime testing context ("tc"). Isolate all this feature in a dedicated postactions.py file inherited by testimage. This patch does not bring any functional change. (From OE-Core rev: c01aa8df0613a103859b4431d3cc5056b2fef1b8) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa: share get_json_result_dir helperAlexis Lothoré2024-02-271-9/+3
| | | | | | | | | | | | | Multiple places in oeqa need to get the log output path, and redefine a small helper to accomplish this Define this helper in lib/oeqa/utils/__init__.py and import it wherever needed to allow using it. (From OE-Core rev: 01b1a6a5a4e7cede4d23a981b5144ae9c8306274) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Set pkg-config variables for building modulesMunehisa Kamata2024-02-241-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: cd2072e5d953af981339427028e19083257e6a92) Signed-off-by: Munehisa Kamata <kamatam@amazon.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: allow imager-specific filename extensionsTrevor Woerner2024-02-241-1/+18
| | | | | | | | | | | | | | | | | | Currently there is only one defined imager as part of oe-core's wic implementation: 'direct'. However, having a highly plugin-based design, wic allows users to define their own imagers (and sources). Therefore don't hard-code the filename extension of the imager output to be 'direct' (i.e. the default imager). Allow the extension to follow the name of the imager being used. A user can specify a custom imager via the WIC_CREATE_EXTRA_ARGS variable. If the user does not specify an imager, then 'direct' is assumed. (From OE-Core rev: dc5a7c76761ed47e0456228956de900d806063bb) Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "meson: use absolute cross-compiler paths"Enguerrand de Ribaucourt2024-02-232-11/+2
| | | | | | | | | | | | | | | | | This reverts commit fc8e5d7c13f62e987b76971116cf290fd01a0c8f. We need to use the absolute path to the compiler so that the VSCode configuration generated by devtool ide-sdk could lint meson projects. A feature was just added to vscode-cpptools to support conveying the compilerPath in addition to the compile_commands.json. The next commits adds the necessary configuration. We can revert this one and keep the meson paths as they were. (From OE-Core rev: 9c2faa835bd7af3e6f6bd7cc08495bd4b3ca9d0b) Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemuboot: predictable network interface namesJoe Slater2024-02-211-1/+6
| | | | | | | | | | | | | Allow interface renaming if 'pni-names' is a distro feature. We do not add QB_NO_PNI to QB_CMDLINE_IP_SLIRP because renaming was never suppressed for slirp. (From OE-Core rev: d8d92ad46273a4e305f690f2820a475e4d7f6701) Signed-off-by: Joe Slater <joe.slater@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: log exception when failing to retrieve artifactsAlexis Lothoré2024-02-211-2/+2
| | | | | | | | | | | | | | | Despite managing to retrieve the failed ptests artifacts, testimage seems to dump some retrieval errors like the following one: WARNING: core-image-ptest-valgrind-1.0-r0 do_testimage: Can not retrieve /usr/lib/valgrind/ptest from test target Log the corresponding exception to help analyzing such issue (From OE-Core rev: 12873e5b1620414a76e4a0e87cc2c806a0513cfe) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* overlayfs: add missing vardepsChristoph Vogtländer2024-02-211-0/+1
| | | | | | | | | | | | | | | Fixes [YOCTO #15120] Consider OVERLAYFS_WRITABLE_PATHS as dependecy of do_create_overlayfs_units() in order to rebuild the recipe when changing the used mount point. Tested in a local recipe by changing the used mount point and verified that the recipe was re-build: passed (From OE-Core rev: 65423847ac843682d4670d41a94d509f18ce8735) Signed-off-by: Christoph Vogtländer <christoph.vogtlaender@loewensteinmedical.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson: use absolute cross-compiler pathsEnguerrand de Ribaucourt2024-02-202-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Among the files generated by meson is compile_commands.json. It is not used by bitbake during the build. However, if the devtool workspace is opened inside an IDE, that IDE can use compile_commands.json to configure linting and code completion. This is notably relied on by the new devtool ide-sdk command. The problem is that the IDE using compile_commands.json does not know the $PATH set-up by bitbake, so it won't find the compiler. This results in linting errors, like missing headers. We can fix this by expliciting the absolute compiler paths in meson.cross. The compile_commands.json specification expressly states: "All paths specified in the command or file fields must be either absolute or relative to this directory." Link: https://clang.llvm.org/docs/JSONCompilationDatabase.html An alternative way to implement this is to directly change CXX inside bitbake.conf to make all recipes use absolute compiler paths.Since this would affect all recipes, so I would like to have the maintainers' opinion on this. It could make sense to use absolute compiler paths for all toolchain binaries, we already do so for the sysroot TOOLCHAIN_OPTIONS. Discussions have been opened with meson/ninja maintainers to implement this at their level: - https://github.com/ninja-build/ninja/issues/2383 - https://github.com/mesonbuild/meson/issues/12834 These tools have even less information on the environment so it makes sense for Yocto to provide the absolute paths. (From OE-Core rev: b4e00248049c2627b05eafa9313a48cf253623fa) Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python_mesonpy.bbclass: move from meta-pythonTim Orling2024-02-201-0/+52
| | | | | | | | | | | | | | | Move the PEP-517 back-end bbclass from meta-python to support: [build-system] build-backend = "mesonpy" This is the declared backend in python3-numpy since: https://github.com/numpy/numpy/commit/942fb8caf33a65e449fbf198ecf1cd39be953248 (From OE-Core rev: f0d3478913b092a01eceafe0c20378cf9117f429) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python: Drop ${PYTHON_PN}Richard Purdie2024-02-203-9/+9
| | | | | | | | | | | python 2 is gone and we don't need the abstraction now, drop the remaining usage of this variable. The definition in python3-dir.bbclass is left for now for other layers. (From OE-Core rev: b566b1e32c7993d1ab7795562f648e52ce186a70) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* overlayfs-etc: add option to skip creation of mount dirsbaruch@tkos.co.il2024-02-191-1/+4
| | | | | | | | | | | | | The 'preinit' script can't create mount directories when rootfs is read-only. Add an option to skip this step. The user must make sure that all required directories are already in the rootfs directory layout. Cc: Vyacheslav Yurkov <uvv.mail@gmail.com> (From OE-Core rev: 3d433d8559467d255bd19af2d0999c65ea24a48d) Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson: set the sysroot in the cross filesRoss Burton2024-02-171-0/+1
| | | | | | | | | | | | | | When cross compiling we have a sysroot, so by telling Meson where it is explicitly it can do the right thing. Currently this means it just sets PKG_CONFIG_SYSROOT_DIR to the value that we already set it to, but in the future this can be used to stop Meson looking directly in /usr when it shouldn't. (From OE-Core rev: 62d4fd215a0886056d64e926f722cd07e9986118) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* waf.bbclass: Print waf output on unparsable versionYoann Congal2024-02-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On AB runs of reproducible-meta-oe/Repro meta-oe/meta-oe, "waf --version" does not seem to contain the version but an error message with "RuntimeWarning: <something>" [0]. Since the actual output is not saved anywhere, it is quite hard to debug. This patch detects the problematic case and send it to the log where it will be seen and fixed. As a side-effect, this error will now only be a warning. Here is a partial backtrace for this (full back trace visible in [0]): NOTE: recipe mpv-0.35.1-r0: task do_configure: Started ERROR: mpv-0.35.1-r0 do_configure: Error executing a python function in exec_func_python() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_func_python() autogenerated', lineno: 2, function: <module> *** 0002:waf_preconfigure(d) File: '$TOP/meta/classes-recipe/waf.bbclass', lineno: 58, function: waf_preconfigure 0056: result = subprocess.check_output([python, wafbin, '--version'], cwd=subsrcdir, stderr=subprocess.STDOUT) 0057: version = result.decode('utf-8').split()[1] *** 0058: if bb.utils.vercmp_string_op(version, "1.8.7", ">="): [...] File: '$TOP/bitbake/lib/bb/utils.py', lineno: 91, function: split_version *** 0091: e = int(s.split(":")[0]) Exception: ValueError: invalid literal for int() with base 10: 'RuntimeWarning' [0]: https://autobuilder.yoctoproject.org/typhoon/#/builders/155/builds/11/steps/32/logs/stdio line 31883 (From OE-Core rev: 4a82c7ca74075b4c22be94891eecc24238bd0e65) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson: remove TMPDIR workaroundRoss Burton2024-02-151-3/+0
| | | | | | | | | | | | | | | | We had to export TMPDIR because Meson was writing temporary files into /tmp and then trying to run them, but some systems had /tmp mounted noexec. This is now solved upstream as of meson commit 1e182b5 (which was part of Meson 0.52.0), and these temporary files are written to the build tree instead. (From OE-Core rev: 1809d20f92dc0e4eff19cf081ca78a9f30deb611) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands: remove make_zimage_symlink_relative()Enrico Jörns2024-02-141-6/+0
| | | | | | | | | | | This does not seem to have any purpose anymore since the pkg_postinst from kernel.bbclass always creates relative symlinks from zImage to zImage-${KERNEL_VERSION}. (From OE-Core rev: 24ce7e5445962b9b3143036ecb3d44945082ce44) Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-arch: Simplify strip supportRichard Purdie2024-02-131-3/+2
| | | | | | | | | | | | | I think these options to strip were added to mirror the other kernel commandline options. In the strip case, it breaks code such as runstrip() in package.py since only a single command with no options is supported. For that reason I find it unlikely anyone is using this. Drop the problematic variables. (From OE-Core rev: 0d1c5971cafc1b65c000a10f7620e6ba22b53c91) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd.bbclass: Check for existence of the symlink tooPavel Zhukov2024-02-101-1/+1
| | | | | | | | | | | | | | | | | | | If the packages' service file is a link to parameterized service file provided by different package [1] then link is dangling link at do_package stage and os.path.exists(path) returns False even if the link exists. Replace os.path.exists with lexists to fix this issue. [1] An example: Package A provides myservice@.service Package B depends and rdepends on A and provides: myservice@B.service -> myservice@.service (From OE-Core rev: e2b638dcd6b7c51f7ee2cd4bc051d6b12e642d6c) Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* u-boot-sign:uboot-config: support to verify signed FIT imageJamin Lin2024-02-082-0/+13
| | | | | | | | | | | | | It does not verify the signed FIT image of kernel and uboot. To catch the unexpected errors as far as possible at the build time, add uboot-fit-check-sign tool which is provided by u-boot to verify the signed FIT image. (From OE-Core rev: 17d3c8315e7a7adbe27183e11e1b6d588c1a1784) Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-sign: Fix to install nonexistent dtb fileJamin Lin2024-02-081-1/+3
| | | | | | | | | | Add to check dtb file exist, then install it. (From OE-Core rev: d2d818534d9334213730c169f8b235af8a794b33) Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-sign: set load address and entrypointJamin Lin2024-02-081-2/+5
| | | | | | | | | | | | | | | | | | | | | According to the design of uboot-sign.bbclass and kernel-fitimage.bbclass, both of them use an UBOOT_LOADADDRESS variable to set the load address of kernel and u-boot image and use an UBOOT_ENTRYPOINT variable to set the entry address of kernel and u-boot image. However, users may want to set the different load address of u-boot and kernel image. Therefore, adds UBOOT_FIT_UBOOT_LOADADDRESS and UBOOT_FIT_UBOOT_ENTRYPOINT variables to set the load address and entry point of u-boot image, respectively. The value of UBOOT_FIT_UBOOT_ENTRYPOINT is UBOOT_LOADADDRESS by default. The value of UBOOT_FIT_UBOOT_ENTRYPOINT is UBOOT_ENTRYPOINT by default. (From OE-Core rev: 2060691a56b45f746efdd04ccdae3fb74df60cb5) Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest.bbclass: Handle the case when Makefile does not exist in ↵Khem Raj2024-02-081-3/+3
| | | | | | | | | | | | | | | | do_install_ptest_base Some recipes e.g. expant generate ninja files and no Makefile may exist, therefore grep -q would fail on a non-existent file, we just need the return code to decide if intall-ptest target should be run or not. Fixes errors like | grep: Makefile: No such file or directory (From OE-Core rev: 01f3966d6bf2442a28b460b67bfc02241cd9ddc2) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: retrieve ptests directory when ptests failAlexis Lothoré2024-02-081-1/+4
| | | | | | | | | | | | | | | | TESTIMAGE_FAILED_QA_ARTIFACTS is set with a default, minimal list of files to retrieve whenever a runtime test fails. Add ptests directory to the list so we can get ptests artifacts (eg: logs) whenever a ptest fails. By appending the ptest directory with the multiconfig component in the path, only failing ptests will lead to corresponding ptest artifacts retrieval, instead of all ptests artifacts retrieval. While doing this addition, reinforce default value using "=" operator to make sure to get the default list in any case. (From OE-Core rev: 9357ab6c47f0a0a7000cb18358bc9775fd54e1f7) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: use --installAdrian Freihofer2024-02-021-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | Since version 3.15 CMake provides a command-line signature to install an already-generated project binary tree. This may be used after building a project to run installation without using the generated build system or the native build tool. This is a small improvement, for regular bitbake calls. CMake does not check the dependencies again which is expected to be faster. The main motivation for this change is using CMake from an SDK context. With this change it is possible to initiate the compile step from an IDE and later on initiating the install step via bitbake which runs the install step on pseudo. This is also what the meson.bbclass already does with the --no-rebuild option. (From OE-Core rev: 72388593d62d45d54790710b9665eb8f13897c8c) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native.bbclass: base_libdir unique from libdirWilliam Hauser2024-01-261-1/+1
| | | | | | | | | | | | Use STAGING_BASE_LIBDIR_NATIVE for the value of base_libdir instead of STAGING_LIBDIR_NATIVE. This will avoid conflicts between the two directories. (From OE-Core rev: 2d7e3d49378257bc02513275b988c8b194e9fd5a) Signed-off-by: William Hauser <william.hauser@meraki.net> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands.bbclass: ignore comment mismatch in systemd_user_checkChen Qi2024-01-261-2/+1
| | | | | | | | | | | | | | | | | | The check was forcing every field to be identical, this is too strict. For example, if the comment differs, there's really no impact. For example, root user's comment is 'root' in passwd, and it's 'Super User' in sysusers.d/basic.conf. Such difference is not worth a warning. In fact, previous codes use 'lower()' to avoid warning between 'nobody' and 'Nobody', and what's more, another patch puts its own basic.conf.in in systemd's SRC_URI, but it changes 'Super User' to 'root'. Such changes are all unnecessary. We should just ignore comment mismatch. (From OE-Core rev: 2a700c3102b2233e71a157f0f88ed88496fa9fbf) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake.bbclass: add Darwin supportEtienne Cordonnier2024-01-211-0/+2
| | | | | | | | | | | | This was initially added by https://git.yoctoproject.org/meta-darwin/commit/?id=97a84e083d0c2812e44231d48fb478e9a9cfac79 to the meta-darwin repository, however having it directly in openembedded-core will make the maintenance of meta-darwin easier. (From OE-Core rev: 8ded801178376a02125e653833d8ff062f80457f) Signed-off-by: Dominik Schnitzer <dominik@snap.com> Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python: update 3.11.5 -> 3.12.1Alexander Kanavin2024-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop distutils and smtpd modules from packaging, as both are gone in 3.12. Rebase: 0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch (drop setup.py chunk as the file is gone) Drop patches: 0001-Do-not-add-usr-lib-termcap-to-linker-flags-to-avoid-.patch (setup.py gone, lib/termcap not mentioned anywhere else) 0001-Don-t-search-system-for-headers-libraries.patch (setup.py gone, usr/lib64 not mentioned anywhere else) 0001-Makefile-do-not-compile-.pyc-in-parallel.patch (replaced with COMPILEALL_OPTS= in EXTRA_OEMAKE) 0001-setup.py-Do-not-detect-multiarch-paths-when-cross-co.patch (setup.py gone, add_multiarch_paths not mentioned anywhere else) 0017-setup.py-do-not-report-missing-dependencies-for-disa.patch (has been superseded by Setup.local tweak in do_configure:prepend) 12-distutils-prefix-is-inside-staging-area.patch (distutils has been removed upstream, so this old, unplesant hack can be finally dropped) avoid_warning_about_tkinter.patch (setup.py gone, tkinter detection logic performed in configure.ac) (From OE-Core rev: 716d82352545d3667a658b69d65d6127678dd150) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gobject-introspection-data.bbclass: move do_compile() tweak to g-i classAlexander Kanavin2024-01-192-5/+5
| | | | | | | | | | g-i-data class is strictly for setting GI_DATA_ENABLED. Any build tweaks should be in g-i class. (From OE-Core rev: 49988a49f7c9a19aa2a547d49369996e3e20d452) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/recipes: Switch to use inherit_deferRichard Purdie2024-01-188-10/+12
| | | | | | | | | | | | | | | | | Now that bitbake supports the use of inherit_defer, switch all conditional (variable based) inherits to use this instead. This leads to more a more deterministic user experience since there is no longer an immediate expansion and later changes to the variables in question (e.g. a bbappend) are accounted for. This patch tries to ensure the behaviour before/after remains as unchanged as it reasonably can, e.g. by always inherting populate_sdk_base. native and nativesdk continue to need to be inherited last, hence being used with inherit_defer in a handful of very specific cases. (From OE-Core rev: 451363438d38bd4552d5bcec4a92332f5819a5d4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands: Try and improve ordering constraintsRichard Purdie2024-01-181-9/+4
| | | | | | | | | | | | The current code is in race to see who can set things last. This isn't scalable or sustainable and problemtic in the face of inherit ordering changes. Move the ordering issue into the actual code execution, which isn't ideal but the best of several bad options and at least lets us drop the anonymous python. (From OE-Core rev: 0ffff2c1f80a9b79b133d787764bab164d9abd70) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs: Fix MULTILIB_RE_ALLOW to be inherit order independentRichard Purdie2024-01-182-2/+2
| | | | | | | | | | | | This variable is only used by the ipk backend with multilibs. In order to make it work correctly regardless of inherit order, change the string to be space delimeted, set using += and add in the regex '|' sperator at the end of processing. (From OE-Core rev: 72befdb12568fbc642022ef0a23b269c5b37a638) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* allarch: Fix allarch corner caseRichard Purdie2024-01-181-2/+2
| | | | | | | | | | | | | Most of the allarch code is conditional and only set if the recipe remains marked as allarch. The qemu wrapper handling is not handled in the same way however and is unconditional. Move the code to some slightly uglier inline python to allow it to be conditional and match the way the rest of the code works. (From OE-Core rev: dfd704f1741dccd9a85338c5d45dee4be079064d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* siteinfo.bbclass: add support for darwin19 and darwin21Etienne Cordonnier2024-01-151-0/+4
| | | | | | | | | | | | Ported from the meta-darwin layer which supports darwin19 (honister version) and darwin21 (kirkstone version). (From OE-Core rev: ec4de080691717bf56170f7e39d9fb5bb2d2b2d6) Signed-off-by: Dominik Schnitzer <dominik@snap.com> Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* xmlcatalog: limit to native recipes onlyRoss Burton2024-01-121-2/+6
| | | | | | | | | | | | | The sysroot postinst is explicitly native-only, so use more overrides to ensure that we don't try to run them outside of native recipes. Also add a comment so this doesn't get forgotten again, and link to the related bug. (From OE-Core rev: 38a5fc5dbb33fd3314f0a98c861a842342add064) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson: use pkg-config in the cross filesRoss Burton2024-01-121-2/+2
| | | | | | | | | | | | >From Meson 1.3.0, the "pkgconfig" entry is deprecated and "pkg-config" should be used instead[1]. [1] https://mesonbuild.com/Release-notes-for-1-3-0.html#machine-files-pkgconfig-field-deprecated-and-replaced-by-pkgconfig (From OE-Core rev: d64b307891422e290bbe821d4303b3af526bbe17) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gtk-doc: don't manually call gtkdocizeRoss Burton2024-01-121-10/+0
| | | | | | | | | | | | | | | | | | | The autoreconf call will now call gtkdocize if needed, so we don't need to run it manually here. This obsoletes GTKDOC_DOCDIR. If this is needed then the replacement is to ensure that the configure.ac has a call to GTK_DOC_CHECK which passes --docdir. For example, this is the change required for kmod: -GTK_DOC_CHECK([1.14],[--flavour no-tmpl-flat]) +GTK_DOC_CHECK([1.14],[--flavour no-tmpl-flat --docdir libkmod/docs]) (From OE-Core rev: 57b0201bfccb4552893d72dc4d76eaa855618563) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>