All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bootimg.bbclass: Add parameter to specify HDDIMG volume ID
@ 2014-07-02  0:57 Ricardo Neri
  0 siblings, 0 replies; only message in thread
From: Ricardo Neri @ 2014-07-02  0:57 UTC (permalink / raw)
  To: openembedded-core; +Cc: Matt Fleming, Glenn P. Williamson

Users and children of the bootimg class may need to specify at build
time the volume ID of the HDDIMG vfat partition. An example of this
may be when at runtime the partition is uniquely identified by
the volume ID.

The HDDIMG_ID is expected to be provided externally. If the variable
is not set, mkdosfs will use the default volume-id.

Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
---
 meta/classes/bootimg.bbclass | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index 7678567..d52aace 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -22,6 +22,7 @@
 # ${COMPRESSISO} - Transparent compress ISO, reduce size ~40% if set to 1
 # ${NOISO}  - skip building the ISO image if set to 1
 # ${NOHDD}  - skip building the HDD image if set to 1
+# ${HDDIMG_ID} - FAT image volume-id
 # ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional)
 
 do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \
@@ -193,7 +194,14 @@ build_fat_img() {
 		FATSIZE="-F 32"
 	fi
 
-	mkdosfs ${FATSIZE} -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${FATIMG} ${BLOCKS}
+	if [ -z "${HDDIMG_ID}" ]; then
+		mkdosfs ${FATSIZE} -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${FATIMG} \
+			${BLOCKS}
+	else
+		mkdosfs ${FATSIZE} -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${FATIMG} \
+		${BLOCKS} -i ${HDDIMG_ID}
+	fi
+
 	# Copy FATSOURCEDIR recursively into the image file directly
 	mcopy -i ${FATIMG} -s ${FATSOURCEDIR}/* ::/
 }
-- 
1.9.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-07-02  0:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-02  0:57 [PATCH] bootimg.bbclass: Add parameter to specify HDDIMG volume ID Ricardo Neri

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.