Topics

[dunfell 16/32] dm-verity-initramfs-image: Cosmetic improvements


akuster
 

From: "niko.mauno@..." <niko.mauno@...>

- revise declaration ordering as suggested by oe-stylize.py
- sort PACKAGE_INSTALL entries in alphabetic order
- split long command line in deploy_verity_hash()

Signed-off-by: Niko Mauno <niko.mauno@...>
Signed-off-by: Armin Kuster <@armpit>
(cherry picked from commit 1d21cec5fda489f9ed7c1132b0abc18db3af6d41)
---
.../images/dm-verity-image-initramfs.bb | 20 ++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/recipes-core/images/dm-verity-image-initramfs.bb b/recipes-core/images/dm-verity-image-initramfs.bb
index 6a1058d..0fdb46c 100644
--- a/recipes-core/images/dm-verity-image-initramfs.bb
+++ b/recipes-core/images/dm-verity-image-initramfs.bb
@@ -1,19 +1,21 @@
DESCRIPTION = "Simple initramfs image for mounting the rootfs over the verity device mapper."

-# We want a clean, minimal image.
-IMAGE_FEATURES = ""
+inherit core-image

PACKAGE_INSTALL = " \
- initramfs-module-dmverity \
- initramfs-module-udev \
base-files \
busybox \
- util-linux-mount \
- udev \
cryptsetup \
+ initramfs-module-dmverity \
+ initramfs-module-udev \
lvm2-udevrules \
+ udev \
+ util-linux-mount \
"

+# We want a clean, minimal image.
+IMAGE_FEATURES = ""
+
# Can we somehow inspect reverse dependencies to avoid these variables?
do_image[depends] += "${DM_VERITY_IMAGE}:do_image_${DM_VERITY_IMAGE_TYPE}"

@@ -22,9 +24,9 @@ do_image[nostamp] = "1"

IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"

-inherit core-image
-
deploy_verity_hash() {
- install -D -m 0644 ${STAGING_VERITY_DIR}/${DM_VERITY_IMAGE}.${DM_VERITY_IMAGE_TYPE}.verity.env ${IMAGE_ROOTFS}${datadir}/misc/dm-verity.env
+ install -D -m 0644 \
+ ${STAGING_VERITY_DIR}/${DM_VERITY_IMAGE}.${DM_VERITY_IMAGE_TYPE}.verity.env \
+ ${IMAGE_ROOTFS}${datadir}/misc/dm-verity.env
}
IMAGE_PREPROCESS_COMMAND += "deploy_verity_hash;"
--
2.17.1