aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-core/images/dm-verity-image-initramfs.bb
blob: f9ea3762d7e122733ccb890aa92d2069c2157024 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
DESCRIPTION = "Simple initramfs image for mounting the rootfs over the verity device mapper."

# We want a clean, minimal image.
IMAGE_FEATURES = ""

PACKAGE_INSTALL = " \
    initramfs-dm-verity \
    base-files \
    busybox \
    util-linux-mount \
    udev \
    cryptsetup \
    lvm2-udevrules \
"

# Can we somehow inspect reverse dependencies to avoid these variables?
do_rootfs[depends] += "${DM_VERITY_IMAGE}:do_image_${DM_VERITY_IMAGE_TYPE}"

IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"

inherit core-image

deploy_verity_hash() {
    install -D -m 0644 ${DEPLOY_DIR_IMAGE}/${DM_VERITY_IMAGE}-${MACHINE}.${DM_VERITY_IMAGE_TYPE}.verity.env ${IMAGE_ROOTFS}/${datadir}/dm-verity.env
}
ROOTFS_POSTPROCESS_COMMAND += "deploy_verity_hash;"