From 684315da98921a483d7c7bd2effc16a95aee6b93 Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Thu, 9 Feb 2012 18:33:31 +0000 Subject: mini-os: create app-specific configuration Instead of using CONFIG_QEMU and CONFIG_GRUB to enable or disable minios code, create CONFIG_ items for features and use application-specific configuration files to enable or disable the features. The configuration flags are currently added to the compiler command line; as the number of flags grows this may need to move to a header. Signed-off-by: Daniel De Graaf Acked-by: Ian Campbell Acked-by: Samuel Thibault Committed-by: Ian Jackson --- extras/mini-os/main.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'extras/mini-os/main.c') diff --git a/extras/mini-os/main.c b/extras/mini-os/main.c index b95b889e16..aeda548f72 100644 --- a/extras/mini-os/main.c +++ b/extras/mini-os/main.c @@ -43,13 +43,13 @@ extern char __app_bss_start, __app_bss_end; static void call_main(void *p) { char *c, quote; -#ifdef CONFIG_QEMU +#ifdef CONFIG_QEMU_XS_ARGS char *domargs, *msg; #endif int argc; char **argv; char *envp[] = { NULL }; -#ifdef CONFIG_QEMU +#ifdef CONFIG_QEMU_XS_ARGS char *vm; char path[128]; int domid; @@ -60,15 +60,15 @@ static void call_main(void *p) * crashing. */ //sleep(1); -#ifndef CONFIG_GRUB +#ifdef CONFIG_SPARSE_BSS sparse((unsigned long) &__app_bss_start, &__app_bss_end - &__app_bss_start); -#if defined(HAVE_LWIP) && !defined(CONFIG_QEMU) - start_networking(); #endif +#if defined(HAVE_LWIP) && defined(CONFIG_START_NETWORK) + start_networking(); #endif create_thread("pcifront", pcifront_watches, NULL); -#ifdef CONFIG_QEMU +#ifdef CONFIG_QEMU_XS_ARGS /* Fetch argc, argv from XenStore */ domid = xenbus_read_integer("target"); if (domid == -1) { @@ -132,7 +132,7 @@ static void call_main(void *p) #define PARSE_ARGS_STORE(ARGS) PARSE_ARGS(ARGS, argv[argc++] = c, memmove(c, c + 1, strlen(c + 1) + 1), *c++ = 0) PARSE_ARGS_COUNT((char*)start_info.cmd_line); -#ifdef CONFIG_QEMU +#ifdef CONFIG_QEMU_XS_ARGS PARSE_ARGS_COUNT(domargs); #endif @@ -141,7 +141,7 @@ static void call_main(void *p) argc = 1; PARSE_ARGS_STORE((char*)start_info.cmd_line) -#ifdef CONFIG_QEMU +#ifdef CONFIG_QEMU_XS_ARGS PARSE_ARGS_STORE(domargs) #endif -- cgit v1.2.3