[OE-core] [PATCH 4/5] runqemu: validate combos

Robert Yang liezhi.yang at windriver.com
Tue Jul 18 03:33:03 UTC 2017



On 07/18/2017 11:21 AM, Robert Yang wrote:
> Error out ealier if the combos is invalid, e.g.:
> $ runqemu tmp/deploy/images/qemux86/bzImage-qemux86.bin tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic
>
> This will fail at kernel panic, no we check and error out early. We can
> add other checkings in the future.
>
> [YOCTO #11286]
>
> Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
> ---
>  scripts/runqemu | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/scripts/runqemu b/scripts/runqemu
> index bdb559f82ff..e9ed890bb27 100755
> --- a/scripts/runqemu
> +++ b/scripts/runqemu
> @@ -1209,6 +1209,10 @@ class BaseConfig(object):
>              self.bitbake_e = ''
>              logger.warn("Couldn't run 'bitbake -e' to gather environment information:\n%s" % err.output.decode('utf-8'))
>
> +    def validate_combos(self):
> +        if (self.fstype in self.vmtypes) and self.kernel:
> +            raise Exception("%s doesn't need kernel %s!" % (self.fstype, self.kernel))

I just found that here should be raise RunQemuError(), updated it in the repo.

// Robert

> +
>      @property
>      def bindir_native(self):
>          result = self.get('STAGING_BINDIR_NATIVE')
> @@ -1240,6 +1244,8 @@ def main():
>          config.check_args()
>          config.read_qemuboot()
>          config.check_and_set()
> +        # Check whether the combos is valid or not
> +        config.validate_combos()
>          config.print_config()
>          config.setup_network()
>          config.setup_rootfs()
>



More information about the Openembedded-core mailing list