Re: [OpenWrt-Devel] [PATCH 5/7] atheros: console config override

2008-05-19 Thread Peter Korsgaard
 Axel == Axel Gembe [EMAIL PROTECTED] writes:

Hi,

 Axel This patch makes it possible to override the console kernel command line
 Axel option by passing a command line to the kernel. It basically removes the
 Axel console option from the default command line and adds it at runtime in
 Axel prom_init when console= was not yet specified.
 
 Axel  void __init prom_init(void)
 Axel  {
 Axel +#if 0
 Axel  char **argv;
 Axel +#endif

Why add these ifdefs just to change them again in the next patch in
the series?

-- 
Bye, Peter Korsgaard
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 5/7] atheros: console config override

2008-05-19 Thread Axel Gembe
Peter Korsgaard wrote:
 Why add these ifdefs just to change them again in the next patch in
 the series?
   
Those patches were meant to be squashed anyways. I just split them for 
ease of discussion.
Also I didn't know if both changes were wanted.

 - Axel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 5/7] atheros: console config override

2008-05-07 Thread Axel Gembe
This patch makes it possible to override the console kernel command line
option by passing a command line to the kernel. It basically removes the
console option from the default command line and adds it at runtime in
prom_init when console= was not yet specified.

Signed-off-by: Axel Gembe [EMAIL PROTECTED]
---
 target/linux/atheros/config-2.6.23 |2 +-
 target/linux/atheros/config-2.6.24 |2 +-
 target/linux/atheros/config-2.6.25 |2 +-
 .../linux/atheros/files/arch/mips/atheros/prom.c   |6 ++
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/target/linux/atheros/config-2.6.23 
b/target/linux/atheros/config-2.6.23
index 5d299d9..1497f7c 100644
--- a/target/linux/atheros/config-2.6.23
+++ b/target/linux/atheros/config-2.6.23
@@ -13,7 +13,7 @@ CONFIG_BASE_SMALL=0
 CONFIG_BITREVERSE=y
 # CONFIG_BROADCOM_PHY is not set
 # CONFIG_BT is not set
-CONFIG_CMDLINE=console=ttyS0,9600 rootfstype=squashfs,jffs2 init=/etc/preinit
+CONFIG_CMDLINE=rootfstype=squashfs,jffs2 init=/etc/preinit
 CONFIG_CPU_BIG_ENDIAN=y
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_PREFETCH=y
diff --git a/target/linux/atheros/config-2.6.24 
b/target/linux/atheros/config-2.6.24
index db6196f..3916e64 100644
--- a/target/linux/atheros/config-2.6.24
+++ b/target/linux/atheros/config-2.6.24
@@ -16,7 +16,7 @@ CONFIG_BITREVERSE=y
 # CONFIG_BROADCOM_PHY is not set
 # CONFIG_BT is not set
 CONFIG_CEVT_R4K=y
-CONFIG_CMDLINE=console=ttyS0,9600 rootfstype=squashfs,jffs2 init=/etc/preinit
+CONFIG_CMDLINE=rootfstype=squashfs,jffs2 init=/etc/preinit
 CONFIG_CPU_BIG_ENDIAN=y
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_PREFETCH=y
diff --git a/target/linux/atheros/config-2.6.25 
b/target/linux/atheros/config-2.6.25
index 4b97840..50aad1c 100644
--- a/target/linux/atheros/config-2.6.25
+++ b/target/linux/atheros/config-2.6.25
@@ -18,7 +18,7 @@ CONFIG_BITREVERSE=y
 # CONFIG_BT is not set
 CONFIG_CEVT_R4K=y
 CONFIG_CLASSIC_RCU=y
-CONFIG_CMDLINE=console=ttyS0,9600 rootfstype=squashfs,jffs2 init=/etc/preinit
+CONFIG_CMDLINE=rootfstype=squashfs,jffs2 init=/etc/preinit
 CONFIG_CPU_BIG_ENDIAN=y
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_PREFETCH=y
diff --git a/target/linux/atheros/files/arch/mips/atheros/prom.c 
b/target/linux/atheros/files/arch/mips/atheros/prom.c
index 82617cd..2f2da0c 100644
--- a/target/linux/atheros/files/arch/mips/atheros/prom.c
+++ b/target/linux/atheros/files/arch/mips/atheros/prom.c
@@ -8,6 +8,7 @@
  * Copyright (C) 2006 FON Technology, SL.
  * Copyright (C) 2006 Imre Kaloz [EMAIL PROTECTED]
  * Copyright (C) 2006 Felix Fietkau [EMAIL PROTECTED]
+ * Copyright (C) 2008 Axel Gembe [EMAIL PROTECTED]
  */
 
 /*
@@ -27,7 +28,9 @@
 
 void __init prom_init(void)
 {
+#if 0
char **argv;
+#endif
 
mips_machtype = -1;
 
@@ -38,6 +41,9 @@ void __init prom_init(void)
/* RedBoot desired command line is argv[1] */
strcat(arcs_cmdline, argv[1]);
 #endif
+   /* Default console speed is 9600 baud */
+   if (strstr(arcs_cmdline, console=) == NULL)
+   strcat(arcs_cmdline,  console=ttyS0,9600);
 }
 
 void __init prom_free_prom_memory(void)
-- 
1.5.5.1

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel