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 | |
Andrew Geissler | cc58928 | 2020-09-18 13:34:40 -0500 | [diff] [blame] | 3 | inherit core-image |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 4 | |
| 5 | PACKAGE_INSTALL = " \ |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 6 | base-files \ |
Andrew Geissler | cc58928 | 2020-09-18 13:34:40 -0500 | [diff] [blame] | 7 | base-passwd \ |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 8 | busybox \ |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 9 | cryptsetup \ |
Andrew Geissler | cc58928 | 2020-09-18 13:34:40 -0500 | [diff] [blame] | 10 | initramfs-module-dmverity \ |
| 11 | initramfs-module-udev \ |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 12 | lvm2-udevrules \ |
Andrew Geissler | cc58928 | 2020-09-18 13:34:40 -0500 | [diff] [blame] | 13 | udev \ |
| 14 | util-linux-mount \ |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 15 | " |
| 16 | |
Andrew Geissler | cc58928 | 2020-09-18 13:34:40 -0500 | [diff] [blame] | 17 | # We want a clean, minimal image. |
| 18 | IMAGE_FEATURES = "" |
| 19 | IMAGE_LINGUAS = "" |
| 20 | |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 21 | # Can we somehow inspect reverse dependencies to avoid these variables? |
Andrew Geissler | cc58928 | 2020-09-18 13:34:40 -0500 | [diff] [blame] | 22 | do_image[depends] += "${DM_VERITY_IMAGE}:do_image_${DM_VERITY_IMAGE_TYPE}" |
| 23 | |
| 24 | # Ensure dm-verity.env is updated also when rebuilding DM_VERITY_IMAGE |
| 25 | do_image[nostamp] = "1" |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 26 | |
| 27 | IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" |
| 28 | |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 29 | deploy_verity_hash() { |
Andrew Geissler | cc58928 | 2020-09-18 13:34:40 -0500 | [diff] [blame] | 30 | install -D -m 0644 \ |
| 31 | ${STAGING_VERITY_DIR}/${DM_VERITY_IMAGE}.${DM_VERITY_IMAGE_TYPE}.verity.env \ |
| 32 | ${IMAGE_ROOTFS}${datadir}/misc/dm-verity.env |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 33 | } |
Andrew Geissler | cc58928 | 2020-09-18 13:34:40 -0500 | [diff] [blame] | 34 | IMAGE_PREPROCESS_COMMAND += "deploy_verity_hash;" |