summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
AgeCommit message (Collapse)Author
31 hourscmake.bbclass: Add ${COREBASE}/scripts to CMAKE_FIND_ROOT_PATHDaniel Klauer
${COREBASE}/scripts contains a "git" wrapper disabling fakeroot/pseudo. This patch allows CMake to find ${COREBASE}/scripts/git instead of ${HOSTTOOLS_DIR}/git. This is needed for git invocations during do_install, since do_install is a fakeroot task, and otherwise all git commands fail with "fatal: detected dubious ownership in repository ...". I don't know how common it is for CMake projects to invoke git during the install phase intentionally. It's probably more common to do this during the configure phase. However, the install step may re-run the configure step, if some dependencies changed. In my case, this happened in incremental Yocto builds which reran do_install and repopulated parts of the recipe-sysroot during that, without first rerunning do_configure or do_compile. One of the dependencies changed (but only changing a file in some unrelated sub-package of it which was not even installed into the recipe-sysroot), causing the dependant's recipe-sysroot to be repopulated during do_install and thus causing the CMake project to be reconfigured during do_install. Signed-off-by: Daniel Klauer <daniel.klauer@gin.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 dayskernel.bbclass: check, if directory exists before removing empty module ↵Heiko
directory If the kernel folder does not exist, find will result in an error. This can occur if the kernel has no modules but, for example, custom modules are created. Add check before deleting. Signed-off-by: Heiko Thole <heiko.thole@entwicklung.eq-3.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 daysrust-target-config: fix feature for vfpv4f16Willy Tu
Based on [1] which fixed the target for vfpv3d16. Adding the support for vfpv4d16 with the same set of changes. Tested with running tokio which hit coredump before the change. It worked fine after this change. [1] https://lists.openembedded.org/g/openembedded-core/message/185702 Signed-off-by: Willy Tu <wltu@google.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 daysrootfs-postcommands.bbclass: Only set DROPBEAR_RSAKEY_DIR onceMichael Glembotzki
If DROPBEAR_RSAKEY_DIR has already been set before, e.g. by overwriting the file dropbear.default, the line will still be appended a second time. DROPBEAR_RSAKEY_DIR="/path/to/dropbear" DROPBEAR_EXTRA_ARGS="-B" DROPBEAR_RSAKEY_DIR=/var/lib/dropbear Signed-off-by: Michael Glembotzki <Michael.Glembotzki@iris-sensing.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 daysRevert "goarch: disable dynamic linking globally"Jose Quaresma
This reverts commit 827c60b79e7fcafd14e68870f6b69dcc48ac9c39. Fixed with the drop of the linkmode Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 daysgo: Drop the linkmode completelyJose Quaresma
This will make possible to restore the default dynamic linking globally which is what we had before the 1.20.X release. Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-16classes/pypi: don't expose PYPI_ARCHIVE_NAMERoss Burton
This variable is only used when constructing a SRC_URI and some recipes think that it's the correct value to assign if the PyPi package name isn't the same as the recipe name, when PYPI_PACKAGE is actually all that needs to be set. Also document the variables we expect the recipe to assign if needed, and where the PyPi URL structure is documented. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-04autotools: update link in comment for cross compilingJörg Sommer
Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2024-04-04image-live.bbclass: Adjust the default value for INITRD_LIVEKevin Hao
The ${INITRAMFS_FSTYPES} may contains multi filesystem types, such as "cpio.gz cpio.xz". So it can't be used directly in setting of the default INITRD_LIVE. We choose the first filesystem type in ${INITRAMFS_FSTYPES} for the default INITRD_LIVE. Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2024-03-30populate_sdk_ext.bbclass: only overwirte lsb string if uninative is usedTimon Bergelt
Overwriting the lsb string without inheriting from uninative causes shared state cache entries to end up in the wrong path where they are not beeing picked up by the extensible SDK environment. Signed-off-by: Timon Bergelt <timon.bergelt@pm.me> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-30cml1: prompt location of updated .config after do_menuconfig()Enrico Jörns
When modifying the kernel config by invoking '-c menuconfig' manually, a sensible next step is to persist this changed configuration somewhere. A way to do this is to copy the generated .config back to the original config location. For this purpose, emit a copy+pasteable printout of the saved .config path similar to what we have for the fragment location in the 'diffconfig' task already. Example output: | Changed configuration saved at: | /path/to/bsp/build/tmp/work/my-machine-oe-linux/linux-custom/6.6.4/build/.config | Recompile will be forced Signed-off-by: Enrico Jörns <ejo@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-30cml1: remove needless check for write_taint attributeEnrico Jörns
The 'FIXME' comment itself says to remove this once the minimum bitbake version has been bumped. This was in 2012. The function was introduced in bitbake commit f7b55a94 ("bitbake: bitbake: ensure -f causes dependent tasks to be re-run") and is already part of bitbake 1.15.3 which is the minimum bitbake version since 'danny'. Remove the check. Signed-off-by: Enrico Jörns <ejo@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-26kernel-module-split.bbclass: enhance objcopy command call for kernel ↵lixiaoyong
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. Signed-off-by: lixiaoyong <lxy204899@163.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-25classes/qemuboot: add depends on qemu-system-native and qemu-helper-nativeRoss Burton
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. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-22python3_pip517: just count wheels in the directory, not subdirectoriesRoss Burton
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. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-18kernel: Fix check_oldest_kernelPaul Barker
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. Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-08kernel-fitImage: only include valid compatible lineChristian Taedcke
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"). Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-08go.bbclass: set GOPROXYJose Quaresma
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. Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-07oeqa/runtime/login: Various code improvements and fixesRichard Purdie
* 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 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-06image_types.bbclass: fix vfat image namesChristian Taedcke
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. Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-05bmaptool: now part of Yocto ProjectTrevor Woerner
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] Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-03goarch: disable dynamic linking globallyJose Quaresma
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. Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-03u-boot: Move UBOOT_INITIAL_ENV back to u-boot.incFabio Estevam
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") Signed-off-by: Fabio Estevam <festevam@denx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-01waf: Improve version parsing to avoid failing on warningsYoann Congal
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 Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-28libc-locale: fix ASCII compatible warning cause build failure.Xiangyu Chen
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. Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-27testimage: create a list of failed test post actionsAlexis Lothoré
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. Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-27lib/oeqa: share get_json_result_dir helperAlexis Lothoré
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. Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-24kernel.bbclass: Set pkg-config variables for building modulesMunehisa Kamata
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. Signed-off-by: Munehisa Kamata <kamatam@amazon.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-24wic: allow imager-specific filename extensionsTrevor Woerner
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. Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-23Revert "meson: use absolute cross-compiler paths"Enguerrand de Ribaucourt
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. Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-21qemuboot: predictable network interface namesJoe Slater
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. Signed-off-by: Joe Slater <joe.slater@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-21testimage: log exception when failing to retrieve artifactsAlexis Lothoré
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 Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-21overlayfs: add missing vardepsChristoph Vogtländer
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 Signed-off-by: Christoph Vogtländer <christoph.vogtlaender@loewensteinmedical.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-20meson: use absolute cross-compiler pathsEnguerrand de Ribaucourt
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. Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-20python_mesonpy.bbclass: move from meta-pythonTim Orling
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 Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-20python: Drop ${PYTHON_PN}Richard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-19overlayfs-etc: add option to skip creation of mount dirsbaruch@tkos.co.il
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> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2024-02-17meson: set the sysroot in the cross filesRoss Burton
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. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-16waf.bbclass: Print waf output on unparsable versionYoann Congal
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 Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-15meson: remove TMPDIR workaroundRoss Burton
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. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2024-02-14rootfs-postcommands: remove make_zimage_symlink_relative()Enrico Jörns
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}. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-13kernel-arch: Simplify strip supportRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-10systemd.bbclass: Check for existence of the symlink tooPavel Zhukov
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 Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-08u-boot-sign:uboot-config: support to verify signed FIT imageJamin Lin
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. 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>
2024-02-08uboot-sign: Fix to install nonexistent dtb fileJamin Lin
Add to check dtb file exist, then install it. 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>
2024-02-08uboot-sign: set load address and entrypointJamin Lin
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. 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>
2024-02-08ptest.bbclass: Handle the case when Makefile does not exist in ↵Khem Raj
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 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-08testimage: retrieve ptests directory when ptests failAlexis Lothoré
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. Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-02cmake.bbclass: use --installAdrian Freihofer
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. 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>
2024-01-26native.bbclass: base_libdir unique from libdirWilliam Hauser
Use STAGING_BASE_LIBDIR_NATIVE for the value of base_libdir instead of STAGING_LIBDIR_NATIVE. This will avoid conflicts between the two directories. 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>