Bug 9411

Summary: runqemu: make it support arch as the parameter rather than machine
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Robert Yang <liezhi.yang>
Component: Scripts and ToolsAssignee: Robert Yang <liezhi.yang>
Status: RESOLVED DUPLICATE QA Contact:
Severity: enhancement    
Priority: Undecided CC: richard.purdie, ross.burton, sgw
Version: 2.2   
Target Milestone: 2.2 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Robert Yang 2016-04-07 08:14:32 UTC
For example, qemu-system-i386 supports qemux86, genericx86, intel-x86-32 and so on, but our runqemu only supports qemux86, the similar to qemu-system-arm and others, we can make it accept arch the parameter rather than machine.

runqemu supports two ways to run atm:
1) $ runqemu path/to/image
2) $ runqemu machine

For the first way, its easy to do, we just require the user to input the arch, for example:
$ runqemu x86_64 path/to/image

But for the second one, if we run it as:
$ runqemu x86_64

We can't know where is the image since our image name doesn't contain arch, for example:

tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64-20160407073216.rootfs.cpio.gz

It would come true if we make the image name contains arch (not only machine name), for example:
core-image-minimal-qemux86-64-x86-64.cpio.gz
Or better:
core-image-minimal_qemux86-64_x86-64.cpio.gz
Comment 1 Ross Burton 2016-04-07 15:39:50 UTC
It's worth mentioning that by default qemux86-64 can't execute code for intel-corei7-64, so it's not that simple.

This sounds a lot like bug 4827.  The idea was that runqemu can be extended by BSPs, so for example if you try to runqemu on a corei7-64 image then the BSP tells it to run qemu-system-x86-64 -cpu Nehalem.

*** This bug has been marked as a duplicate of bug 4827 ***