summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
Commit message (Collapse)AuthorAgeFilesLines
* linuxloader/initramfs: Add support for loongarch64Jialing Zhang2023-05-311-0/+2
| | | | | | | | | | | | | | | Add support for loongarch64 to: linuxloader core-image-minimal-initramfs initramfs-module-install (From OE-Core rev: bed5e0fc0ff1795e80277d306bbdade0915983b6) Signed-off-by: Jialing Zhang <zhangjialing@loongson.cn> Signed-off-by: Qizheng Zhu <zhuqizheng@loongson.cn> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devicetree: recursively search for dtbsRandolph Sapp2023-05-251-4/+4
| | | | | | | | | | | | | | | Upstream's dtb directory structure has no real standard. They just tend to idle around the 2/3 directory depth. Recursively search for the dtb/dtbo files instead of assuming anything. Fixes: 04ab57d200 (kernel-devicetree: allow specification of dtb directory, 2023-05-02) (From OE-Core rev: 81570ba93eb282fd4566077d3b7b9ddf8c303002) Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gi-docgen.bbclass: depends on gobject-introspection-data being enabledRoss Burton2023-05-221-1/+2
| | | | | | | | | | | The gi-docgen tool depends, as it's name suggests, on gobject-introspection being available. (From OE-Core rev: 874dc89182835ff01d881b998c707c1a9f1ccb08) 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>
* gobject-introspection: always DEPEND on gobject-introspection-nativeRoss Burton2023-05-221-11/+7
| | | | | | | | | | | | | | | | | | | If a recipe inherits gobject-introspection then there's a good chance that it needs the gobject-introspection-native recipe for the m4 macros in introspection.m4, because we always autoreconf so we always need the macros to be present. Change the dependencies so that inheriting g-i always adds a dependency on gobject-introspection-native, and a dependency on qemu-native and target gobject-introspection if G-I is enabled. Partially reverts 4e51c18. (From OE-Core rev: 2763bc8c3a8d789ddc8e22e6df69400dcba6d6f3) 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>
* image-live.bbclass: respect IMAGE_MACHINE_SUFFIXMartin Jansa2023-05-221-1/+1
| | | | | | | | | | | | | * fixes: ERROR: core-image-minimal-1.0-r0 do_bootimg: /OE/build/poky/build/tmp/deploy/images/qemux86-64/core-image-minimal-initramfs-qemux86-64.cpio.gz is invalid. initrd image creation failed. ERROR: core-image-minimal-1.0-r0 do_bootimg: ExecutionError('/OE/build/poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/run.build_hddimg.2001892', 1, None, None) when IMAGE_MACHINE_SUFFIX is set to empty in local.conf (From OE-Core rev: ed072d2a0abe5a22330160f67ee5e83c2eae1dac) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* go.bbclass: don't use test to check output from lsMartin Jansa2023-05-221-1/+1
| | | | | | | | | | | * avoids possibly confusing error message in log.do_install like: ls: cannot access 'etcd/3.5.7-r0/build/bin/linux_arm64/': No such file or directory (From OE-Core rev: 2f1777e6ac5269a71203b6a2c562a43503be95ae) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devicetree: make shell scripts posix compliantMartin Jansa2023-05-222-3/+3
| | | | | | | | | | | | | | | | Use the notation suggested by Martin Jansa to avoid a bashism. Also switch KERNEL_DTBVENDORED to the more common 0/1 notation instead of true/false. Fixes: 04ab57d200 (kernel-devicetree: allow specification of dtb directory, 2023-05-02) (From OE-Core rev: dd5a5abc9d88c3bc8ff2c52b042600f00f054015) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base.bbclass: respect MLPREFIX for ptest-pkgs's ptest-runnerMartin Jansa2023-05-111-1/+1
| | | | | | | | | | | | | | | | | * since "populate_sdk_base: ensure ptest-pkgs pulls in ptest-runner" change: https://git.openembedded.org/openembedded-core/commit/?id=ecff0642be5781f7f6cca617158b04ac9a0e85f0 in multilib build when building lib32-foo-image it can pick wrong ptest-runner package if it was built in the same TMPDIR before the image, do_rootfs then fails to find it, if the package manager config doesn't have 64-bit feed enabled: opkg_prepare_url_for_install: Couldn't find anything to satisfy 'ptest-runner' (From OE-Core rev: 4d24749e7e94881bb952f5c927f0012eb70d4390) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest-cargo.bbclass: add the possibility to define test argumentsFrederic Martinsons2023-05-101-2/+6
| | | | | | | | | | | | | | | | It can be useful for user of this class for giving common rust test arguments (like --shuffle, --format or --test-threads) To add arguments to test binary , simply define RUST_TEST_ARGS in your recipe that inherit ptest-cargo, for example: RUST_TEST_ARGS = "--shuffle" (From OE-Core rev: ea1feece62b0347aa2ebf02509ff2da151d96b61) Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types_wic: Remove incorrect MLPREFIX to already prefixed virtual/Martin Jansa2023-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | Avoid dependency on unavailable virtual/lib32-arm-distromllib32-linux-gnueabi-binutils MLPREFIX was dropped from other cases in: https://git.openembedded.org/openembedded-core/commit/?id=6856fc5c848cc2564bebe03a007ef109f46d0adb This was causing: ERROR: Nothing PROVIDES 'virtual/lib32-arm-distromllib32-linux-gnueabi-binutils' (but virtual:multilib:lib32:oe-core/meta/recipes-core/images/core-image-minimal.bb DEPENDS on or otherwise requires it). Close matches: virtual/arm-distromllib32-linux-gnueabi-binutils virtual/lib32-arm-distromllib32-linux-gnueabi-compilerlibs virtual/lib32-arm-distromllib32-linux-gnueabi-go-runtime ERROR: Required build target 'lib32-core-image-minimal' has no buildable providers. Missing or unbuildable dependency chain was: ['lib32-core-image-minimal', 'virtual/lib32-arm-distromllib32-linux-gnueabi-binutils'] in cases where multilib and WIC were enabled at the same time (From OE-Core rev: d7644212a17537e9966218fbb99f21a64569f322) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devicetree: allow specification of dtb directoryRandolph Sapp2023-05-052-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | Fedora/Redhat and Arch are somewhat standardized on their dtb directory structure. Let's add some flags to configure yocto to mimic that behavior. Add the following variables to the kernel class: - KERNEL_DTBDEST (controls the destination directory for dtbs) - KERNEL_DTBVENDORED (controls if vendor subdirectories are to be respected) Currently KERNEL_DTBDEST is expected to be a subdir of KERNEL_IMAGEDEST and KERNEL_DTBVENDORED is expected to be "true"/"false". This only applies to the package directory structure. The deploydir structure is purposely left untouched for compatibility with existing recipes. By default this is configured to behave the same as the current recipe and produce a flat dtb directory at KERNEL_IMAGEDEST. (From OE-Core rev: 04ab57d20009d85eb566e83ae6fe1dcea4db7300) Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest-cargo.bbclass: create classFrederic Martinsons2023-05-051-0/+130
| | | | | | | | | | | | | | | | | | This new class offers the possibility to build rust unit tests (and integration tests) and find them correctly. Due to non deterministic names of generated binaries, a custom parsing of build result must be performed. See https://github.com/rust-lang/cargo/issues/1924 All rust projects will generate a test binary with "cargo build --tests" command, even if there are no test defined in source code. The binary will just output that it ran 0 tests. (From OE-Core rev: dad9bad239d757ae0b159fe5f1276b6856547b4c) Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python3targetconfig.bbclass: Extend PYTHONPATH instead of overwritingJohannes Schrimpf2023-05-051-1/+1
| | | | | | | | | | | | | | | | [YOCTO #15108] -- https://bugzilla.yoctoproject.org/show_bug.cgi?id=15108 Since the latest change, the PYTHONPATH is overwritten instead of extended. This leads to changed behavior and build errors of recipes where the PYTHONPATH is set before setup_target_config is run. Fixes: c9617c03bcee ("python3targetconfig.bbclass: use PYTHONPATH to point to the target config") (From OE-Core rev: 2442ab92f8610784d28d8d83056b643bd95b0b4e) Signed-off-by: Johannes Schrimpf <dev@loewen-email.de> [Luca: add Fixes: tag] Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-sign: support 64bits addressJamin Lin2023-05-041-1/+5
| | | | | | | | | | | | | | | | | | | | The default value of address-cells is "1", so the generated "its" file only support 32bits address for uboot FIT image. However, some platforms may want to support 64bits address of UBOOT_LOADADDRESS and UBOOT_ENTRYPOINT. Therefore, add variables to support both 64bits and 32bits address. By default, the address-cell is 1 which is used for 32bits load address. If users would like to use 64bits load address, users are able to set as following for "0x400000000" 64bits load address. 1. FIT_ADDRESS_CELLS = "2" 2. UBOOT_LOADADDRESS= "0x04 0x00000000" (From OE-Core rev: b4e46cdbd0727d97d13c2b8e9e4ce19c5c693f51) Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: support 64 bits addressJamin Lin2023-05-041-1/+5
| | | | | | | | | | | | | | | | | | | | The default value of address-cells is "1", so the generated "its" file only supports 32bits address for kernel FIT image. However, some platforms may want to support 64bits address of UBOOT_LOADADDRESS and UBOOT_ENTRYPOINT. Therefore, adds a variable to support both 64bits and 32bits address cells. By default, the address-cell is "1" which is used for 32bits load address. If users would like to use 64bits load address, users are able to set as following for "0x400000000" 64bits load address. 1. FIT_ADDRESS_CELLS = "2" 2. UBOOT_LOADADDRESS= "0x04 0x00000000" (From OE-Core rev: 8ce15c76c50d5d61524fea585d19989baefb5df2) Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext.bbclass: redirect stderr to stdout so that both end in LOGFILEMartin Jansa2023-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * this in the end doesn't help much, I was debugging warning (about base-files.do_install signature being different than expected) from: python3 $target_sdk_dir/ext-sdk-prepare.py $LOGFILE '${SDK_INSTALL_TARGETS}' this shows the warning on console, but it doesn't end in $LOGFILE, because it writes only contents of cooker log into the $LOGFILE with: with open(logfile, 'a') as logf: logf.write('Preparing SDK for %s...\n' % ', '.join(sdk_targets)) ret = run_command_interruptible('BB_SETSCENE_ENFORCE=1 bitbake --quiet %s' % ' '.join(sdk_targets)) if not ret: ret = run_command_interruptible('bitbake --quiet build-sysroots') lastlog = get_last_consolelog() if lastlog: with open(lastlog, 'r') as f: for line in f: logf.write(line) if ret: print('ERROR: SDK preparation failed: error log written to %s' % logfile) return ret maybe we could remove whole support for $LOGFILE parameter and just redirect the output like other commands on this line (From OE-Core rev: 719f22df160ebde303274ccfc04049cffdb51577) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devicetree.bbclass: Allow selection of dts files to buildPetr Kubizňák2023-05-041-2/+7
| | | | | | | | | | | | | | Add DT_FILES variable to allow the user of the class to select specific dts files to build. This is useful for packages featuring dts files for multiple machines. Since many machine configs contain a list of dtb files (e.g. KERNEL_DEVICETREE), DT_FILES works with both dts and dtb files. (From OE-Core rev: a6164c384a5bf3980a7a6c7f23927af9aca93b85) Signed-off-by: Petr Kubizňák <kubiznak@2n.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* perl-version: remove PERL* assignmentsPatrick Williams2023-05-041-6/+0
| | | | | | | | | | | | | | | | | | | | The perl-version.bbclass executes functions which can depend on variables potentially populated by native, such as `libdir`. The sanity `native-last` suggests that recipes should `inherit native` last, but when that is done the variables like PERLVERSION end up as `None`, since `${STAGING_LIBDIR}` needs `${libdir}` which is not yet populated (by native). All recipes in poky and widely used meta-layers have already been updated to use the functions directly instead of relying on these problematic variables. Delete the variables so that future recipes do not make the mistake of using them. Related: openbmc/openbmc#3770 (From OE-Core rev: 9351b6e7fab5669340bb062b9c84fb4faa3dce0b) Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update-alternatives.bbclass: fix old override syntaxPeter Bergin2023-05-031-2/+2
| | | | | | | | | | | | | | Function 'gen_updatealternativesvardeps' still used old override syntax when fetching variable flags. Update to use ':' instead to match recipe meta data. This was found by review and no real issue encountered but it is a bug that affects variable dependencies and can affect rebuilds as task hashes might not be accurate. (From OE-Core rev: 5691f554b2cd50f256a8cbb1d96781e9eb6b930e) Signed-off-by: Peter Bergin <peter.bergin@windriver.com> Signed-off-by: Peter Bergin <peter@berginkonsult.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* glide: remove as 'go mod' has become standardOtavio Salvador2023-05-031-15/+0
| | | | | | | (From OE-Core rev: 7870364e482bfae35fb647977c8e03bf3ef1e2a9) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc/go: Drop crosssdk suffix from virtual provides to improve dependency ↵Richard Purdie2023-05-021-1/+1
| | | | | | | | | | | | | | | handling There is little point in having "crosssdk" suffex added to the virtual provider within gcc/go since the TARGET_PREFIX or SDK_PREFIX already encapsulates this. Remove it allowing some of the special case overriding to be removed. This also allows removal of some of the MLPREFIX usage since again, the triplet also covers this. (From OE-Core rev: fe0206ba482d209b24e636d578aa68ba5e67ba1b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cmake: add CMAKE_SYSROOT to generated toolchain filePascal Bach2023-04-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This already got fixed in the toolchain file that is used during development in https://github.com/openembedded/openembedded-core/commit/cb42802f2fe1760f894a435b07286bca3a220364 The toolchain file generated by the cmake.bbclass however does not set CMAKE_SYSROOT. Under certain circumstances this also leads to the error: `"stdlib.h: No such file or directory #include_next <stdlib.h>"` during the build of a recipe. An example where this accured was during the upgrade of the Apache Thrift recipe in meta-openembedded to 0.11.0. With this change the build works out of the box. CMAKE_SYSROOT must only be set when crosscompiling, otherwise it will interfere with the native compiler headers. (From OE-Core rev: eb51e30e17c0c98441583854e8f8632e4fb5d11c) Signed-off-by: Pascal Bach <pascal.bach@siemens.com> (from http://lists.openembedded.org/pipermail/openembedded-core/2018-August/154791.html ) Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Poonam Jadhav <poonam.jadhav@kpit.com> Signed-off-by: Poonam Jadhav <ppjadhav456@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: improve initramfs bundle processing timeBruce Ashfield2023-04-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a partial fix for bugzilla 15059 [https://bugzilla.yoctoproject.org/show_bug.cgi?id=15059] It has been noted by several people that when an initramfs is bundled: - a lot of the kernel is rebuilt - it takes a really long time When looking at the logs, the second kernel compilation (that performs the bundle) is not using the parallel make settings, and builds with -j1. We are already explicitly passing PARALLEL_MAKE when building kernel modules, and by extending that explicit use to the main kernel compilation, we ensure that we always get a parallel build. Build times chnaged from more than 30 minutes for the bundle, to 3 minutes in local testing. The question of whether or not too much is rebuilding during the bundle step is still an open question, but with this tweak, at least the build time is back in the realm of acceptable. (From OE-Core rev: 88fd394ecf0f2174b792075d409d87046896426b) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext.bbclass: set METADATA_REVISION with an DISTRO overrideMartin Jansa2023-04-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * otherwise it ends '<unknown>' inside esdk, because of parsing order: # $METADATA_REVISION [3 operations] # set /OE/build/test-D/conf/local.conf:43 # "f2da54ef432eac89b0f18eaad68e602b6990b5de" # immediate /OE/build/test-D/layers/poky/meta/classes/metadata_scm.bbclass:9 # "${@oe.buildcfg.detect_revision(d)}" # set /OE/build/test-D/layers/poky/meta/classes/metadata_scm.bbclass:10 # [vardepvalue] "${METADATA_REVISION}" # pre-expansion value: # "<unknown>" METADATA_REVISION="<unknown>" * This causes base-files.do_install and following tasks to have different signatures between esdk and the build directory where this esdk was created: bitbake-diffsigs {test-D,poky/build-uninative-disabled}/tmp/stamps/qemux86_64-poky-linux/base-files/*do_install*sigdata* NOTE: Starting bitbake server... basehash changed from 5b6981cf58bfd57d416b0e31611b73a26baae635dd1ac31c08d46f95064c3ffc to dbdce042da4d7813d632b6d1cc87a16f728ad20e55fecbc392830e6acf72babd Variable METADATA_REVISION value changed from '<unknown>' to 'f2da54ef432eac89b0f18eaad68e602b6990b5de' and an warning from "python3 /OE/build/test-D/ext-sdk-prepare.py" when eSDK is being prepared for use: WARNING: The base-files:do_install sig is computed to be 83b9c9a6ef1145baac5a1e0d08814b9156af239c58fc42df95c25a9cd8a7f201, but the sig is locked to 3dc22233059075978e5503691e98e79e7cc60db94259dfcd886bca2291c0add7 in SIGGEN_LOCKEDSIGS_t-qemux86-64 [RP: Add commit about why we need the override for future reference] (From OE-Core rev: 675ea7281c17f77bf5dea17cfd4d9da0928382a0) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage: Fix the default dtb config checkArslan Ahmad2023-04-131-10/+26
| | | | | | | | | | | | | | | The current check for default dtb image checks if the file exists and is not empty but appends a slash to the path due to which the file is never found. It also doesn't replace slash in filename with _ as done when populating the DTB variable. A better way to check the existence of the device tree would be from the list of DTBs since this is used during compilation. (From OE-Core rev: e8e31e11b158837804d029e85f5f8ed3c219a4ea) Signed-off-by: Arslan Ahmad <arslan_ahmad@mentor.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gobject-introspection: reduce dependenciesPetr Kubizňák2023-04-131-5/+7
| | | | | | | | | | | | | | When GI_DATA_ENABLED is 'False' (e.g. because 'gobject-introspection-data' is not in DISTRO_FEATURES), gobject-introspection, gobject-introspection-native and qemu-native should not be added to DEPENDS. This is to reduce dependency chain when g-i is disabled. (From OE-Core rev: 4e51c1815c92bb15977a3bdb14171d770da44004) Signed-off-by: Petr Kubizňák <kubiznak@2n.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devicetree.bbclass: fix typoLuca Ceresoli2023-04-061-1/+1
| | | | | | | (From OE-Core rev: d523079bbea54f791039bf40db3bbc5c5e857ca3) Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo-update-recipe-crates.bbclass: Do not add name= to crate:// URIsPeter Kjellerstedt2023-04-061-1/+1
| | | | | | | | | | | | | With the recent change to the crate fetcher, which automatically sets the name to for each crate to be versioned, there is no longer a need to explicitly set the name= parameter for each URI. This also results in generated files that are compatible with the crate fetcher in Kirkstone and Langdale. (From OE-Core rev: eb272afcd9a12ce2b2f43436b3f84f52cb6cdfb7) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes-recipe/setuptools3-base: clean up FILES assignmentsRoss Burton2023-04-041-10/+3
| | | | | | | | | | | Simply inheriting setuptools3-base should put everything in $libdir in PN, and there's no need to replicate the pkgconfig packaging rules as those are the defaults. (From OE-Core rev: 56a32e31d4fdfb908f0edf513d21bc0f2b8c721e) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: respect IMAGE_LINK_NAMEMartin Jansa2023-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * when searching for qemuboot.conf * don't assume that IMAGE_LINK_NAME is always <rootfs>-<machine> (with <rootfs>-<machine>.qemuboot.conf) * runqemu: use IMAGE_LINK_NAME set by testimage.bbclass or query with bitbake -e * testimage.bbclass was setting DEPLOY_DIR which I don't see used anywhere else, so I assume it was supposed to be DEPLOY_DIR_IMAGE as mentioned in corresponding runqemu code, do the same with IMAGE_LINK_NAME variable * add virtual/kernel as bitbake -e target in run_bitbake_env to make sure IMAGE_LINK_NAME is defined (kernel-artifact-names.bbclass inherits image-artifact-names.bbclass as well) * improve .qemuboot.conf search 1st search for file matching the rootfs and only when not found try again with .rootfs suffix removed [YOCTO #12937] (From OE-Core rev: 716eb55bb963db7b02d985849cb025898aabc855) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo-update-recipe-crates: force name overridesFrederic Martinsons2023-04-011-19/+16
| | | | | | | | | | | | | | | | | | | | A project can have multiple Cargo.lock (provides multiple binaries for example) and each one can depends on differenct version of the same crates. Even within the same Cargo.lock file, it is possible to have different version of same crates. To avoid conflicts, override the name with the version for all crates checksum Moreover, when searching for Cargo.lock, we should ignore specific dir like .git (no use to walk down there) and .pc (because it can have a Cargo.lock if this file was patched) (From OE-Core rev: 1795e98a04ad09b011afcc7cc3bf6dc49475b19a) Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo_common.bbclass: add support of user in url for patchFrederic Martinsons2023-04-011-1/+4
| | | | | | | | | To handle url like git://git@repo/project (From OE-Core rev: ad99ede096aff03c974b8725d90d3c9d1056bae0) Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo_common.bbclass: Support local github reposAlex Kiernan2023-04-011-0/+30
| | | | | | | | | | | | | | | | | | | | | | Since disable network was added cargo configurations which reference git repos fail as they attempt to fetch across the network as part of do_compile, even if EXTRA_OECARGO_PATHS to add them as part of `paths` is used, as this is documented as only working for packages which exist in crates.io. Add parsing of the SRC_URIs for git repos and include `[patch]` sections to redirect to the checked out source repos which the bitbake fetcher has already populated. There are still cases which don't work - if you have multiple copies of the same repo with different revisions, there's currently no way to represent that and anything using a repo which has a virtual manifest will fail to build (see https://github.com/rust-lang/cargo/issues/4934). (From OE-Core rev: 684a8af41c5bb70db68e75f72bdc4c9b09630810) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo-update-recipe-crates: generate checksum for each cratesFrederic Martinsons2023-03-301-4/+40
| | | | | | | | | | | | | | | | | This is related to checksum verification introduction from https://patchwork.yoctoproject.org/project/bitbake/patch/20230315131513.50635-1-frederic.martinsons@gmail.com/ I also choose to raise an exception if: - no crates can be found - no Cargo.lock file exist Otherwise the generated inc file will silently be emptied. (From OE-Core rev: c75b924a3de02625aa90ad4db4403f00d1ffeba2) Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* class-recipe: add support for loongarch64Jialing Zhang2023-03-233-1/+15
| | | | | | | | | (From OE-Core rev: ec88f703f753efcbad5c077d866a5dc44ad54db0) Signed-off-by: Jialing Zhang <zhangjialing@loongson.cn> Signed-off-by: Qizheng Zhu <zhuqizheng@loongson.cn> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-artifact-names: add IMAGE_MACHINE_SUFFIX variableMartin Jansa2023-03-222-4/+13
| | | | | | | | | | | | | | | | | | | | | * to make it easier for projects to avoid default -${MACHINE} suffix if the ${MACHINE} named DEPLOY_DIR_IMAGE works better for them * also use IMAGE_LINK_NAME in IMAGE_NAME to make it more clear that IMAGE_NAME is the same as IMAGE_LINK_NAME but with version suffix * adding it as separate variable helps us to catch the cases where we didn't respect ${IMAGE_LINK_NAME} variable and just used the common default ${IMAGE_BASENAME}-${MACHINE}. [YOCTO #12937] (From OE-Core rev: 6e82c394e98d57a2fe73e547922477cd6b0620f9) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-artifact-names.bbclass: add INITRAMFS_IMAGE_NAME from kernel.bbclassMartin Jansa2023-03-222-1/+3
| | | | | | | | | | | | | | | | | | * move it from kernel.bbclass, because it needs to stay in sync with IMAGE_LINK_NAME structure * image-artifact-names.bbclass is also inheritted from kernel-artifact-names.bbclass so every recipe which needs this variable probably already inherits one of these * fixes kernel-fitimage.bbclass with modified IMAGE_LINK_NAME [YOCTO #12937] (From OE-Core rev: 432d0df0d771c8f0bef1e855ac6b0011b2c3cad2) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo.bbclass: use offline mode for buildingFrederic Martinsons2023-03-161-1/+1
| | | | | | | | | | | | | | | | | | | There should not be any network access during the build step so specify this explicitely to cargo. This will allow better error message, e.g: | Caused by: | can't checkout from 'ssh://git@.../fmartinsons/zbus-git-dep-test.git': you are in the offline mode (--offline) Instead of | Updating git repository `ssh://git@.../fmartinsons/zbus-git-dep-test.git` | warning: spurious network error (2 tries remaining): failed to resolve address for gitlab.com: Temporary failure in name resolution;class=Net (12) (From OE-Core rev: 8e9ec03c73e8c09e223d6f6cce297df363991350) Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* npm.bbclass: avoid DeprecationWarning with new pythonMartin Jansa2023-03-141-1/+1
| | | | | | | | | | meta/classes-recipe/npm.bbclass:85: DeprecationWarning: invalid escape sequence '\.' '--transform', 's,^\./,package/,', (From OE-Core rev: 47f102cfbbaa83d17999747233a81f1b570f448e) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: fix multiubi var initRomuald Jeanne2023-03-141-0/+3
| | | | | | | | | | | | | | Make sure to expand all MKUBIFS_ARGS_<label> and UBINIZE_ARGS_<label> vars in 'do_image_multiubi' task to use them to init the local 'mkubifs_args' and 'ubinize_args' vars. See [YOCTO #15065] (From OE-Core rev: 09d05215cf61981c7bc828cc0ff64c2fd5edc43c) Signed-off-by: Romuald JEANNE <romuald.jeanne@st.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd.bbclass: Add /usr/lib/systemd to searchpaths as wellKhem Raj2023-03-141-0/+1
| | | | | | | | | | | | | | | | Some packages like lirc places its unit files into $systemd_user_unitdir and also uses them in SYSTEMD_SERVICE list in recipe. This fails in do_package ERROR: Didn't find service unit 'lircmd.service', specified in SYSTEMD_SERVICE:lirc. here lircmd.service is installed in /usr/lib/systemd/system/lircmd.service (From OE-Core rev: 12808a4159835b67d8d53d32bc9135811701a779) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pypi.bbclass: Set SRC_URI downloadfilename with an optional prefixZoltan Boszormenyi2023-03-141-1/+3
| | | | | | | | | | | | | | | | This allows avoiding clashes between source archives of a main project and a pypi project using the same name and version. The new optional setting is PYPI_ARCHIVE_NAME_PREFIX which is empty by default so previous downloads can be used. Example usage: PYPI_ARCHIVE_NAME_PREFIX = "pypi-" (From OE-Core rev: 6f9a6a3dbe5c8eb9f0d19987410932fec3d6dd1a) Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: fix vname var init in multiubi_mkfs() functionRomuald JEANNE2023-03-141-6/+7
| | | | | | | | | | | | | As vname var is needed in multiubi_mkfs() function, we need to keep it defined and use it as parameter to the new write_ubi_config() function. See [YOCTO #15027] (From OE-Core rev: 8b5e1cce35e129b21d871ab45b03811fdb6eaf8f) Signed-off-by: Romuald JEANNE <romuald.jeanne@st.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest-packagelists: Simplify ptest list/codeRichard Purdie2023-03-141-1/+1
| | | | | | | | | All the usage sites remove the -ptest suffix. Simply the original list instead and clean up the code. (From OE-Core rev: 4a28057849f9edc6ac06d115531f579673d788b5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_ext: Handle spaces within user $PATHKenfe-Mickael Laventure2023-03-111-1/+1
| | | | | | | | | | | | | | The script generated by the sdk_ext_postinst function was not quoting the user existing PATH when updating it causing the export command to fail. Add necessary double quotes around $PATH. (From OE-Core rev: 00e96bf250eaaded839caf465dbc0af5b604aed7) Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-scripts: Handle spaces within user $PATHKenfe-Mickael Laventure2023-03-111-1/+1
| | | | | | | | | | | | | The environment-setup script generated by the recipe was not quoting the user existing PATH when updating it causing the export command to fail. Add necessary double quotes around $PATH. (From OE-Core rev: 42177ff2d45ee70ad00917bb6fbabca49dae4f59) Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* manpages: use an intercept to run mandbRoss Burton2023-03-081-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you build an image with lots of manpages in, then each package will run mandb inside qemu-user at rootfs time. This is a slow operation and should be done once when all of the packages have installed using an intercept instead. The call to mandb has been changed too. mandb doesn't actually allow the configuration file to be read from stdin so that was being ignored, instead write the file to a temporary file and use that. This means we then don't need to tell it where to search explicitly, and it writes the indexes to the correct paths so we don't need to move files afterwards either. Sadly we do still need to run mandb inside qemu-user, as the underlying database is a gdbm file and they are byte-order dependent. For my test case of core-image-base with api-documentation DISTRO_FEATURES and doc-pkgs IMAGE_FEATURES enabled, the performance gain is significant: core-image-base do_rootfs -1303.1s -73.6% 1771.6s -> 468.5s (From OE-Core rev: fbd8a57aa307bfda70a08cb78af3c97f05c39a3a) 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>
* linux: inherit pkgconfig in kernel.bbclassMing Liu2023-03-061-1/+1
| | | | | | | | | | | | pkgconfig is being required to find dependencies for building kernel native tools, move "inherit pkgconfig" to kernel.bbclass so BSP kernel recipes can also benefit from it. (From OE-Core rev: 8a84bd98e3fbc16c782f83064801e469d086911e) 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>
* kernel: Add kernel specific OBJDUMPKhem Raj2023-03-016-6/+12
| | | | | | | | | | | | | | | | | | | | This helps in switching toolchains cleanly for kernel build between gcc and clang Currently, some kernels allow building with clang but not all the distro might use clang as default system compiler but kernel may demand gcc which is provided via KERNEL_* variables, however kernel does use OBJCOPY at places during build and it maybe set to use llvm objcopy when using clang. That should be a deliberate setting when clang is used for kernel as well, otherwise it should use binutils provided objcopy (From OE-Core rev: 17b409f2fd97894e0943d13c2cb0d52abde647e3) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: fix kernel-meta data detectionUlrich Ölmann2023-02-191-1/+1
| | | | | | | | | Fixes: 7ef7af5c03ba ("kernel-yocto: restore kernel-meta data detection for SRC_URI elements") (From OE-Core rev: c77754f23e3fb49a62602a6c6a04d5525d1cf457) Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>