summaryrefslogtreecommitdiff
path: root/meta-xilinx/meta-xilinx-bsp/classes/image-types-xilinx-qemu.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta-xilinx/meta-xilinx-bsp/classes/image-types-xilinx-qemu.bbclass')
-rw-r--r--meta-xilinx/meta-xilinx-bsp/classes/image-types-xilinx-qemu.bbclass10
1 files changed, 10 insertions, 0 deletions
diff --git a/meta-xilinx/meta-xilinx-bsp/classes/image-types-xilinx-qemu.bbclass b/meta-xilinx/meta-xilinx-bsp/classes/image-types-xilinx-qemu.bbclass
new file mode 100644
index 000000000..59dfabfcc
--- /dev/null
+++ b/meta-xilinx/meta-xilinx-bsp/classes/image-types-xilinx-qemu.bbclass
@@ -0,0 +1,10 @@
+# Define the 'qemu-sd' conversion type
+#
+# This conversion type pads any image to the 256K boundary to ensure that the
+# image file can be used directly with QEMU's SD emulation which requires the
+# block device to match that of valid SD card sizes (which are multiples of
+# 256K).
+
+CONVERSIONTYPES_append = " qemu-sd"
+CONVERSION_CMD_qemu-sd = "cp ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.qemu-sd; truncate -s %256K ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.qemu-sd"
+CONVERSION_DEPENDS_qemu-sd = "coreutils-native"