summaryrefslogtreecommitdiff
path: root/poky/meta/classes
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2021-09-03 05:05:58 +0300
committerAndrew Geissler <geissonator@yahoo.com>2021-09-04 17:46:34 +0300
commitd159c7fb39550d7348052766f46e51b26d3fd4cc (patch)
treef719f75759697649453e6bed883c54bae951eb74 /poky/meta/classes
parent5b587cab386c4691eefa4885b9fd30794934c106 (diff)
downloadopenbmc-d159c7fb39550d7348052766f46e51b26d3fd4cc.tar.xz
subtree updates
poky: 94dfcaff64..359e1cb62f: Alexander Kanavin (76): tcf-agent: fetching over git:// no longer works lighttpd: convert from autotools to meson libxcrypt: upgrade 4.4.23 -> 4.4.25 python3-cython: upgrade 0.29.23 -> 0.29.24 python3-numpy: upgrade 1.21.0 -> 1.21.2 systemd: upgrade 249.1 -> 249.3 xeyes: upgrade 1.1.2 -> 1.2.0 btrfs-tools: update 5.13 -> 5.13.1 diffutils: update 3.7 -> 3.8 mc: update 4.8.26 - > 4.8.27 libsdl2: update 2.0.14 -> 2.0.16 vulkan-samples: update to latest revision pulseaudio: update 14.2 -> 15.0 libjitterentropy: update 3.0.2 -> 3.1.0 usbutils: upgrade 013 -> 014 inetutils: upgrade 2.0 -> 2.1 mobile-broadband-provider-info: upgrade 20201225 -> 20210805 glib-networking: upgrade 2.68.1 -> 2.68.2 e2fsprogs: upgrade 1.46.2 -> 1.46.4 help2man: upgrade 1.48.3 -> 1.48.4 libedit: upgrade 20210522-3.1 -> 20210714-3.1 log4cplus: upgrade 2.0.6 -> 2.0.7 mtools: upgrade 4.0.34 -> 4.0.35 patchelf: upgrade 0.12 -> 0.13 pkgconf: upgrade 1.7.4 -> 1.8.0 python3-git: upgrade 3.1.18 -> 3.1.20 python3-pip: upgrade 21.2.1 -> 21.2.4 python3-pygments: upgrade 2.9.0 -> 2.10.0 python3-setuptools: upgrade 57.1.0 -> 57.4.0 squashfs-tools: upgrade 4.4 -> 4.5 acpica: upgrade 20210331 -> 20210730 libidn2: upgrade 2.3.1 -> 2.3.2 stress-ng: upgrade 0.12.12 -> 0.13.00 sudo: upgrade 1.9.7p1 -> 1.9.7p2 epiphany: upgrade 40.2 -> 40.3 libgudev: upgrade 236 -> 237 libjpeg-turbo: upgrade 2.1.0 -> 2.1.1 libepoxy: upgrade 1.5.8 -> 1.5.9 pango: upgrade 1.48.7 -> 1.48.9 mesa: upgrade 21.1.5 -> 21.2.1 libinput: upgrade 1.18.0 -> 1.18.1 libxfont2: upgrade 2.0.4 -> 2.0.5 libxft: upgrade 2.3.3 -> 2.3.4 xserver-xorg: upgrade 1.20.12 -> 1.20.13 linux-firmware: upgrade 20210511 -> 20210818 wireless-regdb: upgrade 2021.04.21 -> 2021.07.14 libwebp: upgrade 1.2.0 -> 1.2.1 webkitgtk: upgrade 2.32.2 -> 2.32.3 boost: upgrade 1.76.0 -> 1.77.0 diffoscope: upgrade 179 -> 181 enchant2: upgrade 2.3.0 -> 2.3.1 re2c: upgrade 2.1.1 -> 2.2 rng-tools: upgrade 6.13 -> 6.14 kea: backport a patch to fix build errors exposed by latest update batch qemu: add a hint on how to enable CPU render nodes when a suitable GPU is absent mc: fix reproducibility libjitterentropy: remove contaminated hashequiv entry binutils: drop target flex/bison from build dependencies gnu-efi: update 3.0.13 -> 3.0.14 glib-2.0: upgrade 2.68.3 -> 2.68.4 util-linux: upgrade 2.37.1 -> 2.37.2 ccache: upgrade 4.3 -> 4.4 git: upgrade 2.32.0 -> 2.33.0 openssh: upgrade 8.6p1 -> 8.7p1 ell: upgrade 0.42 -> 0.43 python3-mako: upgrade 1.1.4 -> 1.1.5 vala: upgrade 0.52.4 -> 0.52.5 libnsl2: upgrade 1.3.0 -> 2.0.0 gi-docgen: upgrade 2021.6 -> 2021.7 json-glib: upgrade 1.6.2 -> 1.6.4 bind: upgrade 9.16.19 -> 9.16.20 harfbuzz: upgrade 2.8.2 -> 2.9.0 qemurunner.py: print output from runqemu/qemu-system in stop() qemurunner.py: handle getOutput() having nothing to read rust: fix upstream version checks mesa: enable crocus driver for older intel graphics Andreas Müller (2): mesa: upgrade 21.1.5 -> 21.1.7 binutils: Apply upstream patch to fix 'too many open files' on qtwebengine Andrej Valek (2): busybox: 1.33.1 -> 1.34.0 vim: add option to disable NLS support Andres Beltran (2): buildhistory: Add output file listing package information buildhistory: Label packages providing per-file dependencies in depends.dot Andrey Zhizhikin (2): lttng-modules: do not search in non-existing folder during install nativesdk-packagegroup-sdk-host: add perl integer module Armin Kuster (2): lz4: Security Fix for CVE-2021-3520 lz4: remove rest of ptest artifacts Bruce Ashfield (21): linux-yocto/5.13: update to v5.13.7 linux-yocto/5.4: update to v5.4.137 linux-yocto/5.10: update to v5.10.55 linux-yocto/5.4: update to v5.4.139 linux-yocto/5.10: update to v5.10.57 linux-yocto/5.13: update to v5.13.9 linux-yocto/5.4: remove recipes conf/machine: bump qemu preferred versions to 5.13 linux-yocto-dev: bump to v5.14+ lttng-modules: update to 2.13.0 kernel-devsrc: 5.14+ updates kernel-devsrc: fix 5.14+ objtool compilation poky/poky-tiny: set default kernel to 5.13 poky: set default kernel to 5.13 yocto-bsp: drop 5.4 bbappend poky-alt: switch default kernel to 5.10 linux-yocto/5.13: update to v5.13.11 linux-yocto/5.10: update to v5.10.59 linux-yocto/5.13: update to v5.13.12 linux-yocto/5.10: update to v5.10.60 parselogs.py: ignore intermittent CD/DVDROM identification failure Chen Qi (1): package_rpm/update-alternatives: fix package's provides Daniel Gomez (2): wic: Add --no-fstab-update part option oeqa: wic: Add tests for --no-fstab-update Denys Dmytriyenko (1): grep: upgrade 3.6 -> 3.7 Enrico Scholz (1): bitbake: fetch2/wget: fix 'no_proxy' handling Hongxu Jia (2): nativesdk-pseudo: Fix to work with glibc 2.34 systems glibc: fix create thread failed in unprivileged process Hsia-Jun Li (1): lib/oe/elf: Add Android OS to machine_dict Jon Mason (8): arch-armv8m-main: missing space conf/machine: move tune files to architecture directories yocto-bsp: update machine confs with new tune locations docs: update docs with new tune locations arch-arm*: add better support for gcc march extensions tune-cortexr*: add support for all Arm Cortex-R processors arch-arm*: Fix bugs with dsp and simd feature include files tune-*: Use more specific DEFAULTTUNE Jose Quaresma (1): sstate.bbclass: get the number of threads from BB_NUMBER_THREADS Joshua Watt (17): bitbake: contrib: vim: Add "remove" override highlighting bitbake.conf: Add lz4c, pzstd and zstd bitbake: bitbake: asyncrpc: Defer all asyncio to child process conf/licenses: Add FreeType SPDX mapping tzdata: Remove BSD License specifier glib-2.0: Use specific BSD license variant e2fsprogs: Use specific BSD license variant shadow: Use specific BSD license variant libcap: Use specific BSD license variant sudo: Use specific BSD license variant libpam: Use specific BSD license variant libxfont2: Use specific BSD license variant libjitterentropy: Use specific BSD license variant libx11: Use specific BSD license variant font-util: Use specific BSD license variant flac: Use specific BSD license variant swig: Use specific BSD license variant Kai Kang (2): libcgroup: fix installed-vs-shipped qa issue rustfmt: fix SRC_URI Kevin Hao (2): meta-yocto-bsp: Set the default kernel to v5.13 meta-yocto-bsp: Bump the kernel to v5.13.11 Khem Raj (2): weston: Re-order gbm destruction at DRM-backend tear down musl: Update to latest tip of trunk Kristian Klausen (1): systemd: Add repart PACKAGECONFIG Marco Felsch (1): bitbake: bitbake: bitbake-layers: add skip reason to output Marek Vasut (1): weston: Add rdp PACKAGECONFIG Marta Rybczynska (1): lzo: add CVE_PRODUCT Martin Jansa (3): bitbake: prserv: handle PRSERV_HOST = "127.0.0.1:0" the same as "localhost:0" bitbake: cooker/process: Fix typos in exiting message rust: remove unused patches Michael Halstead (2): uninative: Upgrade to 3.3, support glibc 2.34 uninative: Upgrade to 3.4 Michael Opdenacker (2): maintainers.inc: maintainer for alsa-*, flac, lame and speex meta: stop using "virtual/" in RPROVIDES and RDEPENDS Mingli Yu (2): shadow: fix default value in SHA_get_salt_rounds() bitbake: prserv: make localhost work Oleksandr Popovych (1): utils: Reduce the number of calls to the "dirname" command Oliver Kranz (1): Allow global override of golang GO_DYNLINK Paul Barker (2): bitbake: prserv: Replace XML RPC with modern asyncrpc implementation bitbake: prserv: Add read-only mode Paul Gortmaker (1): ltp: backport ioctl_ns05 fix from upstream Peter Kjellerstedt (7): lttng-modules: Make it build when CONFIG_TRACEPOINTS is not enabled again poky-floating-revisions.inc: Use new override syntax for commented vars local.conf.sample: Use the new override syntax for a commented variable bitbake.conf: Use the new variable override syntax in a comment buildhistory-collect-srcrevs: Adapt to the new variable override syntax meson.bbclass: Make the default buildtype "debug" if DEBUG_BUILD is 1 bitbake: providers: Use new override syntax when handling pn- "override" Purushottam Choudhary (1): assimp: added patch to fix hardcoded non-existing paths in CMake modules Randy MacLeod (8): openssl: upgrade from 1.1.1k to 1.1.1l rust: initial merge of most of meta-rust rust: mv README.md to recipes-devtools/rust/README-rust.md rust: update the README to conform to being in oe-core cargo/rust/rustfmt: exclude from world maintainers: Add myself as maintainer for rust pkgs cargo_common: remove http_proxy rust: remove Rust version 1.51.0 toolchain Richard Purdie (27): elfutils: Add zstd PACKAGECONFIG for determinism man-db: Add compression PACKAGECONFIG entries oeqa/selftest/glibc: Handle incorrect encoding issuesin glibc test results package/scripts: Fix FILES_INFO handling package: Fix overrides converion issue with PKGSIZE bitbake: bitbake: Make 3.6.0 the minimum python version elfutils: Fix ptest dependencies bsp-guide: Fix reference to bbappend section of dev-manual ref-manual: Fix reference to bbappend section of dev-manual gcc: Fix nativesdk builds and multilib fixes with gcc 11 bitbake: README: Add note about test suite and new tests pseudo: Fix to work with glibc 2.34 systems bitbake: README: Fix typo rust-cross*: Fix OVERRRIDE references in task signature computation rust-cross-canadian-common: Use rust.inc directly, not rust-target cargo: Ensure cargo-cross-canadian doesn't have native/nativesdk versions rust-native: Avoid stripped warning rust-llvm: Add missing HOMEPAGE rust: Skip target recipe since it doesn't work oeqa/selftest/distrodata: Fix up rust maintainer testing rust: Avoid buildtools+uninative issues with glibc symbols mismatches rust-common: Add LDFLAGS to cc wrapper oeqa/selftest/reproducibile: Exclude rust packages kernel: Use unexpanded EXTENDPKGV oeqa/buildtools-cases: Allow bitbake time to shutdown cargo: Apply uninative fix to snapshot as with rust rust-common: Hack around LD_LIBRARY_PATH issues on centos7 Robert P. J. Day (1): scripts/lib/wic/help/py: "Redhat" -> "Red Hat" Ross Burton (11): oeqa/selftest/buildoptions: test buildhistory PKGSIZE and FILELIST fields uninative: Improve glob to handle glibc 2.34 oeqa/sdk: add relocation test for buildtools glibc: package the stub .a libaries into glibc-dev oeqa/sdk: add HTTPS test for buildtools libcgroup: upgrade to 2.0 gcc: also relocate the musl loader local.conf.sample.extended: fix commented-out override syntax cpio: backport fix for CVE-2021-38185 mesa: fix build on Arm V5 with soft float ptest: allow the ptest-packagelists.inc warning to be disabled Sakib Sajal (1): qemu: fix CVE-2021-3682 Scott Murray (2): bitbake: bitbake: asyncrpc: always create new asyncio loops prservice: remove connection caching Stefan Herbrechtsmeier (4): u-boot: Remove redundancy from installed and deployed SPL artifact names u-boot: Remove misplaced configuration type variable u-boot: Make SPL suffix configurable u-boot: Make UBOOT_BINARYNAME configurable Tim Orling (7): python3-importlib-metadata: upgrade 4.6.3 -> 4.6.4 python3-hypothesis: upgrade 6.14.5 -> 6.14.8 python3-hypothesis: upgrade 6.14.8 -> 6.15.0 python3-hypothesis: enable ptest python3-pluggy: upgrade 0.13.1 -> 1.0.0 python3-pytest: allow python3-pluggy >=1.0.0 rust-common.bbclass: export RUST_TARGET_PATH Trevor Gamblin (1): bluez: upgrade 5.60 -> 5.61 Trevor Woerner (1): distro_features_check: expand with IMAGE_FEATURES Vinay Kumar (2): glibc: Fix CVE-2021-38604 rust-common.inc: Fix build failure with qemuppc64. Yi Zhao (2): prelink: add PACKAGECONFIG for selinux shadow: add /etc/default/useradd Zoltán Böszörményi (4): kernel-module-split.bbclass: Support zstd-compressed modules Allow opt-out of split kernel modules kernel.bbclass: Use full versions for inter-package dependencies base/kernel: Support zstd-compressed squashfs and cpio initramfs leimaohui (2): Fix conflict error when enable multilib. wordsize.h: Fix a miss, this file in arm and aarch64 should be the same. meta-raspberrypi: 32921fc9bd..a6fa6b3aec: Khem Raj (4): machines: Use tune files from new location in oe-core linux-raspberrypi: Update to 5.10.59 raspberrypi-firmware: Update to latest raspberrypi4: Use full kms (vc4-kms-v3d) DT overlay Marcus Comstedt (1): pi-bluetooth: Add compatibility with non-systemd builds Tom Rini (1): xserver-xf86-config: Correctly append to FILES:${PN} meta-security: c885d399cd..1f18c623e9: Armin Kuster (10): cryfs: add new package kas-security-bas: bump conf value kas: fix DISTRO appends dm-verity-img.bbclass: more overided fixups krill: Rust is in core now suricata: rust is in core layer.conf: drop dynamic-layer layer.conf: drop meta-rust harden-image-minimal: fix useradd inherit kas: remove rust layers Daiane Angolini (1): meta-integrity: kernel-modsign: Change weak default value George Liu (1): meta: Fix typos Marta Rybczynska (2): README: fix mailing lists README: fix mailing lists and a typo meta-openembedded: a13db91f19..9fdc7960ba: Andreas Müller (6): catch2: upgrade 2.13.6 -> 2.13.7 fltk/CMake: Do not export executable 'fluid' fltk: upgrade 1.3.6 -> 1.3.7 network-manager-applet: upgrade 1.22.0 -> 1.24.0 networkmanager: upgrade 1.32.4 -> 1.32.8 udisks2: upgrade 2.9.2 -> 2.9.3 Anton Blanchard (2): boost-url: Use GNUInstallDirs instead of hard wiring install directories cereal: Use GNUInstallDirs instead of hard wiring install directories Changqing Li (1): linuxptp: upgrade 3.1 -> 3.1.1 Devendra Tewari (1): android-tools: Add flag to enable adbd service (#147) Dmitry Baryshkov (1): image_types_sparse: stop using ext2simg Easwar Hariharan (1): chrony: Fix privdrop packageconfig Joe Slater (1): nginx: fix CVE-2021-3618 Justin Bronder (1): hidapi: add rdep on glibc-gconv-utf-16 Khem Raj (7): layer.conf: Add ttf-ipa to SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS on fontconfig mpich: link explictly with libgcc packagegroup-meta-networking: Add bmon libnss-nisplus: Remove pipewire: Upgrade to 0.3.34 bluealsa: Add recipe apitrace: Enable on glibc >= 2.34 Leon Anavi (21): python3-astroid: Upgrade 2.6.6 -> 2.7.0 python3-ujson: Upgrade 4.0.2 -> 4.1.0 python3-pycurl: Upgrade 7.44.0 -> 7.44.1 python3-websocket-client: Upgrade 1.1.0 -> 1.2.1 python3-bitarray: Upgrade 2.2.5 -> 2.3.0 python3-langtable: Upgrade 0.0.54 -> 0.0.56 python3-pandas: Upgrade 1.3.1 -> 1.3.2 python3-tzlocal: Upgrade 2.1 -> 3.0 python3-zeroconf: Upgrade 0.34.3 -> 0.36.0 python3-dbus-next: Upgrade 0.2.2 -> 0.2.3 python3-astroid: Upgrade 2.7.0 -> 2.7.1 python3-ruamel-yaml: Upgrade 0.17.10 -> 0.17.11 python3-unidiff: Upgrade 0.6.0 -> 0.7.0 python3-qrcode: Upgrade 7.2 -> 7.3 python3-simplejson: Upgrade 3.17.3 -> 3.17.4 python3-regex: Upgrade 2021.7.6 -> 2021.8.3 python3-colorlog: Upgrade 5.0.1 -> 6.4.1 python3-ruamel-yaml: Upgrade 0.17.11 -> 0.17.13 python3-simplejson: Upgrade 3.17.4 -> 3.17.5 python3-bitarray: Upgrade 2.3.0 -> 2.3.2 python3-watchdog: Upgrade 2.1.3 -> 2.1.5 Martin Jansa (1): layer.conf: Add ttf-takao to SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS on fontconfig Matija Tudan (1): gpsd: upgrade 3.20 -> 3.23 Matteo Croce (1): libbpf: bump to 0.4.0 Michael Opdenacker (2): meta-multimedia: stop using "virtual/" in RPROVIDES and RDEPENDS meta-oe: stop using "virtual/" in RPROVIDES and RDEPENDS Mingli Yu (4): polkit: fix CVE-2021-3560 vsftpd: Upgrade to 3.0.5 mariadb: Upgrade to 10.6.4 jemalloc: improve reproducibility Nathan Rossi (1): nginx: Fix off_t size passed in configure Oleksandr Kravchuk (6): font-adobe-100dpi: fix UPSTREAM_CHECK_REGEX font-adobe-utopia-100dpi: fix UPSTREAM_CHECK_REGEX font-bh-100dpi: fix UPSTREAM_CHECK_REGEX font-bh-lucidatypewriter-100dpi: fix UPSTREAM_CHECK_REGEX font-bitstream-100dpi: fix UPSTREAM_CHECK_REGEX xf86-input-tslib: update to 1.1.1 Patrick Areny (2): libConfuse: Add recipe bmon: Add recipe Peter Kjellerstedt (6): gpsd: Let scons install the udev and systemd files gpsd: Move /usr/share/gpsd/doc to the gpsd-doc package poppler: Explicitly enable/disable boost together with splash chrony: Use new override syntax for USERADD_PARAM gpsd: Correct the installation of gpsd.hotplug if systemd is not enabled gpsd: Do not install gpsd.hotplug unconditionally Peter Morrow (1): libbpf: remove stale comment Sakib Sajal (2): lmdb: use libprefix in Makefile to install libraries gd: fix CVE-2021-38115 Sinan Kaya (4): c-ares: remove custom patches grpc: make SHARED library build optional libkcapi: add a hash only packageconfig libkcapi: allow an option to build natively Tim Orling (2): bootchart: drop; unfetchable python3-django_2.2.x: only check upstream 2.2.x Trevor Gamblin (5): python3-click: Add missing ptest artifacts python3-eventlet: add 0.30.2 to meta-python python3-gunicorn: tweak run-ptest, add RDEPENDS python3-license-expression: add ptest artifacts nftables: upgrade 0.9.9 -> 1.0.0 Vesa Jääskeläinen (2): python3-cached-property: Add recipe for version 1.5.2 python3-pkcs11: Add recipe for version 0.7.0 Yi Zhao (2): audit: upgrade 3.0.4 -> 3.0.5 krb5: filtering out -f*-prefix-map from krb5-config Zoltán Böszörményi (1): metacity: Add a patch to create build/src/core before moving generated sources to it leimaohui (3): packagegroup-meta-oe: Update ttf-ipa package name. uim: Dleted takao fonts from DEPENDS. takao-fonts: It should be in ttf-fonts directory as the other ttf fonts. wangmy (14): fetchmail: upgrade 6.4.20 -> 6.4.21 c-ares: upgrade 1.17.1 -> 1.17.2 icewm: upgrade 2.6.0 -> 2.7.0 netplan: upgrade 0.102 -> 0.103 ctags: upgrade 5.9.20210801.0 -> 5.9.20210815.0 live555: upgrade 20210720 -> 20210809 opensc: upgrade 0.21.0 -> 0.22.0 xfsprogs: upgrade 5.12.0 -> 5.13.0 networkmanager: upgrade 1.32.8 -> 1.32.10 can-utils: upgrade 2021.06.0 -> 2021.08.0 doxygen: upgrade 1.9.1 -> 1.9.2 gensio: upgrade 2.2.8 -> 2.2.9 live555: upgrade 20210809 -> 20210824 sedutil: upgrade 1.15.1.01 -> 1.20.0 zangrc (14): python3-flask-migrate: upgrade 3.0.1 -> 3.1.0 python3-flask-socketio: upgrade 5.1.0 -> 5.1.1 python3-google-api-python-client: upgrade 2.15.0 -> 2.17.0 python3-grpcio-tools: upgrade 1.38.1 -> 1.39.0 python3-grpcio: upgrade 1.38.1 -> 1.39.0 python3-wheel: upgrade 0.36.2 -> 0.37.0 libio-socket-ssl-perl: upgrade 2.071 -> 2.072 python3-aiohttp-jinja2: upgrade 1.4.2 -> 1.5 python3-gevent: upgrade 21.1.2 -> 21.8.0 python3-google-api-python-client: upgrade 2.17.0 -> 2.18.0 python3-h5py: upgrade 3.3.0 -> 3.4.0 python3-haversine: upgrade 2.3.1 -> 2.4.0 python3-pyephem: upgrade 3.7.7.1 -> 4.0.0.2 rdma-core: upgrade 35.0 -> 36.0 zhengruoqin (12): libqmi: upgrade 1.28.8 -> 1.30.0 sedutil: upgrade 1.15.1 -> 1.15.1.01 libencode-perl: upgrade 3.11 -> 3.12 python3-pymisp: upgrade 2.4.144 -> 2.4.148 python3-pyzmq: upgrade 22.1.0 -> 22.2.1 python3-tqdm: upgrade 4.62.0 -> 4.62.2 iwd: upgrade 1.16 -> 1.17 xmlsec1: upgrade 1.2.31 -> 1.2.32 xrdb: upgrade 1.2.0 -> 1.2.1 python3-regex: upgrade 2021.8.3 -> 2021.8.27 python3-sqlalchemy: upgrade 1.4.22 -> 1.4.23 python3-stevedore: upgrade 3.3.0 -> 3.4.0 Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I2960f1ce53a1e2cde8b03b929829db9a2f105541
Diffstat (limited to 'poky/meta/classes')
-rw-r--r--poky/meta/classes/base.bbclass4
-rw-r--r--poky/meta/classes/buildhistory.bbclass9
-rw-r--r--poky/meta/classes/cargo.bbclass89
-rw-r--r--poky/meta/classes/cargo_common.bbclass125
-rw-r--r--poky/meta/classes/crate-fetch.bbclass13
-rw-r--r--poky/meta/classes/features_check.bbclass4
-rw-r--r--poky/meta/classes/goarch.bbclass14
-rw-r--r--poky/meta/classes/image_types.bbclass6
-rw-r--r--poky/meta/classes/insane.bbclass6
-rw-r--r--poky/meta/classes/kernel-fitimage.bbclass2
-rw-r--r--poky/meta/classes/kernel-module-split.bbclass28
-rw-r--r--poky/meta/classes/kernel.bbclass25
-rw-r--r--poky/meta/classes/license_image.bbclass2
-rw-r--r--poky/meta/classes/meson.bbclass3
-rw-r--r--poky/meta/classes/package.bbclass9
-rw-r--r--poky/meta/classes/package_rpm.bbclass8
-rw-r--r--poky/meta/classes/ptest.bbclass10
-rw-r--r--poky/meta/classes/rust-bin.bbclass149
-rw-r--r--poky/meta/classes/rust-common.bbclass180
-rw-r--r--poky/meta/classes/rust.bbclass45
-rw-r--r--poky/meta/classes/sstate.bbclass5
-rw-r--r--poky/meta/classes/toaster.bbclass2
-rw-r--r--poky/meta/classes/uboot-config.bbclass18
-rw-r--r--poky/meta/classes/uninative.bbclass2
-rw-r--r--poky/meta/classes/update-alternatives.bbclass6
-rw-r--r--poky/meta/classes/utils.bbclass2
26 files changed, 707 insertions, 59 deletions
diff --git a/poky/meta/classes/base.bbclass b/poky/meta/classes/base.bbclass
index 11b65171d..340ebe7d7 100644
--- a/poky/meta/classes/base.bbclass
+++ b/poky/meta/classes/base.bbclass
@@ -631,6 +631,10 @@ python () {
if path.endswith('.lz4'):
d.appendVarFlag('do_unpack', 'depends', ' lz4-native:do_populate_sysroot')
+ # *.zst should DEPEND on zstd-native for unpacking
+ elif path.endswith('.zst'):
+ d.appendVarFlag('do_unpack', 'depends', ' zstd-native:do_populate_sysroot')
+
# *.lz should DEPEND on lzip-native for unpacking
elif path.endswith('.lz'):
d.appendVarFlag('do_unpack', 'depends', ' lzip-native:do_populate_sysroot')
diff --git a/poky/meta/classes/buildhistory.bbclass b/poky/meta/classes/buildhistory.bbclass
index 5099e70fb..a61330627 100644
--- a/poky/meta/classes/buildhistory.bbclass
+++ b/poky/meta/classes/buildhistory.bbclass
@@ -446,7 +446,7 @@ def buildhistory_list_installed(d, rootfs_type="image"):
output_file_full = os.path.join(d.getVar('WORKDIR'), output_file)
with open(output_file_full, 'w') as output:
- output.write(format_pkg_list(pkgs, output_type))
+ output.write(format_pkg_list(pkgs, output_type, d.getVar('PKGDATA_DIR')))
python buildhistory_list_installed_image() {
buildhistory_list_installed(d)
@@ -487,6 +487,8 @@ buildhistory_get_installed() {
-e 's:|: -> :' \
-e 's:"\[REC\]":[style=dotted]:' \
-e 's:"\([<>=]\+\)" "\([^"]*\)":[label="\1 \2"]:' \
+ -e 's:"\([*]\+\)" "\([^"]*\)":[label="\2"]:' \
+ -e 's:"\[RPROVIDES\]":[style=dashed]:' \
$1/depends.tmp
# Add header, sorted and de-duped contents and footer and then delete the temp file
printf "digraph depends {\n node [shape=plaintext]\n" > $1/depends.dot
@@ -499,6 +501,11 @@ buildhistory_get_installed() {
cat $1/installed-package-sizes.tmp | awk '{print $2 "\tKiB\t" $1}' | sort -n -r > $1/installed-package-sizes.txt
rm $1/installed-package-sizes.tmp
+ # Produce package info: runtime_name, buildtime_name, recipe, version, size
+ oe-pkgdata-util -p ${PKGDATA_DIR} read-value "PACKAGE,PN,PV,PKGSIZE" -n -f $pkgcache > $1/installed-package-info.tmp
+ cat $1/installed-package-info.tmp | sort -n -r -k 5 > $1/installed-package-info.txt
+ rm $1/installed-package-info.tmp
+
# We're now done with the cache, delete it
rm $pkgcache
diff --git a/poky/meta/classes/cargo.bbclass b/poky/meta/classes/cargo.bbclass
new file mode 100644
index 000000000..0ca38143c
--- /dev/null
+++ b/poky/meta/classes/cargo.bbclass
@@ -0,0 +1,89 @@
+##
+## Purpose:
+## This class is used by any recipes that are built using
+## Cargo.
+
+inherit cargo_common
+
+# the binary we will use
+CARGO = "cargo"
+
+# We need cargo to compile for the target
+BASEDEPENDS:append = " cargo-native"
+
+# Ensure we get the right rust variant
+DEPENDS:append:class-target = " virtual/${TARGET_PREFIX}rust ${RUSTLIB_DEP}"
+DEPENDS:append:class-native = " rust-native"
+
+# Enable build separation
+B = "${WORKDIR}/build"
+
+# In case something fails in the build process, give a bit more feedback on
+# where the issue occured
+export RUST_BACKTRACE = "1"
+
+# The directory of the Cargo.toml relative to the root directory, per default
+# assume there's a Cargo.toml directly in the root directory
+CARGO_SRC_DIR ??= ""
+
+# The actual path to the Cargo.toml
+MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml"
+
+RUSTFLAGS ??= ""
+BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}"
+CARGO_BUILD_FLAGS = "-v --target ${HOST_SYS} ${BUILD_MODE} --manifest-path=${MANIFEST_PATH}"
+
+# This is based on the content of CARGO_BUILD_FLAGS and generally will need to
+# change if CARGO_BUILD_FLAGS changes.
+BUILD_DIR = "${@['release', 'debug'][d.getVar('DEBUG_BUILD') == '1']}"
+CARGO_TARGET_SUBDIR="${HOST_SYS}/${BUILD_DIR}"
+oe_cargo_build () {
+ export RUSTFLAGS="${RUSTFLAGS}"
+ export RUST_TARGET_PATH="${RUST_TARGET_PATH}"
+ bbnote "cargo = $(which ${CARGO})"
+ bbnote "rustc = $(which ${RUSTC})"
+ bbnote "${CARGO} build ${CARGO_BUILD_FLAGS} $@"
+ "${CARGO}" build ${CARGO_BUILD_FLAGS} "$@"
+}
+
+do_compile[progress] = "outof:\s+(\d+)/(\d+)"
+cargo_do_compile () {
+ oe_cargo_fix_env
+ oe_cargo_build
+}
+
+cargo_do_install () {
+ local have_installed=false
+ for tgt in "${B}/target/${CARGO_TARGET_SUBDIR}/"*; do
+ case $tgt in
+ *.so|*.rlib)
+ install -d "${D}${rustlibdir}"
+ install -m755 "$tgt" "${D}${rustlibdir}"
+ have_installed=true
+ ;;
+ *examples)
+ if [ -d "$tgt" ]; then
+ for example in "$tgt/"*; do
+ if [ -f "$example" ] && [ -x "$example" ]; then
+ install -d "${D}${bindir}"
+ install -m755 "$example" "${D}${bindir}"
+ have_installed=true
+ fi
+ done
+ fi
+ ;;
+ *)
+ if [ -f "$tgt" ] && [ -x "$tgt" ]; then
+ install -d "${D}${bindir}"
+ install -m755 "$tgt" "${D}${bindir}"
+ have_installed=true
+ fi
+ ;;
+ esac
+ done
+ if ! $have_installed; then
+ die "Did not find anything to install"
+ fi
+}
+
+EXPORT_FUNCTIONS do_compile do_install
diff --git a/poky/meta/classes/cargo_common.bbclass b/poky/meta/classes/cargo_common.bbclass
new file mode 100644
index 000000000..23d82aa6a
--- /dev/null
+++ b/poky/meta/classes/cargo_common.bbclass
@@ -0,0 +1,125 @@
+##
+## Purpose:
+## This class is to support building with cargo. It
+## must be different than cargo.bbclass because Rust
+## now builds with Cargo but cannot use cargo.bbclass
+## due to dependencies and assumptions in cargo.bbclass
+## that Rust & Cargo are already installed. So this
+## is used by cargo.bbclass and Rust
+##
+
+# add crate fetch support
+inherit crate-fetch
+inherit rust-common
+
+# Where we download our registry and dependencies to
+export CARGO_HOME = "${WORKDIR}/cargo_home"
+
+# The pkg-config-rs library used by cargo build scripts disables itself when
+# cross compiling unless this is defined. We set up pkg-config appropriately
+# for cross compilation, so tell it we know better than it.
+export PKG_CONFIG_ALLOW_CROSS = "1"
+
+# Don't instruct cargo to use crates downloaded by bitbake. Some rust packages,
+# for example the rust compiler itself, come with their own vendored sources.
+# Specifying two [source.crates-io] will not work.
+CARGO_DISABLE_BITBAKE_VENDORING ?= "0"
+
+# Used by libstd-rs to point to the vendor dir included in rustc src
+CARGO_VENDORING_DIRECTORY ?= "${CARGO_HOME}/bitbake"
+
+CARGO_RUST_TARGET_CCLD ?= "${RUST_TARGET_CCLD}"
+cargo_common_do_configure () {
+ mkdir -p ${CARGO_HOME}/bitbake
+
+ cat <<- EOF > ${CARGO_HOME}/config
+ # EXTRA_OECARGO_PATHS
+ paths = [
+ $(for p in ${EXTRA_OECARGO_PATHS}; do echo \"$p\",; done)
+ ]
+ EOF
+
+ cat <<- EOF >> ${CARGO_HOME}/config
+
+ # Local mirror vendored by bitbake
+ [source.bitbake]
+ directory = "${CARGO_VENDORING_DIRECTORY}"
+ EOF
+
+ if [ -z "${EXTERNALSRC}" ] && [ ${CARGO_DISABLE_BITBAKE_VENDORING} = "0" ]; then
+ cat <<- EOF >> ${CARGO_HOME}/config
+
+ [source.crates-io]
+ replace-with = "bitbake"
+ local-registry = "/nonexistant"
+ EOF
+ fi
+
+ cat <<- EOF >> ${CARGO_HOME}/config
+
+ [http]
+ # Multiplexing can't be enabled because http2 can't be enabled
+ # in curl-native without dependency loops
+ multiplexing = false
+
+ # Ignore the hard coded and incorrect path to certificates
+ cainfo = "${STAGING_ETCDIR_NATIVE}/ssl/certs/ca-certificates.crt"
+
+ EOF
+
+ cat <<- EOF >> ${CARGO_HOME}/config
+
+ # HOST_SYS
+ [target.${HOST_SYS}]
+ linker = "${CARGO_RUST_TARGET_CCLD}"
+ EOF
+
+ if [ "${HOST_SYS}" != "${BUILD_SYS}" ]; then
+ cat <<- EOF >> ${CARGO_HOME}/config
+
+ # BUILD_SYS
+ [target.${BUILD_SYS}]
+ linker = "${RUST_BUILD_CCLD}"
+ EOF
+ fi
+
+ # Put build output in build directory preferred by bitbake instead of
+ # inside source directory unless they are the same
+ if [ "${B}" != "${S}" ]; then
+ cat <<- EOF >> ${CARGO_HOME}/config
+
+ [build]
+ # Use out of tree build destination to avoid poluting the source tree
+ target-dir = "${B}/target"
+ EOF
+ fi
+
+ cat <<- EOF >> ${CARGO_HOME}/config
+
+ [term]
+ progress.when = 'always'
+ progress.width = 80
+ EOF
+}
+
+oe_cargo_fix_env () {
+ export CC="${RUST_TARGET_CC}"
+ export CXX="${RUST_TARGET_CXX}"
+ export CFLAGS="${CFLAGS}"
+ export CXXFLAGS="${CXXFLAGS}"
+ export AR="${AR}"
+ export TARGET_CC="${RUST_TARGET_CC}"
+ export TARGET_CXX="${RUST_TARGET_CXX}"
+ export TARGET_CFLAGS="${CFLAGS}"
+ export TARGET_CXXFLAGS="${CXXFLAGS}"
+ export TARGET_AR="${AR}"
+ export HOST_CC="${RUST_BUILD_CC}"
+ export HOST_CXX="${RUST_BUILD_CXX}"
+ export HOST_CFLAGS="${BUILD_CFLAGS}"
+ export HOST_CXXFLAGS="${BUILD_CXXFLAGS}"
+ export HOST_AR="${BUILD_AR}"
+}
+
+EXTRA_OECARGO_PATHS ??= ""
+
+EXPORT_FUNCTIONS do_configure
diff --git a/poky/meta/classes/crate-fetch.bbclass b/poky/meta/classes/crate-fetch.bbclass
new file mode 100644
index 000000000..c0ed434a9
--- /dev/null
+++ b/poky/meta/classes/crate-fetch.bbclass
@@ -0,0 +1,13 @@
+#
+# crate-fetch class
+#
+# Registers 'crate' method for Bitbake fetch2.
+#
+# Adds support for following format in recipe SRC_URI:
+# crate://<packagename>/<version>
+#
+
+python () {
+ import crate
+ bb.fetch2.methods.append( crate.Crate() )
+}
diff --git a/poky/meta/classes/features_check.bbclass b/poky/meta/classes/features_check.bbclass
index b3c804786..205e1b9cd 100644
--- a/poky/meta/classes/features_check.bbclass
+++ b/poky/meta/classes/features_check.bbclass
@@ -1,6 +1,6 @@
# Allow checking of required and conflicting features
#
-# xxx = [DISTRO,MACHINE,COMBINED]
+# xxx = [DISTRO,MACHINE,COMBINED,IMAGE]
#
# ANY_OF_xxx_FEATURES: ensure at least one item on this list is included
# in xxx_FEATURES.
@@ -18,7 +18,7 @@ python () {
unused = True
- for kind in ['DISTRO', 'MACHINE', 'COMBINED']:
+ for kind in ['DISTRO', 'MACHINE', 'COMBINED', 'IMAGE']:
if d.getVar('ANY_OF_' + kind + '_FEATURES') is None and \
d.overridedata.get('ANY_OF_' + kind + '_FEATURES') is None and \
d.getVar('REQUIRED_' + kind + '_FEATURES') is None and \
diff --git a/poky/meta/classes/goarch.bbclass b/poky/meta/classes/goarch.bbclass
index 48dc48dab..92fec16b8 100644
--- a/poky/meta/classes/goarch.bbclass
+++ b/poky/meta/classes/goarch.bbclass
@@ -32,13 +32,13 @@ BASE_GOARM:armv5 = '5'
# Go supports dynamic linking on a limited set of architectures.
# See the supportsDynlink function in go/src/cmd/compile/internal/gc/main.go
GO_DYNLINK = ""
-GO_DYNLINK:arm = "1"
-GO_DYNLINK:aarch64 = "1"
-GO_DYNLINK:x86 = "1"
-GO_DYNLINK:x86-64 = "1"
-GO_DYNLINK:powerpc64 = "1"
-GO_DYNLINK:powerpc64le = "1"
-GO_DYNLINK:class-native = ""
+GO_DYNLINK:arm ?= "1"
+GO_DYNLINK:aarch64 ?= "1"
+GO_DYNLINK:x86 ?= "1"
+GO_DYNLINK:x86-64 ?= "1"
+GO_DYNLINK:powerpc64 ?= "1"
+GO_DYNLINK:powerpc64le ?= "1"
+GO_DYNLINK:class-native ?= ""
GO_DYNLINK:class-nativesdk = ""
# define here because everybody inherits this class
diff --git a/poky/meta/classes/image_types.bbclass b/poky/meta/classes/image_types.bbclass
index e0eb06c1e..32d4cd4c7 100644
--- a/poky/meta/classes/image_types.bbclass
+++ b/poky/meta/classes/image_types.bbclass
@@ -107,6 +107,7 @@ IMAGE_CMD:squashfs = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${
IMAGE_CMD:squashfs-xz = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-xz ${EXTRA_IMAGECMD} -noappend -comp xz"
IMAGE_CMD:squashfs-lzo = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-lzo ${EXTRA_IMAGECMD} -noappend -comp lzo"
IMAGE_CMD:squashfs-lz4 = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-lz4 ${EXTRA_IMAGECMD} -noappend -comp lz4"
+IMAGE_CMD:squashfs-zst = "mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-zst ${EXTRA_IMAGECMD} -noappend -comp zstd"
IMAGE_CMD:erofs = "mkfs.erofs ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.erofs ${IMAGE_ROOTFS}"
IMAGE_CMD:erofs-lz4 = "mkfs.erofs -zlz4 ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.erofs-lz4 ${IMAGE_ROOTFS}"
@@ -244,6 +245,7 @@ do_image_squashfs[depends] += "squashfs-tools-native:do_populate_sysroot"
do_image_squashfs_xz[depends] += "squashfs-tools-native:do_populate_sysroot"
do_image_squashfs_lzo[depends] += "squashfs-tools-native:do_populate_sysroot"
do_image_squashfs_lz4[depends] += "squashfs-tools-native:do_populate_sysroot"
+do_image_squashfs_zst[depends] += "squashfs-tools-native:do_populate_sysroot"
do_image_ubi[depends] += "mtd-utils-native:do_populate_sysroot"
do_image_ubifs[depends] += "mtd-utils-native:do_populate_sysroot"
do_image_multiubi[depends] += "mtd-utils-native:do_populate_sysroot"
@@ -262,10 +264,10 @@ IMAGE_TYPES = " \
btrfs \
iso \
hddimg \
- squashfs squashfs-xz squashfs-lzo squashfs-lz4 \
+ squashfs squashfs-xz squashfs-lzo squashfs-lz4 squashfs-zst \
ubi ubifs multiubi \
tar tar.gz tar.bz2 tar.xz tar.lz4 tar.zst \
- cpio cpio.gz cpio.xz cpio.lzma cpio.lz4 \
+ cpio cpio.gz cpio.xz cpio.lzma cpio.lz4 cpio.zst \
wic wic.gz wic.bz2 wic.lzma wic.zst \
container \
f2fs \
diff --git a/poky/meta/classes/insane.bbclass b/poky/meta/classes/insane.bbclass
index 810459d43..20d4e4d74 100644
--- a/poky/meta/classes/insane.bbclass
+++ b/poky/meta/classes/insane.bbclass
@@ -27,7 +27,7 @@ WARN_QA ?= " libdir xorg-driver-abi \
infodir build-deps src-uri-bad symlink-to-sysroot multilib \
invalid-packageconfig host-user-contaminated uppercase-pn patch-fuzz \
mime mime-xdg unlisted-pkg-lics unhandled-features-check \
- missing-update-alternatives native-last \
+ missing-update-alternatives native-last missing-ptest \
"
ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
@@ -808,11 +808,11 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
# For Saving the FILERPROVIDES, RPROVIDES and FILES_INFO
rdep_data = oe.packagedata.read_subpkgdata(rdep, d)
for key in rdep_data:
- if key.startswith("FILERPROVIDES_") or key.startswith("RPROVIDES:"):
+ if key.startswith("FILERPROVIDES:") or key.startswith("RPROVIDES:"):
for subkey in bb.utils.explode_deps(rdep_data[key]):
filerdepends.pop(subkey,None)
# Add the files list to the rprovides
- if key == "FILES_INFO":
+ if key.startswith("FILES_INFO:"):
# Use eval() to make it as a dict
for subkey in eval(rdep_data[key]):
filerdepends.pop(subkey,None)
diff --git a/poky/meta/classes/kernel-fitimage.bbclass b/poky/meta/classes/kernel-fitimage.bbclass
index 2ef8f06b1..38e05153e 100644
--- a/poky/meta/classes/kernel-fitimage.bbclass
+++ b/poky/meta/classes/kernel-fitimage.bbclass
@@ -576,7 +576,7 @@ fitimage_assemble() {
#
if [ "x${ramdiskcount}" = "x1" ] && [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then
# Find and use the first initramfs image archive type we find
- for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz ext2.gz cpio; do
+ for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.zst cpio.gz ext2.gz cpio; do
initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.${img}"
echo "Using $initramfs_path"
if [ -e "${initramfs_path}" ]; then
diff --git a/poky/meta/classes/kernel-module-split.bbclass b/poky/meta/classes/kernel-module-split.bbclass
index b56dd4a9c..a29c29481 100644
--- a/poky/meta/classes/kernel-module-split.bbclass
+++ b/poky/meta/classes/kernel-module-split.bbclass
@@ -28,6 +28,7 @@ do_install:append() {
install -d ${D}${sysconfdir}/modules-load.d/ ${D}${sysconfdir}/modprobe.d/
}
+KERNEL_SPLIT_MODULES ?= "1"
PACKAGESPLITFUNCS:prepend = "split_kernel_module_packages "
KERNEL_MODULES_META_PACKAGE ?= "${@ d.getVar("KERNEL_PACKAGE_NAME") or "kernel" }-modules"
@@ -44,17 +45,20 @@ python split_kernel_module_packages () {
def extract_modinfo(file):
import tempfile, subprocess
tempfile.tempdir = d.getVar("WORKDIR")
- compressed = re.match( r'.*\.([xg])z$', file)
+ compressed = re.match( r'.*\.(gz|xz|zst)$', file)
tf = tempfile.mkstemp()
tmpfile = tf[1]
if compressed:
tmpkofile = tmpfile + ".ko"
- if compressed.group(1) == 'g':
+ if compressed.group(1) == 'gz':
cmd = "gunzip -dc %s > %s" % (file, tmpkofile)
subprocess.check_call(cmd, shell=True)
- elif compressed.group(1) == 'x':
+ elif compressed.group(1) == 'xz':
cmd = "xz -dc %s > %s" % (file, tmpkofile)
subprocess.check_call(cmd, shell=True)
+ elif compressed.group(1) == 'zst':
+ cmd = "zstd -dc %s > %s" % (file, tmpkofile)
+ subprocess.check_call(cmd, shell=True)
else:
msg = "Cannot decompress '%s'" % file
raise msg
@@ -153,18 +157,26 @@ python split_kernel_module_packages () {
kernel_package_name = d.getVar("KERNEL_PACKAGE_NAME") or "kernel"
kernel_version = d.getVar("KERNEL_VERSION")
- module_regex = r'^(.*)\.k?o(?:\.[xg]z)?$'
+ metapkg = d.getVar('KERNEL_MODULES_META_PACKAGE')
+ splitmods = d.getVar('KERNEL_SPLIT_MODULES')
+ postinst = d.getVar('pkg_postinst:modules')
+ postrm = d.getVar('pkg_postrm:modules')
+
+ if splitmods != '1':
+ etcdir = d.getVar('sysconfdir')
+ d.appendVar('FILES:' + metapkg, '%s/modules-load.d/ %s/modprobe.d/ %s/modules/' % (etcdir, etcdir, d.getVar("nonarch_base_libdir")))
+ d.appendVar('pkg_postinst:%s' % metapkg, postinst)
+ d.prependVar('pkg_postrm:%s' % metapkg, postrm);
+ return
+
+ module_regex = r'^(.*)\.k?o(?:\.(gz|xz|zst))?$'
module_pattern_prefix = d.getVar('KERNEL_MODULE_PACKAGE_PREFIX')
module_pattern_suffix = d.getVar('KERNEL_MODULE_PACKAGE_SUFFIX')
module_pattern = module_pattern_prefix + kernel_package_name + '-module-%s' + module_pattern_suffix
- postinst = d.getVar('pkg_postinst:modules')
- postrm = d.getVar('pkg_postrm:modules')
-
modules = do_split_packages(d, root='${nonarch_base_libdir}/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='%s-%s' % (kernel_package_name, kernel_version))
if modules:
- metapkg = d.getVar('KERNEL_MODULES_META_PACKAGE')
d.appendVar('RDEPENDS:' + metapkg, ' '+' '.join(modules))
# If modules-load.d and modprobe.d are empty at this point, remove them to
diff --git a/poky/meta/classes/kernel.bbclass b/poky/meta/classes/kernel.bbclass
index 027e66eec..d13c38fb0 100644
--- a/poky/meta/classes/kernel.bbclass
+++ b/poky/meta/classes/kernel.bbclass
@@ -9,6 +9,7 @@ PROVIDES += "${@ "virtual/kernel" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel
DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native bison-native"
DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.lzo", "lzop-native", "", d)}"
DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.lz4", "lz4-native", "", d)}"
+DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.zst", "zstd-native", "", d)}"
PACKAGE_WRITE_DEPS += "depmodwrapper-cross"
do_deploy[depends] += "depmodwrapper-cross:do_populate_sysroot gzip-native:do_populate_sysroot"
@@ -97,7 +98,14 @@ python __anonymous () {
typelower = type.lower()
d.appendVar('PACKAGES', ' %s-image-%s' % (kname, typelower))
d.setVar('FILES:' + kname + '-image-' + typelower, '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME}' + ' /' + imagedest + '/' + type)
- d.appendVar('RDEPENDS:%s-image' % kname, ' %s-image-%s' % (kname, typelower))
+ d.appendVar('RDEPENDS:%s-image' % kname, ' %s-image-%s (= ${EXTENDPKGV})' % (kname, typelower))
+ splitmods = d.getVar("KERNEL_SPLIT_MODULES")
+ if splitmods != '1':
+ d.appendVar('RDEPENDS:%s-image' % kname, ' %s-modules (= ${EXTENDPKGV})' % kname)
+ d.appendVar('RDEPENDS:%s-image-%s' % (kname, typelower), ' %s-modules-${KERNEL_VERSION_PKG_NAME} (= ${EXTENDPKGV})' % kname)
+ d.setVar('PKG:%s-modules' % kname, '%s-modules-${KERNEL_VERSION_PKG_NAME}' % kname)
+ d.appendVar('RPROVIDES:%s-modules' % kname, '%s-modules-${KERNEL_VERSION_PKG_NAME}' % kname)
+
d.setVar('PKG:%s-image-%s' % (kname,typelower), '%s-image-%s-${KERNEL_VERSION_PKG_NAME}' % (kname, typelower))
d.setVar('ALLOW_EMPTY:%s-image-%s' % (kname, typelower), '1')
d.setVar('pkg_postinst:%s-image-%s' % (kname,typelower), """set +e
@@ -229,7 +237,7 @@ copy_initramfs() {
mkdir -p ${B}/usr
# Find and use the first initramfs image archive type we find
rm -f ${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio
- for img in cpio cpio.gz cpio.lz4 cpio.lzo cpio.lzma cpio.xz; do
+ for img in cpio cpio.gz cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.zst; do
if [ -e "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.$img" ]; then
cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.$img ${B}/usr/.
case $img in
@@ -258,12 +266,17 @@ copy_initramfs() {
xz -df ${B}/usr/${INITRAMFS_IMAGE_NAME}.$img
break
;;
+ *zst)
+ echo "zst decompressing image"
+ zstd -df ${B}/usr/${INITRAMFS_IMAGE_NAME}.$img
+ break
+ ;;
esac
break
fi
done
# Verify that the above loop found a initramfs, fail otherwise
- [ -f ${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio ] && echo "Finished copy of initramfs into ./usr" || die "Could not find any ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.cpio{.gz|.lz4|.lzo|.lzma|.xz) for bundling; INITRAMFS_IMAGE_NAME might be wrong."
+ [ -f ${B}/usr/${INITRAMFS_IMAGE_NAME}.cpio ] && echo "Finished copy of initramfs into ./usr" || die "Could not find any ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.cpio{.gz|.lz4|.lzo|.lzma|.xz|.zst) for bundling; INITRAMFS_IMAGE_NAME might be wrong."
}
do_bundle_initramfs () {
@@ -621,12 +634,12 @@ FILES:${KERNEL_PACKAGE_NAME}-image = ""
FILES:${KERNEL_PACKAGE_NAME}-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH} ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
FILES:${KERNEL_PACKAGE_NAME}-vmlinux = "/boot/vmlinux-${KERNEL_VERSION_NAME}"
FILES:${KERNEL_PACKAGE_NAME}-modules = ""
-RDEPENDS:${KERNEL_PACKAGE_NAME} = "${KERNEL_PACKAGE_NAME}-base"
+RDEPENDS:${KERNEL_PACKAGE_NAME} = "${KERNEL_PACKAGE_NAME}-base (= ${EXTENDPKGV})"
# Allow machines to override this dependency if kernel image files are
# not wanted in images as standard
-RDEPENDS:${KERNEL_PACKAGE_NAME}-base ?= "${KERNEL_PACKAGE_NAME}-image"
+RDEPENDS:${KERNEL_PACKAGE_NAME}-base ?= "${KERNEL_PACKAGE_NAME}-image (= ${EXTENDPKGV})"
PKG:${KERNEL_PACKAGE_NAME}-image = "${KERNEL_PACKAGE_NAME}-image-${@legitimize_package_name(d.getVar('KERNEL_VERSION'))}"
-RDEPENDS:${KERNEL_PACKAGE_NAME}-image += "${@oe.utils.conditional('KERNEL_IMAGETYPE', 'vmlinux', '${KERNEL_PACKAGE_NAME}-vmlinux', '', d)}"
+RDEPENDS:${KERNEL_PACKAGE_NAME}-image += "${@oe.utils.conditional('KERNEL_IMAGETYPE', 'vmlinux', '${KERNEL_PACKAGE_NAME}-vmlinux (= ${EXTENDPKGV})', '', d)}"
PKG:${KERNEL_PACKAGE_NAME}-base = "${KERNEL_PACKAGE_NAME}-${@legitimize_package_name(d.getVar('KERNEL_VERSION'))}"
RPROVIDES:${KERNEL_PACKAGE_NAME}-base += "${KERNEL_PACKAGE_NAME}-${KERNEL_VERSION}"
ALLOW_EMPTY:${KERNEL_PACKAGE_NAME} = "1"
diff --git a/poky/meta/classes/license_image.bbclass b/poky/meta/classes/license_image.bbclass
index 5cec7a07f..5490d121f 100644
--- a/poky/meta/classes/license_image.bbclass
+++ b/poky/meta/classes/license_image.bbclass
@@ -87,7 +87,7 @@ def write_license_files(d, license_manifest, pkg_dic, rootfs=True):
# If the package doesn't contain any file, that is, its size is 0, the license
# isn't relevant as far as the final image is concerned. So doing license check
# doesn't make much sense, skip it.
- if pkg_dic[pkg]["PKGSIZE_%s" % pkg] == "0":
+ if pkg_dic[pkg]["PKGSIZE:%s" % pkg] == "0":
continue
else:
# Image manifest
diff --git a/poky/meta/classes/meson.bbclass b/poky/meta/classes/meson.bbclass
index 2beed89d1..e124d1814 100644
--- a/poky/meta/classes/meson.bbclass
+++ b/poky/meta/classes/meson.bbclass
@@ -12,7 +12,8 @@ MESON_SOURCEPATH = "${S}"
def noprefix(var, d):
return d.getVar(var).replace(d.getVar('prefix') + '/', '', 1)
-MESON_BUILDTYPE ?= "plain"
+MESON_BUILDTYPE ?= "${@oe.utils.vartrue('DEBUG_BUILD', 'debug', 'plain', d)}"
+MESON_BUILDTYPE[vardeps] += "DEBUG_BUILD"
MESONOPTS = " --prefix ${prefix} \
--buildtype ${MESON_BUILDTYPE} \
--bindir ${@noprefix('bindir', d)} \
diff --git a/poky/meta/classes/package.bbclass b/poky/meta/classes/package.bbclass
index a9138ff6b..c4c5515d5 100644
--- a/poky/meta/classes/package.bbclass
+++ b/poky/meta/classes/package.bbclass
@@ -714,9 +714,7 @@ python package_get_auto_pr() {
return
try:
- conn = d.getVar("__PRSERV_CONN")
- if conn is None:
- conn = oe.prservice.prserv_make_conn(d)
+ conn = oe.prservice.prserv_make_conn(d)
if conn is not None:
if "AUTOINC" in pkgv:
srcpv = bb.fetch2.get_srcrev(d)
@@ -725,6 +723,7 @@ python package_get_auto_pr() {
d.setVar("PRSERV_PV_AUTOINC", str(value))
auto_pr = conn.getPR(version, pkgarch, checksum)
+ conn.close()
except Exception as e:
bb.fatal("Can NOT get PRAUTO, exception %s" % str(e))
if auto_pr is None:
@@ -1652,7 +1651,7 @@ fi
if fstat.st_ino not in seen:
seen.add(fstat.st_ino)
total_size += fstat.st_size
- d.setVar('FILES_INFO', json.dumps(files, sort_keys=True))
+ d.setVar('FILES_INFO:' + pkg , json.dumps(files, sort_keys=True))
process_postinst_on_target(pkg, d.getVar("MLPREFIX"))
add_set_e_to_scriptlets(pkg)
@@ -1670,7 +1669,7 @@ fi
for dfile in (d.getVar('FILERDEPENDSFLIST:' + pkg) or "").split():
write_if_exists(sf, pkg, 'FILERDEPENDS:' + dfile)
- sf.write('%s_%s: %d\n' % ('PKGSIZE', pkg, total_size))
+ sf.write('%s:%s: %d\n' % ('PKGSIZE', pkg, total_size))
# Symlinks needed for rprovides lookup
rprov = d.getVar('RPROVIDES:%s' % pkg) or d.getVar('RPROVIDES')
diff --git a/poky/meta/classes/package_rpm.bbclass b/poky/meta/classes/package_rpm.bbclass
index aebeaf693..88d861c0e 100644
--- a/poky/meta/classes/package_rpm.bbclass
+++ b/poky/meta/classes/package_rpm.bbclass
@@ -40,10 +40,10 @@ def write_rpm_perfiledata(srcname, d):
outfile.write("# Dependency table\n")
outfile.write('deps = {\n')
for pkg in packages.split():
- dependsflist_key = 'FILE' + varname + 'FLIST' + "_" + pkg
+ dependsflist_key = 'FILE' + varname + 'FLIST' + ":" + pkg
dependsflist = (d.getVar(dependsflist_key) or "")
for dfile in dependsflist.split():
- key = "FILE" + varname + "_" + dfile + "_" + pkg
+ key = "FILE" + varname + ":" + dfile + ":" + pkg
deps = filter_nativesdk_deps(srcname, d.getVar(key) or "")
depends_dict = bb.utils.explode_dep_versions(deps)
file = dfile.replace("@underscore@", "_")
@@ -249,10 +249,10 @@ python write_specfile () {
def get_perfile(varname, pkg, d):
deps = []
- dependsflist_key = 'FILE' + varname + 'FLIST' + "_" + pkg
+ dependsflist_key = 'FILE' + varname + 'FLIST' + ":" + pkg
dependsflist = (d.getVar(dependsflist_key) or "")
for dfile in dependsflist.split():
- key = "FILE" + varname + "_" + dfile + "_" + pkg
+ key = "FILE" + varname + ":" + dfile + ":" + pkg
depends = d.getVar(key)
if depends:
deps.append(depends)
diff --git a/poky/meta/classes/ptest.bbclass b/poky/meta/classes/ptest.bbclass
index 200446e52..77614ae86 100644
--- a/poky/meta/classes/ptest.bbclass
+++ b/poky/meta/classes/ptest.bbclass
@@ -118,13 +118,15 @@ python () {
if not(d.getVar('PTEST_ENABLED') == "1"):
for i in ['do_configure_ptest_base', 'do_compile_ptest_base', 'do_install_ptest_base']:
bb.build.deltask(i, d)
+}
+QARECIPETEST[missing-ptest] = "package_qa_check_missing_ptest"
+def package_qa_check_missing_ptest(pn, d, messages):
# This checks that ptest package is actually included
# in standard oe-core ptest images - only for oe-core recipes
if not 'meta/recipes' in d.getVar('FILE') or not(d.getVar('PTEST_ENABLED') == "1"):
return
- enabled_ptests = " ".join([d.getVar('PTESTS_FAST'),d.getVar('PTESTS_SLOW'), d.getVar('PTESTS_PROBLEMS')]).split()
- if (d.getVar('PN') + "-ptest").replace(d.getVar('MLPREFIX'), '') not in enabled_ptests:
- bb.error("Recipe %s supports ptests but is not included in oe-core's conf/distro/include/ptest-packagelists.inc" % d.getVar("PN"))
-}
+ enabled_ptests = " ".join([d.getVar('PTESTS_FAST'), d.getVar('PTESTS_SLOW'), d.getVar('PTESTS_PROBLEMS')]).split()
+ if (pn + "-ptest").replace(d.getVar('MLPREFIX'), '') not in enabled_ptests:
+ package_qa_handle_error("missing-ptest", "supports ptests but is not included in oe-core's ptest-packagelists.inc", d)
diff --git a/poky/meta/classes/rust-bin.bbclass b/poky/meta/classes/rust-bin.bbclass
new file mode 100644
index 000000000..c87343b3c
--- /dev/null
+++ b/poky/meta/classes/rust-bin.bbclass
@@ -0,0 +1,149 @@
+inherit rust
+
+RDEPENDS:${PN}:append:class-target = " ${RUSTLIB_DEP}"
+
+RUSTC_ARCHFLAGS += "-C opt-level=3 -g -L ${STAGING_DIR_HOST}/${rustlibdir} -C linker=${RUST_TARGET_CCLD}"
+EXTRA_OEMAKE += 'RUSTC_ARCHFLAGS="${RUSTC_ARCHFLAGS}"'
+
+# Some libraries alias with the standard library but libstd is configured to
+# make it difficult or imposisble to use its version. Unfortunately libstd
+# must be explicitly overridden using extern.
+OVERLAP_LIBS = "\
+ libc \
+ log \
+ getopts \
+ rand \
+"
+def get_overlap_deps(d):
+ deps = d.getVar("DEPENDS").split()
+ overlap_deps = []
+ for o in d.getVar("OVERLAP_LIBS").split():
+ l = len([o for dep in deps if (o + '-rs' in dep)])
+ if l > 0:
+ overlap_deps.append(o)
+ return " ".join(overlap_deps)
+OVERLAP_DEPS = "${@get_overlap_deps(d)}"
+
+# Prevents multiple static copies of standard library modules
+# See https://github.com/rust-lang/rust/issues/19680
+RUSTC_PREFER_DYNAMIC = "-C prefer-dynamic"
+RUSTC_FLAGS += "${RUSTC_PREFER_DYNAMIC}"
+
+CRATE_NAME ?= "${@d.getVar('BPN').replace('-rs', '').replace('-', '_')}"
+BINNAME ?= "${BPN}"
+LIBNAME ?= "lib${CRATE_NAME}-rs"
+CRATE_TYPE ?= "dylib"
+BIN_SRC ?= "${S}/src/main.rs"
+LIB_SRC ?= "${S}/src/lib.rs"
+
+rustbindest ?= "${bindir}"
+rustlibdest ?= "${rustlibdir}"
+RUST_RPATH_ABS ?= "${rustlibdir}:${rustlib}"
+
+def relative_rpaths(paths, base):
+ relpaths = set()
+ for p in paths.split(':'):
+ if p == base:
+ relpaths.add('$ORIGIN')
+ continue
+ relpaths.add(os.path.join('$ORIGIN', os.path.relpath(p, base)))
+ return '-rpath=' + ':'.join(relpaths) if len(relpaths) else ''
+
+RUST_LIB_RPATH_FLAGS ?= "${@relative_rpaths(d.getVar('RUST_RPATH_ABS', True), d.getVar('rustlibdest', True))}"
+RUST_BIN_RPATH_FLAGS ?= "${@relative_rpaths(d.getVar('RUST_RPATH_ABS', True), d.getVar('rustbindest', True))}"
+
+def libfilename(d):
+ if d.getVar('CRATE_TYPE', True) == 'dylib':
+ return d.getVar('LIBNAME', True) + '.so'
+ else:
+ return d.getVar('LIBNAME', True) + '.rlib'
+
+def link_args(d, bin):
+ linkargs = []
+ if bin:
+ rpaths = d.getVar('RUST_BIN_RPATH_FLAGS', False)
+ else:
+ rpaths = d.getVar('RUST_LIB_RPATH_FLAGS', False)
+ if d.getVar('CRATE_TYPE', True) == 'dylib':
+ linkargs.append('-soname')
+ linkargs.append(libfilename(d))
+ if len(rpaths):
+ linkargs.append(rpaths)
+ if len(linkargs):
+ return ' '.join(['-Wl,' + arg for arg in linkargs])
+ else:
+ return ''
+
+get_overlap_externs () {
+ externs=
+ for dep in ${OVERLAP_DEPS}; do
+ extern=$(ls ${STAGING_DIR_HOST}/${rustlibdir}/lib$dep-rs.{so,rlib} 2>/dev/null \
+ | awk '{print $1}');
+ if [ -n "$extern" ]; then
+ externs="$externs --extern $dep=$extern"
+ else
+ echo "$dep in depends but no such library found in ${rustlibdir}!" >&2
+ exit 1
+ fi
+ done
+ echo "$externs"
+}
+
+do_configure () {
+}
+
+oe_runrustc () {
+ export RUST_TARGET_PATH="${RUST_TARGET_PATH}"
+ bbnote ${RUSTC} ${RUSTC_ARCHFLAGS} ${RUSTC_FLAGS} "$@"
+ "${RUSTC}" ${RUSTC_ARCHFLAGS} ${RUSTC_FLAGS} "$@"
+}
+
+oe_compile_rust_lib () {
+ rm -rf ${LIBNAME}.{rlib,so}
+ local -a link_args
+ if [ -n '${@link_args(d, False)}' ]; then
+ link_args[0]='-C'
+ link_args[1]='link-args=${@link_args(d, False)}'
+ fi
+ oe_runrustc $(get_overlap_externs) \
+ "${link_args[@]}" \
+ ${LIB_SRC} \
+ -o ${@libfilename(d)} \
+ --crate-name=${CRATE_NAME} --crate-type=${CRATE_TYPE} \
+ "$@"
+}
+oe_compile_rust_lib[vardeps] += "get_overlap_externs"
+
+oe_compile_rust_bin () {
+ rm -rf ${BINNAME}
+ local -a link_args
+ if [ -n '${@link_args(d, True)}' ]; then
+ link_args[0]='-C'
+ link_args[1]='link-args=${@link_args(d, True)}'
+ fi
+ oe_runrustc $(get_overlap_externs) \
+ "${link_args[@]}" \
+ ${BIN_SRC} -o ${BINNAME} "$@"
+}
+oe_compile_rust_bin[vardeps] += "get_overlap_externs"
+
+oe_install_rust_lib () {
+ for lib in $(ls ${LIBNAME}.{so,rlib} 2>/dev/null); do
+ echo Installing $lib
+ install -D -m 755 $lib ${D}/${rustlibdest}/$lib
+ done
+}
+
+oe_install_rust_bin () {
+ echo Installing ${BINNAME}
+ install -D -m 755 ${BINNAME} ${D}/${rustbindest}/${BINNAME}
+}
+
+do_rust_bin_fixups() {
+ for f in `find ${PKGD} -name '*.so*'`; do
+ echo "Strip rust note: $f"
+ ${OBJCOPY} -R .note.rustc $f $f
+ done
+}
+PACKAGE_PREPROCESS_FUNCS += "do_rust_bin_fixups"
+
diff --git a/poky/meta/classes/rust-common.bbclass b/poky/meta/classes/rust-common.bbclass
new file mode 100644
index 000000000..a8803d61b
--- /dev/null
+++ b/poky/meta/classes/rust-common.bbclass
@@ -0,0 +1,180 @@
+# Common variables used by all Rust builds
+export rustlibdir = "${libdir}/rust"
+FILES:${PN} += "${rustlibdir}/*.so"
+FILES:${PN}-dev += "${rustlibdir}/*.rlib ${rustlibdir}/*.rmeta"
+FILES:${PN}-dbg += "${rustlibdir}/.debug"
+
+RUSTLIB = "-L ${STAGING_LIBDIR}/rust"
+RUST_DEBUG_REMAP = "--remap-path-prefix=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
+RUSTFLAGS += "${RUSTLIB} ${RUST_DEBUG_REMAP}"
+RUSTLIB_DEP ?= "libstd-rs"
+export RUST_TARGET_PATH = "${STAGING_LIBDIR_NATIVE}/rustlib"
+RUST_PANIC_STRATEGY ?= "unwind"
+
+# Native builds are not effected by TCLIBC. Without this, rust-native
+# thinks it's "target" (i.e. x86_64-linux) is a musl target.
+RUST_LIBC = "${TCLIBC}"
+RUST_LIBC:class-native = "glibc"
+
+def determine_libc(d, thing):
+ '''Determine which libc something should target'''
+
+ # BUILD is never musl, TARGET may be musl or glibc,
+ # HOST could be musl, but only if a compiler is built to be run on
+ # target in which case HOST_SYS != BUILD_SYS.
+ if thing == 'TARGET':
+ libc = d.getVar('RUST_LIBC')
+ elif thing == 'BUILD' and (d.getVar('HOST_SYS') != d.getVar('BUILD_SYS')):
+ libc = d.getVar('RUST_LIBC')
+ else:
+ libc = d.getVar('RUST_LIBC:class-native')
+
+ return libc
+
+def target_is_armv7(d):
+ '''Determine if target is armv7'''
+ # TUNE_FEATURES may include arm* even if the target is not arm
+ # in the case of *-native packages
+ if d.getVar('TARGET_ARCH') != 'arm':
+ return False
+
+ feat = d.getVar('TUNE_FEATURES')
+ feat = frozenset(feat.split())
+ mach_overrides = d.getVar('MACHINEOVERRIDES')
+ mach_overrides = frozenset(mach_overrides.split(':'))
+
+ v7=frozenset(['armv7a', 'armv7r', 'armv7m', 'armv7ve'])
+ if mach_overrides.isdisjoint(v7) and feat.isdisjoint(v7):
+ return False
+ else:
+ return True
+target_is_armv7[vardepvalue] = "${@target_is_armv7(d)}"
+
+# Responsible for taking Yocto triples and converting it to Rust triples
+def rust_base_triple(d, thing):
+ '''
+ Mangle bitbake's *_SYS into something that rust might support (see
+ rust/mk/cfg/* for a list)
+
+ Note that os is assumed to be some linux form
+ '''
+
+ # The llvm-target for armv7 is armv7-unknown-linux-gnueabihf
+ if thing == "TARGET" and target_is_armv7(d):
+ arch = "armv7"
+ else:
+ arch = d.getVar('{}_ARCH'.format(thing))
+
+ # All the Yocto targets are Linux and are 'unknown'
+ vendor = "-unknown"
+ os = d.getVar('{}_OS'.format(thing))
+ libc = determine_libc(d, thing)
+
+ # Prefix with a dash and convert glibc -> gnu
+ if libc == "glibc":
+ libc = "-gnu"
+ elif libc == "musl":
+ libc = "-musl"
+
+ # Don't double up musl (only appears to be the case on aarch64)
+ if os == "linux-musl":
+ if libc != "-musl":
+ bb.fatal("{}_OS was '{}' but TCLIBC was not 'musl'".format(thing, os))
+ os = "linux"
+
+ # This catches ARM targets and appends the necessary hard float bits
+ if os == "linux-gnueabi" or os == "linux-musleabi":
+ libc = bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hf', '', d)
+ return arch + vendor + '-' + os + libc
+
+# Naming explanation
+# Yocto
+# - BUILD_SYS - Yocto triple of the build environment
+# - HOST_SYS - What we're building for in Yocto
+# - TARGET_SYS - What we're building for in Yocto
+#
+# So when building '-native' packages BUILD_SYS == HOST_SYS == TARGET_SYS
+# When building packages for the image HOST_SYS == TARGET_SYS
+# This is a gross over simplification as there are other modes but
+# currently this is all that's supported.
+#
+# Rust
+# - TARGET - the system where the binary will run
+# - HOST - the system where the binary is being built
+#
+# Rust additionally will use two additional cases:
+# - undecorated (e.g. CC) - equivalent to TARGET
+# - triple suffix (e.g. CC:x86_64_unknown_linux_gnu) - both
+# see: https://github.com/alexcrichton/gcc-rs
+# The way that Rust's internal triples and Yocto triples are mapped together
+# its likely best to not use the triple suffix due to potential confusion.
+
+RUST_BUILD_SYS = "${@rust_base_triple(d, 'BUILD')}"
+RUST_HOST_SYS = "${@rust_base_triple(d, 'HOST')}"
+RUST_TARGET_SYS = "${@rust_base_triple(d, 'TARGET')}"
+
+# wrappers to get around the fact that Rust needs a single
+# binary but Yocto's compiler and linker commands have
+# arguments. Technically the archiver is always one command but
+# this is necessary for builds that determine the prefix and then
+# use those commands based on the prefix.
+WRAPPER_DIR = "${WORKDIR}/wrapper"
+RUST_BUILD_CC = "${WRAPPER_DIR}/build-rust-cc"
+RUST_BUILD_CXX = "${WRAPPER_DIR}/build-rust-cxx"
+RUST_BUILD_CCLD = "${WRAPPER_DIR}/build-rust-ccld"
+RUST_BUILD_AR = "${WRAPPER_DIR}/build-rust-ar"
+RUST_TARGET_CC = "${WRAPPER_DIR}/target-rust-cc"
+RUST_TARGET_CXX = "${WRAPPER_DIR}/target-rust-cxx"
+RUST_TARGET_CCLD = "${WRAPPER_DIR}/target-rust-ccld"
+RUST_TARGET_AR = "${WRAPPER_DIR}/target-rust-ar"
+
+create_wrapper () {
+ file="$1"
+ shift
+
+ cat <<- EOF > "${file}"
+ #!/bin/sh
+ exec $@ "\$@"
+ EOF
+ chmod +x "${file}"
+}
+
+export WRAPPER_TARGET_CC = "${CC}"
+export WRAPPER_TARGET_CXX = "${CXX}"
+export WRAPPER_TARGET_CCLD = "${CCLD}"
+export WRAPPER_TARGET_LDFLAGS = "${LDFLAGS}"
+export WRAPPER_TARGET_AR = "${AR}"
+
+# compiler is used by gcc-rs
+# linker is used by rustc/cargo
+# archiver is used by the build of libstd-rs
+do_rust_create_wrappers () {
+ mkdir -p "${WRAPPER_DIR}"
+
+ # Yocto Build / Rust Host C compiler
+ create_wrapper "${RUST_BUILD_CC}" "${BUILD_CC}"
+ # Yocto Build / Rust Host C++ compiler
+ create_wrapper "${RUST_BUILD_CXX}" "${BUILD_CXX}"
+ # Yocto Build / Rust Host linker
+ create_wrapper "${RUST_BUILD_CCLD}" "${BUILD_CCLD}" "${BUILD_LDFLAGS}"
+ # Yocto Build / Rust Host archiver
+ create_wrapper "${RUST_BUILD_AR}" "${BUILD_AR}"
+
+ # Yocto Target / Rust Target C compiler
+ create_wrapper "${RUST_TARGET_CC}" "${WRAPPER_TARGET_CC}" "${WRAPPER_TARGET_LDFLAGS}"
+ # Yocto Target / Rust Target C++ compiler
+ create_wrapper "${RUST_TARGET_CXX}" "${WRAPPER_TARGET_CXX}"
+ # Yocto Target / Rust Target linker
+ create_wrapper "${RUST_TARGET_CCLD}" "${WRAPPER_TARGET_CCLD}" "${WRAPPER_TARGET_LDFLAGS}"
+ # Yocto Target / Rust Target archiver
+ create_wrapper "${RUST_TARGET_AR}" "${WRAPPER_TARGET_AR}"
+
+ # Need to filter out LD_LIBRARY_PATH from the linker without using shell
+ mv ${RUST_BUILD_CCLD} ${RUST_BUILD_CCLD}.real
+ ${BUILD_CC} ${COREBASE}/meta/files/rust-ccld-wrapper.c -o ${RUST_BUILD_CCLD}
+ mv ${RUST_TARGET_CCLD} ${RUST_TARGET_CCLD}.real
+ ${BUILD_CC} ${COREBASE}/meta/files/rust-ccld-wrapper.c -o ${RUST_TARGET_CCLD}
+}
+
+addtask rust_create_wrappers before do_configure after do_patch
+do_rust_create_wrappers[dirs] += "${WRAPPER_DIR}"
diff --git a/poky/meta/classes/rust.bbclass b/poky/meta/classes/rust.bbclass
new file mode 100644
index 000000000..5c8938d09
--- /dev/null
+++ b/poky/meta/classes/rust.bbclass
@@ -0,0 +1,45 @@
+inherit rust-common
+
+RUSTC = "rustc"
+
+RUSTC_ARCHFLAGS += "--target=${HOST_SYS} ${RUSTFLAGS}"
+
+def rust_base_dep(d):
+ # Taken from meta/classes/base.bbclass `base_dep_prepend` and modified to
+ # use rust instead of gcc
+ deps = ""
+ if not d.getVar('INHIBIT_DEFAULT_RUST_DEPS'):
+ if (d.getVar('HOST_SYS') != d.getVar('BUILD_SYS')):
+ deps += " virtual/${TARGET_PREFIX}rust ${RUSTLIB_DEP}"
+ else:
+ deps += " rust-native"
+ return deps
+
+DEPENDS:append = " ${@rust_base_dep(d)}"
+
+# BUILD_LDFLAGS
+# ${STAGING_LIBDIR_NATIVE}
+# ${STAGING_BASE_LIBDIR_NATIVE}
+# BUILDSDK_LDFLAGS
+# ${STAGING_LIBDIR}
+# #{STAGING_DIR_HOST}
+# TARGET_LDFLAGS ?????
+#RUSTC_BUILD_LDFLAGS = "\
+# --sysroot ${STAGING_DIR_NATIVE} \
+# -L${STAGING_LIBDIR_NATIVE} \
+# -L${STAGING_BASE_LIBDIR_NATIVE} \
+#"
+
+# XXX: for some reason bitbake sets BUILD_* & TARGET_* but uses the bare
+# variables for HOST. Alias things to make it easier for us.
+HOST_LDFLAGS ?= "${LDFLAGS}"
+HOST_CFLAGS ?= "${CFLAGS}"
+HOST_CXXFLAGS ?= "${CXXFLAGS}"
+HOST_CPPFLAGS ?= "${CPPFLAGS}"
+
+rustlib_suffix="${TUNE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/rustlib/${HOST_SYS}/lib"
+# Native sysroot standard library path
+rustlib_src="${prefix}/lib/${rustlib_suffix}"
+# Host sysroot standard library path
+rustlib="${libdir}/${rustlib_suffix}"
+rustlib:class-native="${libdir}/rustlib/${BUILD_SYS}/lib"
diff --git a/poky/meta/classes/sstate.bbclass b/poky/meta/classes/sstate.bbclass
index 2175ace4c..d7f1b3f26 100644
--- a/poky/meta/classes/sstate.bbclass
+++ b/poky/meta/classes/sstate.bbclass
@@ -971,13 +971,12 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True,
tasklist.append((tid, sstatefile))
if tasklist:
+ nproc = min(int(d.getVar("BB_NUMBER_THREADS")), len(tasklist))
+
if len(tasklist) >= min_tasks:
msg = "Checking sstate mirror object availability"
bb.event.fire(bb.event.ProcessStarted(msg, len(tasklist)), d)
- import multiprocessing
- nproc = min(multiprocessing.cpu_count(), len(tasklist))
-
bb.event.enable_threadlock()
pool = oe.utils.ThreadedPool(nproc, len(tasklist),
worker_init=checkstatus_init, worker_end=checkstatus_end)
diff --git a/poky/meta/classes/toaster.bbclass b/poky/meta/classes/toaster.bbclass
index 9518ddf7a..dd5c7f224 100644
--- a/poky/meta/classes/toaster.bbclass
+++ b/poky/meta/classes/toaster.bbclass
@@ -106,7 +106,7 @@ def _toaster_load_pkgdatafile(dirpath, filepath):
pkgdata['OPKGN'] = m.group(1)
kn = "_".join([x for x in kn.split("_") if x.isupper()])
pkgdata[kn] = kv.strip()
- if kn == 'FILES_INFO':
+ if kn.startswith('FILES_INFO'):
pkgdata[kn] = json.loads(kv)
except ValueError:
diff --git a/poky/meta/classes/uboot-config.bbclass b/poky/meta/classes/uboot-config.bbclass
index 451db0c65..07a303d0a 100644
--- a/poky/meta/classes/uboot-config.bbclass
+++ b/poky/meta/classes/uboot-config.bbclass
@@ -11,13 +11,18 @@
#
# Copyright 2013, 2014 (C) O.S. Systems Software LTDA.
+def removesuffix(s, suffix):
+ if suffix and s.endswith(suffix):
+ return s[:-len(suffix)]
+ return s
+
# Some versions of u-boot use .bin and others use .img. By default use .bin
# but enable individual recipes to change this value.
UBOOT_SUFFIX ??= "bin"
UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}"
UBOOT_BINARYNAME ?= "${@os.path.splitext(d.getVar("UBOOT_BINARY"))[0]}"
-UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
-UBOOT_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_SUFFIX}"
+UBOOT_IMAGE ?= "${UBOOT_BINARYNAME}-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
+UBOOT_SYMLINK ?= "${UBOOT_BINARYNAME}-${MACHINE}.${UBOOT_SUFFIX}"
UBOOT_MAKE_TARGET ?= "all"
# Output the ELF generated. Some platforms can use the ELF file and directly
@@ -33,10 +38,13 @@ UBOOT_ELF_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_ELF_SUFFIX}"
# should be packaged along with the u-boot binary as well as placed in the
# deploy directory. For those versions they can set the following variables
# to allow packaging the SPL.
+SPL_SUFFIX ?= ""
SPL_BINARY ?= ""
-SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
-SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
-SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
+SPL_DELIMITER ?= "${@'.' if d.getVar("SPL_SUFFIX") else ''}"
+SPL_BINARYFILE ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
+SPL_BINARYNAME ?= "${@removesuffix(d.getVar("SPL_BINARYFILE"), "." + d.getVar("SPL_SUFFIX"))}"
+SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX}"
+SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}${SPL_DELIMITER}${SPL_SUFFIX}"
# Additional environment variables or a script can be installed alongside
# u-boot to be used automatically on boot. This file, typically 'uEnv.txt'
diff --git a/poky/meta/classes/uninative.bbclass b/poky/meta/classes/uninative.bbclass
index 1e19917a9..3c7ccd66f 100644
--- a/poky/meta/classes/uninative.bbclass
+++ b/poky/meta/classes/uninative.bbclass
@@ -100,7 +100,7 @@ ${UNINATIVE_STAGING_DIR}-uninative/relocate_sdk.py \
${UNINATIVE_LOADER} \
${UNINATIVE_LOADER} \
${UNINATIVE_STAGING_DIR}-uninative/${BUILD_ARCH}-linux/${bindir_native}/patchelf-uninative \
- ${UNINATIVE_STAGING_DIR}-uninative/${BUILD_ARCH}-linux${base_libdir_native}/libc*.so" % chksum)
+ ${UNINATIVE_STAGING_DIR}-uninative/${BUILD_ARCH}-linux${base_libdir_native}/libc*.so*" % chksum)
subprocess.check_output(cmd, shell=True)
with open(loaderchksum, "w") as f:
diff --git a/poky/meta/classes/update-alternatives.bbclass b/poky/meta/classes/update-alternatives.bbclass
index 81ca05de0..fc1ffd828 100644
--- a/poky/meta/classes/update-alternatives.bbclass
+++ b/poky/meta/classes/update-alternatives.bbclass
@@ -321,7 +321,7 @@ def apply_update_alternative_provides(d):
# Add file provide
trans_target = oe.package.file_translate(alt_target)
- d.appendVar('FILERPROVIDES_%s_%s' % (trans_target, pkg), " " + alt_link)
- if not trans_target in (d.getVar('FILERPROVIDESFLIST_%s' % pkg) or ""):
- d.appendVar('FILERPROVIDESFLIST_%s' % pkg, " " + trans_target)
+ d.appendVar('FILERPROVIDES:%s:%s' % (trans_target, pkg), " " + alt_link)
+ if not trans_target in (d.getVar('FILERPROVIDESFLIST:%s' % pkg) or ""):
+ d.appendVar('FILERPROVIDESFLIST:%s' % pkg, " " + trans_target)
diff --git a/poky/meta/classes/utils.bbclass b/poky/meta/classes/utils.bbclass
index 120bcc64a..072ea1f63 100644
--- a/poky/meta/classes/utils.bbclass
+++ b/poky/meta/classes/utils.bbclass
@@ -214,7 +214,7 @@ create_cmdline_wrapper () {
#!/bin/bash
realpath=\`readlink -fn \$0\`
realdir=\`dirname \$realpath\`
-exec -a \`dirname \$realpath\`/$cmdname \`dirname \$realpath\`/$cmdname.real $cmdoptions "\$@"
+exec -a \$realdir/$cmdname \$realdir/$cmdname.real $cmdoptions "\$@"
END
chmod +x $cmd
}