diff options
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-x | scripts/runqemu | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index 6a77e3db9a..310d79fdc5 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -1196,6 +1196,10 @@ class BaseConfig(object): | |||
1196 | else: | 1196 | else: |
1197 | self.rootfs_options = '-drive file=%s,if=virtio,format=%s' % (self.rootfs, rootfs_format) | 1197 | self.rootfs_options = '-drive file=%s,if=virtio,format=%s' % (self.rootfs, rootfs_format) |
1198 | 1198 | ||
1199 | qb_rootfs_extra_opt = self.get("QB_ROOTFS_EXTRA_OPT") | ||
1200 | if qb_rootfs_extra_opt and not qb_rootfs_extra_opt.startswith(","): | ||
1201 | qb_rootfs_extra_opt = "," + qb_rootfs_extra_opt | ||
1202 | |||
1199 | if self.fstype in ('cpio.gz', 'cpio'): | 1203 | if self.fstype in ('cpio.gz', 'cpio'): |
1200 | self.kernel_cmdline = 'root=/dev/ram0 rw debugshell' | 1204 | self.kernel_cmdline = 'root=/dev/ram0 rw debugshell' |
1201 | self.rootfs_options = '-initrd %s' % self.rootfs | 1205 | self.rootfs_options = '-initrd %s' % self.rootfs |
@@ -1208,14 +1212,15 @@ class BaseConfig(object): | |||
1208 | drive_type = self.get('QB_DRIVE_TYPE') | 1212 | drive_type = self.get('QB_DRIVE_TYPE') |
1209 | if drive_type.startswith("/dev/sd"): | 1213 | if drive_type.startswith("/dev/sd"): |
1210 | logger.info('Using scsi drive') | 1214 | logger.info('Using scsi drive') |
1211 | vm_drive = '-drive if=none,id=hd,file=%s,format=%s -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=hd' \ | 1215 | vm_drive = '-drive if=none,id=hd,file=%s,format=%s -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=hd%s' \ |
1212 | % (self.rootfs, rootfs_format) | 1216 | % (self.rootfs, rootfs_format, qb_rootfs_extra_opt) |
1213 | elif drive_type.startswith("/dev/hd"): | 1217 | elif drive_type.startswith("/dev/hd"): |
1214 | logger.info('Using ide drive') | 1218 | logger.info('Using ide drive') |
1215 | vm_drive = "-drive file=%s,format=%s" % (self.rootfs, rootfs_format) | 1219 | vm_drive = "-drive file=%s,format=%s" % (self.rootfs, rootfs_format) |
1216 | elif drive_type.startswith("/dev/vdb"): | 1220 | elif drive_type.startswith("/dev/vdb"): |
1217 | logger.info('Using block virtio drive'); | 1221 | logger.info('Using block virtio drive'); |
1218 | vm_drive = '-drive id=disk0,file=%s,if=none,format=%s -device virtio-blk-device,drive=disk0' % (self.rootfs, rootfs_format) | 1222 | vm_drive = '-drive id=disk0,file=%s,if=none,format=%s -device virtio-blk-device,drive=disk0%s' \ |
1223 | % (self.rootfs, rootfs_format,qb_rootfs_extra_opt) | ||
1219 | else: | 1224 | else: |
1220 | # virtio might have been selected explicitly (just use it), or | 1225 | # virtio might have been selected explicitly (just use it), or |
1221 | # is used as fallback (then warn about that). | 1226 | # is used as fallback (then warn about that). |