From deaeef6c6d116fde811df8712cdd44983a690e99 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Thu, 29 Apr 2021 15:39:13 +0200 Subject: [PATCH] swupdate: refactor 'cryptroot' to 'cryptrootfs' The partition encryption system now uses dynamically generated names for the decrypted block devices, which are based on the partition name. Reflect this change in places where the encrypted rootfs is referenced. https://onedigi.atlassian.net/browse/DEL-7174 Signed-off-by: Gabriel Valcazar --- meta-digi-dey/recipes-digi/swu-images/files/preinstall_swu.sh | 4 ++-- meta-digi-dey/recipes-digi/swu-images/swu.inc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meta-digi-dey/recipes-digi/swu-images/files/preinstall_swu.sh b/meta-digi-dey/recipes-digi/swu-images/files/preinstall_swu.sh index ddd61b789..85c099cb0 100644 --- a/meta-digi-dey/recipes-digi/swu-images/files/preinstall_swu.sh +++ b/meta-digi-dey/recipes-digi/swu-images/files/preinstall_swu.sh @@ -68,14 +68,14 @@ log_error() { # Main #------------------------------------------------------------------------------ # Check if encrypted device is already open. -if [ -b /dev/mapper/cryptroot ]; then +if [ -b /dev/mapper/cryptrootfs ]; then exit 0 fi rootfs_block="/dev/mmcblk0p$(fdisk -l /dev/mmcblk0 | sed -ne "s,^[^0-9]*\([0-9]\+\).*\.*,\1,g;T;p")" # Open LUKS encrypted device -trustfence-tool ${rootfs_block} cryptroot +trustfence-tool ${rootfs_block} cryptrootfs if [ "$?" != "0" ]; then log_error "Error executing the firmware update, cannot open virtual device" exit 1 diff --git a/meta-digi-dey/recipes-digi/swu-images/swu.inc b/meta-digi-dey/recipes-digi/swu-images/swu.inc index 48bd622d1..d744e160b 100644 --- a/meta-digi-dey/recipes-digi/swu-images/swu.inc +++ b/meta-digi-dey/recipes-digi/swu-images/swu.inc @@ -29,7 +29,7 @@ BOOT_DEV_NAME ?= "/dev/mmcblk0p1" BOOT_DEV_NAME_ccimx6ul ?= "linux" ROOTFS_DEV_NAME ?= "/dev/mmcblk0p3" ROOTFS_DEV_NAME_ccimx6ul ?= "rootfs" -ROOTFS_ENC_DEV = "/dev/mapper/cryptroot" +ROOTFS_ENC_DEV = "/dev/mapper/cryptrootfs" ROOTFS_ENC_DEV_ccimx6ul = "${ROOTFS_DEV_NAME}" ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_INITRAMFS_IMAGE', True), '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}" PREINST_SCRIPT_TEMPLATE = "scripts: ( { filename = \\"preinstall_swu.sh\\"; type = \\"preinstall\\"; sha256 = \\"@preinstall_swu.sh\\"; \\x7D );"