diff options
Diffstat (limited to 'poky/meta/classes-recipe')
-rw-r--r-- | poky/meta/classes-recipe/go.bbclass | 2 | ||||
-rw-r--r-- | poky/meta/classes-recipe/goarch.bbclass | 14 | ||||
-rw-r--r-- | poky/meta/classes-recipe/image_types.bbclass | 20 | ||||
-rw-r--r-- | poky/meta/classes-recipe/kernel.bbclass | 2 | ||||
-rw-r--r-- | poky/meta/classes-recipe/linuxloader.bbclass | 2 | ||||
-rw-r--r-- | poky/meta/classes-recipe/pypi.bbclass | 9 | ||||
-rw-r--r-- | poky/meta/classes-recipe/rootfs-postcommands.bbclass | 4 | ||||
-rw-r--r-- | poky/meta/classes-recipe/uboot-sign.bbclass | 2 |
8 files changed, 27 insertions, 28 deletions
diff --git a/poky/meta/classes-recipe/go.bbclass b/poky/meta/classes-recipe/go.bbclass index cc3564c36a..d32509aa6d 100644 --- a/poky/meta/classes-recipe/go.bbclass +++ b/poky/meta/classes-recipe/go.bbclass @@ -48,8 +48,6 @@ GO_RPATH:class-native = "${@'-r ${STAGING_LIBDIR_NATIVE}/go/pkg/${TARGET_GOTUPLE GO_RPATH_LINK:class-native = "${@'-Wl,-rpath-link=${STAGING_LIBDIR_NATIVE}/go/pkg/${TARGET_GOTUPLE}_dynlink' if d.getVar('GO_DYNLINK') else ''}" GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${GO_RPATH_LINK} ${LDFLAGS}" GO_LINKMODE ?= "" -GO_LINKMODE:class-nativesdk = "--linkmode=external" -GO_LINKMODE:class-native = "--linkmode=external" GO_EXTRA_LDFLAGS ?= "" GO_LINUXLOADER ?= "-I ${@get_linuxloader(d)}" # Use system loader. If uninative is used, the uninative loader will be patched automatically diff --git a/poky/meta/classes-recipe/goarch.bbclass b/poky/meta/classes-recipe/goarch.bbclass index 6899ec28e4..1ebe03864f 100644 --- a/poky/meta/classes-recipe/goarch.bbclass +++ b/poky/meta/classes-recipe/goarch.bbclass @@ -38,13 +38,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 = "" -GO_DYNLINK:aarch64 = "" -GO_DYNLINK:x86 = "" -GO_DYNLINK:x86-64 = "" -GO_DYNLINK:powerpc64 = "" -GO_DYNLINK:powerpc64le = "" -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-recipe/image_types.bbclass b/poky/meta/classes-recipe/image_types.bbclass index 913cb8788c..2f948ecbf8 100644 --- a/poky/meta/classes-recipe/image_types.bbclass +++ b/poky/meta/classes-recipe/image_types.bbclass @@ -112,18 +112,22 @@ IMAGE_CMD:btrfs () { } oe_mksquashfs () { - local comp=$1 - local suffix=$2 + local comp=$1; shift + local extra_imagecmd="$@" + + if [ "$comp" = "zstd" ]; then + suffix="zst" + fi # Use the bitbake reproducible timestamp instead of the hardcoded squashfs one export SOURCE_DATE_EPOCH=$(stat -c '%Y' ${IMAGE_ROOTFS}) - mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}.squashfs${comp:+-}${suffix:-$comp} ${EXTRA_IMAGECMD} -noappend ${comp:+-comp }$comp + mksquashfs ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}/${IMAGE_NAME}.squashfs${comp:+-}${suffix:-$comp} -noappend ${comp:+-comp }$comp $extra_imagecmd } -IMAGE_CMD:squashfs = "oe_mksquashfs" -IMAGE_CMD:squashfs-xz = "oe_mksquashfs xz" -IMAGE_CMD:squashfs-lzo = "oe_mksquashfs lzo" -IMAGE_CMD:squashfs-lz4 = "oe_mksquashfs lz4" -IMAGE_CMD:squashfs-zst = "oe_mksquashfs zstd zst" +IMAGE_CMD:squashfs = "oe_mksquashfs '' ${EXTRA_IMAGECMD}" +IMAGE_CMD:squashfs-xz = "oe_mksquashfs xz ${EXTRA_IMAGECMD}" +IMAGE_CMD:squashfs-lzo = "oe_mksquashfs lzo ${EXTRA_IMAGECMD}" +IMAGE_CMD:squashfs-lz4 = "oe_mksquashfs lz4 ${EXTRA_IMAGECMD}" +IMAGE_CMD:squashfs-zst = "oe_mksquashfs zstd ${EXTRA_IMAGECMD}" IMAGE_CMD:erofs = "mkfs.erofs ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}.erofs ${IMAGE_ROOTFS}" IMAGE_CMD:erofs-lz4 = "mkfs.erofs -zlz4 ${EXTRA_IMAGECMD} ${IMGDEPLOYDIR}/${IMAGE_NAME}.erofs-lz4 ${IMAGE_ROOTFS}" diff --git a/poky/meta/classes-recipe/kernel.bbclass b/poky/meta/classes-recipe/kernel.bbclass index b084d6d69d..c0a2056fec 100644 --- a/poky/meta/classes-recipe/kernel.bbclass +++ b/poky/meta/classes-recipe/kernel.bbclass @@ -463,7 +463,7 @@ kernel_do_install() { 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 + [ -d "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel" ] && find "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel" -type d -empty -delete else bbnote "no modules to install" fi diff --git a/poky/meta/classes-recipe/linuxloader.bbclass b/poky/meta/classes-recipe/linuxloader.bbclass index 2ea1b62254..a2e8f9837b 100644 --- a/poky/meta/classes-recipe/linuxloader.bbclass +++ b/poky/meta/classes-recipe/linuxloader.bbclass @@ -57,7 +57,7 @@ def get_glibc_loader(d): elif re.search("i.86", targetarch): dynamic_loader = "${base_libdir}/ld-linux.so.2" elif targetarch == "arm": - dynamic_loader = "${base_libdir}/ld-linux${@['-armhf', ''][d.getVar('TARGET_FPU') == 'soft']}.so.3" + dynamic_loader = "${base_libdir}/ld-linux${@['', '-armhf'][d.getVar('TARGET_FPU') == 'hard']}.so.3" elif targetarch.startswith("aarch64"): dynamic_loader = "${base_libdir}/ld-linux-aarch64${ARMPKGSFX_ENDIAN_64}.so.1" elif targetarch.startswith("riscv64"): diff --git a/poky/meta/classes-recipe/pypi.bbclass b/poky/meta/classes-recipe/pypi.bbclass index c6bbe8119a..b8c18ccf39 100644 --- a/poky/meta/classes-recipe/pypi.bbclass +++ b/poky/meta/classes-recipe/pypi.bbclass @@ -12,19 +12,14 @@ def pypi_package(d): return bpn[8:] return bpn -# The PyPi package name (defaults to PN without the python3- prefix) PYPI_PACKAGE ?= "${@pypi_package(d)}" -# The file extension of the source archive PYPI_PACKAGE_EXT ?= "tar.gz" -# An optional prefix for the download file in the case of name collisions +PYPI_ARCHIVE_NAME ?= "${PYPI_PACKAGE}-${PV}.${PYPI_PACKAGE_EXT}" PYPI_ARCHIVE_NAME_PREFIX ?= "" def pypi_src_uri(d): - """ - Construct a source URL as per https://warehouse.pypa.io/api-reference/integration-guide.html#predictable-urls. - """ package = d.getVar('PYPI_PACKAGE') - archive_name = d.expand('${PYPI_PACKAGE}-${PV}.${PYPI_PACKAGE_EXT}') + archive_name = d.getVar('PYPI_ARCHIVE_NAME') archive_downloadname = d.getVar('PYPI_ARCHIVE_NAME_PREFIX') + archive_name return 'https://files.pythonhosted.org/packages/source/%s/%s/%s;downloadfilename=%s' % (package[0], package, archive_name, archive_downloadname) diff --git a/poky/meta/classes-recipe/rootfs-postcommands.bbclass b/poky/meta/classes-recipe/rootfs-postcommands.bbclass index e81b69a239..920da94ba2 100644 --- a/poky/meta/classes-recipe/rootfs-postcommands.bbclass +++ b/poky/meta/classes-recipe/rootfs-postcommands.bbclass @@ -206,7 +206,9 @@ read_only_rootfs_hook () { # Also tweak the key location for dropbear in the same way. if [ -d ${IMAGE_ROOTFS}/etc/dropbear ]; then if [ ! -e ${IMAGE_ROOTFS}/etc/dropbear/dropbear_rsa_host_key ]; then - echo "DROPBEAR_RSAKEY_DIR=/var/lib/dropbear" >> ${IMAGE_ROOTFS}/etc/default/dropbear + if ! grep -q "^DROPBEAR_RSAKEY_DIR=" ${IMAGE_ROOTFS}/etc/default/dropbear ; then + echo "DROPBEAR_RSAKEY_DIR=/var/lib/dropbear" >> ${IMAGE_ROOTFS}/etc/default/dropbear + fi fi fi fi diff --git a/poky/meta/classes-recipe/uboot-sign.bbclass b/poky/meta/classes-recipe/uboot-sign.bbclass index 7a0b8047e4..c8e097f2f2 100644 --- a/poky/meta/classes-recipe/uboot-sign.bbclass +++ b/poky/meta/classes-recipe/uboot-sign.bbclass @@ -367,7 +367,7 @@ do_uboot_assemble_fitimage() { done for binary in ${UBOOT_BINARIES}; do - k=$(expr $j + 1); + k=$(expr $k + 1); if [ $k -eq $i ]; then break; fi |