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 <gabriel.valcazar@digi.com>
This commit is contained in:
parent
59e652ec9b
commit
deaeef6c6d
|
|
@ -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]\+\).*\<rootfs\>.*,\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
|
||||
|
|
|
|||
|
|
@ -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 );"
|
||||
|
|
|
|||
Loading…
Reference in New Issue