Bug 10471

Summary: runqemu handling of machine not specified needs improvement
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paul Eggleton <bluelightning>
Component: Scripts and ToolsAssignee: Robert Yang <liezhi.yang>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: Medium+ CC: joe.konno, joshuagloe, ross.burton
Version: 2.2   
Target Milestone: 2.3 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Paul Eggleton 2016-10-20 21:07:05 UTC
If I run runqemu with an image but no machine specified on the command line, I get this:

--------- snip ---------
$ runqemu core-image-minimal
runqemu - INFO - Can't find qemuboot conf file, DEPLOY_DIR_IMAGE is NULL!
runqemu - INFO - Running bitbake -e...
runqemu - INFO - Overriding conf file setting of STAGING_DIR_NATIVE to /home/paul/poky/poky/build/tmp/sysroots/x86_64-linux from Bitbake environment
runqemu - INFO - Overriding conf file setting of STAGING_BINDIR_NATIVE to /home/paul/poky/poky/build/tmp/sysroots/x86_64-linux/usr/bin from Bitbake environment
Traceback (most recent call last):
  File "/home/paul/poky/poky/scripts/runqemu", line 1019, in <module>
    ret = main()
  File "/home/paul/poky/poky/scripts/runqemu", line 1007, in main
    config.check_and_set()
  File "/home/paul/poky/poky/scripts/runqemu", line 559, in check_and_set
    self.check_fstype()
  File "/home/paul/poky/poky/scripts/runqemu", line 451, in check_fstype
    raise Exception("FSTYPE is NULL!")
Exception: FSTYPE is NULL!
--------- snip ---------

This is a little bit ugly. To my mind there are two choices here:

1) Require that a machine is specified, if it is indeed required. The old runqemu used to work like this IIRC.

2) Pick up the MACHINE value from the build system. It's clearly capable of running bitbake -e to pick up the STAGING_*_NATIVE, so presumably it could just do that for MACHINE?
Comment 1 Ross Burton 2017-03-20 17:34:29 UTC
Merged in oe-core ca551b72a020782f164703765b97156000b908d2.