Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 1 | DESCRIPTION = "Simple initramfs image for mounting the rootfs over the verity device mapper." |
| 2 | |
| 3 | # We want a clean, minimal image. |
| 4 | IMAGE_FEATURES = "" |
| 5 | |
| 6 | PACKAGE_INSTALL = " \ |
| 7 | initramfs-dm-verity \ |
| 8 | base-files \ |
| 9 | busybox \ |
| 10 | util-linux-mount \ |
| 11 | udev \ |
| 12 | cryptsetup \ |
| 13 | lvm2-udevrules \ |
| 14 | " |
| 15 | |
| 16 | # Can we somehow inspect reverse dependencies to avoid these variables? |
| 17 | do_rootfs[depends] += "${DM_VERITY_IMAGE}:do_image_${DM_VERITY_IMAGE_TYPE}" |
| 18 | |
| 19 | IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" |
| 20 | |
| 21 | inherit core-image |
| 22 | |
| 23 | deploy_verity_hash() { |
| 24 | install -D -m 0644 ${DEPLOY_DIR_IMAGE}/${DM_VERITY_IMAGE}-${MACHINE}.${DM_VERITY_IMAGE_TYPE}.verity.env ${IMAGE_ROOTFS}/${datadir}/dm-verity.env |
| 25 | } |
| 26 | ROOTFS_POSTPROCESS_COMMAND += "deploy_verity_hash;" |