From 9d72f9638b5b0c0c46143941e7ed271ad6faec8b Mon Sep 17 00:00:00 2001 From: Bruce Leidl Date: Tue, 15 Jan 2019 12:05:28 -0500 Subject: [PATCH] read kernel id from a file, make compression optional --- meta-citadel/classes/citadel-image.bbclass | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/meta-citadel/classes/citadel-image.bbclass b/meta-citadel/classes/citadel-image.bbclass index eb54256..217ba5f 100644 --- a/meta-citadel/classes/citadel-image.bbclass +++ b/meta-citadel/classes/citadel-image.bbclass @@ -4,14 +4,12 @@ DEPENDS_append = " citadel-image-native mtools-native cryptsetup-native" # Block size must be 4096 or dm-verity won't work EXTRA_IMAGECMD_ext2 = "-i 4096 -b 4096" IMAGE_FSTYPES = "ext2" +IMAGE_OVERHEAD_FACTOR = "1.1" inherit image CITADEL_IMAGE_CHANNEL ??= "dev" - -kernel_id() { - sha256sum ${DEPLOY_DIR_IMAGE}/bzImage-intel-corei7-64.bin | cut -d' ' -f1 -} +CITADEL_IMAGE_COMPRESS ??= "true" do_citadel_mkimage() { cat > ${B}/mkimage.conf << EOF @@ -20,12 +18,13 @@ channel = "${CITADEL_IMAGE_CHANNEL}" version = ${CITADEL_IMAGE_VERSION} timestamp = "${DATETIME}" source = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.ext2" +compress = ${CITADEL_IMAGE_COMPRESS} EOF ver=$(printf "%03d" ${CITADEL_IMAGE_VERSION}) if [ "${CITADEL_IMAGE_TYPE}" = "kernel" ]; then - KERNEL_ID=$(kernel_id) + KERNEL_ID=$(cat ${DEPLOY_DIR_IMAGE}/kernel.id) echo "kernel-version = \"${CITADEL_KERNEL_VERSION}\"" >> ${B}/mkimage.conf echo "kernel-id = \"${KERNEL_ID}\"" >> ${B}/mkimage.conf fname="citadel-kernel-${CITADEL_KERNEL_VERSION}-${CITADEL_IMAGE_CHANNEL}-${ver}.img"