Re: [U-Boot] [PATCH] Enable serial console only before booting
On Sun, Jul 07, 2013 at 12:25:36PM +0200, Fr??d??ric Leroy wrote: When netconsole is active, some boards fail to boot. This patch enables only the serial console before control is handed by another operating system. Signed-off-by: Fr??d??ric Leroy fr...@starox.org --- Hello, I am facing the same problem with LaCie kirkwood boards. I took a simple approach for fixing this issue. This works for me ... Any comments are welcome :) Can you please re-base this to mainline and re-post? Also, can you expand on the comments in the commit message to explain the problem with netconsole and thus why this fixes it? -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Enable serial console only before booting
When netconsole is active, some boards fail to boot. This patch enables only the serial console before control is handed by another operating system. Signed-off-by: Frédéric Leroy fr...@starox.org --- Hello, I am facing the same problem with LaCie kirkwood boards. I took a simple approach for fixing this issue. This works for me ... Any comments are welcome :) Frédéric common/cmd_bootm.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 15f4599..81e8322 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -62,6 +62,17 @@ #include linux/lzo.h #endif /* CONFIG_LZO */ + +#if defined(CONFIG_NETCONSOLE) +#include iomux.h +void console_set_serial_unconditionally(void) +{ + iomux_doenv(stdin, serial); + iomux_doenv(stdout, serial); + iomux_doenv(stderr, serial); +} +#endif + DECLARE_GLOBAL_DATA_PTR; #ifndef CONFIG_SYS_BOOTM_LEN @@ -577,6 +588,7 @@ static int do_bootm_subcommand(cmd_tbl_t *cmdtp, int flag, int argc, * Stop the ethernet stack if NetConsole could have * left it up */ + console_set_serial_unconditionally(nc); eth_halt(); #endif arch_preboot_os(); @@ -645,6 +657,7 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #ifdef CONFIG_NETCONSOLE /* Stop the ethernet stack if NetConsole could have left it up */ + console_set_serial_unconditionally(nc); eth_halt(); #endif @@ -1849,6 +1862,7 @@ static int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #ifdef CONFIG_NETCONSOLE /* Stop the ethernet stack if NetConsole could have left it up */ + console_set_serial_unconditionally(nc); eth_halt(); #endif -- 1.8.1.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Enable serial console only before booting
When netconsole is active, some boards fail to boot. This patch enables only the serial console before control is handed over to another operating system. Signed-off-by: Frédéric Leroy fr...@starox.org --- Sorry for the noise, I tend to post faster than my own swadow ... Changes in v2 : - remove unused argument from console_set_serial_unconditionally call - fix platforms where CONFIG_CONSOLE_MUX is not defined common/cmd_bootm.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 15f4599..e75c692 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -62,6 +62,18 @@ #include linux/lzo.h #endif /* CONFIG_LZO */ +#if defined(CONFIG_NETCONSOLE) +#include iomux.h +void console_set_serial_unconditionally(void) +{ +#if defined(CONFIG_CONSOLE_MUX) + iomux_doenv(stdin, serial); + iomux_doenv(stdout, serial); + iomux_doenv(stderr, serial); +#endif +} +#endif + DECLARE_GLOBAL_DATA_PTR; #ifndef CONFIG_SYS_BOOTM_LEN @@ -577,6 +589,7 @@ static int do_bootm_subcommand(cmd_tbl_t *cmdtp, int flag, int argc, * Stop the ethernet stack if NetConsole could have * left it up */ + console_set_serial_unconditionally(); eth_halt(); #endif arch_preboot_os(); @@ -645,6 +658,7 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #ifdef CONFIG_NETCONSOLE /* Stop the ethernet stack if NetConsole could have left it up */ + console_set_serial_unconditionally(); eth_halt(); #endif @@ -1849,6 +1863,7 @@ static int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) #ifdef CONFIG_NETCONSOLE /* Stop the ethernet stack if NetConsole could have left it up */ + console_set_serial_unconditionally(); eth_halt(); #endif -- 1.8.1.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Enable serial console only before booting
Dear Frédéric Leroy, In message 1373192736-5014-1-git-send-email-fr...@starox.org you wrote: When netconsole is active, some boards fail to boot. This patch enables only the serial console before control is handed by another operating system. I really hate adding such fixes without understanding the exact nature of the problem. Could you please be so kind and explain in which way booting fails when netconsole is active? On what exactly the some boards are that fail that way? And why this does not appear to be a problem on other boards? (or is it?) And thy the some boards cannot be fixed in such a way to behave as the rest of the boards (where it's not a problem) ? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot