summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/pc386/console/console.c
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2009-04-28 06:20:35 +0000
committerChris Johns <chrisj@rtems.org>2009-04-28 06:20:35 +0000
commit1c5ebc542167a74791cf5e82845e00b4f8ff6330 (patch)
treee0b839e0a1ef204877767c7d0b9b1f90b1f45a2e /c/src/lib/libbsp/i386/pc386/console/console.c
parent2009-04-28 Chris Johns <chrisj@rtems.org> (diff)
downloadrtems-1c5ebc542167a74791cf5e82845e00b4f8ff6330.tar.bz2
2009-04-28 Chris Johns <chrisj@rtems.org>
* Makefile.am: Add bspcmdline.c. * include/bsp.h: Add boot command line interfaces. * start/start.c: Save the multiboot command line. Pass the command line to boot_card. * start/start.S: Update for boot_card command line change. * startup/bspstart.c: Initialise the command line. * startup/bspcmdline.c: New. * console/console.c, ide/idecfg.c: Add boot command line support.
Diffstat (limited to 'c/src/lib/libbsp/i386/pc386/console/console.c')
-rw-r--r--c/src/lib/libbsp/i386/pc386/console/console.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/console/console.c b/c/src/lib/libbsp/i386/pc386/console/console.c
index 126b0cb50b..037f56c859 100644
--- a/c/src/lib/libbsp/i386/pc386/console/console.c
+++ b/c/src/lib/libbsp/i386/pc386/console/console.c
@@ -149,7 +149,34 @@ console_initialize(rtems_device_major_number major,
void *arg)
{
rtems_status_code status;
+ const char* mode;
+
+ /*
+ * Check the command line for the type of mode
+ * the consol is.
+ */
+ mode = bsp_cmdline_arg ("--console=");
+ if (mode)
+ {
+ mode += sizeof ("--console=") - 1;
+ if (strncmp (mode, "console", sizeof ("console") - 1) == 0)
+ {
+ BSPConsolePort = BSP_CONSOLE_PORT_CONSOLE;
+ BSPPrintkPort = BSP_CONSOLE_PORT_CONSOLE;
+ }
+ else if (strncmp (mode, "com1", sizeof ("com1") - 1) == 0)
+ {
+ BSPConsolePort = BSP_UART_COM1;
+ BSPPrintkPort = BSP_UART_COM1;
+ }
+ else if (strncmp (mode, "com2", sizeof ("com2") - 1) == 0)
+ {
+ BSPConsolePort = BSP_UART_COM2;
+ BSPPrintkPort = BSP_UART_COM2;
+ }
+ }
+
/* Initialize the KBD interface */
kbd_init();