blob: 187aeaee2964f379809849c6a85b8d67adbdbcb8 [file] [log] [blame]
Andrew Geissler1fe918a2020-05-15 14:16:47 -05001DESCRIPTION = "Simple initramfs image for mounting the rootfs over the verity device mapper."
2
Andrew Geisslercc589282020-09-18 13:34:40 -05003inherit core-image
Andrew Geissler1fe918a2020-05-15 14:16:47 -05004
5PACKAGE_INSTALL = " \
Andrew Geissler1fe918a2020-05-15 14:16:47 -05006 base-files \
Andrew Geisslercc589282020-09-18 13:34:40 -05007 base-passwd \
Andrew Geissler1fe918a2020-05-15 14:16:47 -05008 busybox \
Andrew Geissler1fe918a2020-05-15 14:16:47 -05009 cryptsetup \
Andrew Geisslercc589282020-09-18 13:34:40 -050010 initramfs-module-dmverity \
11 initramfs-module-udev \
Andrew Geissler1fe918a2020-05-15 14:16:47 -050012 lvm2-udevrules \
Andrew Geisslercc589282020-09-18 13:34:40 -050013 udev \
14 util-linux-mount \
Andrew Geissler1fe918a2020-05-15 14:16:47 -050015"
16
Andrew Geisslercc589282020-09-18 13:34:40 -050017# We want a clean, minimal image.
18IMAGE_FEATURES = ""
19IMAGE_LINGUAS = ""
20
Andrew Geissler1fe918a2020-05-15 14:16:47 -050021# Can we somehow inspect reverse dependencies to avoid these variables?
Andrew Geisslercc589282020-09-18 13:34:40 -050022do_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
25do_image[nostamp] = "1"
Andrew Geissler1fe918a2020-05-15 14:16:47 -050026
27IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
28
Andrew Geissler1fe918a2020-05-15 14:16:47 -050029deploy_verity_hash() {
Andrew Geisslercc589282020-09-18 13:34:40 -050030 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 Geissler1fe918a2020-05-15 14:16:47 -050033}
Andrew Geisslercc589282020-09-18 13:34:40 -050034IMAGE_PREPROCESS_COMMAND += "deploy_verity_hash;"