|
26 | 26 | #include <mem_user.h>
|
27 | 27 | #include <os.h>
|
28 | 28 |
|
29 |
| -#define DEFAULT_COMMAND_LINE "root=98:0" |
| 29 | +#define DEFAULT_COMMAND_LINE_ROOT "root=98:0" |
| 30 | +#define DEFAULT_COMMAND_LINE_CONSOLE "console=tty" |
30 | 31 |
|
31 | 32 | /* Changed in add_arg and setup_arch, which run before SMP is started */
|
32 | 33 | static char __initdata command_line[COMMAND_LINE_SIZE] = { 0 };
|
@@ -109,7 +110,8 @@ unsigned long end_vm;
|
109 | 110 | int ncpus = 1;
|
110 | 111 |
|
111 | 112 | /* Set in early boot */
|
112 |
| -static int have_root __initdata = 0; |
| 113 | +static int have_root __initdata; |
| 114 | +static int have_console __initdata; |
113 | 115 |
|
114 | 116 | /* Set in uml_mem_setup and modified in linux_main */
|
115 | 117 | long long physmem_size = 32 * 1024 * 1024;
|
@@ -161,6 +163,17 @@ __uml_setup("debug", no_skas_debug_setup,
|
161 | 163 | " this flag is not needed to run gdb on UML in skas mode\n\n"
|
162 | 164 | );
|
163 | 165 |
|
| 166 | +static int __init uml_console_setup(char *line, int *add) |
| 167 | +{ |
| 168 | + have_console = 1; |
| 169 | + return 0; |
| 170 | +} |
| 171 | + |
| 172 | +__uml_setup("console=", uml_console_setup, |
| 173 | +"console=<preferred console>\n" |
| 174 | +" Specify the preferred console output driver\n\n" |
| 175 | +); |
| 176 | + |
164 | 177 | static int __init Usage(char *line, int *add)
|
165 | 178 | {
|
166 | 179 | const char **p;
|
@@ -264,7 +277,10 @@ int __init linux_main(int argc, char **argv)
|
264 | 277 | add_arg(argv[i]);
|
265 | 278 | }
|
266 | 279 | if (have_root == 0)
|
267 |
| - add_arg(DEFAULT_COMMAND_LINE); |
| 280 | + add_arg(DEFAULT_COMMAND_LINE_ROOT); |
| 281 | + |
| 282 | + if (have_console == 0) |
| 283 | + add_arg(DEFAULT_COMMAND_LINE_CONSOLE); |
268 | 284 |
|
269 | 285 | host_task_size = os_get_top_address();
|
270 | 286 | /*
|
|
0 commit comments