summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Hao <kexin.hao@windriver.com>2024-02-22 09:21:53 +0800
committerArmin Kuster <akuster808@gmail.com>2024-03-27 12:36:58 -0400
commit7b951e3900943b5f4a05a0c06cdff6bd29b4fa00 (patch)
treec856318b673e697b18bbbc6ee8b58478f4fd67d0
parentf9f0aa774b19c293dd97a09570638c717976a568 (diff)
downloadmeta-security-7b951e3900943b5f4a05a0c06cdff6bd29b4fa00.tar.gz
dm-verity: Adjust the image names according to the oe-core change
After the oe-core commit 26d97acc7137 ("image-artifact-names: include ${IMAGE_NAME_SUFFIX} directly in both ${IMAGE_NAME} and ${IMAGE_LINK_NAME}"), the image names have changed from core-image-minimal-qemux86-64-20230307181808.rootfs.ext4 core-image-minimal-qemux86-64.ext4 to core-image-minimal-qemux86-64.rootfs-20230307181456.ext4 core-image-minimal-qemux86-64.rootfs.ext4 Adjust the images name used by dm-verity according to this change. Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--classes/dm-verity-img.bbclass6
-rw-r--r--wic/beaglebone-yocto-verity.wks.in2
-rw-r--r--wic/systemd-bootdisk-dmverity.wks.in2
3 files changed, 5 insertions, 5 deletions
diff --git a/classes/dm-verity-img.bbclass b/classes/dm-verity-img.bbclass
index 2f212d6..62c3069 100644
--- a/classes/dm-verity-img.bbclass
+++ b/classes/dm-verity-img.bbclass
@@ -111,10 +111,10 @@ process_verity() {
111 # Create wks.in fragment with build specific UUIDs for partitions. 111 # Create wks.in fragment with build specific UUIDs for partitions.
112 # Unfortunately the wks.in does not support line continuations... 112 # Unfortunately the wks.in does not support line continuations...
113 # First, the unappended filesystem data partition. 113 # First, the unappended filesystem data partition.
114 echo 'part / --source rawcopy --ondisk sda --sourceparams="file=${DM_VERITY_DEPLOY_DIR}/${DM_VERITY_IMAGE}-${MACHINE}.rootfs.${DM_VERITY_IMAGE_TYPE}.verity" --part-name verityroot --part-type="${DM_VERITY_ROOT_GUID}"'" --uuid=\"$ROOT_UUID\"" > $WKS_INC 114 echo 'part / --source rawcopy --ondisk sda --sourceparams="file=${DM_VERITY_DEPLOY_DIR}/${DM_VERITY_IMAGE}-${MACHINE}${IMAGE_NAME_SUFFIX}.${DM_VERITY_IMAGE_TYPE}.verity" --part-name verityroot --part-type="${DM_VERITY_ROOT_GUID}"'" --uuid=\"$ROOT_UUID\"" > $WKS_INC
115 115
116 # note: no default mount point for hash data partition 116 # note: no default mount point for hash data partition
117 echo 'part --source rawcopy --ondisk sda --sourceparams="file=${DM_VERITY_DEPLOY_DIR}/${DM_VERITY_IMAGE}-${MACHINE}.${DM_VERITY_IMAGE_TYPE}.vhash" --part-name verityhash --part-type="${DM_VERITY_RHASH_GUID}"'" --uuid=\"$RHASH_UUID\"" >> $WKS_INC 117 echo 'part --source rawcopy --ondisk sda --sourceparams="file=${DM_VERITY_DEPLOY_DIR}/${DM_VERITY_IMAGE}-${MACHINE}${IMAGE_NAME_SUFFIX}.${DM_VERITY_IMAGE_TYPE}.vhash" --part-name verityhash --part-type="${DM_VERITY_RHASH_GUID}"'" --uuid=\"$RHASH_UUID\"" >> $WKS_INC
118} 118}
119 119
120verity_setup() { 120verity_setup() {
@@ -162,7 +162,7 @@ verity_setup() {
162verity_hash() { 162verity_hash() {
163 cd ${IMGDEPLOYDIR} 163 cd ${IMGDEPLOYDIR}
164 ln -sf ${IMAGE_NAME}.${DM_VERITY_IMAGE_TYPE}.vhash \ 164 ln -sf ${IMAGE_NAME}.${DM_VERITY_IMAGE_TYPE}.vhash \
165 ${IMAGE_BASENAME}-${MACHINE}.${DM_VERITY_IMAGE_TYPE}.vhash 165 ${IMAGE_BASENAME}-${MACHINE}${IMAGE_NAME_SUFFIX}.${DM_VERITY_IMAGE_TYPE}.vhash
166} 166}
167 167
168VERITY_TYPES = " \ 168VERITY_TYPES = " \
diff --git a/wic/beaglebone-yocto-verity.wks.in b/wic/beaglebone-yocto-verity.wks.in
index d2923de..2d332d8 100644
--- a/wic/beaglebone-yocto-verity.wks.in
+++ b/wic/beaglebone-yocto-verity.wks.in
@@ -12,5 +12,5 @@
12# This .wks only works with the dm-verity-img class. 12# This .wks only works with the dm-verity-img class.
13 13
14part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4 --fixed-size 32 --sourceparams="loader=u-boot" --use-uuid 14part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4 --fixed-size 32 --sourceparams="loader=u-boot" --use-uuid
15part / --source rawcopy --ondisk mmcblk0 --sourceparams="file=${IMGDEPLOYDIR}/${DM_VERITY_IMAGE}-${MACHINE}.${DM_VERITY_IMAGE_TYPE}.verity" 15part / --source rawcopy --ondisk mmcblk0 --sourceparams="file=${IMGDEPLOYDIR}/${DM_VERITY_IMAGE}-${MACHINE}${IMAGE_NAME_SUFFIX}.${DM_VERITY_IMAGE_TYPE}.verity"
16bootloader --append="console=ttyS0,115200" 16bootloader --append="console=ttyS0,115200"
diff --git a/wic/systemd-bootdisk-dmverity.wks.in b/wic/systemd-bootdisk-dmverity.wks.in
index 8466368..0ac9cca 100644
--- a/wic/systemd-bootdisk-dmverity.wks.in
+++ b/wic/systemd-bootdisk-dmverity.wks.in
@@ -10,7 +10,7 @@
10 10
11part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,initrd=microcode.cpio" --ondisk sda --label msdos --active --align 1024 --use-uuid 11part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,initrd=microcode.cpio" --ondisk sda --label msdos --active --align 1024 --use-uuid
12 12
13part / --source rawcopy --ondisk sda --sourceparams="file=${IMGDEPLOYDIR}/${DM_VERITY_IMAGE}-${MACHINE}.${DM_VERITY_IMAGE_TYPE}.verity" --use-uuid 13part / --source rawcopy --ondisk sda --sourceparams="file=${IMGDEPLOYDIR}/${DM_VERITY_IMAGE}-${MACHINE}${IMAGE_NAME_SUFFIX}.${DM_VERITY_IMAGE_TYPE}.verity" --use-uuid
14 14
15part swap --ondisk sda --size 44 --label swap1 --fstype=swap --use-uuid 15part swap --ondisk sda --size 44 --label swap1 --fstype=swap --use-uuid
16 16