blob: 45417ea7ba721d9e047c270449e8a9f78a3a5d93 [file] [log] [blame]
Brad Bishop286d45c2018-10-02 15:21:57 -04001# Define the 'qemu-sd' conversion type
2#
Andrew Geissler84ad7c52020-06-27 00:00:16 -05003# This conversion type pads any image to the 512K boundary to ensure that the
Brad Bishop286d45c2018-10-02 15:21:57 -04004# 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
Andrew Geissler84ad7c52020-06-27 00:00:16 -05006# 512K).
Brad Bishop286d45c2018-10-02 15:21:57 -04007
8CONVERSIONTYPES_append = " qemu-sd"
Andrew Geissler84ad7c52020-06-27 00:00:16 -05009CONVERSION_CMD_qemu-sd = "cp ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.qemu-sd; truncate -s %512K ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.qemu-sd"
Brad Bishop286d45c2018-10-02 15:21:57 -040010CONVERSION_DEPENDS_qemu-sd = "coreutils-native"