summaryrefslogtreecommitdiffstats
path: root/arch/nios2
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-08-15 09:02:17 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-08-16 08:40:55 +0200
commit068bed22a6154aec1fe689603b8a8eaa27c0f350 (patch)
tree5cebcbbbcd486ee49552253d27d079b7f6703fd4 /arch/nios2
parent774580c2bde4c8b126eed0a80d00cb22cbfb3193 (diff)
downloadbarebox-068bed22a6154aec1fe689603b8a8eaa27c0f350.tar.gz
Set model and hostname at boardlevel
With multiboard support the compiletime generated BOARDINFO string gets more and more meaningless. This removes it from Kconfig and replaces it with a variable that can be set at boardlevel. Also many boards have a standard setting for the hostname in the environment. This patch also moves the standard to C code by calling barebox_set_hostname(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/nios2')
-rw-r--r--arch/nios2/Kconfig3
-rw-r--r--arch/nios2/boards/generic/generic.c3
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig
index c49f6e9..116daa9 100644
--- a/arch/nios2/Kconfig
+++ b/arch/nios2/Kconfig
@@ -9,9 +9,6 @@ config ARCH_TEXT_BASE
hex
default 0x00000000
-config BOARDINFO
- default "Altera Generic Board" if GENERIC
-
choice
prompt "Select your board"
diff --git a/arch/nios2/boards/generic/generic.c b/arch/nios2/boards/generic/generic.c
index 499d93b..61b60b6 100644
--- a/arch/nios2/boards/generic/generic.c
+++ b/arch/nios2/boards/generic/generic.c
@@ -60,6 +60,9 @@ device_initcall(generic_devices_init);
static int altera_console_init(void)
{
+ barebox_set_model("Altera Generic Board");
+ barebox_set_hostname("nios2");
+
add_generic_device("altera_serial", DEVICE_ID_DYNAMIC, NULL,
NIOS_SOPC_UART_BASE, 0x20, IORESOURCE_MEM, NULL);