DM: VMcfg: support --vmcfg options

Enable --vmcfg options for acrn-dm, if --vmcfg <index> is specified,
build-in VM configuration will be used, and override any other
optional parameters.
run 'acrn-dm --vmcfg list' to show all build-in VM configurations.
run 'acrnpdm --vmcfg <index>' to launch UOS with selected config.

Tracked-On: #1528
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
This commit is contained in:
yuhong.tao@intel.com
2018-08-24 00:51:51 +08:00
committed by wenlingz
parent 321021ebaf
commit 67d7292081
3 changed files with 73 additions and 3 deletions

View File

@@ -5,6 +5,18 @@
#include <vmcfg_config.h>
#include <vmcfg.h>
#include <stdio.h>
void vmcfg_list(void)
{
int i;
char *name;
for (i = 0; i < num_args_buildin; i++) {
name = args_buildin[i]->argv[args_buildin[i]->argc - 1];
printf("%d: %s\n", i + 1, name);
}
}
static struct vmcfg_arg *vmcfg_buildin_args[] = {
#ifdef CONFIG_MRB_VM1