From 8d7680d1d652c87db27976b1eb9b6a8d68f994af Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Tue, 28 May 2024 13:52:41 +0200 Subject: [PATCH] global: remove IMAGE_NAME_SUFFIX from IMAGE_LINK_NAME poky has reworked the format of image names, hardcoding the IMAGE_NAME_SUFFIX (.rootfs) into IMAGE_LINK_NAME, the name used for image symlinks. This would only be considered a cosmetic change if it weren't for the fact that we have scripts and test infrastructure that relies on the old image name format, and this change would force us to rework it all. Remove the suffix from the link name to maintain our image name format, and reflect this name in our custom image type scripts. Note that this removes ".rootfs" from several files, for example: * .rootfs.ext4.gz is now .ext4.gz * .rootfs.cpio.gz.u-boot.tf is now .cpio.gz.u-boot.tf * .rootfs.ubifs is now .ubifs * .rootfs.sdcard is now .sdcard However, symlink names and non-rootfs files (.boot.vfat, .recovery.vfat...) are unchanged. https://onedigi.atlassian.net/browse/DEL-9011 Signed-off-by: Gabriel Valcazar --- meta-digi-arm/classes/image_types_digi.bbclass | 8 ++++---- meta-digi-arm/conf/machine/include/digi-defaults.inc | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meta-digi-arm/classes/image_types_digi.bbclass b/meta-digi-arm/classes/image_types_digi.bbclass index 8d38f572c..3bcbbcdfb 100644 --- a/meta-digi-arm/classes/image_types_digi.bbclass +++ b/meta-digi-arm/classes/image_types_digi.bbclass @@ -241,7 +241,7 @@ trustence_sign_cpio() { fi } CONVERSIONTYPES += "tf" -CONVERSION_CMD:tf = "trustence_sign_cpio ${IMAGE_NAME}.rootfs.${type}" +CONVERSION_CMD:tf = "trustence_sign_cpio ${IMAGE_NAME}.${type}" CONVERSION_DEPENDS_tf = "${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'trustfence-sign-tools-native', '', d)}" IMAGE_TYPES += "cpio.gz.u-boot.tf" @@ -254,7 +254,7 @@ rootfs_sign() { export CONFIG_SIGN_KEYS_PATH="${TRUSTFENCE_SIGN_KEYS_PATH}" [ -n "${CONFIG_KEY_INDEX}" ] && export CONFIG_KEY_INDEX="${TRUSTFENCE_KEY_INDEX}" - ROOTFS_IMAGE="${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.squashfs" + ROOTFS_IMAGE="${IMGDEPLOYDIR}/${IMAGE_NAME}.squashfs" TMP_ROOTFS_IMAGE_SIGNED="$(mktemp ${ROOTFS_IMAGE}-signed.XXXXXX)" # Sign rootfs read-only image trustfence-sign-artifact.sh -p "${DIGI_SOM}" -r "${ROOTFS_IMAGE}" "${TMP_ROOTFS_IMAGE_SIGNED}" @@ -274,7 +274,7 @@ IMAGE_ROOTFS_ALIGNMENT = "4096" BOARD_BOOTIMAGE_PARTITION_SIZE ??= "65536" # SD card image name -SDIMG = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.sdcard" +SDIMG = "${IMGDEPLOYDIR}/${IMAGE_NAME}.sdcard" BOOTLOADER_SEEK_USERDATA ?= "1" @@ -282,7 +282,7 @@ SDIMG_BOOTLOADER ?= "${DEPLOY_DIR_IMAGE}/${UBOOT_SYMLINK}" SDIMG_BOOTFS_TYPE ?= "boot.vfat" SDIMG_BOOTFS = "${IMGDEPLOYDIR}/${IMAGE_NAME}.${SDIMG_BOOTFS_TYPE}" SDIMG_ROOTFS_TYPE ?= "ext4" -SDIMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.${SDIMG_ROOTFS_TYPE}" +SDIMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_NAME}.${SDIMG_ROOTFS_TYPE}" do_image_sdcard[depends] = " \ dosfstools-native:do_populate_sysroot \ diff --git a/meta-digi-arm/conf/machine/include/digi-defaults.inc b/meta-digi-arm/conf/machine/include/digi-defaults.inc index c29cf6401..803c308df 100644 --- a/meta-digi-arm/conf/machine/include/digi-defaults.inc +++ b/meta-digi-arm/conf/machine/include/digi-defaults.inc @@ -79,6 +79,10 @@ MACHINE_EXTRA_RRECOMMENDS += "${@bb.utils.contains_any('VIRTUAL-RUNTIME_dev_mana # Default image name (for install scripts) DEFAULT_IMAGE_NAME ??= "dey-image-qt" +# Remove IMAGE_NAME_SUFFIX from IMAGE_LINK_NAME so that our image name format +# matches the ones used in old DEY versions +IMAGE_LINK_NAME = "${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}" + # List of graphical images names (for install scripts) GRAPHICAL_IMAGES ?= "dey-image-crank dey-image-qt dey-image-webkit dey-image-lvgl"