Bug 10471 - runqemu handling of machine not specified needs improvement
Summary: runqemu handling of machine not specified needs improvement
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium+ minor
Target Milestone: 2.3 M3
Assignee: Robert Yang
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-10-20 21:07 UTC by Paul Eggleton
Modified: 2017-03-20 17:34 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.