diff options
author | Nathan Rossi <nathan@nathanrossi.com> | 2017-11-14 23:15:23 +1000 |
---|---|---|
committer | Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> | 2017-11-21 11:19:00 -0800 |
commit | 7032447a09c4722a30ebac54593be477fea25d12 (patch) | |
tree | f7109581bca4945349b3b56159da6e80d74b22e6 /classes | |
parent | 027ba910396ff4be20c5795ac9d5caf63cb26f67 (diff) | |
download | meta-xilinx-7032447a09c4722a30ebac54593be477fea25d12.tar.gz |
image-types-xilinx-qemu.bbclass: Add conversion type to pad for QEMU
This image types class add the conversion type 'qemu-sd' to pad target
images such that their size aligns with a 256K boundary. This is
required due to how QEMU emulates SD cards from block devices, since
QEMU truncates the size to match the 256K multiple of which SD cards
advertise
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
Diffstat (limited to 'classes')
-rw-r--r-- | classes/image-types-xilinx-qemu.bbclass | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/classes/image-types-xilinx-qemu.bbclass b/classes/image-types-xilinx-qemu.bbclass new file mode 100644 index 00000000..59dfabfc --- /dev/null +++ b/classes/image-types-xilinx-qemu.bbclass | |||
@@ -0,0 +1,10 @@ | |||
1 | # Define the 'qemu-sd' conversion type | ||
2 | # | ||
3 | # This conversion type pads any image to the 256K boundary to ensure that the | ||
4 | # image file can be used directly with QEMU's SD emulation which requires the | ||
5 | # block device to match that of valid SD card sizes (which are multiples of | ||
6 | # 256K). | ||
7 | |||
8 | CONVERSIONTYPES_append = " qemu-sd" | ||
9 | 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" | ||
10 | CONVERSION_DEPENDS_qemu-sd = "coreutils-native" | ||