diff options
Diffstat (limited to 'poky/meta/classes-recipe')
19 files changed, 148 insertions, 74 deletions
diff --git a/poky/meta/classes-recipe/bin_package.bbclass b/poky/meta/classes-recipe/bin_package.bbclass index 3a1befc29c..9dd2489725 100644 --- a/poky/meta/classes-recipe/bin_package.bbclass +++ b/poky/meta/classes-recipe/bin_package.bbclass @@ -20,6 +20,9 @@ # they would be in ${WORKDIR}. # +# Nothing is being built so there is no need for the cross-compiler. +INHIBIT_DEFAULT_DEPS = "1" + # Skip the unwanted steps do_configure[noexec] = "1" do_compile[noexec] = "1" diff --git a/poky/meta/classes-recipe/cargo_c.bbclass b/poky/meta/classes-recipe/cargo_c.bbclass new file mode 100644 index 0000000000..ef431634a2 --- /dev/null +++ b/poky/meta/classes-recipe/cargo_c.bbclass @@ -0,0 +1,41 @@ +# +# Copyright OpenEmbedded Contributors +# +# SPDX-License-Identifier: MIT +# + +## +## Purpose: +## This class is used by any recipes that want to compile a C ABI compatible +## library with header and pkg config file + +inherit cargo pkgconfig + +# the binaries we will use +CARGO_C_BUILD = "cargo-cbuild" +CARGO_C_INSTALL = "cargo-cinstall" + +# We need cargo-c to compile for the target +BASEDEPENDS:append = " cargo-c-native" + +do_compile[progress] = "outof:\s+(\d+)/(\d+)" +cargo_c_do_compile() { + oe_cargo_fix_env + export RUSTFLAGS="${RUSTFLAGS}" + bbnote "Using rust targets from ${RUST_TARGET_PATH}" + bbnote "cargo-cbuild = $(which ${CARGO_C_BUILD})" + bbnote "${CARGO_C_BUILD} cbuild ${CARGO_BUILD_FLAGS}" + "${CARGO_C_BUILD}" cbuild ${CARGO_BUILD_FLAGS} +} + +cargo_c_do_install() { + oe_cargo_fix_env + export RUSTFLAGS="${RUSTFLAGS}" + bbnote "cargo-cinstall = $(which ${CARGO_C_INSTALL})" + "${CARGO_C_INSTALL}" cinstall ${CARGO_BUILD_FLAGS} \ + --destdir ${D} \ + --prefix ${prefix} \ + --library-type cdylib +} + +EXPORT_FUNCTIONS do_compile do_install diff --git a/poky/meta/classes-recipe/cmake.bbclass b/poky/meta/classes-recipe/cmake.bbclass index 0dda104a69..41748b0820 100644 --- a/poky/meta/classes-recipe/cmake.bbclass +++ b/poky/meta/classes-recipe/cmake.bbclass @@ -51,10 +51,10 @@ OECMAKE_CXX_COMPILER ?= "${@oecmake_map_compiler('CXX', d)[0]}" OECMAKE_CXX_COMPILER_LAUNCHER ?= "${@oecmake_map_compiler('CXX', d)[1]}" # clear compiler vars for allarch to avoid sig hash difference -OECMAKE_C_COMPILER_allarch = "" -OECMAKE_C_COMPILER_LAUNCHER_allarch = "" -OECMAKE_CXX_COMPILER_allarch = "" -OECMAKE_CXX_COMPILER_LAUNCHER_allarch = "" +OECMAKE_C_COMPILER:allarch = "" +OECMAKE_C_COMPILER_LAUNCHER:allarch = "" +OECMAKE_CXX_COMPILER:allarch = "" +OECMAKE_CXX_COMPILER_LAUNCHER:allarch = "" OECMAKE_RPATH ?= "" OECMAKE_PERLNATIVE_DIR ??= "" @@ -90,12 +90,14 @@ def map_host_arch_to_uname_arch(host_arch): return "ppc64" return host_arch + cmake_do_generate_toolchain_file() { if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then cmake_crosscompiling="set( CMAKE_CROSSCOMPILING FALSE )" - else - cmake_sysroot="set( CMAKE_SYSROOT \"${RECIPE_SYSROOT}\" )" + else + cmake_sysroot="set( CMAKE_SYSROOT \"${RECIPE_SYSROOT}\" )" fi + cat > ${WORKDIR}/toolchain.cmake <<EOF # CMake system name must be something like "Linux". # This is important for cross-compiling. @@ -158,6 +160,29 @@ CONFIGURE_FILES = "CMakeLists.txt" do_configure[cleandirs] = "${@d.getVar('B') if d.getVar('S') != d.getVar('B') else ''}" +OECMAKE_ARGS = "\ + -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \ + -DCMAKE_INSTALL_BINDIR:PATH=${@os.path.relpath(d.getVar('bindir'), d.getVar('prefix') + '/')} \ + -DCMAKE_INSTALL_SBINDIR:PATH=${@os.path.relpath(d.getVar('sbindir'), d.getVar('prefix') + '/')} \ + -DCMAKE_INSTALL_LIBEXECDIR:PATH=${@os.path.relpath(d.getVar('libexecdir'), d.getVar('prefix') + '/')} \ + -DCMAKE_INSTALL_SYSCONFDIR:PATH=${sysconfdir} \ + -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=${@os.path.relpath(d.getVar('sharedstatedir'), d. getVar('prefix') + '/')} \ + -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=${localstatedir} \ + -DCMAKE_INSTALL_LIBDIR:PATH=${@os.path.relpath(d.getVar('libdir'), d.getVar('prefix') + '/')} \ + -DCMAKE_INSTALL_INCLUDEDIR:PATH=${@os.path.relpath(d.getVar('includedir'), d.getVar('prefix') + '/')} \ + -DCMAKE_INSTALL_DATAROOTDIR:PATH=${@os.path.relpath(d.getVar('datadir'), d.getVar('prefix') + '/')} \ + -DPYTHON_EXECUTABLE:PATH=${PYTHON} \ + -DPython_EXECUTABLE:PATH=${PYTHON} \ + -DPython3_EXECUTABLE:PATH=${PYTHON} \ + -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \ + -DCMAKE_INSTALL_SO_NO_EXE=0 \ + -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${WORKDIR}/toolchain.cmake \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=1 \ + -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON \ + -DFETCHCONTENT_FULLY_DISCONNECTED=ON \ + -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON \ +" + cmake_do_configure() { if [ "${OECMAKE_BUILDPATH}" ]; then bbnote "cmake.bbclass no longer uses OECMAKE_BUILDPATH. The default behaviour is now out-of-tree builds with B=WORKDIR/build." @@ -178,25 +203,7 @@ cmake_do_configure() { ${OECMAKE_GENERATOR_ARGS} \ $oecmake_sitefile \ ${OECMAKE_SOURCEPATH} \ - -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \ - -DCMAKE_INSTALL_BINDIR:PATH=${@os.path.relpath(d.getVar('bindir'), d.getVar('prefix') + '/')} \ - -DCMAKE_INSTALL_SBINDIR:PATH=${@os.path.relpath(d.getVar('sbindir'), d.getVar('prefix') + '/')} \ - -DCMAKE_INSTALL_LIBEXECDIR:PATH=${@os.path.relpath(d.getVar('libexecdir'), d.getVar('prefix') + '/')} \ - -DCMAKE_INSTALL_SYSCONFDIR:PATH=${sysconfdir} \ - -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=${@os.path.relpath(d.getVar('sharedstatedir'), d. getVar('prefix') + '/')} \ - -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=${localstatedir} \ - -DCMAKE_INSTALL_LIBDIR:PATH=${@os.path.relpath(d.getVar('libdir'), d.getVar('prefix') + '/')} \ - -DCMAKE_INSTALL_INCLUDEDIR:PATH=${@os.path.relpath(d.getVar('includedir'), d.getVar('prefix') + '/')} \ - -DCMAKE_INSTALL_DATAROOTDIR:PATH=${@os.path.relpath(d.getVar('datadir'), d.getVar('prefix') + '/')} \ - -DPYTHON_EXECUTABLE:PATH=${PYTHON} \ - -DPython_EXECUTABLE:PATH=${PYTHON} \ - -DPython3_EXECUTABLE:PATH=${PYTHON} \ - -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \ - -DCMAKE_INSTALL_SO_NO_EXE=0 \ - -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \ - -DCMAKE_NO_SYSTEM_FROM_IMPORTED=1 \ - -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON \ - -DFETCHCONTENT_FULLY_DISCONNECTED=ON \ + ${OECMAKE_ARGS} \ ${EXTRA_OECMAKE} \ -Wno-dev } diff --git a/poky/meta/classes-recipe/cml1.bbclass b/poky/meta/classes-recipe/cml1.bbclass index d83c636e48..c4e3c9ff7a 100644 --- a/poky/meta/classes-recipe/cml1.bbclass +++ b/poky/meta/classes-recipe/cml1.bbclass @@ -58,7 +58,7 @@ python do_menuconfig() { # ensure that environment variables are overwritten with this tasks 'd' values d.appendVar("OE_TERMINAL_EXPORTS", " PKG_CONFIG_DIR PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PKG_CONFIG_SYSROOT_DIR") - oe_terminal("sh -c \"make %s; if [ \\$? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"" % d.getVar('KCONFIG_CONFIG_COMMAND'), + oe_terminal("sh -c 'make %s; if [ \\$? -ne 0 ]; then echo \"Command failed.\"; printf \"Press any key to continue... \"; read r; fi'" % d.getVar('KCONFIG_CONFIG_COMMAND'), d.getVar('PN') + ' Configuration', d) # FIXME this check can be removed when the minimum bitbake version has been bumped diff --git a/poky/meta/classes-recipe/devupstream.bbclass b/poky/meta/classes-recipe/devupstream.bbclass index 1529cc8fca..d941763fb7 100644 --- a/poky/meta/classes-recipe/devupstream.bbclass +++ b/poky/meta/classes-recipe/devupstream.bbclass @@ -46,7 +46,7 @@ python devupstream_virtclass_handler () { pv = d.getVar("PV") proto_marker = "+" + uri.scheme if proto_marker not in pv and not d.getVar("PV:class-devupstream"): - d.setVar("PV", pv + proto_marker + "${SRCPV}") + d.setVar("PV", pv + proto_marker) if variant == "native": pn = d.getVar("PN") diff --git a/poky/meta/classes-recipe/gi-docgen.bbclass b/poky/meta/classes-recipe/gi-docgen.bbclass index b4d7b17761..b178d1c387 100644 --- a/poky/meta/classes-recipe/gi-docgen.bbclass +++ b/poky/meta/classes-recipe/gi-docgen.bbclass @@ -8,9 +8,10 @@ # seems to be a successor to gtk-doc: # https://gitlab.gnome.org/GNOME/gi-docgen -# This variable is set to True if api-documentation and -# gobject-introspection-data are in DISTRO_FEATURES, False otherwise. -GIDOCGEN_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation gobject-introspection-data', 'True', 'False', d)}" +# True if api-documentation and gobject-introspection-data are in DISTRO_FEATURES, +# and qemu-user is in MACHINE_FEATURES, False otherwise. +GIDOCGEN_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation gobject-introspection-data', \ + bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d), 'False', d)}" # When building native recipes, disable gi-docgen, as it is not necessary, # pulls in additional dependencies, and makes build times longer diff --git a/poky/meta/classes-recipe/goarch.bbclass b/poky/meta/classes-recipe/goarch.bbclass index 61ead30a63..e3555e1e46 100644 --- a/poky/meta/classes-recipe/goarch.bbclass +++ b/poky/meta/classes-recipe/goarch.bbclass @@ -90,6 +90,8 @@ def go_map_arch(a, d): return 'ppc64' elif a == 'riscv64': return 'riscv64' + elif a == 'loongarch64': + return 'loong64' else: raise bb.parse.SkipRecipe("Unsupported CPU architecture: %s" % a) diff --git a/poky/meta/classes-recipe/image-combined-dbg.bbclass b/poky/meta/classes-recipe/image-combined-dbg.bbclass index dcf1968538..729313739c 100644 --- a/poky/meta/classes-recipe/image-combined-dbg.bbclass +++ b/poky/meta/classes-recipe/image-combined-dbg.bbclass @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT # -IMAGE_PREPROCESS_COMMAND:append = " combine_dbg_image; " +IMAGE_PREPROCESS_COMMAND:append = " combine_dbg_image" combine_dbg_image () { if [ "${IMAGE_GEN_DEBUGFS}" = "1" -a -e ${IMAGE_ROOTFS}-dbg ]; then diff --git a/poky/meta/classes-recipe/image.bbclass b/poky/meta/classes-recipe/image.bbclass index 21b220a28d..4f00162e78 100644 --- a/poky/meta/classes-recipe/image.bbclass +++ b/poky/meta/classes-recipe/image.bbclass @@ -25,7 +25,7 @@ inherit ${IMGCLASSES} TOOLCHAIN_TARGET_TASK += "${PACKAGE_INSTALL}" TOOLCHAIN_TARGET_TASK_ATTEMPTONLY += "${PACKAGE_INSTALL_ATTEMPTONLY}" -POPULATE_SDK_POST_TARGET_COMMAND += "rootfs_sysroot_relativelinks; " +POPULATE_SDK_POST_TARGET_COMMAND += "rootfs_sysroot_relativelinks" LICENSE ?= "MIT" PACKAGES = "" @@ -120,8 +120,7 @@ def rootfs_command_variables(d): python () { variables = rootfs_command_variables(d) for var in variables: - if d.getVar(var, False): - d.setVarFlag(var, 'func', '1') + d.setVarFlag(var, 'vardeps', d.getVar(var)) } def rootfs_variables(d): @@ -657,8 +656,8 @@ create_merged_usr_symlinks_sdk() { create_merged_usr_symlinks ${SDK_OUTPUT}${SDKTARGETSYSROOT} } -ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_rootfs; ', '',d)}" -POPULATE_SDK_PRE_TARGET_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_sdk; ', '',d)}" +ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_rootfs', '',d)}" +POPULATE_SDK_PRE_TARGET_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_sdk', '',d)}" reproducible_final_image_task () { if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then @@ -678,6 +677,6 @@ systemd_preset_all () { fi } -IMAGE_PREPROCESS_COMMAND:append = " ${@ 'systemd_preset_all;' if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d) and not bb.utils.contains('IMAGE_FEATURES', 'stateless-rootfs', True, False, d) else ''} reproducible_final_image_task; " +IMAGE_PREPROCESS_COMMAND:append = " ${@ 'systemd_preset_all' if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d) and not bb.utils.contains('IMAGE_FEATURES', 'stateless-rootfs', True, False, d) else ''} reproducible_final_image_task " CVE_PRODUCT = "" diff --git a/poky/meta/classes-recipe/image_types.bbclass b/poky/meta/classes-recipe/image_types.bbclass index fdee835e7c..4aed64e27f 100644 --- a/poky/meta/classes-recipe/image_types.bbclass +++ b/poky/meta/classes-recipe/image_types.bbclass @@ -131,6 +131,15 @@ IMAGE_CMD:erofs = "mkfs.erofs ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}.er IMAGE_CMD:erofs-lz4 = "mkfs.erofs -zlz4 ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}.erofs-lz4 ${IMAGE_ROOTFS}" IMAGE_CMD:erofs-lz4hc = "mkfs.erofs -zlz4hc ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}.erofs-lz4hc ${IMAGE_ROOTFS}" +# Note that vfat can't handle all types of files that a real linux file system +# can (e.g. device files, symlinks, etc.) and therefore it not suitable for all +# use cases +oe_mkvfatfs () { + mkfs.vfat $@ -C ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.vfat ${ROOTFS_SIZE} + mcopy -i "${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.vfat" -vsmpQ ${IMAGE_ROOTFS}/* ::/ +} + +IMAGE_CMD:vfat = "oe_mkvfatfs ${EXTRA_IMAGECMD}" IMAGE_CMD_TAR ?= "tar" # ignore return code 1 "file changed as we read it" as other tasks(e.g. do_image_wic) may be hardlinking rootfs @@ -266,6 +275,10 @@ EXTRA_IMAGECMD:ext4 ?= "-i 4096" EXTRA_IMAGECMD:btrfs ?= "-n 4096 --shrink" EXTRA_IMAGECMD:f2fs ?= "" +# If a specific FAT size is needed, set it here (e.g. "-F 32"/"-F 16"/"-F 12") +# otherwise mkfs.vfat will automatically pick one. +EXTRA_IMAGECMD:vfat ?= "" + do_image_cpio[depends] += "cpio-native:do_populate_sysroot" do_image_jffs2[depends] += "mtd-utils-native:do_populate_sysroot" do_image_cramfs[depends] += "util-linux-native:do_populate_sysroot" @@ -285,6 +298,7 @@ do_image_f2fs[depends] += "f2fs-tools-native:do_populate_sysroot" do_image_erofs[depends] += "erofs-utils-native:do_populate_sysroot" do_image_erofs_lz4[depends] += "erofs-utils-native:do_populate_sysroot" do_image_erofs_lz4hc[depends] += "erofs-utils-native:do_populate_sysroot" +do_image_vfat[depends] += "dosfstools-native:do_populate_sysroot mtools-native:do_populate_sysroot" # This variable is available to request which values are suitable for IMAGE_FSTYPES IMAGE_TYPES = " \ @@ -294,6 +308,7 @@ IMAGE_TYPES = " \ ext3 ext3.gz \ ext4 ext4.gz \ btrfs \ + vfat \ squashfs squashfs-xz squashfs-lzo squashfs-lz4 squashfs-zst \ ubi ubifs multiubi \ tar tar.gz tar.bz2 tar.xz tar.lz4 tar.zst \ diff --git a/poky/meta/classes-recipe/kernel.bbclass b/poky/meta/classes-recipe/kernel.bbclass index bb5995b495..2ec9ea2091 100644 --- a/poky/meta/classes-recipe/kernel.bbclass +++ b/poky/meta/classes-recipe/kernel.bbclass @@ -454,8 +454,8 @@ kernel_do_install() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then oe_runmake DEPMOD=echo MODLIB=${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION} INSTALL_FW_PATH=${D}${nonarch_base_libdir}/firmware modules_install - rm "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build" - rm "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source" + rm -f "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build" + rm -f "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source" # Remove empty module directories to prevent QA issues find "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel" -type d -empty -delete else @@ -760,7 +760,7 @@ addtask kernel_link_images after do_compile before do_strip python do_strip() { import shutil - strip = d.getVar('STRIP') + strip = d.getVar('KERNEL_STRIP') extra_sections = d.getVar('KERNEL_IMAGE_STRIP_EXTRA_SECTIONS') kernel_image = d.getVar('B') + "/" + d.getVar('KERNEL_OUTPUT_DIR') + "/vmlinux" diff --git a/poky/meta/classes-recipe/license_image.bbclass b/poky/meta/classes-recipe/license_image.bbclass index 8560c27e93..fc859c7c65 100644 --- a/poky/meta/classes-recipe/license_image.bbclass +++ b/poky/meta/classes-recipe/license_image.bbclass @@ -272,7 +272,7 @@ def get_deployed_files(man_file): dep_files.append(os.path.basename(f)) return dep_files -ROOTFS_POSTPROCESS_COMMAND:prepend = "write_package_manifest; license_create_manifest; " +ROOTFS_POSTPROCESS_COMMAND:prepend = "write_package_manifest license_create_manifest " do_rootfs[recrdeptask] += "do_populate_lic" python do_populate_lic_deploy() { diff --git a/poky/meta/classes-recipe/meson.bbclass b/poky/meta/classes-recipe/meson.bbclass index 7f5e9b1943..d08a83d555 100644 --- a/poky/meta/classes-recipe/meson.bbclass +++ b/poky/meta/classes-recipe/meson.bbclass @@ -20,6 +20,9 @@ do_configure[cleandirs] = "${B}" # Where the meson.build build configuration is MESON_SOURCEPATH = "${S}" +# The target to build in do_compile. If unset the default targets are built. +MESON_TARGET ?= "" + def noprefix(var, d): return d.getVar(var).replace(d.getVar('prefix') + '/', '', 1) @@ -58,7 +61,7 @@ def rust_tool(d, target_var): return "rust = %s" % repr(cmd) addtask write_config before do_configure -do_write_config[vardeps] += "CC CXX LD AR NM STRIP READELF CFLAGS CXXFLAGS LDFLAGS RUSTC RUSTFLAGS" +do_write_config[vardeps] += "CC CXX AR NM STRIP READELF OBJCOPY CFLAGS CXXFLAGS LDFLAGS RUSTC RUSTFLAGS EXEWRAPPER_ENABLED" do_write_config() { # This needs to be Py to split the args into single-element lists cat >${WORKDIR}/meson.cross <<EOF @@ -170,7 +173,7 @@ do_configure[postfuncs] += "meson_do_qa_configure" do_compile[progress] = "outof:^\[(\d+)/(\d+)\]\s+" meson_do_compile() { - meson compile -v ${PARALLEL_MAKE} + meson compile -v ${PARALLEL_MAKE} ${MESON_TARGET} } meson_do_install() { diff --git a/poky/meta/classes-recipe/overlayfs-etc.bbclass b/poky/meta/classes-recipe/overlayfs-etc.bbclass index f8343106f3..0c7834d01f 100644 --- a/poky/meta/classes-recipe/overlayfs-etc.bbclass +++ b/poky/meta/classes-recipe/overlayfs-etc.bbclass @@ -31,7 +31,7 @@ # Regardless which mode you choose, update and migration strategy of configuration files under /etc # overlay is out of scope of this class -ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "overlayfs-etc", "create_overlayfs_etc_preinit;", "", d)}' +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "overlayfs-etc", "create_overlayfs_etc_preinit", "", d)}' IMAGE_FEATURES_CONFLICTS_overlayfs-etc = "${@ 'package-management' if bb.utils.to_boolean(d.getVar('OVERLAYFS_ETC_USE_ORIG_INIT_NAME'), True) else ''}" OVERLAYFS_ETC_MOUNT_POINT ??= "" diff --git a/poky/meta/classes-recipe/populate_sdk_base.bbclass b/poky/meta/classes-recipe/populate_sdk_base.bbclass index b23ea26d40..dfd4bb1d4d 100644 --- a/poky/meta/classes-recipe/populate_sdk_base.bbclass +++ b/poky/meta/classes-recipe/populate_sdk_base.bbclass @@ -152,12 +152,12 @@ python write_host_sdk_manifest () { output.write(format_pkg_list(pkgs, 'ver')) } -POPULATE_SDK_POST_TARGET_COMMAND:append = " write_sdk_test_data ; " -POPULATE_SDK_POST_TARGET_COMMAND:append:task-populate-sdk = " write_target_sdk_manifest; sdk_prune_dirs; " -POPULATE_SDK_POST_HOST_COMMAND:append:task-populate-sdk = " write_host_sdk_manifest; " +POPULATE_SDK_POST_TARGET_COMMAND:append = " write_sdk_test_data" +POPULATE_SDK_POST_TARGET_COMMAND:append:task-populate-sdk = " write_target_sdk_manifest sdk_prune_dirs" +POPULATE_SDK_POST_HOST_COMMAND:append:task-populate-sdk = " write_host_sdk_manifest" -SDK_PACKAGING_COMMAND = "${@'${SDK_PACKAGING_FUNC};' if '${SDK_PACKAGING_FUNC}' else ''}" -SDK_POSTPROCESS_COMMAND = " create_sdk_files; check_sdk_sysroots; archive_sdk; ${SDK_PACKAGING_COMMAND} " +SDK_PACKAGING_COMMAND = "${@'${SDK_PACKAGING_FUNC}' if '${SDK_PACKAGING_FUNC}' else ''}" +SDK_POSTPROCESS_COMMAND = "create_sdk_files check_sdk_sysroots archive_sdk ${SDK_PACKAGING_COMMAND}" def populate_sdk_common(d): from oe.sdk import populate_sdk @@ -372,8 +372,7 @@ do_populate_sdk[vardeps] += "${@sdk_variables(d)}" python () { variables = sdk_command_variables(d) for var in variables: - if d.getVar(var, False): - d.setVarFlag(var, 'func', '1') + d.setVarFlag(var, 'vardeps', d.getVar(var)) } do_populate_sdk[file-checksums] += "${TOOLCHAIN_SHAR_REL_TMPL}:True \ diff --git a/poky/meta/classes-recipe/populate_sdk_ext.bbclass b/poky/meta/classes-recipe/populate_sdk_ext.bbclass index fe656ed824..028d0c1ff5 100644 --- a/poky/meta/classes-recipe/populate_sdk_ext.bbclass +++ b/poky/meta/classes-recipe/populate_sdk_ext.bbclass @@ -120,7 +120,7 @@ python write_host_sdk_ext_manifest () { f.write("%s %s %s\n" % (info[1], info[2], info[3])) } -SDK_POSTPROCESS_COMMAND:append:task-populate-sdk-ext = " write_target_sdk_ext_manifest; write_host_sdk_ext_manifest; " +SDK_POSTPROCESS_COMMAND:append:task-populate-sdk-ext = " write_target_sdk_ext_manifest write_host_sdk_ext_manifest" SDK_TITLE:task-populate-sdk-ext = "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} Extensible SDK" @@ -743,7 +743,7 @@ sdk_ext_postinst() { SDK_POST_INSTALL_COMMAND:task-populate-sdk-ext = "${sdk_ext_postinst}" -SDK_POSTPROCESS_COMMAND:prepend:task-populate-sdk-ext = "copy_buildsystem; install_tools; " +SDK_POSTPROCESS_COMMAND:prepend:task-populate-sdk-ext = "copy_buildsystem install_tools " SDK_INSTALL_TARGETS = "" fakeroot python do_populate_sdk_ext() { diff --git a/poky/meta/classes-recipe/rootfs-postcommands.bbclass b/poky/meta/classes-recipe/rootfs-postcommands.bbclass index 4492c9c0aa..06388b72fb 100644 --- a/poky/meta/classes-recipe/rootfs-postcommands.bbclass +++ b/poky/meta/classes-recipe/rootfs-postcommands.bbclass @@ -5,25 +5,25 @@ # # Zap the root password if debug-tweaks and empty-root-password features are not enabled -ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password; ",d)}' +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password ",d)}' # Allow dropbear/openssh to accept logins from accounts with an empty password string if debug-tweaks or allow-empty-password is enabled -ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-empty-password' ], "ssh_allow_empty_password; ", "",d)}' +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-empty-password' ], "ssh_allow_empty_password ", "",d)}' # Allow dropbear/openssh to accept root logins if debug-tweaks or allow-root-login is enabled -ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-root-login' ], "ssh_allow_root_login; ", "",d)}' +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-root-login' ], "ssh_allow_root_login ", "",d)}' # Autologin the root user on the serial console, if empty-root-password and serial-autologin-root are active -ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", [ 'empty-root-password', 'serial-autologin-root' ], "serial_autologin_root; ", "",d)}' +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", [ 'empty-root-password', 'serial-autologin-root' ], "serial_autologin_root ", "",d)}' # Enable postinst logging if debug-tweaks or post-install-logging is enabled -ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'post-install-logging' ], "postinst_enable_logging; ", "",d)}' +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'post-install-logging' ], "postinst_enable_logging ", "",d)}' # Create /etc/timestamp during image construction to give a reasonably sane default time setting -ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp; " +ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp " # Tweak files in /etc if read-only-rootfs is enabled -ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}' +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook ", "",d)}' # We also need to do the same for the kernel boot parameters, # otherwise kernel or initramfs end up mounting the rootfs read/write @@ -34,20 +34,20 @@ ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only APPEND:append = '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", " ro", "", d)}' # Generates test data file with data store variables expanded in json format -ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data; " +ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data " # Write manifest IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}.manifest" -ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; " +ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest" # Set default postinst log file POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log" # Set default target for systemd images SYSTEMD_DEFAULT_TARGET ?= '${@bb.utils.contains_any("IMAGE_FEATURES", [ "x11-base", "weston" ], "graphical.target", "multi-user.target", d)}' -ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "systemd", "set_systemd_default_target; systemd_sysusers_check;", "", d)}' +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "systemd", "set_systemd_default_target systemd_sysusers_check", "", d)}' -ROOTFS_POSTPROCESS_COMMAND += 'empty_var_volatile;' +ROOTFS_POSTPROCESS_COMMAND += 'empty_var_volatile' -ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "overlayfs", "overlayfs_qa_check; overlayfs_postprocess;", "", d)}' +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "overlayfs", "overlayfs_qa_check overlayfs_postprocess", "", d)}' inherit image-artifact-names @@ -63,10 +63,10 @@ inherit image-artifact-names # systemd_sysusers_create and set_user_group. Using :append is not # enough for that, set_user_group is added that way and would end # up running after us. -SORT_PASSWD_POSTPROCESS_COMMAND ??= " tidy_shadowutils_files; " +SORT_PASSWD_POSTPROCESS_COMMAND ??= "tidy_shadowutils_files" python () { - d.appendVar('ROOTFS_POSTPROCESS_COMMAND', '${SORT_PASSWD_POSTPROCESS_COMMAND}') - d.appendVar('ROOTFS_POSTPROCESS_COMMAND', 'rootfs_reproducible;') + d.appendVar('ROOTFS_POSTPROCESS_COMMAND', ' ${SORT_PASSWD_POSTPROCESS_COMMAND}') + d.appendVar('ROOTFS_POSTPROCESS_COMMAND', ' rootfs_reproducible') } # Resolve the ID as described in the sysusers.d(5) manual: ID can be a numeric diff --git a/poky/meta/classes-recipe/rootfsdebugfiles.bbclass b/poky/meta/classes-recipe/rootfsdebugfiles.bbclass index cbcf876479..4c2fc1de25 100644 --- a/poky/meta/classes-recipe/rootfsdebugfiles.bbclass +++ b/poky/meta/classes-recipe/rootfsdebugfiles.bbclass @@ -34,7 +34,7 @@ ROOTFS_DEBUG_FILES ?= "" ROOTFS_DEBUG_FILES[doc] = "Lists additional files or directories to be installed with 'cp -a' in the format 'source1 target1;source2 target2;...'" -ROOTFS_POSTPROCESS_COMMAND += "rootfs_debug_files;" +ROOTFS_POSTPROCESS_COMMAND += "rootfs_debug_files" rootfs_debug_files () { #!/bin/sh -e echo "${ROOTFS_DEBUG_FILES}" | sed -e 's/;/\n/g' | while read source target mode; do diff --git a/poky/meta/classes-recipe/rust-target-config.bbclass b/poky/meta/classes-recipe/rust-target-config.bbclass index 21a56ede3e..926b0630b1 100644 --- a/poky/meta/classes-recipe/rust-target-config.bbclass +++ b/poky/meta/classes-recipe/rust-target-config.bbclass @@ -21,16 +21,18 @@ def llvm_features_from_tune(d): if 'vfpv4' in feat: f.append("+vfp4") - if 'vfpv3' in feat: + elif 'vfpv3' in feat: f.append("+vfp3") - if 'vfpv3d16' in feat: - f.append("+d16") - - if 'vfpv2' in feat or 'vfp' in feat: + elif 'vfpv3d16' in feat: + f.append("+vfp3") + f.append("-d32") + elif 'vfpv2' in feat or 'vfp' in feat: f.append("+vfp2") if 'neon' in feat: f.append("+neon") + elif target_is_armv7(d): + f.append("-neon") if 'mips32' in feat: f.append("+mips32") @@ -294,6 +296,8 @@ def llvm_cpu(d): trans['i586'] = "i586" trans['mips64'] = "mips64" trans['mips64el'] = "mips64" + trans['powerpc64le'] = "ppc64le" + trans['powerpc64'] = "ppc64" trans['riscv64'] = "generic-rv64" trans['riscv32'] = "generic-rv32" trans['loongarch64'] = "la464" |