From patchwork Wed Nov 22 12:44:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 35071 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37850C61D9B for ; Wed, 22 Nov 2023 12:45:18 +0000 (UTC) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) by mx.groups.io with SMTP id smtpd.web10.18518.1700657110939866611 for ; Wed, 22 Nov 2023 04:45:11 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=QdTgDUC9; spf=pass (domain: gmail.com, ip: 209.85.167.42, mailfrom: martin.jansa@gmail.com) Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-507adc3381cso8776558e87.3 for ; Wed, 22 Nov 2023 04:45:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700657109; x=1701261909; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=AaIWlj/kH04lhyF/rK9+F7zPEE7qOwCYMrLmeUFyI6c=; b=QdTgDUC91Q366XeSCDFUSGcRlgpq+kfvDlpNOQ+pPxfHyjiYz5tBSxMXL3/cz+AnmA JKou363T4ziFiux1eUJkmjSasDQ1JE/X/PBZ8R9L+O2oR7eX4PojO5FF5rKPZRmATs3x 7HJ7Rkm0ZZfcK2VOAkJUnhwTIuRu5Z3MhfUzd6gX9V73uUMZQgNcksfNLi7HVvsj27WF yPh1j8MqC3ngDVjFzNTWP27cjU9OawKbZXotovdsBZrwv0590zAtyqFnwZ+PN4rIXs0e jxAIj/gePetEsR59onoybP4Ai/zPzsGV0vfJmgQSUb1M+FzPIROj5QT4lDmVqTk0rELz b0Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700657109; x=1701261909; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AaIWlj/kH04lhyF/rK9+F7zPEE7qOwCYMrLmeUFyI6c=; b=DGO3EF57RN//nImCiTC7rMhv5hlOwjTrg8Enr9KE9wVuiR2KI8IZIwrvFOldjptT8C LDRMfxStczduE9kgP45mZjUh/EnNzE6fgqa21y6SQeMowcpRqZ1vB+/N8rqvyJqN7BUk D2xt0xXf19ZO/HDpvCbCK/eimDXweke06i2MOEMfu+5zy8VF5/3EYvJNt2sWC7/7pDIy VgpV+dS92g6cYfFy5aAdm+8RaCFBTd2BbxBTuOgLCHpYEi/aO0cpzSsu1k5gO8ag2h0m 2mnwz2e/NLVk6pw9TASgl7j5odZnMuAjgzYdj7zYhiRNSaj7tWXWWZFdwJw1xjrKTFBw 2Haw== X-Gm-Message-State: AOJu0Ywy3IxV9dDIgtvwOsDs2ghxr+l9t4Nvxw1NhaXNgwrln4VKCuO7 GV1lza0qcnQftW4Q5jOI8Nx2aOO/EAc= X-Google-Smtp-Source: AGHT+IE7rwHqv/4xhLnPBVm7fY4vN2I2iO9qdDV5178wnhFHMmlmqb20J7FKUD1t/7/FF8C/xAn8Fw== X-Received: by 2002:a19:a418:0:b0:502:9fce:b6da with SMTP id q24-20020a19a418000000b005029fceb6damr1433063lfc.21.1700657108840; Wed, 22 Nov 2023 04:45:08 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id x15-20020a170906710f00b009bd9ac83a9fsm6523560ejj.152.2023.11.22.04.45.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:45:08 -0800 (PST) From: Martin Jansa To: openembedded-core@lists.openembedded.org Subject: [PATCH 01/21] image*.bbclass, kernel*.bbclass: create version-less artifacts and versioned hard links Date: Wed, 22 Nov 2023 13:44:31 +0100 Message-ID: <932d980fb4fcfd3b78183d5bd51adb4f038eee47.1700600804.git.martin.jansa@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Nov 2023 12:45:18 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191078 From: Martin Jansa * instead of versioned artifacts and version-less symlinks * We used to create the actual artifact files with some version in the filename and then created symlink without any version which was updated to point to the latest one created. In some scenarios it's useful to create all artifacts - typically rootfs and kernel images with the same version - like release build even when the kernel itself wasn't modified since the previous release. If we include the release version in the regular _NAME variables then we'll need to re-run do_deploy and do_image which will cause kernel to be rebuilt and image to be re-created even when the only change since last build was the version number. With this change we can re-use kernel and image from sstate when nothing was changed and run only very fast do_deploy_links task which just adds another hard link to existing artifact from sstate. * This is already used by various LGE builds as do_webos_deploy_fixup() https://github.com/webosose/meta-webosose/blob/master/meta-webos/classes/webos_deploy.bbclass but injecting this task in all the right places is difficult and sometimes requires whole bbclass to be duplicated. Having simpler way of versioning artifacts directly in oe-core might be useful for others. * move IMAGE_VERSION_SUFFIX from _NAME variables to _LINK_NAME that way e.g. kernel.do_deploy can be reused from sstate to provide "version-less" artifacts and then very fast do_deploy_links task just adds links with consistent suffixes (by default the version from the recipe but could be easily set to e.g. some release name when building some products). * create hard links instead of symlinks, so that whatever version the filename says is really there * some IMAGE_FSTYPES might need the "version-less" IMAGE_NAME file to be removed first or they might either append or update the content of the image instead of creating new image file from scratch - I have seen this only with one proprietary format we generate with our own tool, so hopefully this isn't very common * this is basically the mechanism are using in webOS with WEBOS_IMAGE_NAME_SUFFIX which is for official builds set from jenkins job and then all artifacts (images as well as corresponding kernel files) have the same version string) * without this, you can still easily set the variables to contain the version from jenkins job (excluded from sstate signature like DATETIME currently is to prevent rebuilding it everytime even when the content didn't change) but then when kernel is reused from sstate you can have version 1.0 used on kernel artifacts and 2.0 on image artifacts. * if you don't exclude the version string with vardepsexclude, then you get the right version in the filenames but for cost of re-executing do_deploy every single time, which with rm_work will cause all kernel tasks to be re-executed (together with everything which depends on it like external modules etc). * the implementation "from outside" is a bit tricky as shown in webOS OSE, because first you need to reverse the meaning of IMAGE_NAME and IMAGE_LINK_NAME like here, but also replace all symlinks with hardlinks and then adjust all recipes/bbclasses to depend on our do_deploy_fixup task instead of the original do_deploy see the variable modifications: https://github.com/webosose/meta-webosose/blob/a35e81622aae1066591e44a132d01297ff478248/meta-webos/conf/distro/include/webos.inc#L65 and then various bbclasses to hook do_webos_deploy_fixup task creating the hardlinks for possible artifacts: https://github.com/webosose/meta-webosose/blob/a35e81622aae1066591e44a132d01297ff478248/meta-webos/classes/webos_deploy.bbclass https://github.com/webosose/meta-webosose/blob/a35e81622aae1066591e44a132d01297ff478248/meta-webos/classes/kernel.bbclass https://github.com/webosose/meta-webosose/blob/a35e81622aae1066591e44a132d01297ff478248/meta-webos/classes/image.bbclass so hopefully with all these changes in oe-core other project can achieve the same just by setting one variable IMAGE_VERSION_SUFFIX * drop ${PKGE}-${PKGV}-${PR} from kernel artifacts names (this is the latest build) and add it only in hardlinks created in do_deploy_links so that we can use PKGR there again (because these links are generally used only by human operators and they don't have their own TASKHASH or the IMAGE_VERSION_SUFFIX might be set to some release name which they do understand * this allows to drop package_get_auto_pr from kernel do_deploy as well, leaving only 2 EXTENDPRAUTO bumps for each kernel build (do_package and do_deploy_links, unfortunatelly these will still have different value, so if you're looking for the exact kernel image in deploy directory based on kernel image package version seen on the device the EXTENDPRAUTO part of PR will be different). [YOCTO #12937] Signed-off-by: Martin Jansa --- .../image-artifact-names.bbclass | 8 ++-- meta/classes-recipe/image.bbclass | 12 ++--- .../kernel-artifact-names.bbclass | 6 ++- meta/classes-recipe/kernel-devicetree.bbclass | 35 +++++++++----- meta/classes-recipe/kernel-fitimage.bbclass | 33 ++++++++----- meta/classes-recipe/kernel.bbclass | 47 ++++++++++++------- meta/classes-recipe/qemuboot.bbclass | 2 +- .../rootfs-postcommands.bbclass | 4 +- meta/classes/cve-check.bbclass | 14 +++--- meta/lib/oe/cve_check.py | 6 +-- 10 files changed, 100 insertions(+), 67 deletions(-) diff --git a/meta/classes-recipe/image-artifact-names.bbclass b/meta/classes-recipe/image-artifact-names.bbclass index bc76ff0e16..d0f1b0dc55 100644 --- a/meta/classes-recipe/image-artifact-names.bbclass +++ b/meta/classes-recipe/image-artifact-names.bbclass @@ -9,12 +9,12 @@ ################################################################## IMAGE_BASENAME ?= "${PN}" -IMAGE_VERSION_SUFFIX ?= "-${DATETIME}" +IMAGE_VERSION_SUFFIX ?= "-${PKGE}-${PKGV}-${PKGR}-${DATETIME}" IMAGE_VERSION_SUFFIX[vardepsexclude] += "DATETIME SOURCE_DATE_EPOCH" -IMAGE_NAME ?= "${IMAGE_LINK_NAME}${IMAGE_VERSION_SUFFIX}" -IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}${IMAGE_NAME_SUFFIX}" +IMAGE_NAME ?= "${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}${IMAGE_NAME_SUFFIX}" +IMAGE_LINK_NAME ?= "${IMAGE_NAME}${IMAGE_VERSION_SUFFIX}" -# This needs to stay in sync with IMAGE_LINK_NAME, but with INITRAMFS_IMAGE instead of IMAGE_BASENAME +# This needs to stay in sync with IMAGE_NAME, but with INITRAMFS_IMAGE instead of IMAGE_BASENAME # and without ${IMAGE_NAME_SUFFIX} which all initramfs images should set to empty INITRAMFS_IMAGE_NAME ?= "${@['${INITRAMFS_IMAGE}${IMAGE_MACHINE_SUFFIX}', ''][d.getVar('INITRAMFS_IMAGE') == '']}" diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass index 7231fad940..2dd004d312 100644 --- a/meta/classes-recipe/image.bbclass +++ b/meta/classes-recipe/image.bbclass @@ -141,7 +141,7 @@ do_rootfs[vardeps] += "${@rootfs_variables(d)}" # This follows many common usecases and user expectations. # But if you are building an image which doesn't need the kernel image at all, # you can unset this variable manually. -KERNEL_DEPLOY_DEPEND ?= "virtual/kernel:do_deploy" +KERNEL_DEPLOY_DEPEND ?= "virtual/kernel:do_deploy_links" do_build[depends] += "${KERNEL_DEPLOY_DEPEND}" @@ -599,14 +599,14 @@ python create_symlinks() { return for type in subimages: dst = os.path.join(deploy_dir, link_name + "." + type) - src = img_name + "." + type - if os.path.exists(os.path.join(deploy_dir, src)): - bb.note("Creating symlink: %s -> %s" % (dst, src)) + src = os.path.join(deploy_dir, img_name + "." + type) + if os.path.exists(src): + bb.note("Creating hardlink: %s -> %s" % (dst, src)) if os.path.islink(dst): os.remove(dst) - os.symlink(src, dst) + os.link(src, dst) else: - bb.note("Skipping symlink, source does not exist: %s -> %s" % (dst, src)) + bb.note("Skipping hardlink, source does not exist: %s -> %s" % (dst, src)) } MULTILIBRE_ALLOW_REP =. "${base_bindir}|${base_sbindir}|${bindir}|${sbindir}|${libexecdir}|${sysconfdir}|${nonarch_base_libdir}/udev|/lib/modules/[^/]*/modules.*|" diff --git a/meta/classes-recipe/kernel-artifact-names.bbclass b/meta/classes-recipe/kernel-artifact-names.bbclass index 1a7611a15e..186c6bc5b9 100644 --- a/meta/classes-recipe/kernel-artifact-names.bbclass +++ b/meta/classes-recipe/kernel-artifact-names.bbclass @@ -12,8 +12,10 @@ inherit image-artifact-names -KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}${IMAGE_MACHINE_SUFFIX}${IMAGE_VERSION_SUFFIX}" -KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" +KERNEL_VERSION_SUFFIX ?= "${IMAGE_VERSION_SUFFIX}" + +KERNEL_ARTIFACT_NAME ?= "${MACHINE}" +KERNEL_ARTIFACT_LINK_NAME ?= "${KERNEL_ARTIFACT_NAME}${KERNEL_VERSION_SUFFIX}" KERNEL_ARTIFACT_BIN_EXT ?= ".bin" KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}" diff --git a/meta/classes-recipe/kernel-devicetree.bbclass b/meta/classes-recipe/kernel-devicetree.bbclass index eff052b402..cbfaa5c183 100644 --- a/meta/classes-recipe/kernel-devicetree.bbclass +++ b/meta/classes-recipe/kernel-devicetree.bbclass @@ -91,7 +91,7 @@ do_install:append() { done } -do_deploy:append() { +kernel_do_deploy:append() { for dtbf in ${KERNEL_DEVICETREE}; do dtb=`normalize_dtb "$dtbf"` dtb_ext=${dtb##*.} @@ -102,10 +102,7 @@ do_deploy:append() { fi install -m 0644 ${D}/${KERNEL_DTBDEST}/$dtb $deployDir/$dtb_base_name.$dtb_ext if [ -n "${KERNEL_DTB_NAME}" ] ; then - ln -sf $dtb_base_name.$dtb_ext $deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext - fi - if [ -n "${KERNEL_DTB_LINK_NAME}" ] ; then - ln -sf $dtb_base_name.$dtb_ext $deployDir/$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext + ln -vf $deployDir/$dtb_base_name.$dtb_ext $deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext fi for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do if [ "$type" = "zImage" ] && [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ]; then @@ -116,10 +113,6 @@ do_deploy:append() { ln -sf $type-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ $deployDir/$type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} fi - if [ -n "${KERNEL_DTB_LINK_NAME}" ]; then - ln -sf $type-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ - $deployDir/$type-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} - fi if [ -e "${KERNEL_OUTPUT_DIR}/${type}.initramfs" ]; then cat ${KERNEL_OUTPUT_DIR}/${type}.initramfs \ $deployDir/$dtb_base_name.$dtb_ext \ @@ -128,10 +121,26 @@ do_deploy:append() { ln -sf ${type}-${INITRAMFS_NAME}-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} fi - if [ -n "${KERNEL_DTB_LINK_NAME}" ]; then - ln -sf ${type}-${INITRAMFS_NAME}-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ - $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} - fi + fi + fi + done + done +} +kernel_do_deploy_links:append() { + for dtbf in ${KERNEL_DEVICETREE}; do + dtb=`normalize_dtb "$dtbf"` + dtb_ext=${dtb##*.} + dtb_base_name=`basename $dtb .$dtb_ext` + if [ -n "${KERNEL_DTB_LINK_NAME}" ] ; then + ln -vf $deployDir/$dtb_base_name.$dtb_ext $deployDir/$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext + fi + for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do + if [ "$type" = "zImage" ] && [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ] && [ -n "${KERNEL_DTB_LINK_NAME}" ]; then + ln -vf $deployDir/$type-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ + $deployDir/$type-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} + if [ -e "${KERNEL_OUTPUT_DIR}/${type}.initramfs" ]; then + ln -vf $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ + $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} fi fi done diff --git a/meta/classes-recipe/kernel-fitimage.bbclass b/meta/classes-recipe/kernel-fitimage.bbclass index 7e30a5d47e..0ad200d9db 100644 --- a/meta/classes-recipe/kernel-fitimage.bbclass +++ b/meta/classes-recipe/kernel-fitimage.bbclass @@ -837,7 +837,6 @@ do_kernel_generate_rsa_keys() { addtask kernel_generate_rsa_keys before do_assemble_fitimage after do_compile -kernel_do_deploy[vardepsexclude] = "DATETIME" kernel_do_deploy:append() { # Update deploy directory if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then @@ -845,29 +844,39 @@ kernel_do_deploy:append() { if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then bbnote "Copying fit-image.its source file..." install -m 0644 ${B}/fit-image.its "$deployDir/fitImage-its-${KERNEL_FIT_NAME}.its" - if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then - ln -snf fitImage-its-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${KERNEL_FIT_LINK_NAME}" - fi - bbnote "Copying linux.bin file..." install -m 0644 ${B}/linux.bin $deployDir/fitImage-linux.bin-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} - if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then - ln -snf fitImage-linux.bin-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-linux.bin-${KERNEL_FIT_LINK_NAME}" - fi fi if [ -n "${INITRAMFS_IMAGE}" ]; then bbnote "Copying fit-image-${INITRAMFS_IMAGE}.its source file..." install -m 0644 ${B}/fit-image-${INITRAMFS_IMAGE}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its" + if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then + bbnote "Copying fitImage-${INITRAMFS_IMAGE} file..." + install -m 0644 ${B}/${KERNEL_OUTPUT_DIR}/fitImage-${INITRAMFS_IMAGE} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT}" + fi + fi + fi +} +kernel_do_deploy_links:append() { + if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then + if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then + if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then + ln -vf $deployDir/fitImage-its-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${KERNEL_FIT_LINK_NAME}" + fi if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then - ln -snf fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" + ln -vf $deployDir/fitImage-linux.bin-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-linux.bin-${KERNEL_FIT_LINK_NAME}" + fi + fi + + if [ -n "${INITRAMFS_IMAGE}" ]; then + if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then + ln -vf $deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" fi if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then - bbnote "Copying fitImage-${INITRAMFS_IMAGE} file..." - install -m 0644 ${B}/${KERNEL_OUTPUT_DIR}/fitImage-${INITRAMFS_IMAGE} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT}" if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then - ln -snf fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" + ln -vf $deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" fi fi fi diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass index 9ff37f5c38..db289d776f 100644 --- a/meta/classes-recipe/kernel.bbclass +++ b/meta/classes-recipe/kernel.bbclass @@ -820,9 +820,6 @@ kernel_do_deploy() { else install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType $deployDir/$baseName${KERNEL_IMAGE_BIN_EXT} fi - if [ -n "${KERNEL_IMAGE_LINK_NAME}" ] ; then - ln -sf $baseName${KERNEL_IMAGE_BIN_EXT} $deployDir/$imageType-${KERNEL_IMAGE_LINK_NAME}${KERNEL_IMAGE_BIN_EXT} - fi if [ "${KERNEL_IMAGETYPE_SYMLINK}" = "1" ] ; then ln -sf $baseName${KERNEL_IMAGE_BIN_EXT} $deployDir/$imageType fi @@ -837,10 +834,6 @@ kernel_do_deploy() { fi TAR_ARGS="$TAR_ARGS --owner=0 --group=0" tar $TAR_ARGS -cv -C ${D}${root_prefix} lib | gzip -9n > $deployDir/modules-${MODULE_TARBALL_NAME}.tgz - - if [ -n "${MODULE_TARBALL_LINK_NAME}" ] ; then - ln -sf modules-${MODULE_TARBALL_NAME}.tgz $deployDir/modules-${MODULE_TARBALL_LINK_NAME}.tgz - fi fi if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then @@ -848,22 +841,42 @@ kernel_do_deploy() { if [ "$imageType" = "fitImage" ] ; then continue fi - initramfsBaseName=$imageType-${INITRAMFS_NAME} - install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType.initramfs $deployDir/$initramfsBaseName${KERNEL_IMAGE_BIN_EXT} - if [ -n "${INITRAMFS_LINK_NAME}" ] ; then - ln -sf $initramfsBaseName${KERNEL_IMAGE_BIN_EXT} $deployDir/$imageType-${INITRAMFS_LINK_NAME}${KERNEL_IMAGE_BIN_EXT} - fi + install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType.initramfs $deployDir/$imageType-${INITRAMFS_NAME}${KERNEL_IMAGE_BIN_EXT} done fi } -# We deploy to filenames that include PKGV and PKGR, read the saved data to -# ensure we get the right values for both -do_deploy[prefuncs] += "read_subpackage_metadata" - addtask deploy after do_populate_sysroot do_packagedata -EXPORT_FUNCTIONS do_deploy +kernel_do_deploy_links() { + deployDir="${DEPLOY_DIR_IMAGE}" + if [ -n "${KERNEL_DEPLOYSUBDIR}" ]; then + deployDir="${DEPLOY_DIR_IMAGE}/${KERNEL_DEPLOYSUBDIR}" + mkdir "$deployDir" + fi + + for imageType in ${KERNEL_IMAGETYPES} ; do + ln -vf $deployDir/$imageType-${KERNEL_IMAGE_NAME}.bin $deployDir/$imageType-${KERNEL_IMAGE_LINK_NAME}${KERNEL_IMAGE_BIN_EXT} + done + + if [ ${MODULE_TARBALL_DEPLOY} = "1" -a -f $deployDir/modules-${MODULE_TARBALL_NAME}.tgz ] ; then + ln -vf $deployDir/modules-${MODULE_TARBALL_NAME}.tgz $deployDir/modules-${MODULE_TARBALL_LINK_NAME}.tgz + fi + + if [ ! -z "${INITRAMFS_IMAGE}" -a "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then + for imageType in ${KERNEL_IMAGETYPES} ; do + if [ "$imageType" = "fitImage" ] ; then + continue + fi + ln -vf $deployDir/$imageType-${INITRAMFS_NAME}.bin $deployDir/$imageType-${INITRAMFS_LINK_NAME}${KERNEL_IMAGE_BIN_EXT} + done + fi +} +do_deploy_links[prefuncs] += "read_subpackage_metadata" + +addtask deploy_links after do_deploy before do_build + +EXPORT_FUNCTIONS do_deploy do_deploy_links # Add using Device Tree support inherit kernel-devicetree diff --git a/meta/classes-recipe/qemuboot.bbclass b/meta/classes-recipe/qemuboot.bbclass index ff32aac902..0ee4008a65 100644 --- a/meta/classes-recipe/qemuboot.bbclass +++ b/meta/classes-recipe/qemuboot.bbclass @@ -178,5 +178,5 @@ python do_write_qemuboot_conf() { if qemuboot_link and qemuboot_link != qemuboot: if os.path.lexists(qemuboot_link): os.remove(qemuboot_link) - os.symlink(os.path.basename(qemuboot), qemuboot_link) + os.link(qemuboot, qemuboot_link) } diff --git a/meta/classes-recipe/rootfs-postcommands.bbclass b/meta/classes-recipe/rootfs-postcommands.bbclass index 29ee74932a..a8173c32bc 100644 --- a/meta/classes-recipe/rootfs-postcommands.bbclass +++ b/meta/classes-recipe/rootfs-postcommands.bbclass @@ -396,7 +396,7 @@ python write_image_manifest () { if manifest_link != manifest_name: if os.path.lexists(manifest_link): os.remove(manifest_link) - os.symlink(os.path.basename(manifest_name), manifest_link) + os.link(manifest_name, manifest_link) } # Can be used to create /etc/timestamp during image construction to give a reasonably @@ -469,7 +469,7 @@ python write_image_test_data() { if testdata_link != testdata_name: if os.path.lexists(testdata_link): os.remove(testdata_link) - os.symlink(os.path.basename(testdata_name), testdata_link) + os.link(testdata_name, testdata_link) } write_image_test_data[vardepsexclude] += "TOPDIR" diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass index 5191d04303..b87d565755 100644 --- a/meta/classes/cve-check.bbclass +++ b/meta/classes/cve-check.bbclass @@ -125,7 +125,7 @@ python () { def generate_json_report(d, out_path, link_path): if os.path.exists(d.getVar("CVE_CHECK_SUMMARY_INDEX_PATH")): import json - from oe.cve_check import cve_check_merge_jsons, update_symlinks + from oe.cve_check import cve_check_merge_jsons, update_links bb.note("Generating JSON CVE summary") index_file = d.getVar("CVE_CHECK_SUMMARY_INDEX_PATH") @@ -143,12 +143,12 @@ def generate_json_report(d, out_path, link_path): with open(out_path, "w") as f: json.dump(summary, f, indent=2) - update_symlinks(out_path, link_path) + update_links(out_path, link_path) python cve_save_summary_handler () { import shutil import datetime - from oe.cve_check import update_symlinks + from oe.cve_check import update_links cve_tmp_file = d.getVar("CVE_CHECK_TMP_FILE") @@ -162,7 +162,7 @@ python cve_save_summary_handler () { if os.path.exists(cve_tmp_file): shutil.copyfile(cve_tmp_file, cve_summary_file) cvefile_link = os.path.join(cvelogpath, cve_summary_name) - update_symlinks(cve_summary_file, cvefile_link) + update_links(cve_summary_file, cvefile_link) bb.plain("Complete CVE report summary created at: %s" % cvefile_link) if d.getVar("CVE_CHECK_FORMAT_JSON") == "1": @@ -219,7 +219,7 @@ python cve_check_write_rootfs_manifest () { import shutil import json from oe.rootfs import image_list_installed_packages - from oe.cve_check import cve_check_merge_jsons, update_symlinks + from oe.cve_check import cve_check_merge_jsons, update_links if d.getVar("CVE_CHECK_COPY_FILES") == "1": deploy_file = d.getVar("CVE_CHECK_RECIPE_FILE") @@ -274,7 +274,7 @@ python cve_check_write_rootfs_manifest () { with open(manifest_name, "w") as f: f.write(text_data) - update_symlinks(manifest_name, link_path) + update_links(manifest_name, link_path) bb.plain("Image CVE report stored in: %s" % manifest_name) if enable_json: @@ -284,7 +284,7 @@ python cve_check_write_rootfs_manifest () { with open(manifest_name, "w") as f: json.dump(json_data, f, indent=2) - update_symlinks(manifest_name, link_path) + update_links(manifest_name, link_path) bb.plain("Image CVE JSON report stored in: %s" % manifest_name) } diff --git a/meta/lib/oe/cve_check.py b/meta/lib/oe/cve_check.py index 3fa77bf9a7..0e56589a03 100644 --- a/meta/lib/oe/cve_check.py +++ b/meta/lib/oe/cve_check.py @@ -178,15 +178,15 @@ def cve_check_merge_jsons(output, data): output["package"].append(data["package"][0]) -def update_symlinks(target_path, link_path): +def update_links(target_path, link_path): """ - Update a symbolic link link_path to point to target_path. + Update a link link_path to point to target_path. Remove the link and recreate it if exist and is different. """ if link_path != target_path and os.path.exists(target_path): if os.path.exists(os.path.realpath(link_path)): os.remove(link_path) - os.symlink(os.path.basename(target_path), link_path) + os.link(target_path, link_path) def convert_cve_version(version): From patchwork Wed Nov 22 12:44:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 35075 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85204C61DF6 for ; Wed, 22 Nov 2023 12:45:18 +0000 (UTC) Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) by mx.groups.io with SMTP id smtpd.web10.18519.1700657111504735903 for ; Wed, 22 Nov 2023 04:45:11 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LWWsirwV; spf=pass (domain: gmail.com, ip: 209.85.218.52, mailfrom: martin.jansa@gmail.com) Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-9fcfd2a069aso500952166b.1 for ; Wed, 22 Nov 2023 04:45:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700657110; x=1701261910; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=R+/Cjvxf54NUl3zLrG33cM+CDDJTLdZbgDH2N9Nv/2Y=; b=LWWsirwVh/XHnTBAgWnoSHWfaGMkGv3fE/ZEmrBUDJhrpxd/sbkK//ltPHhZjH4kKq x+aq3ndSzpJdeXCfVLzSR6RyWOGDKWGdEcU6yBuYdXgrgxgQqV75o4/jCEw75AvxudVZ OWUR14bdS49GT4N9PPDn2wT7JMeUxXpKnK98yIIRG+ogubMAM0M6NOmIMai7E+LWwQ/O BaaletPrHjhqu/hn3buHWk8jioLW42B0Jxti8fa/+rWk4drELmb+sti8KlBGvLxXR47M JFev3ZD14FqRNF7utk0Yk5/KBxaAIp+vNmKkdsixg4vlD6KJJYe4r4YfHjh/NOHYhCYJ kOhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700657110; x=1701261910; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=R+/Cjvxf54NUl3zLrG33cM+CDDJTLdZbgDH2N9Nv/2Y=; b=HCzoxHdugUn3f8Bi6dT8zmtIFhYXuEZoJFHIBBCpllczHBYC4vHcSG2JRBKSpLj+b4 hJSTZjMSnhoEY3KiuWgu0THccq40RPDMWc4yIfmJlS7GEaTBz/oxaumqT8FRjJ9VRrSD SHkW0vK497qPXbWHp0BCemjmFtl+3fp4vMXwNp3cts3jTeSMHOu8oJIb628rcOQLILmC mokKukSkHssZmlZ5m0moqzoHMGOM8fEfiHYSoCspzFTRUU6vzKpYiXUfqXMFEB7AXZj/ EmSuY1xuTT3Wjt9wKq9W6ZqgX7WJCGAZeBpgBJofKliRrJXw4yEWgp/kIi77BmhudqE9 8t6Q== X-Gm-Message-State: AOJu0Yw6Eykl9eMJIXLp5ubavvG8W0CCvCHQhOgO61uo0N3m8jEfBAZ3 Lv6uw5NK/R/xy8Re2Zl07RPUYI+uHPU= X-Google-Smtp-Source: AGHT+IGgQH/ZunSONNdZRlWcZrZGLZo5t4lVwGXUGIMQhNbHRjbwGozmj0GC6V82o0i/ayM/MdBSOw== X-Received: by 2002:a17:906:260e:b0:9ff:ca67:789d with SMTP id h14-20020a170906260e00b009ffca67789dmr1888146ejc.31.1700657109849; Wed, 22 Nov 2023 04:45:09 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id d7-20020a17090648c700b00a0353fd24a5sm1381680ejt.184.2023.11.22.04.45.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:45:09 -0800 (PST) From: Martin Jansa To: openembedded-core@lists.openembedded.org Subject: [PATCH 02/21] create-spdx-2.2.bbclass: use hardlink as well Date: Wed, 22 Nov 2023 13:44:32 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Nov 2023 12:45:18 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191079 [YOCTO #12937] Signed-off-by: Martin Jansa --- meta/classes/create-spdx-2.2.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/create-spdx-2.2.bbclass b/meta/classes/create-spdx-2.2.bbclass index b0aef80db1..8c77f6b886 100644 --- a/meta/classes/create-spdx-2.2.bbclass +++ b/meta/classes/create-spdx-2.2.bbclass @@ -967,7 +967,7 @@ python image_combine_spdx() { if image_link_name: link = imgdeploydir / (image_link_name + suffix) if link != target_path: - link.symlink_to(os.path.relpath(target_path, link.parent)) + os.link(target_path, link) spdx_tar_path = imgdeploydir / (image_name + ".spdx.tar.zst") make_image_link(spdx_tar_path, ".spdx.tar.zst") From patchwork Wed Nov 22 12:44:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 35077 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B72BAC624B4 for ; Wed, 22 Nov 2023 12:45:18 +0000 (UTC) Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) by mx.groups.io with SMTP id smtpd.web11.18433.1700657112377877467 for ; Wed, 22 Nov 2023 04:45:12 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Dt9gWLcV; spf=pass (domain: gmail.com, ip: 209.85.208.54, mailfrom: martin.jansa@gmail.com) Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-548f0b7ab11so3300375a12.1 for ; Wed, 22 Nov 2023 04:45:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700657111; x=1701261911; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ax7SqeQuMmGdkGTx59zhzzfJPaq1NnyD/uyZZ2WikvQ=; b=Dt9gWLcVGJaS965eFDDETitpNJ4JDUQX4LfwaPTnLRbBfWpQ6/WWPhwesNP2RtzdhJ yviYUfKuErChWeoklV7QfeS1u2taVc8mzHPXpQih0QonSpB7lf9iz7Laoh0Ptfo0kVJa Ao5V9Deklhxshl/sSegWiCBEEYn4S/FHYzDuclpfddXv6n31m53a3ZPETSg5bhX6Pi0g eKZBAT6lCnVoFHnqyosTedfT58hxZHllhLO25I36ZtV+BjdDmt4jeQM3qZ3p8rLuNswJ UlrgNfNxHcQUdvZNhdgKwDDzdSPQ+4Yen/hyOqW5X5mHIsD6/IWYM3R+11POKUSfJqTx SiTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700657111; x=1701261911; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ax7SqeQuMmGdkGTx59zhzzfJPaq1NnyD/uyZZ2WikvQ=; b=CKOXYSTfl/VQdxD1uASVWv3qwr9tK/sE4EHwXhtwAWQAnzaF1qCgoZZ007HMpqcWrH 339/dxfxrGrslxhkxbUVVxZ3bIzmLIxvBMVAaDpGvO8ErzCcNm/hczDkVpE0gjxSdxJf 9go2UPetJteThrnngCTyRPv7owMe5Ad2Lw9fto4225NMA6XkXis1ak933rTM3wLWvEvX sf8NSeKtl9kXkEZ9QJxOKpijc7LAZR/BgSmofO4moXJJo6PDOdbkFwYyv6ArsF4nSD4Q UiJ65009XBapKL56wMT6CuBMcBVAOJKjK1YptgAyUksPLNMTroWQ1KyaurjCmlr3C9Pv 14kQ== X-Gm-Message-State: AOJu0YwbAQ9uXa4zs3b9wPNI7BjO2nPafBrizxaJOkBE7l6PXrvgnvIY PggTyvmybu7uwH8HcbiqLfXZA2WjsFU= X-Google-Smtp-Source: AGHT+IFZt5MOC3pIToW1/rhoBzVGfJTqP1gLOMrEl9mui5pt1auoTQ7W0JpubQKE+YdCVaA+8RU36g== X-Received: by 2002:a50:ed89:0:b0:548:5fa3:1483 with SMTP id h9-20020a50ed89000000b005485fa31483mr223116edr.6.1700657110646; Wed, 22 Nov 2023 04:45:10 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id r6-20020aa7cfc6000000b0054a9410bac5sm9641edy.77.2023.11.22.04.45.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:45:10 -0800 (PST) From: Martin Jansa To: openembedded-core@lists.openembedded.org Subject: [PATCH 03/21] image, kernel: allow to disable creating the hardlinks by setting *LINK_NAME variables to empty Date: Wed, 22 Nov 2023 13:44:33 +0100 Message-ID: <3fb298d945d4a4eef1c95f993af6330abdc14ffa.1700600804.git.martin.jansa@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Nov 2023 12:45:18 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191080 From: Martin Jansa * they can be disabled individually by setting *_LINK_NAME to empty or disable them all by setting IMAGE_VERSION_SUFFIX to empty (making them equal to *_NAME variables) There are couple *_LINK_NAME variables: IMAGE_LINK_NAME = "" KERNEL_IMAGE_LINK_NAME = "" KERNEL_DTB_LINK_NAME = "" KERNEL_FIT_LINK_NAME = "" MODULE_TARBALL_LINK_NAME = "" INITRAMFS_LINK_NAME = "" or IMAGE_MACHINE_SUFFIX = "" IMAGE_NAME_SUFFIX = "" IMAGE_VERSION_SUFFIX = "" to have really the minimal filenames: $ ls tmp/deploy/images/qemux86-64/ bzImage core-image-minimal.manifest core-image-minimal.tar.bz2 bzImage-qemux86-64.bin core-image-minimal.qemuboot.conf core-image-minimal.testdata.json core-image-minimal.ext4 core-image-minimal.spdx.tar.zst modules-qemux86-64.tgz and to remove MACHINE name from kernel artifacts as well (if you prefer the MACHINE name in directory only), you can set: KERNEL_ARTIFACT_NAME = "" [YOCTO #12937] Signed-off-by: Martin Jansa --- meta/classes-recipe/image.bbclass | 3 +- meta/classes-recipe/kernel-devicetree.bbclass | 32 +++++++++-------- meta/classes-recipe/kernel-fitimage.bbclass | 17 ++++----- meta/classes-recipe/kernel.bbclass | 36 ++++++++++++------- 4 files changed, 49 insertions(+), 39 deletions(-) diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass index 2dd004d312..48dc70b8fc 100644 --- a/meta/classes-recipe/image.bbclass +++ b/meta/classes-recipe/image.bbclass @@ -595,7 +595,8 @@ python create_symlinks() { taskname = d.getVar("BB_CURRENTTASK") subimages = (d.getVarFlag("do_" + taskname, 'subimages', False) or "").split() - if not link_name: + if not link_name or link_name == img_name: + bb.note("Not creating versioned hardlinks, because IMAGE_LINK_NAME is empty or identical to IMAGE_NAME") return for type in subimages: dst = os.path.join(deploy_dir, link_name + "." + type) diff --git a/meta/classes-recipe/kernel-devicetree.bbclass b/meta/classes-recipe/kernel-devicetree.bbclass index cbfaa5c183..1fde90f023 100644 --- a/meta/classes-recipe/kernel-devicetree.bbclass +++ b/meta/classes-recipe/kernel-devicetree.bbclass @@ -127,22 +127,24 @@ kernel_do_deploy:append() { done } kernel_do_deploy_links:append() { - for dtbf in ${KERNEL_DEVICETREE}; do - dtb=`normalize_dtb "$dtbf"` - dtb_ext=${dtb##*.} - dtb_base_name=`basename $dtb .$dtb_ext` - if [ -n "${KERNEL_DTB_LINK_NAME}" ] ; then + if [ -z "${KERNEL_DTB_LINK_NAME}" -o "${KERNEL_DTB_LINK_NAME}" = "${KERNEL_DTB_NAME}" ] ; then + bbnote "Not creating versioned hardlinks, because KERNEL_DTB_LINK_NAME is empty or identical to KERNEL_DTB_NAME" + else + for dtbf in ${KERNEL_DEVICETREE}; do + dtb=`normalize_dtb "$dtbf"` + dtb_ext=${dtb##*.} + dtb_base_name=`basename $dtb .$dtb_ext` ln -vf $deployDir/$dtb_base_name.$dtb_ext $deployDir/$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext - fi - for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do - if [ "$type" = "zImage" ] && [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ] && [ -n "${KERNEL_DTB_LINK_NAME}" ]; then - ln -vf $deployDir/$type-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ - $deployDir/$type-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} - if [ -e "${KERNEL_OUTPUT_DIR}/${type}.initramfs" ]; then - ln -vf $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ - $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} + for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do + if [ "$type" = "zImage" ] && [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ] ; then + ln -vf $deployDir/$type-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ + $deployDir/$type-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} + if [ -e "${KERNEL_OUTPUT_DIR}/${type}.initramfs" ]; then + ln -vf $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ + $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} + fi fi - fi + done done - done + fi } diff --git a/meta/classes-recipe/kernel-fitimage.bbclass b/meta/classes-recipe/kernel-fitimage.bbclass index 0ad200d9db..50d89a4383 100644 --- a/meta/classes-recipe/kernel-fitimage.bbclass +++ b/meta/classes-recipe/kernel-fitimage.bbclass @@ -860,22 +860,17 @@ kernel_do_deploy:append() { } kernel_do_deploy_links:append() { if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then - if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then - if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then + if [ -z "${KERNEL_FIT_LINK_NAME}" -o "${KERNEL_FIT_LINK_NAME}" = "${KERNEL_FIT_NAME}" ] ; then + bbnote "Not creating versioned hardlinks, because KERNEL_FIT_LINK_NAME is empty or identical to KERNEL_FIT_NAME" + else + if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then ln -vf $deployDir/fitImage-its-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${KERNEL_FIT_LINK_NAME}" - fi - if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then ln -vf $deployDir/fitImage-linux.bin-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-linux.bin-${KERNEL_FIT_LINK_NAME}" fi - fi - if [ -n "${INITRAMFS_IMAGE}" ]; then - if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then + if [ -n "${INITRAMFS_IMAGE}" ]; then ln -vf $deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" - fi - - if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then - if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then + if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then ln -vf $deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" fi fi diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass index db289d776f..7963b6cc17 100644 --- a/meta/classes-recipe/kernel.bbclass +++ b/meta/classes-recipe/kernel.bbclass @@ -855,21 +855,33 @@ kernel_do_deploy_links() { mkdir "$deployDir" fi - for imageType in ${KERNEL_IMAGETYPES} ; do - ln -vf $deployDir/$imageType-${KERNEL_IMAGE_NAME}.bin $deployDir/$imageType-${KERNEL_IMAGE_LINK_NAME}${KERNEL_IMAGE_BIN_EXT} - done + if [ -z "${KERNEL_IMAGE_LINK_NAME}" -o "${KERNEL_IMAGE_LINK_NAME}" = "${KERNEL_IMAGE_NAME}" ] ; then + bbnote "Not creating versioned hardlinks for kernel images, because KERNEL_IMAGE_LINK_NAME is empty or identical to KERNEL_IMAGE_NAME" + else + for imageType in ${KERNEL_IMAGETYPES} ; do + ln -vf $deployDir/$imageType-${KERNEL_IMAGE_NAME}.bin $deployDir/$imageType-${KERNEL_IMAGE_LINK_NAME}${KERNEL_IMAGE_BIN_EXT} + done + fi - if [ ${MODULE_TARBALL_DEPLOY} = "1" -a -f $deployDir/modules-${MODULE_TARBALL_NAME}.tgz ] ; then - ln -vf $deployDir/modules-${MODULE_TARBALL_NAME}.tgz $deployDir/modules-${MODULE_TARBALL_LINK_NAME}.tgz + if [ -z "${MODULE_TARBALL_LINK_NAME}" -o "${MODULE_TARBALL_LINK_NAME}" = "${MODULE_TARBALL_NAME}" ] ; then + bbnote "Not creating versioned hardlinks for module tarball, because MODULE_TARBALL_LINK_NAME is empty or identical to MODULE_TARBALL_NAME" + else + if [ ${MODULE_TARBALL_DEPLOY} = "1" -a -f $deployDir/modules-${MODULE_TARBALL_NAME}.tgz ] ; then + ln -vf $deployDir/modules-${MODULE_TARBALL_NAME}.tgz $deployDir/modules-${MODULE_TARBALL_LINK_NAME}.tgz + fi fi - if [ ! -z "${INITRAMFS_IMAGE}" -a "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then - for imageType in ${KERNEL_IMAGETYPES} ; do - if [ "$imageType" = "fitImage" ] ; then - continue - fi - ln -vf $deployDir/$imageType-${INITRAMFS_NAME}.bin $deployDir/$imageType-${INITRAMFS_LINK_NAME}${KERNEL_IMAGE_BIN_EXT} - done + if [ -z "${INITRAMFS_LINK_NAME}" -o "${INITRAMFS_LINK_NAME}" = "${INITRAMFS_NAME}" ] ; then + bbnote "Not creating versioned hardlinks for initramfs image, because INITRAMFS_LINK_NAME is empty" + else + if [ ! -z "${INITRAMFS_IMAGE}" -a "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then + for imageType in ${KERNEL_IMAGETYPES} ; do + if [ "$imageType" = "fitImage" ] ; then + continue + fi + ln -vf $deployDir/$imageType-${INITRAMFS_NAME}.bin $deployDir/$imageType-${INITRAMFS_LINK_NAME}${KERNEL_IMAGE_BIN_EXT} + done + fi fi } do_deploy_links[prefuncs] += "read_subpackage_metadata" From patchwork Wed Nov 22 12:44:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 35076 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72F4AC61DF5 for ; Wed, 22 Nov 2023 12:45:18 +0000 (UTC) Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) by mx.groups.io with SMTP id smtpd.web10.18520.1700657113383887267 for ; Wed, 22 Nov 2023 04:45:13 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ThQkF0cQ; spf=pass (domain: gmail.com, ip: 209.85.218.51, mailfrom: martin.jansa@gmail.com) Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-991c786369cso936911166b.1 for ; Wed, 22 Nov 2023 04:45:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700657112; x=1701261912; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=lkJ1ujenh9mWajf7E1tItRrrdulx+HQ2UQSuIWBRZak=; b=ThQkF0cQ8dT5B3eaCvg/6Q/zFzvVGgbvlyLOhyg95CPk5g8bNVJaUl8krZQrFowkIP Wm+bR+1dcD+jOA7BaxoWRpj5/yMkSCA7lY5VU8a7ZGmoCv0Gx2IuFtOEYYgrtNx3c1G9 NGBvRDripPmHMXSOc/PCEENv9ad8hX7c49bKwzlFSW6B5QR4NDqXfbspWuVe8CcuRHq/ 1Xkvt9Ug3gEzi8aX+pdV3sGvfhPmuMtUGSYdjNR4WYYVO9y/uuoJxOzZTbR5uXbQWkdM Ev12EBT34r/hJOW8WVcn43QJqmHF4pdNRNJXFTiozVDhySGIP0QfQbqTd1UIHYXOLtVb Sx4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700657112; x=1701261912; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lkJ1ujenh9mWajf7E1tItRrrdulx+HQ2UQSuIWBRZak=; b=jmlYXaKFJQeGjQ6kQDY3vR4QSNumjSGi3QMeHWRguHC1ypta3nfQCaeAtbTWT8+Sl9 Bzxjx1BU2hDMOxBsxIHSbxDsKWsvcuThZ2ekFCudAtvqVy1+cJjnjTzCU9IyplxEpOmH zU4bxaYWxQLM8S6WW6hR5Nf5qPajqvP/mlmmLD64H2RoYwc6VhnufPXEOaDZaqgf/mlU RNVRhqg8W65Xre0eSo/WqMlHZjnLZQ+vascgZVUrvzy1bdRPjt+6its2em3JcC+RJ/ib iigJUI0W3nS+O7C8ae2K1EgAyF/yMCoUpJBEZrNjoRSyT/74oPhbkuo1JPDHObxhWNJQ JKtA== X-Gm-Message-State: AOJu0Yxa32AMMZsc34Kb3w0L7eQU75x9EfBJk69k+nWo4fxyzaub2RqX kRDalBDQ+e4icnlBaKD2ZsJgtsxllRE= X-Google-Smtp-Source: AGHT+IGhfWq/5A6qxDBc1hK5mWV8rP/aAckn1P03ppqOfBUyzL2jn6aNWt4IHQeiUKDZWihIGRdy/Q== X-Received: by 2002:a17:906:4749:b0:9bf:9c58:e91e with SMTP id j9-20020a170906474900b009bf9c58e91emr1291789ejs.56.1700657111518; Wed, 22 Nov 2023 04:45:11 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id n3-20020a1709061d0300b00a047ef6f2c6sm700393ejh.135.2023.11.22.04.45.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:45:11 -0800 (PST) From: Martin Jansa To: openembedded-core@lists.openembedded.org Subject: [PATCH 04/21] kernel: move the leading dash into KERNEL_ARTIFACT_NAME Date: Wed, 22 Nov 2023 13:44:34 +0100 Message-ID: <4002ad7942d87e16d61df25dab114975a0272a39.1700600804.git.martin.jansa@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Nov 2023 12:45:18 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191081 * this matches how IMAGE_MACHINE_SUFFIX works and we can use that for the default value * allows to set IMAGE_MACHINE_SUFFIX to empty for people who prefer to keep MACHINE name only in the directory name otherwise there would be a stray dash in: lrwxrwxrwx 2 martin martin 12 Nov 18 13:25 bzImage -> bzImage-.bin -rw-r--r-- 2 martin martin 12M Nov 18 13:25 bzImage-.bin -rw-r--r-- 2 martin martin 182M Nov 18 13:25 modules-.tgz if you set KERNEL_ARTIFACT_NAME = "" [YOCTO #12937] Signed-off-by: Martin Jansa --- .../classes-recipe/kernel-artifact-names.bbclass | 6 +++--- meta/classes-recipe/kernel-devicetree.bbclass | 12 ++++++------ meta/classes-recipe/kernel-fitimage.bbclass | 16 ++++++++-------- meta/classes-recipe/kernel.bbclass | 10 +++++----- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/meta/classes-recipe/kernel-artifact-names.bbclass b/meta/classes-recipe/kernel-artifact-names.bbclass index 186c6bc5b9..023ce61de5 100644 --- a/meta/classes-recipe/kernel-artifact-names.bbclass +++ b/meta/classes-recipe/kernel-artifact-names.bbclass @@ -14,7 +14,7 @@ inherit image-artifact-names KERNEL_VERSION_SUFFIX ?= "${IMAGE_VERSION_SUFFIX}" -KERNEL_ARTIFACT_NAME ?= "${MACHINE}" +KERNEL_ARTIFACT_NAME ?= "${IMAGE_MACHINE_SUFFIX}" KERNEL_ARTIFACT_LINK_NAME ?= "${KERNEL_ARTIFACT_NAME}${KERNEL_VERSION_SUFFIX}" KERNEL_ARTIFACT_BIN_EXT ?= ".bin" @@ -35,5 +35,5 @@ MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}" MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" MODULE_TARBALL_DEPLOY ?= "1" -INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}" -INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}" +INITRAMFS_NAME ?= "initramfs${KERNEL_ARTIFACT_NAME}" +INITRAMFS_LINK_NAME ?= "initramfs${KERNEL_ARTIFACT_LINK_NAME}" diff --git a/meta/classes-recipe/kernel-devicetree.bbclass b/meta/classes-recipe/kernel-devicetree.bbclass index 1fde90f023..2cd8588304 100644 --- a/meta/classes-recipe/kernel-devicetree.bbclass +++ b/meta/classes-recipe/kernel-devicetree.bbclass @@ -102,7 +102,7 @@ kernel_do_deploy:append() { fi install -m 0644 ${D}/${KERNEL_DTBDEST}/$dtb $deployDir/$dtb_base_name.$dtb_ext if [ -n "${KERNEL_DTB_NAME}" ] ; then - ln -vf $deployDir/$dtb_base_name.$dtb_ext $deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext + ln -vf $deployDir/$dtb_base_name.$dtb_ext $deployDir/$dtb_base_name${KERNEL_DTB_NAME}.$dtb_ext fi for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do if [ "$type" = "zImage" ] && [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ]; then @@ -111,7 +111,7 @@ kernel_do_deploy:append() { > $deployDir/$type-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} if [ -n "${KERNEL_DTB_NAME}" ]; then ln -sf $type-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ - $deployDir/$type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} + $deployDir/$type-$dtb_base_name${KERNEL_DTB_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} fi if [ -e "${KERNEL_OUTPUT_DIR}/${type}.initramfs" ]; then cat ${KERNEL_OUTPUT_DIR}/${type}.initramfs \ @@ -119,7 +119,7 @@ kernel_do_deploy:append() { > $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} if [ -n "${KERNEL_DTB_NAME}" ]; then ln -sf ${type}-${INITRAMFS_NAME}-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ - $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} + $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name${KERNEL_DTB_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} fi fi fi @@ -134,14 +134,14 @@ kernel_do_deploy_links:append() { dtb=`normalize_dtb "$dtbf"` dtb_ext=${dtb##*.} dtb_base_name=`basename $dtb .$dtb_ext` - ln -vf $deployDir/$dtb_base_name.$dtb_ext $deployDir/$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext + ln -vf $deployDir/$dtb_base_name.$dtb_ext $deployDir/$dtb_base_name${KERNEL_DTB_LINK_NAME}.$dtb_ext for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do if [ "$type" = "zImage" ] && [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ] ; then ln -vf $deployDir/$type-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ - $deployDir/$type-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} + $deployDir/$type-$dtb_base_name${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} if [ -e "${KERNEL_OUTPUT_DIR}/${type}.initramfs" ]; then ln -vf $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ - $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} + $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} fi fi done diff --git a/meta/classes-recipe/kernel-fitimage.bbclass b/meta/classes-recipe/kernel-fitimage.bbclass index 50d89a4383..266680ffa8 100644 --- a/meta/classes-recipe/kernel-fitimage.bbclass +++ b/meta/classes-recipe/kernel-fitimage.bbclass @@ -843,17 +843,17 @@ kernel_do_deploy:append() { if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then bbnote "Copying fit-image.its source file..." - install -m 0644 ${B}/fit-image.its "$deployDir/fitImage-its-${KERNEL_FIT_NAME}.its" + install -m 0644 ${B}/fit-image.its "$deployDir/fitImage-its${KERNEL_FIT_NAME}.its" bbnote "Copying linux.bin file..." - install -m 0644 ${B}/linux.bin $deployDir/fitImage-linux.bin-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} + install -m 0644 ${B}/linux.bin $deployDir/fitImage-linux.bin${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} fi if [ -n "${INITRAMFS_IMAGE}" ]; then bbnote "Copying fit-image-${INITRAMFS_IMAGE}.its source file..." - install -m 0644 ${B}/fit-image-${INITRAMFS_IMAGE}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its" + install -m 0644 ${B}/fit-image-${INITRAMFS_IMAGE}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}.its" if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then bbnote "Copying fitImage-${INITRAMFS_IMAGE} file..." - install -m 0644 ${B}/${KERNEL_OUTPUT_DIR}/fitImage-${INITRAMFS_IMAGE} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT}" + install -m 0644 ${B}/${KERNEL_OUTPUT_DIR}/fitImage-${INITRAMFS_IMAGE} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT}" fi fi fi @@ -864,14 +864,14 @@ kernel_do_deploy_links:append() { bbnote "Not creating versioned hardlinks, because KERNEL_FIT_LINK_NAME is empty or identical to KERNEL_FIT_NAME" else if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then - ln -vf $deployDir/fitImage-its-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${KERNEL_FIT_LINK_NAME}" - ln -vf $deployDir/fitImage-linux.bin-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-linux.bin-${KERNEL_FIT_LINK_NAME}" + ln -vf $deployDir/fitImage-its${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its${KERNEL_FIT_LINK_NAME}" + ln -vf $deployDir/fitImage-linux.bin${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-linux.bin${KERNEL_FIT_LINK_NAME}" fi if [ -n "${INITRAMFS_IMAGE}" ]; then - ln -vf $deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" + ln -vf $deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_LINK_NAME}" if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then - ln -vf $deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" + ln -vf $deployDir/fitImage-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_LINK_NAME}" fi fi fi diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass index 7963b6cc17..e38784a320 100644 --- a/meta/classes-recipe/kernel.bbclass +++ b/meta/classes-recipe/kernel.bbclass @@ -813,7 +813,7 @@ kernel_do_deploy() { fi for imageType in ${KERNEL_IMAGETYPES} ; do - baseName=$imageType-${KERNEL_IMAGE_NAME} + baseName=$imageType${KERNEL_IMAGE_NAME} if [ -s ${KERNEL_OUTPUT_DIR}/$imageType.stripped ] ; then install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType.stripped $deployDir/$baseName${KERNEL_IMAGE_BIN_EXT} @@ -833,7 +833,7 @@ kernel_do_deploy() { TAR_ARGS="" fi TAR_ARGS="$TAR_ARGS --owner=0 --group=0" - tar $TAR_ARGS -cv -C ${D}${root_prefix} lib | gzip -9n > $deployDir/modules-${MODULE_TARBALL_NAME}.tgz + tar $TAR_ARGS -cv -C ${D}${root_prefix} lib | gzip -9n > $deployDir/modules${MODULE_TARBALL_NAME}.tgz fi if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then @@ -859,15 +859,15 @@ kernel_do_deploy_links() { bbnote "Not creating versioned hardlinks for kernel images, because KERNEL_IMAGE_LINK_NAME is empty or identical to KERNEL_IMAGE_NAME" else for imageType in ${KERNEL_IMAGETYPES} ; do - ln -vf $deployDir/$imageType-${KERNEL_IMAGE_NAME}.bin $deployDir/$imageType-${KERNEL_IMAGE_LINK_NAME}${KERNEL_IMAGE_BIN_EXT} + ln -vf $deployDir/$imageType${KERNEL_IMAGE_NAME}.bin $deployDir/$imageType${KERNEL_IMAGE_LINK_NAME}${KERNEL_IMAGE_BIN_EXT} done fi if [ -z "${MODULE_TARBALL_LINK_NAME}" -o "${MODULE_TARBALL_LINK_NAME}" = "${MODULE_TARBALL_NAME}" ] ; then bbnote "Not creating versioned hardlinks for module tarball, because MODULE_TARBALL_LINK_NAME is empty or identical to MODULE_TARBALL_NAME" else - if [ ${MODULE_TARBALL_DEPLOY} = "1" -a -f $deployDir/modules-${MODULE_TARBALL_NAME}.tgz ] ; then - ln -vf $deployDir/modules-${MODULE_TARBALL_NAME}.tgz $deployDir/modules-${MODULE_TARBALL_LINK_NAME}.tgz + if [ ${MODULE_TARBALL_DEPLOY} = "1" -a -f $deployDir/modules${MODULE_TARBALL_NAME}.tgz ] ; then + ln -vf $deployDir/modules${MODULE_TARBALL_NAME}.tgz $deployDir/modules${MODULE_TARBALL_LINK_NAME}.tgz fi fi From patchwork Wed Nov 22 12:44:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 35073 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B598C61DB3 for ; Wed, 22 Nov 2023 12:45:18 +0000 (UTC) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) by mx.groups.io with SMTP id smtpd.web11.18434.1700657114026053165 for ; Wed, 22 Nov 2023 04:45:14 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=VHxEQ+UR; spf=pass (domain: gmail.com, ip: 209.85.208.180, mailfrom: martin.jansa@gmail.com) Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-2c87adce180so46935071fa.0 for ; Wed, 22 Nov 2023 04:45:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700657112; x=1701261912; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=gZyEUh/T/qToStF5ZzG0KtriNPfDdQITZFOzGEjOxIQ=; b=VHxEQ+URNLphCrJ34LUWTXeaPx88/h9JOR10ek/CnKwZ9PNUbPRxCdUJ+oWw3Kkb4/ CJBuK3QOEbtdqoej0gz9kJw39SKUCM+npczr5p4cFqqG4KbvzadwWD4081OxTl5sAjFR z+oKrk05dTBeumNA9fxF6UblX1+MlKmV9uaSUHVzCRm2WAORsqmRYkOaZw8aiPcVmalv QO8BPJbJmV3F7GOnmOoQVCzPAJr4JZ2r7dGwyFqsbF0gj66Mh4KPd1TDk4HCOEES58ZI eqvD9/wvd25CFOhd7x+Ya84hiNIRg/AjpISug0070OOjggagVQiZe1LMearBrf1pMGsK +8Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700657112; x=1701261912; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gZyEUh/T/qToStF5ZzG0KtriNPfDdQITZFOzGEjOxIQ=; b=GHXgn9PsB6DFj9zkHqyGRfhFDZJ7SOGqEQWUdZ9vm81sdM7iqIiDl+OHjJV3+P6Vgc 0hktK9LgX9LH4cEZSNDuMEVDQmcTtqFPCHFPTWCjgr2iV9EIOC1Htz9ZWMCuLruroqzc 1HyQTNPBfYi2+BnbKk5GSAlMk3D/jXoePsBtBDq7eJN/PVR9hDF5MyDyG2mnts9bteuJ jB4Hqsbrg7h9q2xluAixieCGPf9PAsj561J3wkilLYc/Ws5OP/SjgVKYymAwic3ZBdbt 7HzSLVw9/+yGndZ2duZZFc7OCQaB8xZx22ylowTrkAvu1Tm2ef86UmoUJAmwUbkVf5Cx v7Nw== X-Gm-Message-State: AOJu0YyZROgFJ3o6Rd82my96jr1nwKpMbCPHmwMhwWw35VXaZqQS66Ff vvb3S6tnsSmYGsbZMh6c2VH7wtDMo7E= X-Google-Smtp-Source: AGHT+IE6NtY20SVzFZCMOkeGmMJZ+dClN4Nsl2cx34+mxRAGA1kV7rkj1h8LxT20V020U+x2Ndxa+A== X-Received: by 2002:a05:6512:ac3:b0:509:1033:c544 with SMTP id n3-20020a0565120ac300b005091033c544mr2343365lfu.50.1700657112170; Wed, 22 Nov 2023 04:45:12 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id cm7-20020a170906f58700b009e5e1710ae7sm5377963ejd.191.2023.11.22.04.45.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:45:11 -0800 (PST) From: Martin Jansa To: openembedded-core@lists.openembedded.org Subject: [PATCH 05/21] kernel-fitimage.bbclass: avoid duplicate .bin extension Date: Wed, 22 Nov 2023 13:44:35 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Nov 2023 12:45:18 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191082 * the linux.bin was deployed as: fitImage-linux.bin${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} where KERNEL_FIT_BIN_EXT is the 2nd ".bin" * add the${KERNEL_FIT_BIN_EXT} also to corresponding links: fitImage-linux${KERNEL_FIT_LINK_NAME}${KERNEL_FIT_BIN_EXT} [YOCTO #12937] Signed-off-by: Martin Jansa --- meta/classes-recipe/kernel-fitimage.bbclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta/classes-recipe/kernel-fitimage.bbclass b/meta/classes-recipe/kernel-fitimage.bbclass index 266680ffa8..25a33123a6 100644 --- a/meta/classes-recipe/kernel-fitimage.bbclass +++ b/meta/classes-recipe/kernel-fitimage.bbclass @@ -845,7 +845,7 @@ kernel_do_deploy:append() { bbnote "Copying fit-image.its source file..." install -m 0644 ${B}/fit-image.its "$deployDir/fitImage-its${KERNEL_FIT_NAME}.its" bbnote "Copying linux.bin file..." - install -m 0644 ${B}/linux.bin $deployDir/fitImage-linux.bin${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} + install -m 0644 ${B}/linux.bin $deployDir/fitImage-linux${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} fi if [ -n "${INITRAMFS_IMAGE}" ]; then @@ -865,13 +865,13 @@ kernel_do_deploy_links:append() { else if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then ln -vf $deployDir/fitImage-its${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its${KERNEL_FIT_LINK_NAME}" - ln -vf $deployDir/fitImage-linux.bin${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-linux.bin${KERNEL_FIT_LINK_NAME}" + ln -vf $deployDir/fitImage-linux${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-linux${KERNEL_FIT_LINK_NAME}${KERNEL_FIT_BIN_EXT}" fi if [ -n "${INITRAMFS_IMAGE}" ]; then ln -vf $deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_LINK_NAME}" if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then - ln -vf $deployDir/fitImage-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_LINK_NAME}" + ln -vf $deployDir/fitImage-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_LINK_NAME}${KERNEL_FIT_BIN_EXT}" fi fi fi From patchwork Wed Nov 22 12:44:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 35074 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 665F1C61DF4 for ; Wed, 22 Nov 2023 12:45:18 +0000 (UTC) Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by mx.groups.io with SMTP id smtpd.web11.18435.1700657114441052745 for ; Wed, 22 Nov 2023 04:45:14 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=eDbBiqcZ; spf=pass (domain: gmail.com, ip: 209.85.218.45, mailfrom: martin.jansa@gmail.com) Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-9fffa4c4f43so410289566b.3 for ; Wed, 22 Nov 2023 04:45:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700657113; x=1701261913; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=fqhjYl5w8LOzOCTE8sWbviy2v9fZ5k92HrDXd354WwA=; b=eDbBiqcZGs4+amWrvd4nVskyKsgz9BZhtz8b8hxGRIbzXe3RWz73oa3qc7LZlJYIrl tTNbBXeoeiEuLmxoqCKsoDpEJROVLBdIaqeC1D8KMJSendW+k7uXvFl8IQ4D9CIWHfpm HmBJ0powZwQmGgriYRHB7mYXXdqPl1j0vhnx9o9deCiR2tqAIrtHEF6U9/Bzhs93nxQg IUfiYonePpdv3VF5d0iL5ayQV17XknN5oa2wmFwVOI2a6xbFVagzWWV6mv4Kt+q/R2eh JgRHuWXobyxFCnvLFJGJKaDn/JVXuYYiQINkjrYlOgIA/fII5xDgOgLRX5xn5ur8gBAo bUmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700657113; x=1701261913; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fqhjYl5w8LOzOCTE8sWbviy2v9fZ5k92HrDXd354WwA=; b=H5w+TorQ64SRjmckniataERp8K7yJYWYT9sC08E3xPCBb9MmexTspsGlzKn6ld5v9A n79hqOHVQEFepBsM6zIfrdR+CgJcSOD2l/s5TBMw4tt+MA62yjSxigDanRvt8uUOB7Zf TUgGolh/tP1CA5kX2oYCYqh8nqpcx7shZruK5fwI6pkPA63tmDpOCyYDEqFN55XdyLlg JEhbmipBx+P7WatXopcqtFS9nK33aVP1kCkqdpZaKQHLk2Pomdb4AE9CrHF8GneM+o+R 8cVLVQxg6OoRaRka6QM2Zg7xHxdfwyrBQZu1bFCF0YsFGl0HeUbl1udUNE5QzoAy5SY0 yQJQ== X-Gm-Message-State: AOJu0Yy+xcGy5VDLrItVqYgSZz+fROdXMWnK6x18rbtZP2DUOVr8bdXe 08QZhli3e0gEdOXt7JEx9o3KFIMn7m4= X-Google-Smtp-Source: AGHT+IE7Zy+rRtS67uOFUj0W6chEpAZsowv8wwE9joTa07vvtIYn/XBqPWZd/tN7OGRe5N5JsYUh8g== X-Received: by 2002:a17:906:535b:b0:a03:7de1:374f with SMTP id j27-20020a170906535b00b00a037de1374fmr1610269ejo.25.1700657112867; Wed, 22 Nov 2023 04:45:12 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id e10-20020a170906314a00b009a13fdc139fsm6529375eje.183.2023.11.22.04.45.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:45:12 -0800 (PST) From: Martin Jansa To: openembedded-core@lists.openembedded.org Subject: [PATCH 06/21] kernel-fitimage.bbclass: add .its extension also to links Date: Wed, 22 Nov 2023 13:44:36 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Nov 2023 12:45:18 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191083 * for consistency with the names [YOCTO #12937] --- meta/classes-recipe/kernel-artifact-names.bbclass | 2 ++ meta/classes-recipe/kernel-fitimage.bbclass | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/meta/classes-recipe/kernel-artifact-names.bbclass b/meta/classes-recipe/kernel-artifact-names.bbclass index 023ce61de5..1117a5b61f 100644 --- a/meta/classes-recipe/kernel-artifact-names.bbclass +++ b/meta/classes-recipe/kernel-artifact-names.bbclass @@ -31,6 +31,8 @@ KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}" KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" KERNEL_FIT_BIN_EXT ?= "${KERNEL_ARTIFACT_BIN_EXT}" +KERNEL_FIT_ITS_EXT ?= ".its" + MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}" MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" MODULE_TARBALL_DEPLOY ?= "1" diff --git a/meta/classes-recipe/kernel-fitimage.bbclass b/meta/classes-recipe/kernel-fitimage.bbclass index 25a33123a6..ee2496fedc 100644 --- a/meta/classes-recipe/kernel-fitimage.bbclass +++ b/meta/classes-recipe/kernel-fitimage.bbclass @@ -843,14 +843,14 @@ kernel_do_deploy:append() { if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then bbnote "Copying fit-image.its source file..." - install -m 0644 ${B}/fit-image.its "$deployDir/fitImage-its${KERNEL_FIT_NAME}.its" + install -m 0644 ${B}/fit-image.its "$deployDir/fitImage-its${KERNEL_FIT_NAME}${KERNEL_FIT_ITS_EXT}" bbnote "Copying linux.bin file..." install -m 0644 ${B}/linux.bin $deployDir/fitImage-linux${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} fi if [ -n "${INITRAMFS_IMAGE}" ]; then bbnote "Copying fit-image-${INITRAMFS_IMAGE}.its source file..." - install -m 0644 ${B}/fit-image-${INITRAMFS_IMAGE}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}.its" + install -m 0644 ${B}/fit-image-${INITRAMFS_IMAGE}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}${KERNEL_FIT_ITS_EXT}" if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then bbnote "Copying fitImage-${INITRAMFS_IMAGE} file..." install -m 0644 ${B}/${KERNEL_OUTPUT_DIR}/fitImage-${INITRAMFS_IMAGE} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT}" @@ -864,12 +864,12 @@ kernel_do_deploy_links:append() { bbnote "Not creating versioned hardlinks, because KERNEL_FIT_LINK_NAME is empty or identical to KERNEL_FIT_NAME" else if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then - ln -vf $deployDir/fitImage-its${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its${KERNEL_FIT_LINK_NAME}" + ln -vf $deployDir/fitImage-its${KERNEL_FIT_NAME}${KERNEL_FIT_ITS_EXT} "$deployDir/fitImage-its${KERNEL_FIT_LINK_NAME}${KERNEL_FIT_ITS_EXT}" ln -vf $deployDir/fitImage-linux${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-linux${KERNEL_FIT_LINK_NAME}${KERNEL_FIT_BIN_EXT}" fi if [ -n "${INITRAMFS_IMAGE}" ]; then - ln -vf $deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_LINK_NAME}" + ln -vf $deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}${KERNEL_FIT_ITS_EXT} "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_LINK_NAME}${KERNEL_FIT_ITS_EXT}" if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then ln -vf $deployDir/fitImage-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_LINK_NAME}${KERNEL_FIT_BIN_EXT}" fi From patchwork Wed Nov 22 12:44:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 35072 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 550D1C61DB1 for ; Wed, 22 Nov 2023 12:45:18 +0000 (UTC) Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) by mx.groups.io with SMTP id smtpd.web10.18521.1700657115290314365 for ; Wed, 22 Nov 2023 04:45:15 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cDrTCf6+; spf=pass (domain: gmail.com, ip: 209.85.208.51, mailfrom: martin.jansa@gmail.com) Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-5441ba3e53cso9218861a12.1 for ; Wed, 22 Nov 2023 04:45:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700657114; x=1701261914; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=GEs5GP4sUVL6h/dzzIfbpFERW0EoyKNfbGoR4IsCx0k=; b=cDrTCf6+kmSTgZ0xAx/ljTXqSLOOMofiJhup4QTPKVe48kfDe0krwXaVQDO0lhBfgq dF9I63WskSw2iz0ijudKM7HONlA1yNRqUw9sLdOaipiuAqWd0Vw/qu9JiXcm6txB3NWy qmC7ysXKm5GtFdfSjv3kvAvFrgbfkAazqXSJwUnaJghVjI8jeo5NxxblsHC5M1laeCVe //SHgM28g8l14A5oYt/vtEhDNDRAWPfOj/kOtDhp7GsrUXQCveXSVbTx61hGK3D8iXdI vJmTOHq74/OosTOfMf7mtoJI/UjOJKR8an/O9/K4hYs5cZopEVm3yqhOYCIrFDuzmv5S GCQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700657114; x=1701261914; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GEs5GP4sUVL6h/dzzIfbpFERW0EoyKNfbGoR4IsCx0k=; b=oORCwScv3SHlCdchLRyBqckmmUp3appU5I+Ec9OIyKqQxp1hpvNp8fAnBKg/+3QdxC FgB37ADKtM9ExvJ6rQ/UbF1A7QY2wq4nth1MPzyLCW/ZKe9UoU9gYRo2Q5yffcZpTD7G PLB0ssO5eIGysVVPaM6ncNAcrUZkIIfa5/guLsSJnHDmRZr/7SHf5gucAKykE6uN+ANE BSduncOfQnKzwyxcGvOfNNBli2NNUpVcRvFNVsDw2slh8YYAfW8kD4oqBRHRx3TTwMNL lSmQc4crs6Le9DCCEWjTh78PZTQXC9b6qSJHgNZMdhq3GhwKo5P9uIsT9gItAxbfMMnC SHig== X-Gm-Message-State: AOJu0Yz9hFB6S61ypFklbKAyF2AQslzceEgvkHGktuhXP1HcUlESZru7 clo2ZTkQq0K0zQEIXrSu/lXI8jTAAZI= X-Google-Smtp-Source: AGHT+IGlN5NBdOkuKtDHYKB++9iEXs/sk4F+n5zXt5424m+pIi9qj+izKFN/AZXIDGXssUeDprQ2bA== X-Received: by 2002:aa7:d30e:0:b0:543:6e4f:37b with SMTP id p14-20020aa7d30e000000b005436e4f037bmr1533932edq.36.1700657113605; Wed, 22 Nov 2023 04:45:13 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id s16-20020aa7cb10000000b00544f8271b5fsm6010044edt.8.2023.11.22.04.45.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:45:13 -0800 (PST) From: Martin Jansa To: openembedded-core@lists.openembedded.org Subject: [PATCH 07/21] uboot: use ${IMAGE_MACHINE_SUFFIX} instead of -${MACHINE} and use hardlinks Date: Wed, 22 Nov 2023 13:44:37 +0100 Message-ID: <750bddbb2afb8d1e4d7260189d2db81dc5382f0d.1700600804.git.martin.jansa@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Nov 2023 12:45:18 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191084 * rename variables to match the conventions used in kernel and image recipes * use versioned hardlinks as kernel and image recipes, but don't split the do_deploy_links task (can be split later). [YOCTO #12937] Signed-off-by: Martin Jansa --- meta/classes-recipe/uboot-config.bbclass | 22 ++- meta/classes-recipe/uboot-sign.bbclass | 68 ++++----- meta/recipes-bsp/u-boot/u-boot.inc | 177 +++++++++++------------ 3 files changed, 129 insertions(+), 138 deletions(-) diff --git a/meta/classes-recipe/uboot-config.bbclass b/meta/classes-recipe/uboot-config.bbclass index 9be1d64d3e..a3c875e762 100644 --- a/meta/classes-recipe/uboot-config.bbclass +++ b/meta/classes-recipe/uboot-config.bbclass @@ -19,6 +19,12 @@ def removesuffix(s, suffix): return s[:-len(suffix)] return s +inherit kernel-artifact-names + +UBOOT_VERSION_SUFFIX ?= "${IMAGE_VERSION_SUFFIX}" +UBOOT_ARTIFACT_NAME ?= "${IMAGE_MACHINE_SUFFIX}" +UBOOT_ARTIFACT_LINK_NAME ?= "${UBOOT_ARTIFACT_NAME}${UBOOT_VERSION_SUFFIX}" + UBOOT_ENTRYPOINT ?= "20008000" UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}" @@ -27,8 +33,8 @@ UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}" UBOOT_SUFFIX ??= "bin" UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}" UBOOT_BINARYNAME ?= "${@os.path.splitext(d.getVar("UBOOT_BINARY"))[0]}" -UBOOT_IMAGE ?= "${UBOOT_BINARYNAME}-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}" -UBOOT_SYMLINK ?= "${UBOOT_BINARYNAME}-${MACHINE}.${UBOOT_SUFFIX}" +UBOOT_IMAGE ?= "${UBOOT_BINARYNAME}${UBOOT_ARTIFACT_NAME}.${UBOOT_SUFFIX}" +UBOOT_LINK ?= "${UBOOT_BINARYNAME}${UBOOT_ARTIFACT_LINK_NAME}.${UBOOT_SUFFIX}" UBOOT_MAKE_TARGET ?= "all" # Output the ELF generated. Some platforms can use the ELF file and directly @@ -38,7 +44,7 @@ UBOOT_ELF ?= "" UBOOT_ELF_SUFFIX ?= "elf" UBOOT_ELF_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}" UBOOT_ELF_BINARY ?= "u-boot.${UBOOT_ELF_SUFFIX}" -UBOOT_ELF_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_ELF_SUFFIX}" +UBOOT_ELF_LINK ?= "u-boot${UBOOT_ARTIFACT_LINK_NAME}.${UBOOT_ELF_SUFFIX}" # Some versions of u-boot build an SPL (Second Program Loader) image that # should be packaged along with the u-boot binary as well as placed in the @@ -49,8 +55,8 @@ SPL_BINARY ?= "" 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}" +SPL_IMAGE ?= "${SPL_BINARYNAME}${UBOOT_ARTIFACT_NAME}${SPL_DELIMITER}${SPL_SUFFIX}" +SPL_LINK ?= "${SPL_BINARYNAME}${UBOOT_ARTIFACT_LINK_NAME}${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' @@ -62,8 +68,8 @@ UBOOT_ENV ?= "" UBOOT_ENV_SRC_SUFFIX ?= "cmd" UBOOT_ENV_SRC ?= "${UBOOT_ENV}.${UBOOT_ENV_SRC_SUFFIX}" UBOOT_ENV_BINARY ?= "${UBOOT_ENV}.${UBOOT_ENV_SUFFIX}" -UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}" -UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${UBOOT_ENV_SUFFIX}" +UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}${UBOOT_ARTIFACT_NAME}.${UBOOT_ENV_SUFFIX}" +UBOOT_ENV_LINK ?= "${UBOOT_ENV}${UBOOT_ARTIFACT_LINK_NAME}.${UBOOT_ENV_SUFFIX}" # Default name of u-boot initial env, but enable individual recipes to change # this value. @@ -73,7 +79,7 @@ UBOOT_INITIAL_ENV ?= "${PN}-initial-env" # to find EXTLINUX conf file. UBOOT_EXTLINUX_INSTALL_DIR ?= "/boot/extlinux" UBOOT_EXTLINUX_CONF_NAME ?= "extlinux.conf" -UBOOT_EXTLINUX_SYMLINK ?= "${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}-${PR}" +UBOOT_EXTLINUX_CONF_LINK ?= "${UBOOT_EXTLINUX_CONF_NAME}${UBOOT_ARTIFACT_LINK_NAME}" # Options for the device tree compiler passed to mkimage '-D' feature: UBOOT_MKIMAGE_DTCOPTS ??= "" diff --git a/meta/classes-recipe/uboot-sign.bbclass b/meta/classes-recipe/uboot-sign.bbclass index ad04c82378..e89c8214d3 100644 --- a/meta/classes-recipe/uboot-sign.bbclass +++ b/meta/classes-recipe/uboot-sign.bbclass @@ -34,27 +34,27 @@ UBOOT_FITIMAGE_ENABLE ?= "0" SPL_SIGN_ENABLE ?= "0" # Default value for deployment filenames. -UBOOT_DTB_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.dtb" +UBOOT_DTB_IMAGE ?= "u-boot${UBOOT_ARTIFACT_NAME}.dtb" UBOOT_DTB_BINARY ?= "u-boot.dtb" UBOOT_DTB_SIGNED ?= "${UBOOT_DTB_BINARY}-signed" -UBOOT_DTB_SYMLINK ?= "u-boot-${MACHINE}.dtb" -UBOOT_NODTB_IMAGE ?= "u-boot-nodtb-${MACHINE}-${PV}-${PR}.bin" +UBOOT_DTB_LINK ?= "u-boot${UBOOT_ARTIFACT_LINK_NAME}.dtb" +UBOOT_NODTB_IMAGE ?= "u-boot-nodtb${UBOOT_ARTIFACT_NAME}.bin" UBOOT_NODTB_BINARY ?= "u-boot-nodtb.bin" -UBOOT_NODTB_SYMLINK ?= "u-boot-nodtb-${MACHINE}.bin" -UBOOT_ITS_IMAGE ?= "u-boot-its-${MACHINE}-${PV}-${PR}" +UBOOT_NODTB_LINK ?= "u-boot-nodtb${UBOOT_ARTIFACT_LINK_NAME}.bin" +UBOOT_ITS_IMAGE ?= "u-boot-its${UBOOT_ARTIFACT_NAME}" UBOOT_ITS ?= "u-boot.its" -UBOOT_ITS_SYMLINK ?= "u-boot-its-${MACHINE}" -UBOOT_FITIMAGE_IMAGE ?= "u-boot-fitImage-${MACHINE}-${PV}-${PR}" +UBOOT_ITS_LINK ?= "u-boot-its${UBOOT_ARTIFACT_LINK_NAME}" +UBOOT_FITIMAGE_IMAGE ?= "u-boot-fitImage${UBOOT_ARTIFACT_NAME}" UBOOT_FITIMAGE_BINARY ?= "u-boot-fitImage" -UBOOT_FITIMAGE_SYMLINK ?= "u-boot-fitImage-${MACHINE}" +UBOOT_FITIMAGE_LINK ?= "u-boot-fitImage${UBOOT_ARTIFACT_LINK_NAME}" SPL_DIR ?= "spl" -SPL_DTB_IMAGE ?= "u-boot-spl-${MACHINE}-${PV}-${PR}.dtb" +SPL_DTB_IMAGE ?= "u-boot-spl${UBOOT_ARTIFACT_NAME}.dtb" SPL_DTB_BINARY ?= "u-boot-spl.dtb" SPL_DTB_SIGNED ?= "${SPL_DTB_BINARY}-signed" -SPL_DTB_SYMLINK ?= "u-boot-spl-${MACHINE}.dtb" -SPL_NODTB_IMAGE ?= "u-boot-spl-nodtb-${MACHINE}-${PV}-${PR}.bin" +SPL_DTB_LINK ?= "u-boot-spl${UBOOT_ARTIFACT_LINK_NAME}.dtb" +SPL_NODTB_IMAGE ?= "u-boot-spl-nodtb${UBOOT_ARTIFACT_NAME}.bin" SPL_NODTB_BINARY ?= "u-boot-spl-nodtb.bin" -SPL_NODTB_SYMLINK ?= "u-boot-spl-nodtb-${MACHINE}.bin" +SPL_NODTB_LINK ?= "u-boot-spl-nodtb${UBOOT_ARTIFACT_LINK_NAME}.bin" # U-Boot fitImage description UBOOT_FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}" @@ -148,14 +148,14 @@ deploy_dtb() { if [ -e "${UBOOT_DTB_SIGNED}" ]; then install -Dm644 ${UBOOT_DTB_SIGNED} ${DEPLOYDIR}/${uboot_dtb_binary} if [ -n "${type}" ]; then - ln -sf ${uboot_dtb_binary} ${DEPLOYDIR}/${UBOOT_DTB_IMAGE} + ln -vf ${DEPLOYDIR}/${uboot_dtb_binary} ${DEPLOYDIR}/${UBOOT_DTB_IMAGE} fi fi if [ -f "${UBOOT_NODTB_BINARY}" ]; then install -Dm644 ${UBOOT_NODTB_BINARY} ${DEPLOYDIR}/${uboot_nodtb_binary} if [ -n "${type}" ]; then - ln -sf ${uboot_nodtb_binary} ${DEPLOYDIR}/${UBOOT_NODTB_IMAGE} + ln -vf ${DEPLOYDIR}/${uboot_nodtb_binary} ${DEPLOYDIR}/${UBOOT_NODTB_IMAGE} fi fi } @@ -182,14 +182,14 @@ deploy_spl_dtb() { if [ -e "${SPL_DIR}/${SPL_DTB_SIGNED}" ] ; then install -Dm644 ${SPL_DIR}/${SPL_DTB_SIGNED} ${DEPLOYDIR}/${spl_dtb_binary} if [ -n "${type}" ]; then - ln -sf ${spl_dtb_binary} ${DEPLOYDIR}/${SPL_DTB_IMAGE} + ln -vf ${DEPLOYDIR}/${spl_dtb_binary} ${DEPLOYDIR}/${SPL_DTB_IMAGE} fi fi if [ -f "${SPL_DIR}/${SPL_NODTB_BINARY}" ] ; then install -Dm644 ${SPL_DIR}/${SPL_NODTB_BINARY} ${DEPLOYDIR}/${spl_nodtb_binary} if [ -n "${type}" ]; then - ln -sf ${spl_nodtb_binary} ${DEPLOYDIR}/${SPL_NODTB_IMAGE} + ln -vf ${DEPLOYDIR}/${spl_nodtb_binary} ${DEPLOYDIR}/${SPL_NODTB_IMAGE} fi fi @@ -378,8 +378,8 @@ deploy_helper() { if [ "${UBOOT_FITIMAGE_ENABLE}" = "1" -a -n "${SPL_DTB_BINARY}" ]; then if [ -n "${type}" ]; then - uboot_its_image="u-boot-its-${type}-${PV}-${PR}" - uboot_fitimage_image="u-boot-fitImage-${type}-${PV}-${PR}" + uboot_its_image="u-boot-its-${type}${UBOOT_ARTIFACT_NAME}" + uboot_fitimage_image="u-boot-fitImage-${type}${UBOOT_ARTIFACT_NAME}" else uboot_its_image="${UBOOT_ITS_IMAGE}" uboot_fitimage_image="${UBOOT_FITIMAGE_IMAGE}" @@ -389,8 +389,8 @@ deploy_helper() { install -Dm644 ${UBOOT_ITS} ${DEPLOYDIR}/$uboot_its_image if [ -n "${type}" ]; then - ln -sf $uboot_its_image ${DEPLOYDIR}/${UBOOT_ITS_IMAGE} - ln -sf $uboot_fitimage_image ${DEPLOYDIR}/${UBOOT_FITIMAGE_IMAGE} + ln -vf ${DEPLOYDIR}/$uboot_its_image ${DEPLOYDIR}/${UBOOT_ITS_IMAGE} + ln -vf ${DEPLOYDIR}/$uboot_fitimage_image ${DEPLOYDIR}/${UBOOT_FITIMAGE_IMAGE} fi fi @@ -420,24 +420,24 @@ do_deploy:prepend() { fi if [ "${UBOOT_SIGN_ENABLE}" = "1" -a -n "${UBOOT_DTB_BINARY}" ] ; then - ln -sf ${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_BINARY} - ln -sf ${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_SYMLINK} - ln -sf ${UBOOT_NODTB_IMAGE} ${DEPLOYDIR}/${UBOOT_NODTB_SYMLINK} - ln -sf ${UBOOT_NODTB_IMAGE} ${DEPLOYDIR}/${UBOOT_NODTB_BINARY} + ln -vf ${DEPLOYDIR}/${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_BINARY} + ln -vf ${DEPLOYDIR}/${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_LINK} + ln -vf ${DEPLOYDIR}/${UBOOT_NODTB_IMAGE} ${DEPLOYDIR}/${UBOOT_NODTB_LINK} + ln -vf ${DEPLOYDIR}/${UBOOT_NODTB_IMAGE} ${DEPLOYDIR}/${UBOOT_NODTB_BINARY} fi if [ "${UBOOT_FITIMAGE_ENABLE}" = "1" ] ; then - ln -sf ${UBOOT_ITS_IMAGE} ${DEPLOYDIR}/${UBOOT_ITS} - ln -sf ${UBOOT_ITS_IMAGE} ${DEPLOYDIR}/${UBOOT_ITS_SYMLINK} - ln -sf ${UBOOT_FITIMAGE_IMAGE} ${DEPLOYDIR}/${UBOOT_FITIMAGE_BINARY} - ln -sf ${UBOOT_FITIMAGE_IMAGE} ${DEPLOYDIR}/${UBOOT_FITIMAGE_SYMLINK} + ln -vf ${DEPLOYDIR}/${UBOOT_ITS_IMAGE} ${DEPLOYDIR}/${UBOOT_ITS} + ln -vf ${DEPLOYDIR}/${UBOOT_ITS_IMAGE} ${DEPLOYDIR}/${UBOOT_ITS_LINK} + ln -vf ${DEPLOYDIR}/${UBOOT_FITIMAGE_IMAGE} ${DEPLOYDIR}/${UBOOT_FITIMAGE_BINARY} + ln -vf ${DEPLOYDIR}/${UBOOT_FITIMAGE_IMAGE} ${DEPLOYDIR}/${UBOOT_FITIMAGE_LINK} fi if [ "${SPL_SIGN_ENABLE}" = "1" -a -n "${SPL_DTB_BINARY}" ] ; then - ln -sf ${SPL_DTB_IMAGE} ${DEPLOYDIR}/${SPL_DTB_SYMLINK} - ln -sf ${SPL_DTB_IMAGE} ${DEPLOYDIR}/${SPL_DTB_BINARY} - ln -sf ${SPL_NODTB_IMAGE} ${DEPLOYDIR}/${SPL_NODTB_SYMLINK} - ln -sf ${SPL_NODTB_IMAGE} ${DEPLOYDIR}/${SPL_NODTB_BINARY} + ln -vf ${DEPLOYDIR}/${SPL_DTB_IMAGE} ${DEPLOYDIR}/${SPL_DTB_LINK} + ln -vf ${DEPLOYDIR}/${SPL_DTB_IMAGE} ${DEPLOYDIR}/${SPL_DTB_BINARY} + ln -vf ${DEPLOYDIR}/${SPL_NODTB_IMAGE} ${DEPLOYDIR}/${SPL_NODTB_LINK} + ln -vf ${DEPLOYDIR}/${SPL_NODTB_IMAGE} ${DEPLOYDIR}/${SPL_NODTB_BINARY} fi } @@ -445,7 +445,7 @@ do_deploy:append() { # If we're creating a u-boot fitImage, point u-boot.bin # symlink since it might get used by image recipes if [ "${UBOOT_FITIMAGE_ENABLE}" = "1" ] ; then - ln -sf ${UBOOT_FITIMAGE_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY} - ln -sf ${UBOOT_FITIMAGE_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK} + ln -vf ${DEPLOYDIR}/${UBOOT_FITIMAGE_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY} + ln -vf ${DEPLOYDIR}/${UBOOT_FITIMAGE_IMAGE} ${DEPLOYDIR}/${UBOOT_LINK} fi } diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc index b3482dcef3..4ea0ed3cf4 100644 --- a/meta/recipes-bsp/u-boot/u-boot.inc +++ b/meta/recipes-bsp/u-boot/u-boot.inc @@ -42,21 +42,18 @@ do_compile () { unset CFLAGS unset CPPFLAGS - if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ] - then + if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion fi - if [ -n "${UBOOT_CONFIG}" -o -n "${UBOOT_DELTA_CONFIG}" ] - then + if [ -n "${UBOOT_CONFIG}" -o -n "${UBOOT_DELTA_CONFIG}" ]; then unset i j k for config in ${UBOOT_MACHINE}; do i=$(expr $i + 1); for type in ${UBOOT_CONFIG}; do j=$(expr $j + 1); - if [ $j -eq $i ] - then + if [ $j -eq $i ]; then oe_runmake -C ${S} O=${B}/${config} ${UBOOT_MAKE_TARGET} for binary in ${UBOOT_BINARIES}; do k=$(expr $k + 1); @@ -86,21 +83,18 @@ do_compile () { fi fi - if [ -n "${UBOOT_ENV}" ] && [ "${UBOOT_ENV_SUFFIX}" = "scr" ] - then + if [ -n "${UBOOT_ENV}" ] && [ "${UBOOT_ENV_SUFFIX}" = "scr" ]; then ${UBOOT_MKIMAGE} -C none -A ${UBOOT_ARCH} -T script -d ${WORKDIR}/${UBOOT_ENV_SRC} ${WORKDIR}/${UBOOT_ENV_BINARY} fi } do_install () { - if [ -n "${UBOOT_CONFIG}" ] - then + if [ -n "${UBOOT_CONFIG}" ]; then for config in ${UBOOT_MACHINE}; do i=$(expr $i + 1); for type in ${UBOOT_CONFIG}; do j=$(expr $j + 1); - if [ $j -eq $i ] - then + if [ $j -eq $i ]; then install -D -m 644 ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type} ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY} @@ -129,16 +123,13 @@ do_install () { fi fi - if [ -n "${UBOOT_ELF}" ] - then - if [ -n "${UBOOT_CONFIG}" ] - then + if [ -n "${UBOOT_ELF}" ]; then + if [ -n "${UBOOT_CONFIG}" ]; then for config in ${UBOOT_MACHINE}; do i=$(expr $i + 1); for type in ${UBOOT_CONFIG}; do j=$(expr $j + 1); - if [ $j -eq $i ] - then + if [ $j -eq $i ]; then install -m 644 ${B}/${config}/${UBOOT_ELF} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type} ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY} @@ -153,21 +144,18 @@ do_install () { fi fi - if [ -e ${WORKDIR}/fw_env.config ] ; then + if [ -e ${WORKDIR}/fw_env.config ]; then install -d ${D}${sysconfdir} install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config fi - if [ -n "${SPL_BINARY}" ] - then - if [ -n "${UBOOT_CONFIG}" ] - then + if [ -n "${SPL_BINARY}" ]; then + if [ -n "${UBOOT_CONFIG}" ]; then for config in ${UBOOT_MACHINE}; do i=$(expr $i + 1); for type in ${UBOOT_CONFIG}; do j=$(expr $j + 1); - if [ $j -eq $i ] - then + if [ $j -eq $i ]; then install -m 644 ${B}/${config}/${SPL_BINARY} ${D}/boot/${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE}-${type} ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE} @@ -182,14 +170,12 @@ do_install () { fi fi - if [ -n "${UBOOT_ENV}" ] - then + if [ -n "${UBOOT_ENV}" ]; then install -m 644 ${WORKDIR}/${UBOOT_ENV_BINARY} ${D}/boot/${UBOOT_ENV_IMAGE} ln -sf ${UBOOT_ENV_IMAGE} ${D}/boot/${UBOOT_ENV_BINARY} fi - if [ "${UBOOT_EXTLINUX}" = "1" ] - then + if [ "${UBOOT_EXTLINUX}" = "1" ]; then install -Dm 0644 ${UBOOT_EXTLINUX_CONFIG} ${D}/${UBOOT_EXTLINUX_INSTALL_DIR}/${UBOOT_EXTLINUX_CONF_NAME} fi } @@ -211,27 +197,26 @@ FILES:${PN} = "/boot ${datadir}" RDEPENDS:${PN} += "${PN}-env" do_deploy () { - if [ -n "${UBOOT_CONFIG}" ] - then + if [ -n "${UBOOT_CONFIG}" ]; then for config in ${UBOOT_MACHINE}; do i=$(expr $i + 1); for type in ${UBOOT_CONFIG}; do j=$(expr $j + 1); - if [ $j -eq $i ] - then - install -D -m 644 ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} - cd ${DEPLOYDIR} - ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type} - ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK} - ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type} - ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY} + if [ $j -eq $i ]; then + install -D -m 644 ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/${UBOOT_BINARYNAME}-${type}${UBOOT_ARTIFACT_NAME}.${UBOOT_SUFFIX} + ln -vf ${DEPLOYDIR}/${UBOOT_BINARYNAME}-${type}${UBOOT_ARTIFACT_NAME}.${UBOOT_SUFFIX} ${DEPLOYDIR}/${UBOOT_BINARY}-${type} + ln -vf ${DEPLOYDIR}/${UBOOT_BINARYNAME}-${type}${UBOOT_ARTIFACT_NAME}.${UBOOT_SUFFIX} ${DEPLOYDIR}/${UBOOT_BINARY} + if [ -n "${UBOOT_LINK}" -a "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then + ln -vf ${DEPLOYDIR}/${UBOOT_BINARYNAME}-${type}${UBOOT_ARTIFACT_NAME}.${UBOOT_SUFFIX} ${DEPLOYDIR}/${UBOOT_LINK}-${type} + ln -vf ${DEPLOYDIR}/${UBOOT_BINARYNAME}-${type}${UBOOT_ARTIFACT_NAME}.${UBOOT_SUFFIX} ${DEPLOYDIR}/${UBOOT_LINK} + fi # Deploy the uboot-initial-env if [ -n "${UBOOT_INITIAL_ENV}" ]; then - install -D -m 644 ${B}/${config}/u-boot-initial-env-${type} ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} - cd ${DEPLOYDIR} - ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} ${UBOOT_INITIAL_ENV}-${MACHINE}-${type} - ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} ${UBOOT_INITIAL_ENV}-${type} + install -D -m 644 ${B}/${config}/u-boot-initial-env-${type} ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}-${type}${UBOOT_ARTIFACT_NAME} + if [ "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then + ln -vf ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}-${type}${UBOOT_ARTIFACT_NAME} ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}-${type}${UBOOT_ARTIFACT_LINK_NAME} + fi fi fi done @@ -240,43 +225,42 @@ do_deploy () { unset i else install -D -m 644 ${B}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} + ln -vf ${DEPLOYDIR}/${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY} - cd ${DEPLOYDIR} - rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK} - ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK} - ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY} + if [ -n "${UBOOT_LINK}" -a "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then + ln -vf ${DEPLOYDIR}/${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_LINK} + fi # Deploy the uboot-initial-env if [ -n "${UBOOT_INITIAL_ENV}" ]; then - install -D -m 644 ${B}/u-boot-initial-env ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR} - cd ${DEPLOYDIR} - ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR} ${UBOOT_INITIAL_ENV}-${MACHINE} - ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR} ${UBOOT_INITIAL_ENV} + install -D -m 644 ${B}/u-boot-initial-env ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}${UBOOT_ARTIFACT_NAME} + if [ "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then + ln -vf ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}${UBOOT_ARTIFACT_NAME} ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}${UBOOT_ARTIFACT_LINK_NAME} + fi fi fi - if [ -e ${WORKDIR}/fw_env.config ] ; then - install -D -m 644 ${WORKDIR}/fw_env.config ${DEPLOYDIR}/fw_env.config-${MACHINE}-${PV}-${PR} - cd ${DEPLOYDIR} - ln -sf fw_env.config-${MACHINE}-${PV}-${PR} fw_env.config-${MACHINE} - ln -sf fw_env.config-${MACHINE}-${PV}-${PR} fw_env.config + if [ -e ${WORKDIR}/fw_env.config ]; then + install -D -m 644 ${WORKDIR}/fw_env.config ${DEPLOYDIR}/fw_env.config${UBOOT_ARTIFACT_NAME} + if [ "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then + ln -vf ${DEPLOYDIR}/fw_env.config${UBOOT_ARTIFACT_NAME} ${DEPLOYDIR}/fw_env.config${UBOOT_ARTIFACT_LINK_NAME} + fi fi - if [ -n "${UBOOT_ELF}" ] - then - if [ -n "${UBOOT_CONFIG}" ] - then + if [ -n "${UBOOT_ELF}" ]; then + if [ -n "${UBOOT_CONFIG}" ]; then for config in ${UBOOT_MACHINE}; do i=$(expr $i + 1); for type in ${UBOOT_CONFIG}; do j=$(expr $j + 1); - if [ $j -eq $i ] - then - install -m 644 ${B}/${config}/${UBOOT_ELF} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}-${type} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}-${type} - ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK} + if [ $j -eq $i ]; then + install -m 644 ${B}/${config}/${UBOOT_ELF} ${DEPLOYDIR}/u-boot-${type}${UBOOT_ARTIFACT_NAME}.${UBOOT_ELF_SUFFIX} + ln -vf ${DEPLOYDIR}/u-boot-${type}${UBOOT_ARTIFACT_NAME}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}-${type} + ln -vf ${DEPLOYDIR}/u-boot-${type}${UBOOT_ARTIFACT_NAME}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY} + if [ -n "${UBOOT_ELF_LINK}" -a "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then + ln -vf ${DEPLOYDIR}/u-boot-${type}${UBOOT_ARTIFACT_NAME}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_LINK}-${type} + ln -vf ${DEPLOYDIR}/u-boot-${type}${UBOOT_ARTIFACT_NAME}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_LINK} + fi fi done unset j @@ -284,28 +268,27 @@ do_deploy () { unset i else install -m 644 ${B}/${UBOOT_ELF} ${DEPLOYDIR}/${UBOOT_ELF_IMAGE} - ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_BINARY} - ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK} + ln -vf ${DEPLOYDIR}/${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_BINARY} + if [ -n "${UBOOT_ELF_LINK}" -a "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then + ln -vf ${DEPLOYDIR}/${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_LINK} + fi fi fi - - if [ -n "${SPL_BINARY}" ] - then - if [ -n "${UBOOT_CONFIG}" ] - then + if [ -n "${SPL_BINARY}" ]; then + if [ -n "${UBOOT_CONFIG}" ]; then for config in ${UBOOT_MACHINE}; do i=$(expr $i + 1); for type in ${UBOOT_CONFIG}; do j=$(expr $j + 1); - if [ $j -eq $i ] - then - install -m 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} - rm -f ${DEPLOYDIR}/${SPL_BINARYFILE} ${DEPLOYDIR}/${SPL_SYMLINK} - ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE}-${type} - ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE} - ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} - ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_SYMLINK} + if [ $j -eq $i ]; then + install -m 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}${UBOOT_ARTIFACT_NAME}${SPL_DELIMITER}${SPL_SUFFIX} + ln -vf ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}${UBOOT_ARTIFACT_NAME}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE}-${type} + ln -vf ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}${UBOOT_ARTIFACT_NAME}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE} + if [ -n "${SPL_LINK}" -a "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then + ln -vf ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}${UBOOT_ARTIFACT_NAME}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_LINK}-${type} + ln -vf ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}${UBOOT_ARTIFACT_NAME}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_LINK} + fi fi done unset j @@ -313,28 +296,30 @@ do_deploy () { unset i else install -m 644 ${B}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE} - ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME} - ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK} + ln -vf ${DEPLOYDIR}/${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME} + if [ -n "${SPL_LINK}" -a "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then + ln -vf ${DEPLOYDIR}/${SPL_IMAGE} ${DEPLOYDIR}/${SPL_LINK} + fi fi fi - if [ -n "${UBOOT_ENV}" ] - then + if [ -n "${UBOOT_ENV}" ]; then install -m 644 ${WORKDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_IMAGE} - ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_BINARY} - ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK} + ln -vf ${DEPLOYDIR}${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_BINARY} + if [ -n "${UBOOT_ENV_LINK}" -a "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then + ln -vf ${DEPLOYDIR}${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_LINK} + fi fi - if [ "${UBOOT_EXTLINUX}" = "1" ] - then - install -m 644 ${UBOOT_EXTLINUX_CONFIG} ${DEPLOYDIR}/${UBOOT_EXTLINUX_SYMLINK} - ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE} - ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME} + if [ "${UBOOT_EXTLINUX}" = "1" ]; then + install -m 644 ${UBOOT_EXTLINUX_CONFIG} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME}${UBOOT_ARTIFACT_NAME} + if [ -n "${UBOOT_EXTLINUX_CONF_LINK}" -a "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then + ln -vf ${DEPLOYDIR}${UBOOT_EXTLINUX_CONF_NAME}${UBOOT_ARTIFACT_NAME} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_LINK} + fi fi - if [ -n "${UBOOT_DTB}" ] - then - install -m 644 ${B}/arch/${UBOOT_ARCH_DIR}/dts/${UBOOT_DTB_BINARY} ${DEPLOYDIR}/ + if [ -n "${UBOOT_DTB}" ]; then + install -m 644 ${B}/arch/${UBOOT_ARCH_DIR}/dts/${UBOOT_DTB_BINARY} ${DEPLOYDIR}/${UBOOT_DTB_BINARY}${UBOOT_ARTIFACT_NAME} fi } From patchwork Wed Nov 22 12:44:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 35068 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4EEA6C61D9D for ; Wed, 22 Nov 2023 12:45:18 +0000 (UTC) Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) by mx.groups.io with SMTP id smtpd.web10.18522.1700657115988276160 for ; Wed, 22 Nov 2023 04:45:16 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=a5y8GFaN; spf=pass (domain: gmail.com, ip: 209.85.208.44, mailfrom: martin.jansa@gmail.com) Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-5401bab7525so9636190a12.2 for ; Wed, 22 Nov 2023 04:45:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700657114; x=1701261914; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=lMrcdPAoeMlhwviv1Hn6mOdSBQI8As2RRxLNv+v+uXs=; b=a5y8GFaNteUDOgG+2AfNR4DNFaf3qLlb/eJmAVerRpvIdiOoVKpbTgRjMilE2JVmcw ptRd3iThbcHoljLaTe5HTm3/cLp9EAej4Pke5LVBtHFnDcgc+gjn9PEAQGG5QhENgRZ+ OBY8nmbCejzr27MorrjyztY4vEYEB4yxHDL6OdeS/NHxdhJzF060u9vwnx/ptvJWTAAU WGCqBoYPOmmv8HfxE5YMqGoDAM7sDfXfYGoVRdjZstbjf13gNlgJexU4MKvuM3tFhIDh AYkBcNNHX26ab+D7r4p2P4wtclZT2zMiBdeLgsLwx7kNAMfxoHTp+TbcTB06ecoILjWr 0h7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700657114; x=1701261914; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lMrcdPAoeMlhwviv1Hn6mOdSBQI8As2RRxLNv+v+uXs=; b=GumaMNfmVnNjdtwEAl69WjXBIMdSP88Pvn2m1qYVDi/pLxY+JYgdnC4xpHwkI/ZtAI Gl6zumUAvqITcjJnBOKwYVlN1GixLOrgA/i/MeeR2wVDAsje6lowKVlS+rcgn6XaCfeH yuL2Vzg/xZYgWNj6vulYe/p93bT2vCv2K69cGnc5yxD8VwPrU0m4ue8j0E7mvMje9JAC gS/0Q7h2KhdIpzDPOkoGo7wtnhD8yDNTnzyKl0IfIBeoYWOZD955KTwbNhv7/OTa9QYd NMIQH6do7egHhcvUFTL69D8TWTS/gNhB0y/K1sDXHzKUKHI0k2agt13zqHpt/mL63vIt ZV/Q== X-Gm-Message-State: AOJu0Yy6Rvj8tLme0V4tkECIHcV8vyxDj6Bm5h5CNNoTf+A/jmVQtboY wBZRhLbHa2DDPPwFX74s0rXzBaQyBxk= X-Google-Smtp-Source: AGHT+IH2Qi0T+bj12ZlldP0lFAALeerCZjKh6ELzie2smMgtKvyzP2dKbrLaklmT/192wIf1l7uNbw== X-Received: by 2002:aa7:d3c6:0:b0:543:caf4:e5bc with SMTP id o6-20020aa7d3c6000000b00543caf4e5bcmr1811994edr.1.1700657114326; Wed, 22 Nov 2023 04:45:14 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id u10-20020a056402110a00b005487c48d9ebsm4722582edv.57.2023.11.22.04.45.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:45:14 -0800 (PST) From: Martin Jansa To: openembedded-core@lists.openembedded.org Subject: [PATCH 08/21] image.bbclass: rename create_symlinks to create_hardlinks Date: Wed, 22 Nov 2023 13:44:38 +0100 Message-ID: <167efa2f229459d7b6b9334ee1c740d9413664ec.1700600804.git.martin.jansa@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Nov 2023 12:45:18 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191085 * to make it more clear what this postfunc does now [YOCTO #12937] Signed-off-by: Martin Jansa --- meta/classes-recipe/image-live.bbclass | 2 +- meta/classes-recipe/image.bbclass | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meta/classes-recipe/image-live.bbclass b/meta/classes-recipe/image-live.bbclass index 95dd44a8c0..4d926cb7a7 100644 --- a/meta/classes-recipe/image-live.bbclass +++ b/meta/classes-recipe/image-live.bbclass @@ -257,7 +257,7 @@ python do_bootimg() { bb.build.exec_func('build_efi_cfg', d) bb.build.exec_func('build_hddimg', d) bb.build.exec_func('build_iso', d) - bb.build.exec_func('create_symlinks', d) + bb.build.exec_func('create_hardlinks', d) } do_bootimg[subimages] = "hddimg iso" diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass index 48dc70b8fc..aa24a92245 100644 --- a/meta/classes-recipe/image.bbclass +++ b/meta/classes-recipe/image.bbclass @@ -508,7 +508,7 @@ python () { d.setVarFlag(task, 'fakeroot', '1') d.appendVarFlag(task, 'prefuncs', ' ' + debug + ' set_image_size') - d.prependVarFlag(task, 'postfuncs', 'create_symlinks ') + d.prependVarFlag(task, 'postfuncs', 'create_hardlinks ') d.appendVarFlag(task, 'subimages', ' ' + ' '.join(subimages)) d.appendVarFlag(task, 'vardeps', ' ' + ' '.join(vardeps)) d.appendVarFlag(task, 'vardepsexclude', ' DATETIME DATE ' + ' '.join(vardepsexclude)) @@ -584,9 +584,9 @@ python set_image_size () { } # -# Create symlinks to the newly created image +# Create hardlinks to the newly created image # -python create_symlinks() { +python create_hardlinks() { deploy_dir = d.getVar('IMGDEPLOYDIR') img_name = d.getVar('IMAGE_NAME') From patchwork Wed Nov 22 12:44:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 35070 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45CC0C61DA7 for ; Wed, 22 Nov 2023 12:45:18 +0000 (UTC) Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by mx.groups.io with SMTP id smtpd.web11.18439.1700657116892995830 for ; Wed, 22 Nov 2023 04:45:17 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Dmu8Z8jg; spf=pass (domain: gmail.com, ip: 209.85.218.50, mailfrom: martin.jansa@gmail.com) Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-9ae2cc4d17eso915268066b.1 for ; Wed, 22 Nov 2023 04:45:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700657115; x=1701261915; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=8mc4sO9tD2TOemG6NsC4zxLJijiMNYm5Btq3woQe7tc=; b=Dmu8Z8jg3da4JwMZIaPDTy4fx1nxOJcVukKitr5GjBfngn3AjzBgiPHBJVRm4405cb SbtydGJ19tU5IteEv93KbBqHuaIJiHnCpqf1ZGjaNdh2227f9d8QnVTfPPOeaxzTIGHv tVb3GT3rpTWgDDmPYqP0MiHYG8m6xxOfzUToXLQjyHb8q7wBooBtLcor6dmEFlvG5VkM P2WuP4HPSNa2gRygUKh0gVU53P9ZANke56g7jSHrbcZHNKes9UyLKLUbJcIi1JrszWJo TyUaT6rjTgqOLA6EKe/2UjduEy0DnsyHKq6Iu8rTt9TmHaEl3tPlEHsU8zQtKB3Oi5dU Kyuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700657115; x=1701261915; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8mc4sO9tD2TOemG6NsC4zxLJijiMNYm5Btq3woQe7tc=; b=NpLmD47yGt2mh0rKBG0hwwZvA5lBBV/LjP8zSAUezzSTjDZLuyMQBYQJHCj71GHCbD VA1mxAvpSJjgPNWdEGEbH6qtB3iOEZ/u5V9XBr50xbf8pRaHo72anuPcKHcXHZV9gpyP HgMik0R+2KX026OKwPXZQ3b3jXVBiacLvMluHWLDhCAQPmKgllJqehxqbl/uXPZOZFm8 SmLndND6m1w2E5UAwXaocFTOkGCunhQClk6aKToQ6j/rF6l5bxOkKafFT46u/TDxAWjD QM+jmenIcPlPwOUGsrN1JzNywZ+WERd4G69nHjo09TB72tTvntYIjf4YVrUNLVnHXcMZ qC9Q== X-Gm-Message-State: AOJu0YxV+kUMcsj9WBw6E6C3dub4BXJat6xxb4UePJbUBMXu7CVrl2Sd dtbIxdqAtwad8g17aN/RBXkqjk/0Tjs= X-Google-Smtp-Source: AGHT+IGk1Jd0nPeybYntdW+I5y4BKAT5+jLsUreG8dwBOKJwGdn+f8mbqjfhV5716M2qIsBiuCaDGQ== X-Received: by 2002:a17:906:12:b0:a01:f06b:77c8 with SMTP id 18-20020a170906001200b00a01f06b77c8mr1376951eja.2.1700657115172; Wed, 22 Nov 2023 04:45:15 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id y5-20020a170906524500b009e6cedc8bf5sm6548449ejm.29.2023.11.22.04.45.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:45:14 -0800 (PST) From: Martin Jansa To: openembedded-core@lists.openembedded.org Subject: [PATCH 09/21] image-artifact-names.bbclass: add IMAGE_VERSION_SUFFIX_DATETIME which uses SOURCE_DATE_EPOCH Date: Wed, 22 Nov 2023 13:44:39 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Nov 2023 12:45:18 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191086 * since https://git.openembedded.org/openembedded-core/diff/meta/classes/image-artifact-names.bbclass?id=abb0671d2cebfd7e8df94796404bbe9c7f961058 which removed the bb.data.inherits_class('reproducible_build', d) condition this was already applied in all the builds which used DATETIME, so we can move it to the default value directly and DISTRO configs than can choose to use IMAGE_VERSION_SUFFIX_DATETIME as they want [YOCTO #12937] Signed-off-by: Martin Jansa --- meta/classes-global/base.bbclass | 3 +++ meta/classes-recipe/image-artifact-names.bbclass | 12 +++--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass index ac84312a87..755d10106a 100644 --- a/meta/classes-global/base.bbclass +++ b/meta/classes-global/base.bbclass @@ -207,6 +207,9 @@ do_unpack[postfuncs] += "create_source_date_epoch_stamp" def get_source_date_epoch_value(d): return oe.reproducible.epochfile_read(d.getVar('SDE_FILE'), d) +def get_source_date_epoch_value_datetime(d): + import datetime + return datetime.datetime.fromtimestamp(int(get_source_date_epoch_value(d)), datetime.timezone.utc).strftime('%Y%m%d%H%M%S') def get_layers_branch_rev(d): revisions = oe.buildcfg.get_layer_revisions(d) diff --git a/meta/classes-recipe/image-artifact-names.bbclass b/meta/classes-recipe/image-artifact-names.bbclass index d0f1b0dc55..2d18f34c9c 100644 --- a/meta/classes-recipe/image-artifact-names.bbclass +++ b/meta/classes-recipe/image-artifact-names.bbclass @@ -9,8 +9,9 @@ ################################################################## IMAGE_BASENAME ?= "${PN}" -IMAGE_VERSION_SUFFIX ?= "-${PKGE}-${PKGV}-${PKGR}-${DATETIME}" -IMAGE_VERSION_SUFFIX[vardepsexclude] += "DATETIME SOURCE_DATE_EPOCH" +IMAGE_VERSION_SUFFIX_DATETIME = "${@get_source_date_epoch_value_datetime(d)}" +IMAGE_VERSION_SUFFIX_DATETIME[vardepvalue] = "" +IMAGE_VERSION_SUFFIX ?= "-${PKGE}-${PKGV}-${PKGR}-${IMAGE_VERSION_SUFFIX_DATETIME}" IMAGE_NAME ?= "${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}${IMAGE_NAME_SUFFIX}" IMAGE_LINK_NAME ?= "${IMAGE_NAME}${IMAGE_VERSION_SUFFIX}" @@ -32,10 +33,3 @@ IMAGE_MACHINE_SUFFIX ??= "-${MACHINE}" # by default) followed by additional suffices which describe the format (.ext4, # .ext4.xz, etc.). IMAGE_NAME_SUFFIX ??= ".rootfs" - -python () { - if bb.data.inherits_class('deploy', d) and d.getVar("IMAGE_VERSION_SUFFIX") == "-${DATETIME}": - import datetime - d.setVar("IMAGE_VERSION_SUFFIX", "-" + datetime.datetime.fromtimestamp(int(d.getVar("SOURCE_DATE_EPOCH")), datetime.timezone.utc).strftime('%Y%m%d%H%M%S')) - d.setVarFlag("IMAGE_VERSION_SUFFIX", "vardepvalue", "") -} From patchwork Wed Nov 22 12:44:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 35067 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 407E7C61D97 for ; Wed, 22 Nov 2023 12:45:18 +0000 (UTC) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by mx.groups.io with SMTP id smtpd.web10.18523.1700657117446179213 for ; Wed, 22 Nov 2023 04:45:17 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BXnGVnYI; spf=pass (domain: gmail.com, ip: 209.85.208.53, mailfrom: martin.jansa@gmail.com) Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-5446c9f3a77so9590472a12.0 for ; Wed, 22 Nov 2023 04:45:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700657116; x=1701261916; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=eGvOG3h9XoEJTOJuOYZwtMnrpSF7SmfcXtkZ0RRfnZc=; b=BXnGVnYIqAHKarvJkGEGuUSh7sHvLuufEFzPmyAwpTF5OEE5gTCPQin5NPUrYd3QJM wvEd0QXUEhihAmbnAXDctaZHYn/DGwr6xOKrMr5T8EsWRBd1R8ccFspf1ZVQ+M0mQkgr WRq+D+2MFgK7TJMrQuqn+k0UNJU1Uv1KvmUABiA9N5YA8gPP7pf2ih+NFW615EGJQUnI qrbG1mlcUFVg+CMZIUDp1iSa0wiPx2rUv2f2UG1pRHGkXE6xXeh5CvKrg4lHuYxeoqLh V7FMwvGEbCsaggK4df9z0TfuVjRDMWZvlz1ROhvS+GvErX351fponm82WfU61ZRXu4nd Twjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700657116; x=1701261916; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eGvOG3h9XoEJTOJuOYZwtMnrpSF7SmfcXtkZ0RRfnZc=; b=DswoOGnZEmmvmyh7M+mBxBYZHGrkWIINSE8M0CMiwpEUtuqMFy4RN1d9kNelqOBJ8i zUnx121ZsSTw0A1EgCt6ud6y/qndikFw32hHJq13N/FyZl4xsF7G9ZpIBuRgX70DUoKd hXTqknB95/WWhLYz5j0yKXf9xYtVv1LvN71+rBMMdTVAD9szW7jaUD4el/kCa2kDZq34 Xk5LH/LQSj8XmoHNi6vhZIhcM5gCFD/fRpBACln14kRSIE1+6JIqnsJseM3XqU26aw9C 6pkXNVYn/XNIt08A0uZJIgmOLMQ65ZNYx4brdD77wkVSt/qUjtul6n60K3TitjJkv1vg DikQ== X-Gm-Message-State: AOJu0YwaW2KncvHA/GNARS0N7jPTtNzpopXYID9hwGHnKVeQiXZ8fgfa 4Dp1/D8hewjRVwuQIV+oDzs2l6tyQkw= X-Google-Smtp-Source: AGHT+IH892urY4zI7XHA8kDlFJ/RlH5JrwNcrpKFjOaFQWrjdCXNRG6f8HS06Vsu6VIf3pK94bG8qA== X-Received: by 2002:a17:906:14e:b0:a00:152a:1ec4 with SMTP id 14-20020a170906014e00b00a00152a1ec4mr1852375ejh.11.1700657115896; Wed, 22 Nov 2023 04:45:15 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id q22-20020a1709066ad600b009e776cc92dcsm6599449ejs.181.2023.11.22.04.45.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:45:15 -0800 (PST) From: Martin Jansa To: openembedded-core@lists.openembedded.org Subject: [PATCH 10/21] oeqa: bbtests.BitbakeTests.test_image_manifest: use just isfile() instead of islink() Date: Wed, 22 Nov 2023 13:44:40 +0100 Message-ID: <1d362851c180f90ace447cf0364db3d11cfb01c9.1700600804.git.martin.jansa@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Nov 2023 12:45:18 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191087 * with [YOCTO #12937] changes the manifest is hardlink not symlink * fixes: 2023-11-16 00:16:33,967 - oe-selftest - INFO - test_image_manifest (bbtests.BitbakeTests.test_image_manifest) 2023-11-16 00:19:05,060 - oe-selftest - INFO - ... FAIL 2023-11-16 00:19:05,060 - oe-selftest - INFO - Traceback (most recent call last): File "/OE/build/poky/meta/lib/oeqa/selftest/cases/bbtests.py", line 139, in test_image_manifest self.assertTrue(os.path.islink(manifest), msg="No manifest file created for image. It should have been created in %s" % manifest) AssertionError: False is not true : No manifest file created for image. It should have been created in /OE/build/poky/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs--1.0-r0-20110405230000.manifest [YOCTO #12937] Signed-off-by: Martin Jansa --- meta/lib/oeqa/selftest/cases/bbtests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py index d242352ea2..4276a9ba91 100644 --- a/meta/lib/oeqa/selftest/cases/bbtests.py +++ b/meta/lib/oeqa/selftest/cases/bbtests.py @@ -136,7 +136,7 @@ class BitbakeTests(OESelftestTestCase): deploydir = bb_vars["DEPLOY_DIR_IMAGE"] imagename = bb_vars["IMAGE_LINK_NAME"] manifest = os.path.join(deploydir, imagename + ".manifest") - self.assertTrue(os.path.islink(manifest), msg="No manifest file created for image. It should have been created in %s" % manifest) + self.assertTrue(os.path.isfile(manifest), msg="No manifest file created for image. It should have been created in %s" % manifest) def test_invalid_recipe_src_uri(self): data = 'SRC_URI = "file://invalid"' From patchwork Wed Nov 22 12:44:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 35079 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8758FC61D97 for ; Wed, 22 Nov 2023 12:45:28 +0000 (UTC) Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) by mx.groups.io with SMTP id smtpd.web10.18524.1700657118239540516 for ; Wed, 22 Nov 2023 04:45:18 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fWQYbOX7; spf=pass (domain: gmail.com, ip: 209.85.218.48, mailfrom: martin.jansa@gmail.com) Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a03a9009572so134669366b.3 for ; Wed, 22 Nov 2023 04:45:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700657117; x=1701261917; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=/NcP/VXozG9LfoelsKgobdvP+9t34jAtx0mBcSR/fXc=; b=fWQYbOX7hjm6tLy62Ucgqv92/BKcPbz6XgvBV/93jXZqikhm49je7qlZqN46NgQEzc NFpHQhUBuxogcFnFDLsC7M3hNOpBzWxnaFRR9x82Y3rr274BfsVfJjazXN3zoU0AltkH Ss4/ulz8AxbyYTcpE7TRjMtBsWAE4tzdC6ci4Pyr/4OpyOfz1qLFX+7aSEWkTtDLg847 aY/SQX8LodggKqzK4y4VF4kcUv1dJT6gZlogybEvFN6iHzrnXYl1vEV29S9EP5c6jwi+ UZ5bPUmbWN/CzWwfIZFpcg3rR+/2m72Gd+MhgVuO4C489W+SX4jvP5373nNMDd05NGSD ps7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700657117; x=1701261917; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/NcP/VXozG9LfoelsKgobdvP+9t34jAtx0mBcSR/fXc=; b=J6qypihdHatefJ7gI2nMyqwMrp1PR2bOYCYQSiliI/RTshWNLAD7wxUMD6pS6GDJCh R2SeVHEGanjSw8SgVYUMfwK5GFSjRYIap0ORh4QK3y2PckhgpK3NhiLy9oaLAPytPFxb mSbAKLgTeEVSkwzxWaP0tIFuQexOUHrfFovAVWzjmCIPeycVMkBPkngR5rVkrnDNAI7N Udridvigz4t74sWy2CqBYR6H/7GjkCxtUnMJIUXGAIbCKrPVUZLFPeBruhJF59qvtiLp POrgZ8lr4wALe3KKeZX7A8LD9vilPsCqc2UlpclH3k1gldzUFkS/RQmUa+5VsUgxjg30 qSFw== X-Gm-Message-State: AOJu0YwayZ6xw0UyX41BjQzUixQsbZ+bXs0xqZ8mkGzm42DyBThql/eF rt06LBTNlrA1p5cvd4fKT177GAHvgkM= X-Google-Smtp-Source: AGHT+IHG7Jjk7XH7V17exoyXLwXUHc27vBS/Gw/oXDIk8MP//aV8uUSeynuVdLiIm3rGCm1J65CcWA== X-Received: by 2002:a17:906:7482:b0:a01:a299:fa3 with SMTP id e2-20020a170906748200b00a01a2990fa3mr1692633ejl.8.1700657116647; Wed, 22 Nov 2023 04:45:16 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id b11-20020a170906490b00b009fcf9f8e526sm4323455ejq.25.2023.11.22.04.45.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:45:16 -0800 (PST) From: Martin Jansa To: openembedded-core@lists.openembedded.org Subject: [PATCH 11/21] oeqa: wic: use just isfile() instead of islink() Date: Wed, 22 Nov 2023 13:44:41 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Nov 2023 12:45:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191088 * with [YOCTO #12937] changes the manifest is hardlink not symlink * fixes: 2023-11-18 23:48:55,695 - oe-selftest - INFO - ... FAIL 2023-11-18 23:48:55,696 - oe-selftest - INFO - Traceback (most recent call last): File "/OE/build/poky/meta/lib/oeqa/core/decorator/__init__.py", line 35, in wrapped_f return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/OE/build/poky/meta/lib/oeqa/selftest/cases/wic.py", line 836, in test_wic_image_type self.assertTrue(os.path.islink(path), msg="Link %s wasn't generated as expected" % path) AssertionError: False is not true : Link tmp/deploy/images/qemux86-64/wic-image-minimal-qemux86-64.rootfs--1.0-r0-20110405230000.wic wasn't generated as expected --- meta/lib/oeqa/selftest/cases/wic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index b4866bcb32..fdff3e846e 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py @@ -833,7 +833,7 @@ class Wic2(WicTestCase): # pointing to existing files for suffix in ('wic', 'manifest'): path = prefix + suffix - self.assertTrue(os.path.islink(path), msg="Link %s wasn't generated as expected" % path) + self.assertTrue(os.path.isfile(path), msg="Link %s wasn't generated as expected" % path) self.assertTrue(os.path.isfile(os.path.realpath(path)), msg="File linked to by %s wasn't generated as expected" % path) # TODO this should work on aarch64 From patchwork Wed Nov 22 12:44:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 35078 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91CA4C61D9C for ; Wed, 22 Nov 2023 12:45:28 +0000 (UTC) Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) by mx.groups.io with SMTP id smtpd.web11.18441.1700657119063693908 for ; Wed, 22 Nov 2023 04:45:19 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Fr6KZw+Q; spf=pass (domain: gmail.com, ip: 209.85.218.44, mailfrom: martin.jansa@gmail.com) Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a049d19b63bso71219266b.2 for ; Wed, 22 Nov 2023 04:45:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700657117; x=1701261917; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=NkkoPa4gtIEmYq10V2lKRB2HlrHMrPXdzDg3ZWqT1H8=; b=Fr6KZw+Q0x0J55msNPwqYPXN4JITMMmJHeebgDm7VhgrLOducucgWSV6lgH1ZQtHB1 xlHPzKCrtt9k8l6/Y1pegZPwEWAlGxdovX/qlchnzgrUs7DI5Syyi0X1JN3hLDGbP95I uiCsquhDY1FdaKQcbk3NlORcVrjOdW5X/CIzr9fS9n7yE7PDHm8qvKnUiQvmWOiKS5er 2wRQKDBCnXt/HEFRXCuAaqz9590brS6KP0rt6ve0TpwKFbP1mGBI9Oljl/BNZxmdgFRS 4EEZfZ3Dc6RE9NZnBMcPOudvLKFjKNN0lq2R9UWhtbtHpJ0qRZjptmoyDT1EhNzCTuJT LobQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700657117; x=1701261917; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NkkoPa4gtIEmYq10V2lKRB2HlrHMrPXdzDg3ZWqT1H8=; b=h55xqT+LaPhtl8mAm3iYm9tDmMkNiAcB/W37GMN0STYSBtf5DGce18IRxuHhENud6I wZ/LEgrQjkQStJFbBSXXDUJCMdoduZurdeZey7opoDemq8BA4hEYf+NFRCWYzwXGGijW xY/WkNctFlj0l8MF+YvY482iIiF2ImuLpGChkTT77QfJNGTgCZkFkUZHT9y7wo2K6syS MlkbcnQSRUjzQnUPA5xx1FdpXlQiG1w/x0mPn6rb/adNYDqmVjJSgoFxif+UQ8Qm+FUa VGBjdISxEO0zk5yVC99oBxAxG7Cq/QW0hZVfRRDdbvelSAsc8h8ql4x0wexOgKYcEznn oAGg== X-Gm-Message-State: AOJu0YxmJqidNzcW8qHhFFN6DtlUS80A/VvOtYcZrh/CQVjrT7sARkT+ BOe+Q6rFZ5sGmXWOzCnlZZijHxYFQTE= X-Google-Smtp-Source: AGHT+IFujJK+wPQL/e87GCoIcejk9EnweQYbkWRq4w2Rjahd+rHf6YEZYXrDig8BQN5RsXNX+zOX2w== X-Received: by 2002:a17:907:1a54:b0:9bf:889e:32a4 with SMTP id mf20-20020a1709071a5400b009bf889e32a4mr1354987ejc.54.1700657117341; Wed, 22 Nov 2023 04:45:17 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id cd17-20020a170906b35100b009b2ba067b37sm6508703ejb.202.2023.11.22.04.45.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:45:17 -0800 (PST) From: Martin Jansa To: openembedded-core@lists.openembedded.org Subject: [PATCH 12/21] linux-dummy: add do_deploy_links task Date: Wed, 22 Nov 2023 13:44:42 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Nov 2023 12:45:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191089 * fixes containerimage.ContainerImageTests.test_expected_files oeqa test failing with: Initialising tasks...ERROR: Task do_build in /OE/build/poky/build-st/meta-selftest/recipes-test/container-image/container-test-image.bb depends upon non-existent task do_deploy_links in /OE/build/poky/meta/recipes-kernel/linux/linux-dummy.bb [YOCTO #12937] Signed-off-by: Martin Jansa --- meta/recipes-kernel/linux/linux-dummy.bb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta/recipes-kernel/linux/linux-dummy.bb b/meta/recipes-kernel/linux/linux-dummy.bb index 2396f46202..47a0d5e9da 100644 --- a/meta/recipes-kernel/linux/linux-dummy.bb +++ b/meta/recipes-kernel/linux/linux-dummy.bb @@ -60,7 +60,12 @@ do_deploy() { : } +do_deploy_links() { + : +} + addtask bundle_initramfs after do_install before do_deploy addtask deploy after do_install +addtask deploy_links after do_deploy addtask shared_workdir after do_compile before do_install addtask compile_kernelmodules From patchwork Wed Nov 22 12:44:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 35087 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D32A3C61D9D for ; Wed, 22 Nov 2023 12:45:28 +0000 (UTC) Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) by mx.groups.io with SMTP id smtpd.web10.18525.1700657119749485659 for ; Wed, 22 Nov 2023 04:45:20 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mMq0TAVo; spf=pass (domain: gmail.com, ip: 209.85.218.52, mailfrom: martin.jansa@gmail.com) Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a03a9009572so134672366b.3 for ; Wed, 22 Nov 2023 04:45:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700657118; x=1701261918; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Npj/4pL/8eE3DBC0ZD4H9kLmyzZlQ7VlkQUeUZOoOLc=; b=mMq0TAVo3ZzNwZEi5K06I062frz1kZ/TwPi8Jvb96QF2iAnrkIYbyDTCRsIKOKL3bG +d13B3/glqvDVYKsY/S5J1kLytH451ujqWU42Aj+zS0U6sDYg3jw81p8OuR8OuHKEx6g lGZbdmCCZictChf64WNVkO0y/DC0Wq/UOte9HSEboZDf/Jp0uC5bdQ6dGT/vfRt5aojm xNnFSNme6a6qYvpAoax3PzWhZ9YqyOxuoB9AbmvlECb6DQsBOCppvZY7e2ecPfHzwEdU +lwXWVzXM65tnMpoQIKGMUdyTQcryDlaHdSXAsem1Ri4QoC4KQsBmiOOeDqs1b/kXDZk OUdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700657118; x=1701261918; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Npj/4pL/8eE3DBC0ZD4H9kLmyzZlQ7VlkQUeUZOoOLc=; b=E9yU9wlHuh2b48GI14OlAMTEChX+0djAESNg9UXPi3E1YYJXmy4V3eQJ1ib9U3dzOv NypLURHEFO1goGjmB0hG00goHWhUBQVtUQta5xPzWWiCZV6u/ghk3OqN6sAXsxURQEe6 IAgBTIZ0cqPeHohcPWss6YHH/kPFHjwq5dJCezZaFbnkAifcPHC5qRcF1qhTtJDC9QO1 2/FtOIgvJdq2WkQYDNjF8huT+s9mRH/SVJ+0iMc7swegdmlzsrWt9WEPuBrE6sA2UmYi rTpfbA2T1x5yAOpmNJ9wLjMHKHn0ilj+qEQUBVeoTWPdCqPZQBsktIiMEQFPNxqWeWyg 7Jvg== X-Gm-Message-State: AOJu0YzPqQACnAwRqU4QbRT4v6NNlD+eWhL+H5b+NbGhb9x1AlxO+gqd 380gocNdR7wCrDGx5ZSYVFrOGvJC+ds= X-Google-Smtp-Source: AGHT+IGd6h1tPLSIaSi7tBmp31SGqhYxEgGsYhvGQjkBXwpc8LQ678t7ka6/IcSNm/7k2lMpGfbERw== X-Received: by 2002:a17:906:748:b0:9cf:797b:6adc with SMTP id z8-20020a170906074800b009cf797b6adcmr1465109ejb.33.1700657118019; Wed, 22 Nov 2023 04:45:18 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id q22-20020a1709066ad600b009e776cc92dcsm6599492ejs.181.2023.11.22.04.45.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:45:17 -0800 (PST) From: Martin Jansa To: openembedded-core@lists.openembedded.org Subject: [PATCH 13/21] kernel.bbclass: inherit KERNEL_CLASSES at the end Date: Wed, 22 Nov 2023 13:44:43 +0100 Message-ID: <3be74acd327c35399f2ce0e1345e29199c7f6c0c.1700600804.git.martin.jansa@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Nov 2023 12:45:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191090 * after defining deploy-links task, so that e.g. kernel-fitimage can append to it like kernel-devicetree.bbclass [YOCTO #12937] Signed-off-by: Martin Jansa --- meta/classes-recipe/kernel.bbclass | 34 +++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass index e38784a320..c5ff7453ff 100644 --- a/meta/classes-recipe/kernel.bbclass +++ b/meta/classes-recipe/kernel.bbclass @@ -156,23 +156,6 @@ set -e d.appendVarFlag('do_configure', 'depends', ' ${INITRAMFS_TASK}') } -# Here we pull in all various kernel image types which we support. -# -# In case you're wondering why kernel.bbclass inherits the other image -# types instead of the other way around, the reason for that is to -# maintain compatibility with various currently existing meta-layers. -# By pulling in the various kernel image types here, we retain the -# original behavior of kernel.bbclass, so no meta-layers should get -# broken. -# -# KERNEL_CLASSES by default pulls in kernel-uimage.bbclass, since this -# used to be the default behavior when only uImage was supported. This -# variable can be appended by users who implement support for new kernel -# image types. - -KERNEL_CLASSES ?= " kernel-uimage " -inherit ${KERNEL_CLASSES} - # Old style kernels may set ${S} = ${WORKDIR}/git for example # We need to move these over to STAGING_KERNEL_DIR. We can't just # create the symlink in advance as the git fetcher can't cope with @@ -892,3 +875,20 @@ EXPORT_FUNCTIONS do_deploy do_deploy_links # Add using Device Tree support inherit kernel-devicetree + +# Here we pull in all various kernel image types which we support. +# +# In case you're wondering why kernel.bbclass inherits the other image +# types instead of the other way around, the reason for that is to +# maintain compatibility with various currently existing meta-layers. +# By pulling in the various kernel image types here, we retain the +# original behavior of kernel.bbclass, so no meta-layers should get +# broken. +# +# KERNEL_CLASSES by default pulls in kernel-uimage.bbclass, since this +# used to be the default behavior when only uImage was supported. This +# variable can be appended by users who implement support for new kernel +# image types. + +KERNEL_CLASSES ?= " kernel-uimage " +inherit ${KERNEL_CLASSES} From patchwork Wed Nov 22 12:44:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 35086 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0F15C61DF7 for ; Wed, 22 Nov 2023 12:45:28 +0000 (UTC) Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) by mx.groups.io with SMTP id smtpd.web11.18443.1700657120481640980 for ; Wed, 22 Nov 2023 04:45:20 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=A3v9ZFC0; spf=pass (domain: gmail.com, ip: 209.85.218.47, mailfrom: martin.jansa@gmail.com) Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a00cbb83c82so363936866b.2 for ; Wed, 22 Nov 2023 04:45:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700657119; x=1701261919; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=NhP9OpWLIOrt/PGtaX6EbLmcnKflFbEnQWT734D0Vpk=; b=A3v9ZFC0DWjdbBYVBYAUqiLTfUtnyFGDQBc4t6PsmO/YIcdTvnWwo5dwLeff1qIa4d U68xdaVJOvCWiE7NLqeXrqp0hwkeuUjDIpKfjYBpPXIzA+H/ATHt8w6nh/xqe2NfODCh BkCIWq/au9w2ZuC+gmWv2BW0O82Gql0Xh025rGmb1ZgtIPXbMB9gFbLSCYXNktQ6HukN e4znf2dxcCgB8gTuUrA4kEJ3QcHJ5Arm5Lk4AfCaK1WFNB3q1F4DPOwQIdDxpyNc2lVO SdDKVeaj2vgSLO9+uvXH0t/DxCa0AD9skCVcA9n2BOdDbEbsFocRDCujvoCvEM8rkoly Li2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700657119; x=1701261919; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NhP9OpWLIOrt/PGtaX6EbLmcnKflFbEnQWT734D0Vpk=; b=CyR1ZRe8qwqgfFkQSS+t3pFRFTOUidG7oGctvygrG8ntw5KMjnmDIMR0Vx4y5LVc4T u+uBrq3RRndOrskgwXvazfzD/vMzr3EeCynYlEoPHAu/cq53ysSUyvckvdBvtZz31EiE PMgn7/fzfLXsPx6n1+bYLlZl/hj2pqvijyYN2UuyevMKtIqIYGeiKoEfQJai0HpDPgGg nCZceJcOJ3/cO6iPrfYj0sx27DOHxvz0DpomRdw3veV0LYtb/KN322Hm4Lf4VK2yxz4q wL3nzvadx6GGWWEqYTmsM0rCVNb9BOsJjdWPUQbZhu083cZVmV4npSOUvNUDsSkpljeo +u+A== X-Gm-Message-State: AOJu0Yyl2imWUr0DtKw6HvWm8+Z8CV5r5sULwuqnNgHSaWBCf8seilQb 9fQRggIe66bHVtO2FN+IVJchlRtUYwQ= X-Google-Smtp-Source: AGHT+IGa8ISRENKxREqKY0ZJiyF77PA2O3V9v9eyHL35VMKauE4x4UhRrt9OT/UvuPnes6BMhQPZFw== X-Received: by 2002:a17:907:4c8:b0:9b6:aac1:6fa5 with SMTP id vz8-20020a17090704c800b009b6aac16fa5mr1319187ejb.55.1700657118948; Wed, 22 Nov 2023 04:45:18 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id j24-20020a1709064b5800b009fdb3ec3c57sm4070601ejv.160.2023.11.22.04.45.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:45:18 -0800 (PST) From: Martin Jansa To: openembedded-core@lists.openembedded.org Subject: [PATCH 14/21] image.bbclass: don't append -dbg suffix twice Date: Wed, 22 Nov 2023 13:44:44 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Nov 2023 12:45:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191091 * now with IMAGE_LINK_NAME defined based on IMAGE_NAME we don't want to append -dbg to IMAGE_NAME and then again to IMAGE_LINK_NAME * this resulted in filename like: core-image-minimal-qemux86-64.rootfs-dbg--1.0-r0-20110405230000-dbg.tar.bz2 [YOCTO #12937] Signed-off-by: Martin Jansa --- meta/classes-recipe/image.bbclass | 2 -- 1 file changed, 2 deletions(-) diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass index aa24a92245..e68b8034ea 100644 --- a/meta/classes-recipe/image.bbclass +++ b/meta/classes-recipe/image.bbclass @@ -338,8 +338,6 @@ addtask do_image_qa_setscene def setup_debugfs_variables(d): d.appendVar('IMAGE_ROOTFS', '-dbg') - if d.getVar('IMAGE_LINK_NAME'): - d.appendVar('IMAGE_LINK_NAME', '-dbg') d.appendVar('IMAGE_NAME','-dbg') d.setVar('IMAGE_BUILDING_DEBUGFS', 'true') debugfs_image_fstypes = d.getVar('IMAGE_FSTYPES_DEBUGFS') From patchwork Wed Nov 22 12:44:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 35085 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5F03C61DF6 for ; Wed, 22 Nov 2023 12:45:28 +0000 (UTC) Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by mx.groups.io with SMTP id smtpd.web10.18527.1700657121658054104 for ; Wed, 22 Nov 2023 04:45:21 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JdGs/1M2; spf=pass (domain: gmail.com, ip: 209.85.218.45, mailfrom: martin.jansa@gmail.com) Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a02d12a2444so221728266b.3 for ; Wed, 22 Nov 2023 04:45:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700657120; x=1701261920; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=EClhXYBp3Mwo3FIl2rDYyu5lmiKrjJ1XWTabrQxTO4Q=; b=JdGs/1M2JY1w5Ywj0JzwuMG2SbYdu3S5wqnuWRs4SsrA3+g1Vw5EDfGq3EOa/OAGyU 2Lqg9azFi2+uIBUrLxaU4NSqMzEsuI2tFg3KGquKbRA9xKMzvTdVw2zRJ3EWg4toqmUR PR2TZY7fiY9k8BJHvm/dhJfJtNzFLfDQMTrbySg/RllCNwOu8t//QJZcsZ1pfP7+U3pU 1fpLn3fz8349ScRoSOncchOMR0HunIyMbRTE0Czn/Iokgt8v63krTMj5lUP7VLLljCoP 2lFs+rjWy/0KdjLo1pWnUNvcYmb3O/GmTQCHchP4ET6BM7S+J8jwQmz/L4LOFlHsl12J dACQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700657120; x=1701261920; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EClhXYBp3Mwo3FIl2rDYyu5lmiKrjJ1XWTabrQxTO4Q=; b=ZCzNTYz10pT9BwCJQC9SndJfYHNnMIsVtbCyEfVy7h3Gmc53ff0Ej/YFxGzwlw7xLG EXYHG9Zk8AmMWuQHkhdT7EzpTHwNwnZpZU6qsqXBmrU1NO+3fApu36zeAFVt4Nmpg6bS 42GcjrD1uXBHP4+zNYKW0i9gQ3ZBW22H5oLgdmt5WgJf/Lxa13cCzgzgeCcrpAWyK7GS XclQhsxzbLQ621cgFZdRbxm8wv9d7Cr9Nt4JSXVQFVyd13fyU6+HHujSKdl8xzqNVLWr 2svml5gGB468WKhGndp7pBd2mHbJwjoRzEaIeaavyfBd1YNdsgsuoJje+IW/BAWS98DV 7s/g== X-Gm-Message-State: AOJu0Yyp7vhf50KaCYTw8eoMLl3jhxc/wIYd7/ZGvKtoWVyZA0eXz08i 6xrZ3cHa7N6RJT8BDMrOJtKqqfLWtiQ= X-Google-Smtp-Source: AGHT+IE5AQMzLBWa4zjVf54kbaFUfaHwfY8Z6UwEEnCaii+vbh/0YGO2jpC/K5kHSVtMdoCYaLWx9w== X-Received: by 2002:a17:907:9382:b0:9e5:2710:6ba with SMTP id cm2-20020a170907938200b009e5271006bamr1303801ejc.70.1700657119865; Wed, 22 Nov 2023 04:45:19 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id k23-20020a1709063fd700b009e689685196sm6609900ejj.142.2023.11.22.04.45.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:45:19 -0800 (PST) From: Martin Jansa To: openembedded-core@lists.openembedded.org Subject: [PATCH 15/21] oeqa: imagefeatures: append -dbg suffix at the end of IMAGE_NAME not IMAGE_LINK_NAME Date: Wed, 22 Nov 2023 13:44:45 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Nov 2023 12:45:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191092 * the filename is constructed as: meta/classes-recipe/image.bbclass: d.appendVar('IMAGE_NAME','-dbg') and IMAGE_LINK_NAME adds ${IMAGE_VERSION_SUFFIX} _after_ this [YOCTO #12937] Signed-off-by: Martin Jansa --- meta/lib/oeqa/selftest/cases/imagefeatures.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py index dc88c222bd..da510f0e8e 100644 --- a/meta/lib/oeqa/selftest/cases/imagefeatures.py +++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py @@ -288,9 +288,9 @@ SKIP_RECIPE[busybox] = "Don't build this" self.write_config(features) bitbake(image) - bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME'], image) + bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_NAME'], image) - dbg_tar_file = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s-dbg.%s" % (bb_vars['IMAGE_LINK_NAME'], image_fstypes_debugfs)) + dbg_tar_file = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s-dbg.%s" % (bb_vars['IMAGE_NAME'], image_fstypes_debugfs)) self.assertTrue(os.path.exists(dbg_tar_file), 'debug filesystem not generated at %s' % dbg_tar_file) result = runCmd('cd %s; tar xvf %s' % (bb_vars['DEPLOY_DIR_IMAGE'], dbg_tar_file)) self.assertEqual(result.status, 0, msg='Failed to extract %s: %s' % (dbg_tar_file, result.output)) From patchwork Wed Nov 22 12:44:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 35082 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC244C61DB3 for ; Wed, 22 Nov 2023 12:45:28 +0000 (UTC) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) by mx.groups.io with SMTP id smtpd.web11.18444.1700657122112755290 for ; Wed, 22 Nov 2023 04:45:22 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lIRIi9XQ; spf=pass (domain: gmail.com, ip: 209.85.208.41, mailfrom: martin.jansa@gmail.com) Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-548696eac92so6149030a12.3 for ; Wed, 22 Nov 2023 04:45:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700657120; x=1701261920; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=GGpM28qFc3AlDwzLUrsUSnxLOLr5TxOdFt3AOZUJ0b4=; b=lIRIi9XQG93oacnci+3RXa1kmy3hEQY1HvDZDfazLHuhXS/aSenT7/x07B9ZaBKeKU NCu6yiUYWNUxs1crbmiZmbZM0zRjAfW9HXETQeGsEJnEq01EbHrqbdGKpdkwwUQBGVEQ ZP/sL+wiVLhDW8iP8hGTrKxOup8W/SFpo7YYoBPwB59+bvGziaMEcPy4qqbzJ/5OApUj XZ4YrVf3KJlm7GraPW1rnTkT0X7ip7kRXxsgpAxB6XX6Fnc+XU0uUoTsw+ewQ7TvmBOw ZgQPB6njssLcO6dnT+D5YqXos+LbvONF7b8YL8OtnVLHJPGhWY2pQP/hdDvyJFTn6X9Q 7ulw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700657120; x=1701261920; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GGpM28qFc3AlDwzLUrsUSnxLOLr5TxOdFt3AOZUJ0b4=; b=RmwsQKRSQOkjmjOOfucPVG88t2L90p7kHyCq+oPLSZVmSPijGLrqqRxfA2mPYOFmtm zXBK6jcrjtemgOEYPxfiqaOeSsj/Pr+qGCuluOMXinlFKp1eKJsCmO9Z6SUzMz7LarU3 jN1hBaqhUdstXRiWElDlqf911qarVklx5Qb9Mb/7Nxkt8EqHWZ+6fTrAfvOiJpxXvFED 2US0FLl00jWMWrhVJNCrDgSGx5O5CoZyc9NByemOLJmOi9o6eEKwtqx/4aC7xNZk807c 8WvBMigsUslF3U1omddRZnBTiy1EizdnlhMbs6NV8hVmc1yXBZz5TPoPsMfH1aIVO9yE /T1Q== X-Gm-Message-State: AOJu0YwAbhz1eFzCJTIPXruz8WSgWDZUbLZqZN7q5t09BKCzvS33tMRD SX59HiGOfvz2hShTgntokpMZHZKBcTU= X-Google-Smtp-Source: AGHT+IHSSST6I841SM1Z0M/94DX3d17PTU5xihj27ZtQQ+mF7BLxn3pA8X7/yF/gH45QpbjlQ/ybEw== X-Received: by 2002:a17:906:eb4e:b0:a00:772c:c879 with SMTP id mc14-20020a170906eb4e00b00a00772cc879mr1653762ejb.38.1700657120531; Wed, 22 Nov 2023 04:45:20 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id z11-20020a170906240b00b00a036aba80b1sm1325747eja.201.2023.11.22.04.45.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:45:20 -0800 (PST) From: Martin Jansa To: openembedded-core@lists.openembedded.org Subject: [PATCH 16/21] oeqa: gdbserver: append -dbg suffix at the end of IMAGE_NAME not IMAGE_LINK_NAME Date: Wed, 22 Nov 2023 13:44:46 +0100 Message-ID: <82f46db622bca8efb11415600aec78fa5a263655.1700600804.git.martin.jansa@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Nov 2023 12:45:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191093 * the filename is constructed as: meta/classes-recipe/image.bbclass: d.appendVar('IMAGE_NAME','-dbg') and IMAGE_LINK_NAME adds ${IMAGE_VERSION_SUFFIX} _after_ this [YOCTO #12937] Signed-off-by: Martin Jansa --- meta/lib/oeqa/selftest/cases/gdbserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/gdbserver.py b/meta/lib/oeqa/selftest/cases/gdbserver.py index 9da97ae780..f441468861 100644 --- a/meta/lib/oeqa/selftest/cases/gdbserver.py +++ b/meta/lib/oeqa/selftest/cases/gdbserver.py @@ -34,12 +34,12 @@ CORE_IMAGE_EXTRA_INSTALL = "gdbserver" self.assertEqual(r.status, 0) self.assertIn("GNU gdb", r.output) image = 'core-image-minimal' - bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME'], image) + bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_NAME'], image) with tempfile.TemporaryDirectory(prefix="debugfs-") as debugfs: - filename = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s-dbg.tar.bz2" % bb_vars['IMAGE_LINK_NAME']) + filename = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s-dbg.tar.bz2" % bb_vars['IMAGE_NAME']) shutil.unpack_archive(filename, debugfs) - filename = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s.tar.bz2" % bb_vars['IMAGE_LINK_NAME']) + filename = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s.tar.bz2" % bb_vars['IMAGE_NAME']) shutil.unpack_archive(filename, debugfs) with runqemu("core-image-minimal", runqemuparams="nographic") as qemu: From patchwork Wed Nov 22 12:44:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 35088 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B87FAC61DF5 for ; Wed, 22 Nov 2023 12:45:28 +0000 (UTC) Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) by mx.groups.io with SMTP id smtpd.web11.18445.1700657122868198193 for ; Wed, 22 Nov 2023 04:45:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=I9NjESkF; spf=pass (domain: gmail.com, ip: 209.85.208.52, mailfrom: martin.jansa@gmail.com) Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-543c3756521so9207761a12.2 for ; Wed, 22 Nov 2023 04:45:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700657121; x=1701261921; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=qlBhm5GF0q5Wo0sPb/2QT6eSIvU3iKhNBT1zDDhZ3OQ=; b=I9NjESkFDxnexxYsHnQJ7EFNiJeeXT3GZck+hty2cBpbMgv4S4e2jMFiV76bcdIk3I aL0lDXzQ1iaJbO0dJJ71vzcbx5Z/0ofTcgEZTE+2bF6JXAYjsopYh1eFWm7YZyi3N9RY q6Q5Hky0DpEDz4L+GDpPSQhNDU9P56xpILuWZiPk9Y7FF0U2rZVrRbaSES4tSknB4w68 irQ0sP62ck2rZPytwdJs7aiYBFZV4iGnj0jFLxHslof+i8DvwA4UCw0AAljPiXuRwbgE 5inKmSnw2TWWBdGyAUHY2LRDkZVtfG69zDcix56umlli2oJuVRd0xPY173unJwrlWFJ5 HTXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700657121; x=1701261921; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qlBhm5GF0q5Wo0sPb/2QT6eSIvU3iKhNBT1zDDhZ3OQ=; b=muNtRkCOSNytajdOt9JXIH+IoHaddxpI1I0nXcccwylUT+eLvcDZMKNzhzQv4z0ZtA cIN8fvVN4Cu3MJFiDhb9NkJFVY+4I0C+9c4v4IS/vaH1On0Vt5Y/wyzfr/cu2VU//BRR ASILQoQrKw5QsejEoOpgqqdRKzwyixI2EBhb/xoxpqXJG8ydZ+PB4gwE0ty7w3ezlfC0 1TSb2yiyMpj7xo2JWkt8OkIrZep4TNlmkYfjsuO6uq4JVA5WhRRhCLlcnLEQqSJjSCfF yqR/RpfV+Ojy4ObjeszRN/FYCuvRSrKfXwxN4pGot6hLSP49gEGMbaR9C82sOwx4E4da FpxQ== X-Gm-Message-State: AOJu0YwOFw6VEf2FEI65EjLWXPR6+RUQXC0Vfkch1fxFqRw52SXdvICK cnOG7MywQE2WUXUzAoifSNqN46iNuCk= X-Google-Smtp-Source: AGHT+IEaeWkKnuWRMR4sTtJ7cv4+ptjCAQV34jv2ER5Pk/PIo59xC8fiw7rpPozB29RxmnBtx/aivQ== X-Received: by 2002:a17:907:597:b0:9c7:4d98:981f with SMTP id vw23-20020a170907059700b009c74d98981fmr1196691ejb.33.1700657121265; Wed, 22 Nov 2023 04:45:21 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id r7-20020a170906280700b009cc1e8ed7c5sm6559331ejc.133.2023.11.22.04.45.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:45:20 -0800 (PST) From: Martin Jansa To: openembedded-core@lists.openembedded.org Subject: [PATCH 17/21] oeqa: fitimage: respect KERNEL_FIT_NAME Date: Wed, 22 Nov 2023 13:44:47 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Nov 2023 12:45:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191094 * avoid couple of get_bb_var calls and use get_bb_vars instead * use KERNEL_FIT_LINK_NAME instead of assuming it's MACHINE as e.g.: machine = get_bb_var('MACHINE') fitimage_its_path = os.path.join(deploy_dir_image, "fitImage-its-%s-%s-%s" % (image_type, machine, machine)) * be aware that KERNEL_FIT_LINK_NAME can still be set to empty and then this oeqa check would fail again, because this hardlink: ln -vf $deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_LINK_NAME}" wouldn't be created and also with KERNEL_FIT_LINK_NAME the PKGV in kernel recipe looks differently in the final kernel artifact and KERNEL_FIT_LINK_NAME e.g.: AssertionError: False is not true: tmp/deploy/images/beaglebone-yocto/fitImage-its-core-image-minimal-initramfs-beaglebone-yocto-beaglebone-yocto--6.1.20+git-r0-20230318024804 image tree source doesn't exist because it's actually named with SRCPV expanded: tmp/deploy/images/beaglebone-yocto/fitImage-its-core-image-minimal-initramfs-beaglebone-yocto-beaglebone-yocto--6.1.20+git0+29ec3dc6f4_423e199669-r0-20230318024804 Use KERNEL_FIT_NAME instead of KERNEL_FIT_LINK_NAME but then we would need to add .its extension to expected filenames as well, but in previous commit I've added KERNEL_FIT_ITS_EXT variable and used it for links as well. But this doesn't apply for u-boot-its* files which don't use any extension. [YOCTO #12937] Signed-off-by: Martin Jansa --- meta/lib/oeqa/selftest/cases/fitimage.py | 98 ++++++++++++------------ 1 file changed, 48 insertions(+), 50 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/fitimage.py b/meta/lib/oeqa/selftest/cases/fitimage.py index 9383d0c4db..170df1bea2 100644 --- a/meta/lib/oeqa/selftest/cases/fitimage.py +++ b/meta/lib/oeqa/selftest/cases/fitimage.py @@ -5,7 +5,7 @@ # from oeqa.selftest.case import OESelftestTestCase -from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars +from oeqa.utils.commands import runCmd, bitbake, get_bb_vars import os import re @@ -46,12 +46,12 @@ FIT_DESC = "A model description" # fitImage is created as part of linux recipe image = "virtual/kernel" bitbake(image) - bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'INITRAMFS_IMAGE_NAME', 'KERNEL_FIT_LINK_NAME'], image) + bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'INITRAMFS_IMAGE_NAME', 'KERNEL_FIT_NAME', 'KERNEL_FIT_ITS_EXT', 'KERNEL_FIT_BIN_EXT'], image) fitimage_its_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], - "fitImage-its-%s-%s" % (bb_vars['INITRAMFS_IMAGE_NAME'], bb_vars['KERNEL_FIT_LINK_NAME'])) + "fitImage-its-%s%s%s" % (bb_vars['INITRAMFS_IMAGE_NAME'], bb_vars['KERNEL_FIT_NAME'], bb_vars['KERNEL_FIT_ITS_EXT'])) fitimage_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], - "fitImage-%s-%s" % (bb_vars['INITRAMFS_IMAGE_NAME'], bb_vars['KERNEL_FIT_LINK_NAME'])) + "fitImage-%s%s%s" % (bb_vars['INITRAMFS_IMAGE_NAME'], bb_vars['KERNEL_FIT_NAME'], bb_vars['KERNEL_FIT_BIN_EXT'])) self.assertTrue(os.path.exists(fitimage_its_path), "%s image tree source doesn't exist" % (fitimage_its_path)) @@ -126,12 +126,12 @@ UBOOT_MKIMAGE_SIGN_ARGS = "-c 'a smart comment'" # fitImage is created as part of linux recipe image = "virtual/kernel" bitbake(image) - bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'KERNEL_FIT_LINK_NAME'], image) + bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'KERNEL_FIT_NAME', 'KERNEL_FIT_ITS_EXT', 'KERNEL_FIT_BIN_EXT'], image) fitimage_its_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], - "fitImage-its-%s" % (bb_vars['KERNEL_FIT_LINK_NAME'])) + "fitImage-its%s%s" % (bb_vars['KERNEL_FIT_NAME'], bb_vars['KERNEL_FIT_ITS_EXT'])) fitimage_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], - "fitImage-%s.bin" % (bb_vars['KERNEL_FIT_LINK_NAME'])) + "fitImage%s%s" % (bb_vars['KERNEL_FIT_NAME'], bb_vars['KERNEL_FIT_BIN_EXT'])) self.assertTrue(os.path.exists(fitimage_its_path), "%s image tree source doesn't exist" % (fitimage_its_path)) @@ -278,14 +278,14 @@ FIT_SIGN_INDIVIDUAL = "1" self.write_config(config) # The U-Boot fitImage is created as part of the U-Boot recipe - bitbake("virtual/bootloader") + image = "virtual/bootloader" + bitbake(image) + bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'KERNEL_FIT_NAME'], image) - deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE') - machine = get_bb_var('MACHINE') - fitimage_its_path = os.path.join(deploy_dir_image, - "u-boot-its-%s" % (machine,)) - fitimage_path = os.path.join(deploy_dir_image, - "u-boot-fitImage-%s" % (machine,)) + fitimage_its_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], + "u-boot-its%s" % (bb_vars['KERNEL_FIT_NAME'])) + fitimage_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], + "u-boot-fitImage%s" % (bb_vars['KERNEL_FIT_NAME'])) self.assertTrue(os.path.exists(fitimage_its_path), "%s image tree source doesn't exist" % (fitimage_its_path)) @@ -363,14 +363,14 @@ UBOOT_MKIMAGE_SIGN_ARGS = "-c 'a smart U-Boot comment'" self.write_config(config) # The U-Boot fitImage is created as part of the U-Boot recipe - bitbake("virtual/bootloader") + image = "virtual/bootloader" + bitbake(image) + bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'KERNEL_FIT_NAME'], image) - deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE') - machine = get_bb_var('MACHINE') - fitimage_its_path = os.path.join(deploy_dir_image, - "u-boot-its-%s" % (machine,)) - fitimage_path = os.path.join(deploy_dir_image, - "u-boot-fitImage-%s" % (machine,)) + fitimage_its_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], + "u-boot-its%s" % (bb_vars['KERNEL_FIT_NAME'])) + fitimage_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], + "u-boot-fitImage%s" % (bb_vars['KERNEL_FIT_NAME'])) self.assertTrue(os.path.exists(fitimage_its_path), "%s image tree source doesn't exist" % (fitimage_its_path)) @@ -454,15 +454,14 @@ UBOOT_FIT_HASH_ALG = "sha256" self.write_config(config) # The U-Boot fitImage is created as part of the U-Boot recipe - bitbake("virtual/bootloader") + image = "virtual/bootloader" + bitbake(image) + bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'KERNEL_FIT_NAME'], image) - image_type = "core-image-minimal" - deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE') - machine = get_bb_var('MACHINE') - fitimage_its_path = os.path.join(deploy_dir_image, - "u-boot-its-%s" % (machine,)) - fitimage_path = os.path.join(deploy_dir_image, - "u-boot-fitImage-%s" % (machine,)) + fitimage_its_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], + "u-boot-its%s" % (bb_vars['KERNEL_FIT_NAME'])) + fitimage_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], + "u-boot-fitImage%s" % (bb_vars['KERNEL_FIT_NAME'])) self.assertTrue(os.path.exists(fitimage_its_path), "%s image tree source doesn't exist" % (fitimage_its_path)) @@ -609,15 +608,14 @@ FIT_SIGN_INDIVIDUAL = "1" self.write_config(config) # The U-Boot fitImage is created as part of the U-Boot recipe - bitbake("virtual/bootloader") + image = "virtual/bootloader" + bitbake(image) + bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'KERNEL_FIT_NAME'], image) - image_type = "core-image-minimal" - deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE') - machine = get_bb_var('MACHINE') - fitimage_its_path = os.path.join(deploy_dir_image, - "u-boot-its-%s" % (machine,)) - fitimage_path = os.path.join(deploy_dir_image, - "u-boot-fitImage-%s" % (machine,)) + fitimage_its_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], + "u-boot-its%s" % (bb_vars['KERNEL_FIT_NAME'])) + fitimage_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], + "u-boot-fitImage%s" % (bb_vars['KERNEL_FIT_NAME'])) self.assertTrue(os.path.exists(fitimage_its_path), "%s image tree source doesn't exist" % (fitimage_its_path)) @@ -753,26 +751,26 @@ FIT_HASH_ALG = "sha256" self.write_config(config) # fitImage is created as part of linux recipe - bitbake("virtual/kernel") + image = "virtual/kernel" + bitbake(image) + bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'INITRAMFS_IMAGE_NAME', 'KERNEL_FIT_NAME', 'KERNEL_FIT_ITS_EXT', 'KERNEL_FIT_BIN_EXT'], image) - image_type = get_bb_var('INITRAMFS_IMAGE') - deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE') - machine = get_bb_var('MACHINE') - fitimage_its_path = os.path.join(deploy_dir_image, - "fitImage-its-%s-%s-%s" % (image_type, machine, machine)) - fitimage_path = os.path.join(deploy_dir_image,"fitImage") + fitimage_its_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], + "fitImage-its-%s%s%s" % (bb_vars['INITRAMFS_IMAGE_NAME'], bb_vars['KERNEL_FIT_NAME'], bb_vars['KERNEL_FIT_ITS_EXT'])) + fitimage_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "fitImage") self.assertTrue(os.path.exists(fitimage_its_path), "%s image tree source doesn't exist" % (fitimage_its_path)) self.assertTrue(os.path.exists(fitimage_path), "%s FIT image doesn't exist" % (fitimage_path)) - kernel_load = str(get_bb_var('UBOOT_LOADADDRESS')) - kernel_entry = str(get_bb_var('UBOOT_ENTRYPOINT')) - kernel_type = str(get_bb_var('UBOOT_MKIMAGE_KERNEL_TYPE')) - kernel_compression = str(get_bb_var('FIT_KERNEL_COMP_ALG')) - uboot_arch = str(get_bb_var('UBOOT_ARCH')) - fit_hash_alg = str(get_bb_var('FIT_HASH_ALG')) + bb_vars = get_bb_vars(['UBOOT_LOADADDRESS', 'UBOOT_ENTRYPOINT', 'UBOOT_MKIMAGE_KERNEL_TYPE', 'FIT_KERNEL_COMP_ALG', 'UBOOT_ARCH', 'FIT_HASH_ALG'], image) + kernel_load = str(bb_vars['UBOOT_LOADADDRESS']) + kernel_entry = str(bb_vars['UBOOT_ENTRYPOINT']) + kernel_type = str(bb_vars['UBOOT_MKIMAGE_KERNEL_TYPE']) + kernel_compression = str(bb_vars['FIT_KERNEL_COMP_ALG']) + uboot_arch = str(bb_vars['UBOOT_ARCH']) + fit_hash_alg = str(bb_vars['FIT_HASH_ALG']) its_file = open(fitimage_its_path) From patchwork Wed Nov 22 12:44:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 35083 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC282C61DF4 for ; Wed, 22 Nov 2023 12:45:28 +0000 (UTC) Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) by mx.groups.io with SMTP id smtpd.web11.18447.1700657123534188357 for ; Wed, 22 Nov 2023 04:45:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=K01mfdWU; spf=pass (domain: gmail.com, ip: 209.85.208.49, mailfrom: martin.jansa@gmail.com) Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-543c3756521so9207779a12.2 for ; Wed, 22 Nov 2023 04:45:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700657122; x=1701261922; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=1ncpDvRpt5O+kIEZCaxsM31oezdTO4eqZmifCN73B8Q=; b=K01mfdWURqLDdj8hRySbJVaNWA/sEGHzj6hlmh9zCyUHK02aJKDKctuqlRvnyptmrm OcrY23+ovzDZB5SvR3kR5SLluLVfQq1y1K10tsHN120jz9rkDOV+RWtBKf0Q51vuKWhi qL4IkwlSqVbmDXo2BU1F0Fe+oidnJN4DDEWyb4ZWK9hDBzJQXxm8SbAUub2GAkpKiSr6 4nsv9mqwre4ti4fI0t+nD+rkSxoSf/pZnVfTGtJdMu5wPmrii4kba+lvSiUC1QOs3Oxp PwEbECbGCWGBF3dSIYUY0I69piwaacDTkAOOFwHg5/FnRaUZ14jfmyFvb8+Qzen9Zt+C X2Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700657122; x=1701261922; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1ncpDvRpt5O+kIEZCaxsM31oezdTO4eqZmifCN73B8Q=; b=K0R+iNSRY9WbuzdIr61ctvkI7V69o6FaTaq5qISRNq0RdXV0y3xUiq9Ln4IR+nke3V ha0YHGR30vupM14EU33lZxuuugE4CLt45pnWeupJN5qqz3id7YLMQXYWfmrQ6aD7zmi1 3nvNkCvvpNRQYock/3P73HsJDd6WBMhe934wmtki+ZptdyVnYAlWYQ3xA+6d7AdzbXYa Jn7X71eV9yH9oHqooMQKqDIuenx38sif+v//prDwnVvpDiyoMPe0Lwat3MILPfolUtJT 6vk+qbQwsFdUNpagmLWGvoQFJTXAD1wCeKSEta36J6MDewVrgq2tQ/4nU9EGlvs3cSjY Fwxg== X-Gm-Message-State: AOJu0YxxKvudbZ+ryZy1Frwu5BzKj3r4EXAi6MsE3MdUR+X2yt87OfnP 8scLrIOJBcka8qY6dDYhlk/WeBqCMJc= X-Google-Smtp-Source: AGHT+IEMEpwwzvaAnBrrTZiiIkdKnTSFBJ61+PRIY5DHro3n0C397coXjgzuVuHf90m4pIQuIqGLYA== X-Received: by 2002:a17:906:535b:b0:9da:ee00:a023 with SMTP id j27-20020a170906535b00b009daee00a023mr1407912ejo.30.1700657122010; Wed, 22 Nov 2023 04:45:22 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id y23-20020a170906471700b009fcd13bbd72sm4374923ejq.214.2023.11.22.04.45.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:45:21 -0800 (PST) From: Martin Jansa To: openembedded-core@lists.openembedded.org Subject: [PATCH 18/21] selftest: multiconfig-image-packager: use IMAGE_NAME instead of IMAGE_LINK_NAME Date: Wed, 22 Nov 2023 13:44:48 +0100 Message-ID: <17dccf417aa6d8ec1fadae328bdd29a0ee7aeb78.1700600804.git.martin.jansa@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Nov 2023 12:45:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191095 * the IMAGE_LINK_NAME now contains PKGV, PKGR in the filename, but the multiconfig-image-packager and MC_DEPLOY_IMAGE_BASENAME (e.g. core-image-minimal) has different PKGV value causing: | DEBUG: Executing shell function do_install | install: cannot stat 'tmp-mc-musl/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs--0.1-r0-20110405230000.ext4': No such file or directory ... | install: cannot stat 'tmp-mc-tiny/deploy/images/qemux86/core-image-minimal-qemux86.rootfs--0.1-r0-20110405230000.cpio.gz': No such file or directory because the actual filenames are: tmp-mc-musl/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs--1.0-r0-20110405230000.ext4 tmp-mc-tiny/deploy/images/qemux86/core-image-minimal-qemux86.rootfs--1.0-r0-20110405230000.ext4 [YOCTO #12937] Signed-off-by: Martin Jansa --- .../multiconfig/multiconfig-image-packager_0.1.bb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb b/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb index d7785cee2e..b53b6a4b26 100644 --- a/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb +++ b/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb @@ -13,11 +13,11 @@ do_install[mcdepends] += "mc::${MCNAME}:core-image-minimal:do_image_complete mc: do_install () { install -d ${D}/var/lib/machines/${MCNAME} - install ${MC_DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME_CORE_IMAGE_MINIMAL}.${MCIMGTYPE} ${D}/var/lib/machines/${MCNAME}/${MC_DEPLOY_IMAGE_BASENAME}.${MCIMGTYPE} + install ${MC_DEPLOY_DIR_IMAGE}/${IMAGE_NAME_CORE_IMAGE_MINIMAL}.${MCIMGTYPE} ${D}/var/lib/machines/${MCNAME}/${MC_DEPLOY_IMAGE_BASENAME}.${MCIMGTYPE} install ${MC_DEPLOY_DIR_IMAGE}/bzImage ${D}/var/lib/machines/${MCNAME} } -# for IMAGE_LINK_NAME, IMAGE_BASENAME +# for IMAGE_NAME, IMAGE_BASENAME inherit image-artifact-names python () { @@ -31,14 +31,14 @@ python () { # these will most likely start with my BPN multiconfig-image-packager, but I want them from core-image-minimal # as there is no good way to query core-image-minimal's context lets assume that there are no overrides # and that we can just replace IMAGE_BASENAME - image_link_name = d.getVar('IMAGE_LINK_NAME') + image_name = d.getVar('IMAGE_NAME') image_basename = d.getVar('IMAGE_BASENAME') machine = d.getVar('MACHINE') mcmachine = d.getVar('MCMACHINE') image_to_deploy = d.getVar('MC_DEPLOY_IMAGE_BASENAME') - image_link_name_to_deploy = image_link_name.replace(image_basename, image_to_deploy).replace(machine, mcmachine) - bb.warn('%s: assuming that "%s" built for "%s" has IMAGE_LINK_NAME "%s"' % (d.getVar('PN'), mcmachine, image_to_deploy, image_link_name_to_deploy)) - d.setVar('IMAGE_LINK_NAME_CORE_IMAGE_MINIMAL', image_link_name_to_deploy) + image_name_to_deploy = image_name.replace(image_basename, image_to_deploy).replace(machine, mcmachine) + bb.warn('%s: assuming that "%s" built for "%s" has IMAGE_NAME "%s"' % (d.getVar('PN'), mcmachine, image_to_deploy, image_name_to_deploy)) + d.setVar('IMAGE_NAME_CORE_IMAGE_MINIMAL', image_name_to_deploy) } BBCLASSEXTEND = "mcextend:tiny mcextend:musl" From patchwork Wed Nov 22 12:44:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 35081 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0493C61DB1 for ; Wed, 22 Nov 2023 12:45:28 +0000 (UTC) Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) by mx.groups.io with SMTP id smtpd.web10.18530.1700657124248094176 for ; Wed, 22 Nov 2023 04:45:24 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=QVOaYC/1; spf=pass (domain: gmail.com, ip: 209.85.208.42, mailfrom: martin.jansa@gmail.com) Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-543456dbd7bso1550770a12.1 for ; Wed, 22 Nov 2023 04:45:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700657123; x=1701261923; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=C6jQL1xZDJTXbxEfkjkWHYaY7V9TpgHEo3OfX0pT8pg=; b=QVOaYC/1mogzboxIJmzTXlpf0ddG8JtzY0rVnaXR+bdmwSCikTQY9/7G6lXCJ7BMwo ZSTENPtoka1GH0/CgBGPPVlUAT2RcAbmrCWf0K4TsRp5vRCKvoan4c56/4YEKY9L2ZP+ S6vxPrf7FzXgznPRstTqgcgYLcF4fn9IuSQfUY3PXljwFh+9R35AzS/SsOk0pu64xsLo jgE8/2BSfz+vdRF9u0Sh89jMYCad2zRkN/OomYjfjBmASZI9A2O61YWFCGklPxKHrhgZ XuIn0xQomgfbFZr1SfH7S3FJq4Jkf1Pb/b45QR59QkmhqnzE20ULHhCoeLCJPRGTfCN8 PEYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700657123; x=1701261923; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C6jQL1xZDJTXbxEfkjkWHYaY7V9TpgHEo3OfX0pT8pg=; b=ntttdLcFFfBYmCp4wzvQNkK7pHKP03ZLFwHL3lwzCfWg5iMh2yoYCZr4PpWtjFI4uU c+aI74Xh4f/NwQt5CGNcAhXuZr0xPW+63dlIkbFJx5SFYnUAFslibVwwTgP1zu6OCVpY mQdLSN0CEUNDgLmqDexhe5455NUwWm921nDiaeTRBF+IjDXnSeoqSVZBzt8efDUNH8iY 6nlUSSEiUYDC5TdOqNnF+iQXNlmcvXlUU+SSyP5oYPlg5G5qvVll4T0gk5GKnGDkoF5n ll2XGfJEXtblf2rFJ1K9RQ/LgBc/BOS6nJ1bQleppCzlZxcrGAwPM4mDU/66kUbhBhkc hfUQ== X-Gm-Message-State: AOJu0YwtlgF+ljgGo6suTs/vJlZYNQoE1rPYdtfmFiY0tWWXjLJfau1F 36ND8HiTh20eqZJm1WRjeLPKqmOBd2k= X-Google-Smtp-Source: AGHT+IH04Ql/5CUAPm5PLW2xFKkppgSI0LHTRoOf1KgDOaMWNOogwEgyeZqaTTT7ttfbeZzwI2LNUw== X-Received: by 2002:a17:906:7d6:b0:9a9:f0e6:904e with SMTP id m22-20020a17090607d600b009a9f0e6904emr2042297ejc.16.1700657122698; Wed, 22 Nov 2023 04:45:22 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id va26-20020a17090711da00b009fcbff55852sm4379933ejb.162.2023.11.22.04.45.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:45:22 -0800 (PST) From: Martin Jansa To: openembedded-core@lists.openembedded.org Subject: [PATCH 19/21] image.bbclass: remove hardlinks as well Date: Wed, 22 Nov 2023 13:44:49 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Nov 2023 12:45:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191096 * it was removing only destination symlinks, but sometimes hardlink might be regenerated as well, e.g. in oeqa test wic.Wic.test_permissions which was failing with: NOTE: recipe core-image-minimal-1.0-r0: task do_image_wic: Started ERROR: core-image-minimal-1.0-r0 do_image_wic: Error executing a python function in exec_func_python() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_func_python() autogenerated', lineno: 2, function: 0001: *** 0002:create_hardlinks(d) 0003: File: '/OE/build/poky/meta/classes-recipe/image.bbclass', lineno: 606, function: create_hardlinks 0602: if os.path.exists(src): 0603: bb.note("Creating hardlink: %s -> %s" % (dst, src)) 0604: if os.path.islink(dst): 0605: os.remove(dst) *** 0606: os.link(src, dst) 0607: else: 0608: bb.note("Skipping hardlink, source does not exist: %s -> %s" % (dst, src)) 0609:} 0610: Exception: FileExistsError: [Errno 17] File exists: 'tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/deploy-core-image-minimal-image-complete/core-image-minimal-qemux86-64.rootfs.wic' -> 'tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/deploy-core-image-minimal-image-complete/core-image-minimal-qemux86-64.rootfs--1.0-r0-20110405230000.wic' [YOCTO #12937] Signed-off-by: Martin Jansa --- meta/classes-recipe/image.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass index e68b8034ea..081f1927fb 100644 --- a/meta/classes-recipe/image.bbclass +++ b/meta/classes-recipe/image.bbclass @@ -601,7 +601,7 @@ python create_hardlinks() { src = os.path.join(deploy_dir, img_name + "." + type) if os.path.exists(src): bb.note("Creating hardlink: %s -> %s" % (dst, src)) - if os.path.islink(dst): + if os.path.isfile(dst): os.remove(dst) os.link(src, dst) else: From patchwork Wed Nov 22 12:44:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 35080 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93EC3C61DA7 for ; Wed, 22 Nov 2023 12:45:28 +0000 (UTC) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) by mx.groups.io with SMTP id smtpd.web11.18449.1700657125371754390 for ; Wed, 22 Nov 2023 04:45:25 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=L8oc2KtT; spf=pass (domain: gmail.com, ip: 209.85.167.45, mailfrom: martin.jansa@gmail.com) Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-507bd64814fso9448422e87.1 for ; Wed, 22 Nov 2023 04:45:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700657123; x=1701261923; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=jqQsnTleE3IA7J232ox7CQOscDR/Nrrocz9U2MCp4U0=; b=L8oc2KtTjeFNr0F2eYPymReMAdBDJOQ63Ti8VNfslcXQJl2I499wptoWKmOfAjtG4h TaUAePN1cQl0XHLwCAASQypbHwBGK6Shtsyd6a+8My1N4M7Nf6MePUIQLHcMzUz95Xf5 TuN/uxRquKOuPiq6NkV292izb7zZbunC0rXA3LPEtfuUKZkbgp//Of+Si1pam62yP8Tq t4x9uLCGXVaPtNwlFjMNGkFzRULfAec+gKmKbdE5X+X/fXbIaye7TkIzKmH4QPuXyA03 4DoHLRIRiVAKpEpiYUrwHQgeEah4HjQrz/5bZ8aeDEBHLsghfF+QSCej2yT3IWpITAys WWSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700657123; x=1701261923; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jqQsnTleE3IA7J232ox7CQOscDR/Nrrocz9U2MCp4U0=; b=fkT6bGzqbDjwOZ+YfY5rOWwyRNWYmQJ7ugxPjGapUvPQAoPxHxU9wOHXacniSqdtUd iccjzl76h4hlvPwAbTUTgWy+9u4VzDRuUhq/8OHPIp58kEaDNJ5HwNCgewJ6c9ey8rD7 2lVhtBLZ8KHLGp0/Lwli4pWFkWg/0pWObqhztyFmH7fxIhJzSY+F50uMYqTlNyfGTVgt uxHEPaMIK8MK06L/smaXoOy2R4e2ybyKlt6XBwMZ2GO79iI0Dp0opfYXqZQ7h7VBTDbD IKR5RrYE+n6c5fHnUwqUZoofwWRrmh5Yer6FFbENydUtZ4BKtRfH5YpSfBuOUdyGsnjz cwnQ== X-Gm-Message-State: AOJu0YzXmP+Y/lcqmSmg1Fhr2PomWaCeXPmlvDUM09MncY/vWYVRUc4+ 52syl8H5pawbxxacbAl8dRY1gyJhgCU= X-Google-Smtp-Source: AGHT+IGS44uH4crB8CYpR4xdSKtiMH9vC/OOO0wSdXtYXdQD3V0pz59pV0jmejwPc8wvKMp7X0SbEA== X-Received: by 2002:a05:6512:3614:b0:503:19d8:8dc3 with SMTP id f20-20020a056512361400b0050319d88dc3mr1091572lfs.31.1700657123458; Wed, 22 Nov 2023 04:45:23 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id p20-20020a170906a01400b009adc77fe164sm6563144ejy.66.2023.11.22.04.45.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:45:23 -0800 (PST) From: Martin Jansa To: openembedded-core@lists.openembedded.org Subject: [PATCH 20/21] populate_sdk_ext.bbclass: add *:do_shared_workdir to BB_SETSCENE_ENFORCE_IGNORE_TASKS Date: Wed, 22 Nov 2023 13:44:50 +0100 Message-ID: <606a01cbb1f1d6608093260692d9d299218074b7.1700600804.git.martin.jansa@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Nov 2023 12:45:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191097 * otherwise populate_sdk_ext task will fail as shown e.g. with: bitbake core-image-minimal -c populate_sdk_ext esdk.oeSDKExtSelfTest.test_image_generation_binary_feeds esdk.oeSDKExtSelfTest.test_install_libraries_headers: ERROR: Task linux-yocto.do_deploy_links attempted to execute unexpectedly Task tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/sdk-ext/image/tmp-renamed-sdk/layers/poky/meta/recipes-core/images/core-image-minimal.bb:do_image_qa, unihash 9d177d4c6ca34e68e19b1bc23deec58c3eabe5f9d5808f90402161163a73f22f, taskhash 9d177d4c6ca34e68e19b1bc23deec58c3eabe5f9d5808f90402161163a73f22f Task tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/sdk-ext/image/tmp-renamed-sdk/layers/poky/meta/recipes-core/images/core-image-minimal.bb:do_image_complete, unihash 0aff4dcbdb3c5ca68e0ebb39457fbe86beb3482986ddfe0b0b6fc0386807edbf, taskhash 0aff4dcbdb3c5ca68e0ebb39457fbe86beb3482986ddfe0b0b6fc0386807edbf This is usually due to missing setscene tasks. Those missing in this build were: {'tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/sdk-ext/image/tmp-renamed-sdk/layers/poky/meta/recipes-core/images/core-image-minimal.bb:do_image_complete', 'tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/sdk-ext/image/tmp-renamed-sdk/layers/poky/meta/recipes-core/images/core-image-minimal.bb:do_image_qa'} ERROR: Task (tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/sdk-ext/image/tmp-renamed-sdk/layers/poky/meta/recipes-kernel/linux/linux-yocto_6.5.bb:do_deploy_links) failed with exit code 'setscene ignore_tasks' NOTE: Tasks Summary: Attempted 4975 tasks of which 4971 didn't need to be rerun and 1 failed. Summary: 1 task failed: tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/sdk-ext/image/tmp-renamed-sdk/layers/poky/meta/recipes-kernel/linux/linux-yocto_6.5.bb:do_deploy_links Summary: There was 1 WARNING message. Summary: There was 1 ERROR message, returning a non-zero exit code. ERROR: Logfile of failure stored in: tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/temp/log.do_populate_sdk_ext.2280835 NOTE: recipe core-image-minimal-1.0-r0: task do_populate_sdk_ext: Failed ERROR: Task (/OE/build/poky/meta/recipes-core/images/core-image-minimal.bb:do_populate_sdk_ext) failed with exit code '1' NOTE: Tasks Summary: Attempted 6211 tasks of which 6147 didn't need to be rerun and 1 failed. Summary: 1 task failed: /OE/build/poky/meta/recipes-core/images/core-image-minimal.bb:do_populate_sdk_ext Summary: There was 1 ERROR message, returning a non-zero exit code. [YOCTO #12937] Signed-off-by: Martin Jansa --- meta/classes-recipe/populate_sdk_ext.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes-recipe/populate_sdk_ext.bbclass b/meta/classes-recipe/populate_sdk_ext.bbclass index f209becae1..5705140359 100644 --- a/meta/classes-recipe/populate_sdk_ext.bbclass +++ b/meta/classes-recipe/populate_sdk_ext.bbclass @@ -366,7 +366,7 @@ def write_local_conf(d, baseoutpath, derivative, core_meta_subdir, uninative_che f.write('BB_HASHCONFIG_IGNORE_VARS:append = " SIGGEN_UNLOCKED_RECIPES"\n\n') # Set up which tasks are ignored for run on install - f.write('BB_SETSCENE_ENFORCE_IGNORE_TASKS = "%:* *:do_shared_workdir *:do_rm_work wic-tools:* *:do_addto_recipe_sysroot"\n\n') + f.write('BB_SETSCENE_ENFORCE_IGNORE_TASKS = "%:* *:do_shared_workdir *:do_rm_work *:do_deploy_links wic-tools:* *:do_addto_recipe_sysroot"\n\n') # Hide the config information from bitbake output (since it's fixed within the SDK) f.write('BUILDCFG_HEADER = ""\n\n') From patchwork Wed Nov 22 12:44:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 35084 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 923B1C61D9B for ; Wed, 22 Nov 2023 12:45:28 +0000 (UTC) Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) by mx.groups.io with SMTP id smtpd.web10.18531.1700657126196723608 for ; Wed, 22 Nov 2023 04:45:26 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=eJL1ndgt; spf=pass (domain: gmail.com, ip: 209.85.218.52, mailfrom: martin.jansa@gmail.com) Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a00d5b0ec44so350835866b.0 for ; Wed, 22 Nov 2023 04:45:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700657124; x=1701261924; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=c9czxcDtUG6ZESyDD9Djl5QWr3/pSqdiVQemICp/lPU=; b=eJL1ndgt9qlqGhjOxsASAGm7NK6Vpx5QEzDoKiNW+7I9XlTQJiN9HOOboKcTZimS3K yDkho4DfH4dsVwScYGh+OqBbrLbG0gpNX0LlR6lkPiUH5VCEC/O5fvMUC7TyRcwWgg5l dp5wOUCu2o5QRHbP6r2T+3fDWN5s1+xoA8yEELoFwgDOMn5viYTYnSfhCSirgBcn9v4J HvUBQTdk6UU3VIeAXqbl8h+qeQ3a3ggA7ptR1u4M2akbkykwjWhEyY4Jmo2ns5D7UTCQ AvLrJdRzUgIArmyYij66GVAUa58zaKa9H80lCpDm+L6uc3fKnxuT5dMCjDXdxRbz4mHN MHNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700657124; x=1701261924; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=c9czxcDtUG6ZESyDD9Djl5QWr3/pSqdiVQemICp/lPU=; b=ouKP9fDXxFgMSNK0FUoXZskaMV6z1kjJ1FAgyMbk2hUn9kn0KbS8VSsN6UeWwuHvVW dpo/IzSx+RGGs9gen8PShauKq3tyoXfEAVqN92HvRxWTOoIz54wM8NQxWGsMZypncEEV jfq1yHLg2xoy+5k+ZCvRMmsv1jioOhWlsSP8A0rwc/AG2eVI8Jm+Gm6NUgi2XTej4CyE 4AwVwCdJ/x4M0Hlu8gclj/0YTIiNpT3YfkNXgNk4ziBclONQt6A5c6HyzUPgzOQInK6l 5+O15/AkUHfygAipxY4Y4WyJGd1nkeEqWyFv4hwZoN7zflGH+vTuAEEY2dwlUVlEsjS5 huFQ== X-Gm-Message-State: AOJu0Yxh+4ZguTtWF6UkA+UBGQFcwzDrxs59SbYTp4z90Vb5p2flT89G tKdzarvTBirgKk+tiYu9thOe8+gZaNA= X-Google-Smtp-Source: AGHT+IE20QflflD/WO1iL2hs4iNbjJmdqAfiNyCU+CxydJgcYKSnI/T3PlIa0JZ+8bWB52dfdxBjlA== X-Received: by 2002:a17:906:10dd:b0:a04:b55a:4111 with SMTP id v29-20020a17090610dd00b00a04b55a4111mr858335ejv.47.1700657124491; Wed, 22 Nov 2023 04:45:24 -0800 (PST) Received: from localhost (ip-109-238-218-228.aim-net.cz. [109.238.218.228]) by smtp.gmail.com with ESMTPSA id w17-20020a1709067c9100b009b9f87b34b6sm6560657ejo.189.2023.11.22.04.45.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:45:23 -0800 (PST) From: Martin Jansa To: openembedded-core@lists.openembedded.org Subject: [PATCH 21/21] u-boot.inc: don't replace the binary with symlink Date: Wed, 22 Nov 2023 13:44:51 +0100 Message-ID: <8026b4db3dc2a49dc8b7e51b01836af56f3713ba.1700600804.git.martin.jansa@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Nov 2023 12:45:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191098 * when UBOOT_ARTIFACT_NAME and UBOOT_ARTIFACT_LINK_NAME are empty the UBOOT_BINARYNAME and UBOOT_IMAGE might be indentical and the binary gets overwritten by the symlink to itself (similarly for SPL_*) $ ls -lah /OE/build/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/u-boot/2023.10/package/boot total 8.0K drwxr-xr-x 2 martin martin 4.0K Nov 21 21:23 . drwxr-xr-x 4 martin martin 4.0K Nov 21 21:23 .. lrwxrwxrwx 1 martin martin 3 Nov 21 21:23 MLO -> MLO lrwxrwxrwx 1 martin martin 10 Nov 21 21:23 u-boot.bin -> u-boot.bin * which causes: ERROR: u-boot-1_2023.10-r0 do_package: Error executing a python function in exec_func_python() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_func_python() autogenerated', lineno: 2, function: 0001: *** 0002:do_package(d) 0003: File: '/OE/build/poky/meta/classes-global/package.bbclass', lineno: 536, function: do_package 0532: bb.build.exec_func("package_prepare_pkgdata", d) 0533: bb.build.exec_func("perform_packagecopy", d) 0534: for f in (d.getVar('PACKAGE_PREPROCESS_FUNCS') or '').split(): 0535: bb.build.exec_func(f, d) *** 0536: oe.package.process_split_and_strip_files(d) 0537: oe.package.fixup_perms(d) 0538: 0539: ########################################################################### 0540: # Split up PKGD into PKGDEST File: '/OE/build/poky/meta/lib/oe/package.py', lineno: 1073, function: process_split_and_strip_files 1069: staticlibs.append(file) 1070: continue 1071: 1072: try: *** 1073: ltarget = cpath.realpath(file, dvar, False) 1074: s = cpath.lstat(ltarget) 1075: except OSError as e: 1076: (err, strerror) = e.args 1077: if err != errno.ENOENT: File: '/OE/build/poky/meta/lib/oe/cachedpath.py', lineno: 231, function: realpath 0227: if e.errno == errno.ELOOP: 0228: # make ELOOP more readable; without catching it, there will 0229: # be printed a backtrace with 100s of OSError exceptions 0230: # else *** 0231: raise OSError(errno.ELOOP, 0232: "too much recursions while resolving '%s'; loop in '%s'" % 0233: (file, e.strerror)) 0234: 0235: raise Exception: OSError: [Errno 40] too much recursions while resolving '/OE/build/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/u-boot/2023.10/package/boot/MLO'; loop in '/OE/build/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/u-boot/2023.10/package/boot/MLO' ERROR: Logfile of failure stored in: /OE/build/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/u-boot/2023.10/temp/log.do_package.3990391 [YOCTO #12937] Signed-off-by: Martin Jansa --- meta/classes-recipe/uboot-sign.bbclass | 24 ++++++++++----------- meta/recipes-bsp/u-boot/u-boot.inc | 29 +++++++++++++++++++------- 2 files changed, 34 insertions(+), 19 deletions(-) diff --git a/meta/classes-recipe/uboot-sign.bbclass b/meta/classes-recipe/uboot-sign.bbclass index e89c8214d3..d7de2c3bde 100644 --- a/meta/classes-recipe/uboot-sign.bbclass +++ b/meta/classes-recipe/uboot-sign.bbclass @@ -420,24 +420,24 @@ do_deploy:prepend() { fi if [ "${UBOOT_SIGN_ENABLE}" = "1" -a -n "${UBOOT_DTB_BINARY}" ] ; then - ln -vf ${DEPLOYDIR}/${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_BINARY} - ln -vf ${DEPLOYDIR}/${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_LINK} - ln -vf ${DEPLOYDIR}/${UBOOT_NODTB_IMAGE} ${DEPLOYDIR}/${UBOOT_NODTB_LINK} - ln -vf ${DEPLOYDIR}/${UBOOT_NODTB_IMAGE} ${DEPLOYDIR}/${UBOOT_NODTB_BINARY} + [ "${UBOOT_DTB_IMAGE}" != "${UBOOT_DTB_BINARY}" ] && ln -vf ${DEPLOYDIR}/${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_BINARY} + [ "${UBOOT_DTB_IMAGE}" != "${UBOOT_DTB_LINK}" ] && ln -vf ${DEPLOYDIR}/${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_LINK} + [ "${UBOOT_NODTB_IMAGE}" != "${UBOOT_NODTB_LINK}" ] && ln -vf ${DEPLOYDIR}/${UBOOT_NODTB_IMAGE} ${DEPLOYDIR}/${UBOOT_NODTB_LINK} + [ "${UBOOT_NODTB_IMAGE}" != "${UBOOT_NODTB_BINARY}" ] && ln -vf ${DEPLOYDIR}/${UBOOT_NODTB_IMAGE} ${DEPLOYDIR}/${UBOOT_NODTB_BINARY} fi if [ "${UBOOT_FITIMAGE_ENABLE}" = "1" ] ; then - ln -vf ${DEPLOYDIR}/${UBOOT_ITS_IMAGE} ${DEPLOYDIR}/${UBOOT_ITS} - ln -vf ${DEPLOYDIR}/${UBOOT_ITS_IMAGE} ${DEPLOYDIR}/${UBOOT_ITS_LINK} - ln -vf ${DEPLOYDIR}/${UBOOT_FITIMAGE_IMAGE} ${DEPLOYDIR}/${UBOOT_FITIMAGE_BINARY} - ln -vf ${DEPLOYDIR}/${UBOOT_FITIMAGE_IMAGE} ${DEPLOYDIR}/${UBOOT_FITIMAGE_LINK} + [ "${UBOOT_ITS_IMAGE}" != "${UBOOT_ITS}" ] && ln -vf ${DEPLOYDIR}/${UBOOT_ITS_IMAGE} ${DEPLOYDIR}/${UBOOT_ITS} + [ "${UBOOT_ITS_IMAGE}" != "${UBOOT_ITS_LINK}" ] && ln -vf ${DEPLOYDIR}/${UBOOT_ITS_IMAGE} ${DEPLOYDIR}/${UBOOT_ITS_LINK} + [ "${UBOOT_FITIMAGE_IMAGE}" != "${UBOOT_FITIMAGE_BINARY}" ] && ln -vf ${DEPLOYDIR}/${UBOOT_FITIMAGE_IMAGE} ${DEPLOYDIR}/${UBOOT_FITIMAGE_BINARY} + [ "${UBOOT_FITIMAGE_IMAGE}" != "${UBOOT_FITIMAGE_LINK}" ] && ln -vf ${DEPLOYDIR}/${UBOOT_FITIMAGE_IMAGE} ${DEPLOYDIR}/${UBOOT_FITIMAGE_LINK} fi if [ "${SPL_SIGN_ENABLE}" = "1" -a -n "${SPL_DTB_BINARY}" ] ; then - ln -vf ${DEPLOYDIR}/${SPL_DTB_IMAGE} ${DEPLOYDIR}/${SPL_DTB_LINK} - ln -vf ${DEPLOYDIR}/${SPL_DTB_IMAGE} ${DEPLOYDIR}/${SPL_DTB_BINARY} - ln -vf ${DEPLOYDIR}/${SPL_NODTB_IMAGE} ${DEPLOYDIR}/${SPL_NODTB_LINK} - ln -vf ${DEPLOYDIR}/${SPL_NODTB_IMAGE} ${DEPLOYDIR}/${SPL_NODTB_BINARY} + [ "${SPL_DTB_IMAGE}" != "${SPL_DTB_LINK}" ] && ln -vf ${DEPLOYDIR}/${SPL_DTB_IMAGE} ${DEPLOYDIR}/${SPL_DTB_LINK} + [ "${SPL_DTB_IMAGE}" != "${SPL_DTB_BINARY}" ] && ln -vf ${DEPLOYDIR}/${SPL_DTB_IMAGE} ${DEPLOYDIR}/${SPL_DTB_BINARY} + [ "${SPL_NODTB_IMAGE}" != "${SPL_NODTB_LINK}" ] && ln -vf ${DEPLOYDIR}/${SPL_NODTB_IMAGE} ${DEPLOYDIR}/${SPL_NODTB_LINK} + [ "${SPL_NODTB_IMAGE}" != "${SPL_NODTB_BINARY}" ] && ln -vf ${DEPLOYDIR}/${SPL_NODTB_IMAGE} ${DEPLOYDIR}/${SPL_NODTB_BINARY} fi } diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc index 4ea0ed3cf4..168f659acc 100644 --- a/meta/recipes-bsp/u-boot/u-boot.inc +++ b/meta/recipes-bsp/u-boot/u-boot.inc @@ -113,7 +113,9 @@ do_install () { unset i else install -D -m 644 ${B}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} - ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} + if [ "${UBOOT_IMAGE}" != "${UBOOT_BINARY}" ]; then + ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} + fi # Install the uboot-initial-env if [ -n "${UBOOT_INITIAL_ENV}" ]; then @@ -140,7 +142,9 @@ do_install () { unset i else install -m 644 ${B}/${UBOOT_ELF} ${D}/boot/${UBOOT_ELF_IMAGE} - ln -sf ${UBOOT_ELF_IMAGE} ${D}/boot/${UBOOT_ELF_BINARY} + if [ "${UBOOT_ELF_IMAGE}" != "${UBOOT_ELF_BINARY}" ]; then + ln -sf ${UBOOT_ELF_IMAGE} ${D}/boot/${UBOOT_ELF_BINARY} + fi fi fi @@ -158,6 +162,7 @@ do_install () { if [ $j -eq $i ]; then install -m 644 ${B}/${config}/${SPL_BINARY} ${D}/boot/${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE}-${type} +sd ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE} fi done @@ -166,13 +171,17 @@ do_install () { unset i else install -m 644 ${B}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} - ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARYFILE} + if [ "${SPL_IMAGE}" != "${SPL_BINARYFILE}" ]; then + ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARYFILE} + fi fi fi if [ -n "${UBOOT_ENV}" ]; then install -m 644 ${WORKDIR}/${UBOOT_ENV_BINARY} ${D}/boot/${UBOOT_ENV_IMAGE} - ln -sf ${UBOOT_ENV_IMAGE} ${D}/boot/${UBOOT_ENV_BINARY} + if [ "${UBOOT_ENV_IMAGE}" != "${UBOOT_ENV_BINARY}" ]; then + ln -sf ${UBOOT_ENV_IMAGE} ${D}/boot/${UBOOT_ENV_BINARY} + fi fi if [ "${UBOOT_EXTLINUX}" = "1" ]; then @@ -225,7 +234,9 @@ do_deploy () { unset i else install -D -m 644 ${B}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} - ln -vf ${DEPLOYDIR}/${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY} + if [ "${UBOOT_IMAGE}" != "${UBOOT_BINARY}" ]; then + ln -vf ${DEPLOYDIR}/${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY} + fi if [ -n "${UBOOT_LINK}" -a "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then ln -vf ${DEPLOYDIR}/${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_LINK} @@ -296,7 +307,9 @@ do_deploy () { unset i else install -m 644 ${B}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE} - ln -vf ${DEPLOYDIR}/${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME} + if [ "${SPL_IMAGE}" != "${SPL_BINARYNAME}" ]; then + ln -vf ${DEPLOYDIR}/${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME} + fi if [ -n "${SPL_LINK}" -a "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then ln -vf ${DEPLOYDIR}/${SPL_IMAGE} ${DEPLOYDIR}/${SPL_LINK} fi @@ -305,7 +318,9 @@ do_deploy () { if [ -n "${UBOOT_ENV}" ]; then install -m 644 ${WORKDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_IMAGE} - ln -vf ${DEPLOYDIR}${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_BINARY} + if [ "${UBOOT_ENV_IMAGE}" != "${UBOOT_ENV_BINARY}" ]; then + ln -vf ${DEPLOYDIR}${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_BINARY} + fi if [ -n "${UBOOT_ENV_LINK}" -a "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then ln -vf ${DEPLOYDIR}${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_LINK} fi