summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
...
* rust-common: Remove conflict with utils create_wrapperRichard Purdie2022-08-091-9/+9
| | | | | | | | | | utils already has a create_wrapper function which I tried to use from cargo and got unexpected results. Rename the rust function to avoid this conflict of named. (From OE-Core rev: ef347bd395955ce68893fee7995a4f3abbe6ff93) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Drop cross/crosssdkRichard Purdie2022-08-082-3/+3
| | | | | | | | | | Now that target config json is provided by rust-target-config.bbclass, the need for the cross and crosssdk recipes is removed. Drop them and simplify dependencies accordingly. (From OE-Core rev: 4b54f5f52b33db4d2fe95c5faef033b6c6b37b7d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common: Set rustlibdir to match target expectationRichard Purdie2022-08-081-2/+2
| | | | | | (From OE-Core rev: 06af65757b7694df983b3f99cec75e4e9bec0725) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common: Simplify libc handlingRichard Purdie2022-08-081-37/+8
| | | | | | | | | | The current libc handling code is simply wrong in many cases. Simplify it to a check of the triplet for musl handling which is much simpler and less error prone when handling things like nativesdk targets. (From OE-Core rev: f35d5af06db10fa20e55f4c738e665b35f5c394b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: Make target workaround genericRichard Purdie2022-08-081-1/+7
| | | | | | | | | Ensure the 'target' data is set for both HOST and TARGET queries as appropriate to work correctly in cross configurations. (From OE-Core rev: ec15882fbf396de8d3a5921a3028850ba3fccc48) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common: Update to match cross targetsRichard Purdie2022-08-081-1/+1
| | | | | | | | | Tweak the armv7 workaround to work for cross environments and as a host triplet and not just as a target. (From OE-Core rev: dc134c031171a55a35964ba801219552a516a0ca) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo_common: Handle build SYS as well as HOST/TARGETRichard Purdie2022-08-081-0/+9
| | | | | | | | | Improve the common class to handle BUILD_SYS as well as host and target, removing the need to a workaround in the rust recipe. (From OE-Core rev: 0dc9635c28c269f782ad4ed6ea06b4e4de1beb8e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common/rust: Improve bootstrap BUILD_SYS handlingRichard Purdie2022-08-081-0/+5
| | | | | | | | | | Move the "unknown" vendor workaround used during bootstrap to a central location so it is applied consistently to all RUST_BUILD_SYS values rather than some subset. (From OE-Core rev: d02c28b2219d736c9598a13fead7a03eaa3256a6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Generate per recipe target configuration filesRichard Purdie2022-08-084-12/+12
| | | | | | | | | | Instead of generating target configuration files centrally and often getting it wrong, or having trouble finding the right set, generate them dynamically from the bbclass into WORKDIR per recipe. (From OE-Core rev: 9160e4a37561d8ac882057450a818621bec13bed) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: Show clear error when target isn't definedRichard Purdie2022-08-081-0/+2
| | | | | | (From OE-Core rev: b30ee171de9cd736d16d783410cf748e35309257) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Switch to use RUST_XXX_SYS consistentlyRichard Purdie2022-08-085-9/+9
| | | | | | | | | | | The code was using a mixture of XXX_SYS and RUST_XXX_SYS. Use RUST_XXX_SYS consistently and add the variables to the global exclsion on signatures as they're reflected in the directory triplets and trying to filter them out the hashes separately is too painful. (From OE-Core rev: ee0c0fdf9c1eba9eece6ed1293fda25bf18964b3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common: Rework wrappers to handle muslRichard Purdie2022-08-081-8/+14
| | | | | | | | | For musl we need to be able to add a library to the end of the linker commandline. Rework the wrapper code to be able to do this through a new variable. (From OE-Core rev: dfff5a176765c0e8b212bf31081f80e79025fd1b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common: Drop export directive from wrappersRichard Purdie2022-08-081-5/+5
| | | | | | | | | These variables don't need to be exported into the environment, which reduces the scope of rebuilds when variable values change. (From OE-Core rev: 1a992268e556a79daa6802367f48796000a1f436) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common: Add CXXFLAGSRichard Purdie2022-08-081-1/+1
| | | | | | | | Similarly to CC and CCLD, handle CXX flags too. (From OE-Core rev: e2fc083529d526cb565a2de1917022d10c7d08b8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: Add mips n32 target informationRichard Purdie2022-08-081-0/+7
| | | | | | | | | Add MIPS n32 target information. This appears to be correct but building libstd-rs for the target doesn't work. (From OE-Core rev: 255be90dc8e3625060c9b8ccc2ec3a71f24470d2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base: Disable rust SDK for MIPS n32Richard Purdie2022-08-081-0/+2
| | | | | | | | | | The n32 MIPS rust SDK doesn't quite build (libstd-rs fails with an llvm register issue). Disable it for now, someone with interest in having it working can fix if/as/when. (From OE-Core rev: aad10f24eea5a6b54de17138ab5c0f4ed1355a8f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* nativesdk: Clear TUNE_FEATURESRichard Purdie2022-08-081-0/+1
| | | | | | | | | | Similarly to what native.bbclass does, clear TUNE_FEATURES since these aren't appropriate to the nativesdk build. This saves us having to change down signature issues due to data in this variable. (From OE-Core rev: 2e5079e434504a3a22b609f7ddbb7f4c533c4cdb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types_wic.bbclass: fix cross binutils dependencyChen Qi2022-08-041-1/+1
| | | | | | | | | | | | | | | Enable multilib and wic at the same time and we'll meet the following error. ERROR: Nothing PROVIDES 'virtual/i686-wrsmllib32-linux-binutils' Adjust the dependency to take multilib into consideration. (From OE-Core rev: 958ee0eede859bdba659e3343856b1c226207854) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* create-spdx: ignore packing control files from ipk and debJose Quaresma2022-08-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise spdx can have references for data that is not packed in the package delivered because this contol data is temporarly and only exist while the package is been write. During do_package_write_ipk task in do_package_ipk the control files is cleaned up at the end. This can create a race condiction when the do_create_spdx task runs the add_package_files function and these files is been deleted at same time in the task do_package_write_ipk. ERROR: alsa-topology-conf-1.2.5.1-r0 do_create_spdx: 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> 0001: *** 0002:do_create_spdx(d) 0003: File: '/srv/oe/build/conf/../../layers/openembedded-core/meta/classes/create-spdx.bbclass', lineno: 567, function: do_create_spdx 0563: package_doc.add_relationship(package_doc, "DESCRIBES", spdx_package) 0564: 0565: package_archive = deploy_dir_spdx / "packages" / (package_doc.name + ".tar.zst") 0566: with optional_tarfile(package_archive, archive_packaged) as archive: *** 0567: package_files = add_package_files( 0568: d, 0569: package_doc, 0570: spdx_package, 0571: pkgdest / package, File: '/srv/oe/build/conf/../../layers/openembedded-core/meta/classes/create-spdx.bbclass', lineno: 234, function: add_package_files 0230: info.mtime = source_date_epoch 0231: 0232: archive.addfile(info, f) 0233: *** 0234: sha1 = bb.utils.sha1_file(filepath) 0235: sha1s.append(sha1) 0236: spdx_file.checksums.append(oe.spdx.SPDXChecksum( 0237: algorithm="SHA1", 0238: checksumValue=sha1, File: '/srv/oe/bitbake/lib/bb/utils.py', lineno: 559, function: sha1_file 0555: """ 0556: Return the hex string representation of the SHA1 checksum of the filename 0557: """ 0558: import hashlib *** 0559: return _hasher(hashlib.sha1(), filename) 0560: 0561:def sha384_file(filename): 0562: """ 0563: Return the hex string representation of the SHA384 checksum of the filename File: '/srv/oe/bitbake/lib/bb/utils.py', lineno: 528, function: _hasher 0524: 0525:def _hasher(method, filename): 0526: import mmap 0527: *** 0528: with open(filename, "rb") as f: 0529: try: 0530: with mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ) as mm: 0531: for chunk in iter(lambda: mm.read(8192), b''): 0532: method.update(chunk) Exception: FileNotFoundError: [Errno 2] No such file or directory: '/srv/oe/build/tmp-lmp/work/all-lmp-linux/alsa-topology-conf/1.2.5.1-r0/packages-split/alsa-topology-conf/CONTROL/control' ERROR: Logfile of failure stored in: /srv/oe/build/tmp-lmp/work/all-lmp-linux/alsa-topology-conf/1.2.5.1-r0/temp/log.do_create_spdx.998864 INFO: recipe alsa-topology-conf-1.2.5.1-r0: task do_create_spdx: Failed (From OE-Core rev: 0bfe403f46fd568910a727982c3ff528e3d5c8bc) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/sanity: Add comment about github & gitlab archivesJoshua Watt2022-08-041-0/+1
| | | | | | | | | | Add a comment so that users grepping for "github" or "gitlab" will find this code (since the regex wont). (From OE-Core rev: 07c9c6144748d1fbbbdf9c2cb156bea5bed273d4) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* uboot-config.bbclass: Raise error for bad keyTom Hochstein2022-08-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | If an invalid key is used, the class ignores the error, with an indeterminate result. In my case, the problem surfaced in do_deploy: ``` | cp: cannot stat '/.../build/tmp/work/imx6qdlsabresd-fsl-linux-gnueabi/u-boot-imx-mfgtool/2022.04-r0/deploy-u-boot-imx-mfgtool/u-boot.imx': No such file or | directory ``` The root cause of this was that the uboot config key did not match a valid option. With the fix, the error is caught by the class: ``` ERROR: Nothing PROVIDES 'u-boot-imx-mfgtool' u-boot-imx-mfgtool was skipped: The selected UBOOT_CONFIG key ['mfgtool'] has no match in dict_keys(['sd-fslc', 'sd-imx', 'sd-optee-imx', 'sata-imx', 'mfgtool-imx']). ``` (From OE-Core rev: 801a27d73b10017cac3c0caa05d0a2af3502a7ba) Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Acked-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: depend on cross-binutilsRoss Burton2022-08-021-0/+2
| | | | | | | | | | | Wic can build an unified kernel image, but this needs the cross-objcopy from binutils. (From OE-Core rev: 7c7a488116f49083ca42d3628ebc0870585110c3) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* create-spdx: Fix supplier fieldMihai Lindner2022-07-281-3/+3
| | | | | | | | | | | The correct field name is "supplier" according to SPDX schema. The "supplier" field translates to "PackageSupplier", but that's for tag-value format. (From OE-Core rev: ca8db0e0a2860ac1e3f537471fa71b43c3be0a58) Signed-off-by: Mihai Lindner <mihai.lindner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* toolchain-scripts.bbclass: adjust toolchain_create_tree_env_script to better ↵Alexander Kanavin2022-07-281-9/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | replicate (e)SDK Specifically: 1. Place the environment setup file into $B and not into $TMPDIR, so that the recipe using the class can itself better decide what to do with the file. 2. Use global, unified sysroots (provided through build-sysroots recipe) and not recipe-specific ones, as this allows flexible on-the-fly management of what libraries are available to build applications, without having to modify any recipes, similar to eSDK 'extensible' part. This also requires adjustment of the sstate sametune_samegsigs test, as meta-ide-support becomes dependent on $MACHINE (unified sysroots have it in their paths) and needs to be excluded from the test. 3. Add a few missing settings that have been added to SDK environment files. 4. Add a snippet to the environment setup file that also runs the relocation scripts. In regular SDKs this is executed by the SDK installer, in direct SDK we can do it when setting up the environment. (From OE-Core rev: db5dfd78ae441201778b1175f4fb9a3eba994899) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: remove unsed do_deploy_archives[dirs]Jose Quaresma2022-07-281-1/+0
| | | | | | | | | | | | Remove as commit b3afe7d redifines it. https://git.openembedded.org/openembedded-core/commit/?id=b3afe7d9bd25a943e947de3ec064ea245173c5a8 (From OE-Core rev: cf5e155a9c76a6e4ed7145118e7367ab6f2f53f2) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base: Fix mingw override nameRichard Purdie2022-07-281-1/+1
| | | | | | | | Correct the override name used for rust toolchain removal from the mingw sdk. (From OE-Core rev: 8aeb0dfe6508daea51db4f0992eed194e925fdd7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk: Add SDK toolchain language selection supportRichard Purdie2022-07-281-2/+15
| | | | | | | | | Add a new variable SDK_TOOLCHAIN_LANGS to allow different language support to be selected within SDKs. Initially supported options are rust and go. (From OE-Core rev: 0026b5687147410e4c7140ca5133089ebb51d9d4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native: Clear TUNE_FEATURES/ABIEXTENSIONRichard Purdie2022-07-281-0/+2
| | | | | | | | | | Some recipes reference these. Rather than continually trying to chase down the references and taskhash issues, clear the variables for an easier life and simpler code. These wouldn't convey anything useful in a native build. (From OE-Core rev: f8edeead263708889d31a7ff578ef8274cb678b4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: Allow the targets generated to be configurableRichard Purdie2022-07-281-2/+8
| | | | | | | | | Remove further code duplication by allowing the main function to be configurable. (From OE-Core rev: 2d4b35a0db1220e7a7f1b6776223aa4d40a3f246) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: Create new class to contain target json config generationRichard Purdie2022-07-281-0/+368
| | | | | | | | | | | | | Currently most of the rust recipes use this code but it is all piecemeal. Turn the code into a class where things can start to be rationalised. Ultimately some of the data and python code should be moved to a python library but one step at a time. No functionality changes. (From OE-Core rev: 3795285cbf362e13b8151bfdbe1bce999ac28641) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: pass LD also in savedefconfigMartin Jansa2022-07-251-1/+1
| | | | | | | | | | | | | | * similar to: https://git.openembedded.org/openembedded-core/commit/?id=66c1f4b0abd3483759f9e4141a80f982eaf8ccfd https://git.openembedded.org/openembedded-core/commit/?id=36fe2efc91fec5a52374a2dc4814a69076a2d28e but for savedefconfig task * otherwise with ld-is-gold it will fail with: gold linker is not supported as it is not capable of linking the kernel proper. (From OE-Core rev: f0c9e1bf35289afa63f040bbc13ca1755e4db0f9) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base/reproducible: Change Source Date Epoch generation methodsRichard Purdie2022-07-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | In bc, we found that there are files newer than Changelog (e.g. scan.l) which means after install runs, the timestamp is clamped to SDE which means "bitbake bc -C compile" would then try and regenerate generated files and complain flex was missing. Rather than assuming Changelog/NEWS are magic for dates, drop that scan method and scan all unpacked files. This shouldn't be that slow as they'd be in the disk cache already after an unpack. For bc, this changes SDE by about two minutes and avoids the problems rebuilding. Add a version comment to the task definition as changes in python library code won't trigger a rebuild and we need one here. (From OE-Core rev: 32dda0ad91a9e7946351c897578b4c97ae142341) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gobject-introspection-data: Disable cache for g-ir-scannerTom Hochstein2022-07-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An intermittent failure occurs in libical-native do_compile: | Traceback (most recent call last): | File "/.../build/tmp/work/x86_64-linux/libical-native/3.0.14-r0/recipe-sysroot-native/usr/lib/python3.10/shutil.py", line 813, in move | os.rename(src, real_dst) | OSError: [Errno 18] Invalid cross-device link: '/tmp/g-ir-scanner-cache-adxo_2bq' -> '/home/bamboo/.cache/g-ir-scanner/bab9a83d2cd93e62ed005a2c1d4f89ae75c67251' | | During handling of the above exception, another exception occurred: | | Traceback (most recent call last): | File "/.../tmp/work/x86_64-linux/libical-native/3.0.14-r0/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/bin/g-ir-scanner", line 99, in <module> | sys.exit(scanner_main(sys.argv)) | File "/.../tmp/work/x86_64-linux/libical-native/3.0.14-r0/recipe-sysroot-native/usr/lib/gobject-introspection/giscanner/scannermain.py", line 590, in scanner_main | transformer = create_transformer(namespace, options) | File "/.../tmp/work/x86_64-linux/libical-native/3.0.14-r0/recipe-sysroot-native/usr/lib/gobject-introspection/giscanner/scannermain.py", line 409, in create_transformer | transformer.register_include(include_obj) | File "/.../tmp/work/x86_64-linux/libical-native/3.0.14-r0/recipe-sysroot-native/usr/lib/gobject-introspection/giscanner/transformer.py", line 140, in register_include | self._parse_include(filename) | File "/.../tmp/work/x86_64-linux/libical-native/3.0.14-r0/recipe-sysroot-native/usr/lib/gobject-introspection/giscanner/transformer.py", line 230, in _parse_include | self._parse_include(dep_filename) | File "/.../tmp/work/x86_64-linux/libical-native/3.0.14-r0/recipe-sysroot-native/usr/lib/gobject-introspection/giscanner/transformer.py", line 225, in _parse_include | self._cachestore.store(filename, parser) | File "/.../tmp/work/x86_64-linux/libical-native/3.0.14-r0/recipe-sysroot-native/usr/lib/gobject-introspection/giscanner/cachestore.py", line 153, in store | shutil.move(tmp_filename, store_filename) | File "/.../tmp/work/x86_64-linux/libical-native/3.0.14-r0/recipe-sysroot-native/usr/lib/python3.10/shutil.py", line 833, in move | copy_function(src, real_dst) | File "/.../tmp/work/x86_64-linux/libical-native/3.0.14-r0/recipe-sysroot-native/usr/lib/python3.10/shutil.py", line 435, in copy2 | copystat(src, dst, follow_symlinks=follow_symlinks) | File "/.../tmp/work/x86_64-linux/libical-native/3.0.14-r0/recipe-sysroot-native/usr/lib/python3.10/shutil.py", line 374, in copystat | lookup("utime")(dst, ns=(st.st_atime_ns, st.st_mtime_ns), | FileNotFoundError: [Errno 2] No such file or directory A similar issue is described in a fix for gobject-introspection-native. https://github.com/openembedded/openembedded-core/commit/d3c48ff7d19e86b2338b1778f9563969bba3d336 The problem was fixed there by setting the environment variable GI_SCANNER_DISABLE_CACHE to disable the use of $HOME/.cache. Extend the fix to users of gobject-instropection by promoting the fix to the bbclass. (From OE-Core rev: 35d5f707f6bb2ce5e9ab908e66e1ea9eeac754b1) Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-fitimage.bbclass: add padding algorithm property in config nodesLUIS ENRIQUEZ2022-07-192-0/+5
| | | | | | | | | | This allows choosing padding algorithm when building fitImage. It may be pkcs-1.5 or pss. (From OE-Core rev: 29d5336c728b28890bbaadebf0ccff00ad90a64d) Signed-off-by: LUIS ENRIQUEZ <luis.enriquez@se.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands.bbclass: move host-user-contaminated.txt to ${S}Ming Liu2022-07-191-1/+1
| | | | | | | | | | | | | This is to ensure host-user-contaminated.txt would be removed before do_rootfs runs, since ${S} is in cleandirs of do_rootfs, otherwise, a host-user-contaminated.txt file that generated from previous builds could be used which is wrong. (From OE-Core rev: 54a3fd63e684d070fad962be97e549f3af7ac111) 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>
* package.bbclass: Fix kernel source handling when not using externalsrcAlejandro Hernandez Samaniego2022-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | Previous commit c725bdb29b266 broke kernel source handling, this was due to the code expecting the sources to be in a different directory, this did not happen when using externalsrc since sources were found in the expected directories. Pass work-shared to the check to allow sources to be found in the proper directory, allowing these to be packaged in the next step. To test this we grabbed a commit where we knew the buildpaths QA test should flag a file inside the kernel sources, with the previous commit the QA warning wasnt flagged since no sources where there, with this fix the buildpaths QA warning gets flagged properly. (From OE-Core rev: 2714a8ef8c7b3c66d50f27f4f52fe2fe4db39b00) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alhe@linux.microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate: Use the python3 ThreadPoolExecutor instead of the OE ThreadedPoolJose Quaresma2022-07-151-13/+19
| | | | | | | | | | | For the FetchConnectionCache use a queue where each thread can get an unsed connection_cache that is properly initialized before we fireup the ThreadPoolExecutor. (From OE-Core rev: eb6a6820928472ef194b963b606454e731f9486f) Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: introduce UBOOT_MKIMAGE_KERNEL_TYPEMing Liu2022-07-153-2/+5
| | | | | | | | | | | | | | | | Sometimes an end user might want to choose another kernel type argument for uboot-mkimage other than "kernel", for instance: "kernel_noload". Let's introduce a variable UBOOT_MKIMAGE_KERNEL_TYPE to support that, and it could be used by BSP layers as well. (From OE-Core rev: e288686e97de1265eeeaf452141e1473867efb1b) (From OE-Core rev: 4eb7bbcc2f08b25387a15b7e4a89ef199783c973) 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>
* package.bbclass: Avoid stripping signed kernel modules in splitdebuginfoChristoph Lauer2022-07-151-0/+5
| | | | | | | | | | | | Since commit d756b346f248df47b0540644adb1d0f17bcc4b6e kernel modules are stripped by the functions 'runstrip' and 'splitdebuginfo'. Signed modules must not be stripped. Function 'runstrip' avoids this by running is_kernel_module_signed. Apply the same check to splitdebuginfo. (From OE-Core rev: 6859226652339b19cbc7bdfec074fe2016cdee60) (From OE-Core rev: dc0f0413eabfd50f78d887f73f808d40a314fbd8) Signed-off-by: Christoph Lauer <christoph.lauer@xtronic.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Drop debug exclusion from buildpaths testRichard Purdie2022-07-151-3/+0
| | | | | | | | | Once, we didn't have reproducible debug info and weren't sure how we'd get it. This is long since fixed so we can drop this exclusion as obsolete. (From OE-Core rev: dab0d98eee0e196fb24c16334982b5d568caa313) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Reword staging to refer to populate_sysrootRichard Purdie2022-07-151-7/+4
| | | | | | | | | 'staging' is a term lost in time. This code now operates on the sysroots, adjust the naming and messages to be more correct/appropriate. (From OE-Core rev: 5753b6bc5b106ab5fd3652c24ef6a1f94f983424) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Add buildpaths to WARN_QA by defaultRichard Purdie2022-07-151-1/+1
| | | | | | | | | | | | | | | | | This was never enabled originally as there were a ton of warnings and we weren't able to fix them. Now we have reproducibile builds, this can be enabled by default as there shouldn't be such paths any longer. This is known to work well for OE-Core, other layers may have variable quaility but enabling it will start to hint to other layers and maintainers that these issues need fixing. It also will give developers early warning of reproducibility issues, rather than us catching them on the YP autobuilder. (From OE-Core rev: 54715c054eac8cf8214a5a390f722567efed54e0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: remove obsolete PEP517_BUILD_APIRoss Burton2022-07-144-8/+0
| | | | | | | | | This variable is no longer used, so remove it from the python_* classes. (From OE-Core rev: 49b6c5a656eecbc51489823e37bc07918173e8d2) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python_pep517: use picobuild instead of manually calling the APIRoss Burton2022-07-141-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling the PEP-517 API directly mostly works, but sometimes doesn't. For example we don't verify build dependencies, which led to the cbor2 ugprade silently failing to actually package anything. The standard frontend is pypa/build, but for source-based distributions that can be annoying to build as it depends on the following packages: - tomli - pep517 - packaging - pyparsing Manually bootstrapping those recipes is possible, but tedious. Picobuild is another frontend (written by myself) which is designed explicitly to be used programatically by source-based distributions: it doesn't support builds inside virtual environments as we're building distribution packages, and it vendors the dependencies for bootstrapping if they're not available. Over time more packages are expected to move to using Flit to build which makes the bootstrapping process slightly easier, and tomli will be integrated into Python 3.11, so it's possible that in the future we drop picobuild and switch to build. This change means the PEP517_BUILD_API variable is obsolete, so remove it. (From OE-Core rev: 35104958181d18fd67b73943b9310c813d62b14d) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python3-flit-core: bootstrap explicitlyRoss Burton2022-07-141-0/+5
| | | | | | | | | | | Add a method to python_flit_core.bbclass that does a manual build with flit explicitly, and use that to bootstrap python3-flit-core-native which can build itself. (From OE-Core rev: e902578c2c9aacdc83dcfa517bc1e57667fcc460) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bin_package: install into base_prefixPascal Bach2022-07-121-1/+2
| | | | | | | | | This makes the bin_package.bbclass work properly with the native class. (From OE-Core rev: ad330b6d4b6e2ba051b5c6c437e07a183831f757) Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-arch: Fix buildpaths leaking into external module compilesRichard Purdie2022-07-121-1/+1
| | | | | | | | | | | | Building external kernel modules like lttng-modules was showing build paths inside the debug symbols for the modules and breaking build reproducibility. Fix this by adding in the mapping needed to map the kernel build directory to something more approriate on target. (From OE-Core rev: b56dc9009ba93174de6bf4c01e17808ef249dc5c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage : remove curl-ptest from rpm indexYogesh Tyagi2022-07-081-0/+3
| | | | | | | | | | | | | | When creating rpm index for dnf runtime tests, currently all the package starting with curl are getting included. Now curl-ptest is getting enabled through another patch but we don't want rpm index to be created for curl-ptest since it fetches lot of perl dependencies. This patch removes curl-ptest from rpm index. (From OE-Core rev: 830663cee1eabdecdd473f4589a6c03b6e6c409b) Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* utils: create_cmdline_shebang_wrapper preserve permission and ownershipPaulo Neves2022-07-041-0/+3
| | | | | | | | | | | | | | | The .real command was not given the same permissions and ownership as the original pre-wrap file and this is now fixed. A situation where the original pre-wrap file did not have write permissions would cause a failure in the wrapping is also fixed. Test update also included. (From OE-Core rev: 47973fd4f3fbb0af1a0d1bc2c39f2900a963177d) Signed-off-by: Paulo Neves <ptsneves@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* utils: create_cmdline_shebang_wrapper whitespace and sed refactorPaulo Neves2022-07-041-5/+5
| | | | | | | | | | Correct whitespace to match the rest of the code in utils. Refactored sed expression with a simpler equivalent. (From OE-Core rev: 68f49af704a4e808ad274d689e884923776edfec) Signed-off-by: Paulo Neves <ptsneves@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>