diff options
author | Alessandro Pecugi <alessandro.pecugi@seco.com> | 2024-08-29 13:16:04 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-08-30 21:59:38 +0100 |
commit | 35cb7bc646de8bd5b4bf540c30999bf248aae959 (patch) | |
tree | 67bf2ed48f9ead3813c8668835b56220c9a4766e /scripts | |
parent | 661eebe146dd992c125fc1e4cfc78af3b16599cd (diff) | |
download | poky-35cb7bc646de8bd5b4bf540c30999bf248aae959.tar.gz |
runqemu: add sd card device
runqemu currently only supports scsi, ide and virtio drive types.
Implement QB_DRIVE_TYPE=/dev/mmcblk which adds an sdhci-pci device and
mounts the rootfs file as an sd card.
(From OE-Core rev: 0740896afbe13f37058e990a0a13b2b51bba70fd)
Signed-off-by: Alessandro Pecugi <alessandro.pecugi@seco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/runqemu | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index f350021258..2817acb19f 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -1295,6 +1295,10 @@ to your build configuration. | |||
1295 | elif drive_type.startswith("/dev/hd"): | 1295 | elif drive_type.startswith("/dev/hd"): |
1296 | logger.info('Using ide drive') | 1296 | logger.info('Using ide drive') |
1297 | vm_drive = "-drive file=%s,format=%s" % (self.rootfs, rootfs_format) | 1297 | vm_drive = "-drive file=%s,format=%s" % (self.rootfs, rootfs_format) |
1298 | elif drive_type.startswith("/dev/mmcblk"): | ||
1299 | logger.info('Using sdcard drive') | ||
1300 | vm_drive = '-drive id=sdcard0,if=none,file=%s,format=%s -device sdhci-pci -device sd-card,drive=sdcard0' \ | ||
1301 | % (self.rootfs, rootfs_format) | ||
1298 | elif drive_type.startswith("/dev/vdb"): | 1302 | elif drive_type.startswith("/dev/vdb"): |
1299 | logger.info('Using block virtio drive'); | 1303 | logger.info('Using block virtio drive'); |
1300 | vm_drive = '-drive id=disk0,file=%s,if=none,format=%s -device virtio-blk-device,drive=disk0%s' \ | 1304 | vm_drive = '-drive id=disk0,file=%s,if=none,format=%s -device virtio-blk-device,drive=disk0%s' \ |