From 9caaf62dd5bec54ffae5a8c306ac7d5e8b81e73a Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Sun, 6 May 2007 09:35:25 +0000 Subject: [PATCH] Move console/*.c into lib/ in order to simplify the directory structure. Signed-off-by: Uwe Hermann Acked-by: Stefan Reinauer git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@315 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- Kconfig | 1 - Makefile | 1 - arch/x86/Makefile | 7 +- console/Kconfig | 165 ----------------------------------- console/Makefile | 26 ------ lib/Kconfig | 165 +++++++++++++++++++++++++++++++++++ {console => lib}/console.c | 0 {console => lib}/vsprintf.c | 0 {console => lib}/vtxprintf.c | 0 9 files changed, 168 insertions(+), 197 deletions(-) delete mode 100644 console/Kconfig delete mode 100644 console/Makefile rename {console => lib}/console.c (100%) rename {console => lib}/vsprintf.c (100%) rename {console => lib}/vtxprintf.c (100%) diff --git a/Kconfig b/Kconfig index 45b33a4cd5..6e40b2ae8e 100644 --- a/Kconfig +++ b/Kconfig @@ -42,7 +42,6 @@ endmenu source mainboard/Kconfig source arch/Kconfig source lib/Kconfig -source console/Kconfig source device/Kconfig # These are used for internal purposes only. diff --git a/Makefile b/Makefile index 51c574164c..0439f57571 100644 --- a/Makefile +++ b/Makefile @@ -107,7 +107,6 @@ CFLAGS += -nostdinc -isystem `$(CC) -print-file-name=include` include lib/Makefile include device/Makefile -include console/Makefile include mainboard/$(MAINBOARDDIR)/Makefile include northbridge/Makefile include southbridge/Makefile diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 039575a8c9..65cf25b95d 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -62,8 +62,8 @@ $(obj)/linuxbios.bootblock: $(obj)/linuxbios.vpd $(obj)/stage0.init # initram module and the various stages and payload files. # -STAGE0_CONSOLE_OBJ = vtxprintf.o vsprintf.o console.o -STAGE0_LIB_OBJ = uart8250.o mem.o elfboot.o lar.o delay.o +STAGE0_LIB_OBJ = uart8250.o mem.o elfboot.o lar.o delay.o vtxprintf.o \ + vsprintf.o console.o STAGE0_ARCH_X86_OBJ = cachemain.o serial.o archelfboot.o speaker.o udelay_io.o mc146818rtc.o ifeq ($(CONFIG_CAR_TYPE_I586),y) @@ -73,8 +73,7 @@ else endif -STAGE0_OBJ := $(patsubst %,$(obj)/console/%,$(STAGE0_CONSOLE_OBJ)) \ - $(patsubst %,$(obj)/lib/%,$(STAGE0_LIB_OBJ)) \ +STAGE0_OBJ := $(patsubst %,$(obj)/lib/%,$(STAGE0_LIB_OBJ)) \ $(patsubst %,$(obj)/arch/x86/%,$(STAGE0_ARCH_X86_OBJ)) \ $(patsubst %,$(obj)/arch/x86/%,$(STAGE0_CAR_OBJ)) diff --git a/console/Kconfig b/console/Kconfig deleted file mode 100644 index 1c15cddeec..0000000000 --- a/console/Kconfig +++ /dev/null @@ -1,165 +0,0 @@ -menu "Console" - -config CONSOLE - bool "Console support" - default y - help - Support for various types of (debugging) consoles. - -choice - prompt "Console log level" - default CONSOLE_LOGLEVEL_8 - depends CONSOLE - -config CONSOLE_LOGLEVEL_8 - bool "BIOS_SPEW" - help - Way too many details. - -config CONSOLE_LOGLEVEL_7 - bool "BIOS_DEBUG" - help - Debug-level messages. - -config CONSOLE_LOGLEVEL_6 - bool "BIOS_INFO" - help - Informational messages. - -config CONSOLE_LOGLEVEL_5 - bool "BIOS_NOTICE" - help - Normal but significant conditions. - -config CONSOLE_LOGLEVEL_4 - bool "BIOS_WARNING" - help - Warning conditions. - -config CONSOLE_LOGLEVEL_3 - bool "BIOS_ERR" - help - Error conditions. - -config CONSOLE_LOGLEVEL_2 - bool "BIOS_CRIT" - help - Critical conditions. - -config CONSOLE_LOGLEVEL_1 - bool "BIOS_ALERT" - help - Action must be taken immediately. - -config CONSOLE_LOGLEVEL_0 - bool "BIOS_EMERG" - help - System is unusable. - -endchoice - -config DEFAULT_CONSOLE_LOGLEVEL - int - default 0 if CONSOLE_LOGLEVEL_0 - default 1 if CONSOLE_LOGLEVEL_1 - default 2 if CONSOLE_LOGLEVEL_2 - default 3 if CONSOLE_LOGLEVEL_3 - default 4 if CONSOLE_LOGLEVEL_4 - default 5 if CONSOLE_LOGLEVEL_5 - default 6 if CONSOLE_LOGLEVEL_6 - default 7 if CONSOLE_LOGLEVEL_7 - default 8 if CONSOLE_LOGLEVEL_8 - help - Map the log level config names to an integer. - -config CONSOLE_SERIAL - boolean "Serial console support" - default y - depends CONSOLE - help - Send LinuxBIOS output to serial console. - -choice - prompt "Serial console COM port" - default CONSOLE_SERIAL_COM1 - depends CONSOLE_SERIAL - -config CONSOLE_SERIAL_COM1 - bool "COM1/ttyS0" - help - Serial console on COM1/ttyS0. - -config CONSOLE_SERIAL_COM2 - bool "COM2/ttyS1" - help - Serial console on COM2/ttyS1. - -endchoice - -choice - prompt "Serial console speed" - default CONSOLE_SERIAL_115200 - depends CONSOLE_SERIAL - -config CONSOLE_SERIAL_115200 - bool "115200 bps" - help - Set serial console speed to 115200 bps. - -config CONSOLE_SERIAL_57600 - bool "57600 bps" - help - Set serial console speed to 57600 bps. - -config CONSOLE_SERIAL_38400 - bool "38400 bps" - help - Set serial console speed to 38400 bps. - -config CONSOLE_SERIAL_19200 - bool "19200 bps" - help - Set serial console speed to 19200 bps. - -config CONSOLE_SERIAL_9600 - bool "9600 bps" - help - Set serial console speed to 9600 bps. - -endchoice - -config CONSOLE_USB - boolean "USB2 console support (EXPERIMENTAL)" - depends CONSOLE && EXPERIMENTAL - help - Send LinuxBIOS output to USB2 (EHCI) console. - - Note: This requires a USB2 controller which supports the EHCI - Debug Port capability. Controllers which are known to work: - - * 10b9:5239 ALi Corporation USB 2.0 (USB PCI card) - * 10de:0088 NVIDIA MCP2A - * 10de:005b NVIDIA CK804 - * 10de:036d NVIDIA MCP55 - * 8086:24dd Intel ICH5 - * 8086:265c Intel ICH6 - * 8086:268c Intel 631xESB/632xESB/3100 - * 8086:27cc Intel ICH7 - * 8086:2836 Intel ICH8 - * 8086:283a Intel ICH8 - - See http://linuxbios.org/EHCI_Debug_Port for an up-to-date list. - -comment "Cosmetic console options" - depends EXPERT && (CONSOLE_SERIAL || CONSOLE_USB) - -config CONSOLE_PREFIX - bool "Prefix all console output with '(LB)'" - depends EXPERT && (CONSOLE_SERIAL || CONSOLE_USB) - default n - help - When you enable this option, LinuxBIOS will prefix each line of - console output with '(LB)'. - -endmenu - diff --git a/console/Makefile b/console/Makefile deleted file mode 100644 index d90c2e5075..0000000000 --- a/console/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -## -## This file is part of the LinuxBIOS project. -## -## Copyright (C) 2007 coresystems GmbH -## Written by Stefan Reinauer for coresystems GmbH. -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -## - -$(obj)/console/%.o: $(src)/console/%.c - $(Q)mkdir -p $(obj)/console - $(Q)printf " CC $(subst $(shell pwd)/,,$(@))\n" - $(Q)$(CC) $(INITCFLAGS) -c $< -o $@ - diff --git a/lib/Kconfig b/lib/Kconfig index d32fd26dcc..cea4163a39 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -61,3 +61,168 @@ endchoice endmenu +menu "Console" + +config CONSOLE + bool "Console support" + default y + help + Support for various types of (debugging) consoles. + +choice + prompt "Console log level" + default CONSOLE_LOGLEVEL_8 + depends CONSOLE + +config CONSOLE_LOGLEVEL_8 + bool "BIOS_SPEW" + help + Way too many details. + +config CONSOLE_LOGLEVEL_7 + bool "BIOS_DEBUG" + help + Debug-level messages. + +config CONSOLE_LOGLEVEL_6 + bool "BIOS_INFO" + help + Informational messages. + +config CONSOLE_LOGLEVEL_5 + bool "BIOS_NOTICE" + help + Normal but significant conditions. + +config CONSOLE_LOGLEVEL_4 + bool "BIOS_WARNING" + help + Warning conditions. + +config CONSOLE_LOGLEVEL_3 + bool "BIOS_ERR" + help + Error conditions. + +config CONSOLE_LOGLEVEL_2 + bool "BIOS_CRIT" + help + Critical conditions. + +config CONSOLE_LOGLEVEL_1 + bool "BIOS_ALERT" + help + Action must be taken immediately. + +config CONSOLE_LOGLEVEL_0 + bool "BIOS_EMERG" + help + System is unusable. + +endchoice + +config DEFAULT_CONSOLE_LOGLEVEL + int + default 0 if CONSOLE_LOGLEVEL_0 + default 1 if CONSOLE_LOGLEVEL_1 + default 2 if CONSOLE_LOGLEVEL_2 + default 3 if CONSOLE_LOGLEVEL_3 + default 4 if CONSOLE_LOGLEVEL_4 + default 5 if CONSOLE_LOGLEVEL_5 + default 6 if CONSOLE_LOGLEVEL_6 + default 7 if CONSOLE_LOGLEVEL_7 + default 8 if CONSOLE_LOGLEVEL_8 + help + Map the log level config names to an integer. + +config CONSOLE_SERIAL + boolean "Serial console support" + default y + depends CONSOLE + help + Send LinuxBIOS output to serial console. + +choice + prompt "Serial console COM port" + default CONSOLE_SERIAL_COM1 + depends CONSOLE_SERIAL + +config CONSOLE_SERIAL_COM1 + bool "COM1/ttyS0" + help + Serial console on COM1/ttyS0. + +config CONSOLE_SERIAL_COM2 + bool "COM2/ttyS1" + help + Serial console on COM2/ttyS1. + +endchoice + +choice + prompt "Serial console speed" + default CONSOLE_SERIAL_115200 + depends CONSOLE_SERIAL + +config CONSOLE_SERIAL_115200 + bool "115200 bps" + help + Set serial console speed to 115200 bps. + +config CONSOLE_SERIAL_57600 + bool "57600 bps" + help + Set serial console speed to 57600 bps. + +config CONSOLE_SERIAL_38400 + bool "38400 bps" + help + Set serial console speed to 38400 bps. + +config CONSOLE_SERIAL_19200 + bool "19200 bps" + help + Set serial console speed to 19200 bps. + +config CONSOLE_SERIAL_9600 + bool "9600 bps" + help + Set serial console speed to 9600 bps. + +endchoice + +config CONSOLE_USB + boolean "USB2 console support (EXPERIMENTAL)" + depends CONSOLE && EXPERIMENTAL + help + Send LinuxBIOS output to USB2 (EHCI) console. + + Note: This requires a USB2 controller which supports the EHCI + Debug Port capability. Controllers which are known to work: + + * 10b9:5239 ALi Corporation USB 2.0 (USB PCI card) + * 10de:0088 NVIDIA MCP2A + * 10de:005b NVIDIA CK804 + * 10de:036d NVIDIA MCP55 + * 8086:24dd Intel ICH5 + * 8086:265c Intel ICH6 + * 8086:268c Intel 631xESB/632xESB/3100 + * 8086:27cc Intel ICH7 + * 8086:2836 Intel ICH8 + * 8086:283a Intel ICH8 + + See http://linuxbios.org/EHCI_Debug_Port for an up-to-date list. + +comment "Cosmetic console options" + depends EXPERT && (CONSOLE_SERIAL || CONSOLE_USB) + +config CONSOLE_PREFIX + bool "Prefix all console output with '(LB)'" + depends EXPERT && (CONSOLE_SERIAL || CONSOLE_USB) + default n + help + When you enable this option, LinuxBIOS will prefix each line of + console output with '(LB)'. + +endmenu + diff --git a/console/console.c b/lib/console.c similarity index 100% rename from console/console.c rename to lib/console.c diff --git a/console/vsprintf.c b/lib/vsprintf.c similarity index 100% rename from console/vsprintf.c rename to lib/vsprintf.c diff --git a/console/vtxprintf.c b/lib/vtxprintf.c similarity index 100% rename from console/vtxprintf.c rename to lib/vtxprintf.c