Bug 11286 - runqemu should validate the rootfs type it is trying to use and print clear message if unsupported.
Summary: runqemu should validate the rootfs type it is trying to use and print clear m...
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: 2.4
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: 2.4 M2
Assignee: Robert Yang
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-04-02 22:33 UTC by brian avery
Modified: 2017-07-28 07:17 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description brian avery 2017-04-02 22:33:52 UTC
runqemu is happy to use an ext[234] file system as well as a rootfs dir. File types like .wic,.tar.bz2, .cpio are not supported.  Since the error messages in these cases can be quite obscure 
for example wic gives:
[   10.009298] Kernel Offset: disabled
[   10.009298] ---[ end Kernel panic - not syncing: Invalid configuration from end user prevents continuing
---
it would be helpful to validate the rootfs inputs.
Comment 1 Robert Yang 2017-04-05 09:03:43 UTC
The runqemu does check whether the fstype is supported or not:

    def check_arg_fstype(self, fst):
        """Check and set FSTYPE"""
        if fst not in self.fstypes + self.vmtypes:
            logger.warn("Maybe unsupported FSTYPE: %s" % fst)
        if not self.fstype or self.fstype == fst:
            if fst == 'ramfs':
                fst = 'cpio.gz'
            self.fstype = fst
        else:
            raise Exception("Conflicting: FSTYPE %s and %s" % (self.fstype, fst))

what did you mean about "validate the rootfs inputs.", please ?
Comment 2 brian avery 2017-04-06 20:59:08 UTC
Hmm, so maybe my understanding of what should and should not work is wrong.  I built core-image-minimal for qemux86 off of master commitish 633ad6c9f436f5d2.
The following works fine:
runqemu tmp/deploy/images/qemux86/bzImage-qemux86.bin tmp/deploy/images/qemux86/core-image-minimal-qemux86.ext4 

The following all fail in diverse ways:
uvesa timeout, no login prompt:
runqemu tmp/deploy/images/qemux86/bzImage-qemux86.bin tmp/deploy/images/qemux86/core-image-minimal-qemux86.cpio.gz 
runqemu tmp/deploy/images/qemux86/bzImage-qemux86.bin tmp/deploy/images/qemux86/core-image-minimal-qemux86.cpio

No valid filesystem found, kernel panic:
runqemu tmp/deploy/images/qemux86/bzImage-qemux86.bin tmp/deploy/images/qemux86/core-image-minimal-qemux86.tar.bz2
runqemu tmp/deploy/images/qemux86/bzImage-qemux86.bin tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic

Undefined video mode 318 (stays stuck for ~ 1 minute then actually booted after I came back from getting tea. I thought his was failing but apparently not...)
$ runqemu qemux86 core-image-minimal wic 
----
Does this help clarify?