2015-03-21 17:40:21 +00:00
|
|
|
From 8c3c5af7d22366bcebd48817190b22ddbb119f9d Mon Sep 17 00:00:00 2001
|
2015-03-06 13:05:47 +00:00
|
|
|
From: Peter Robinson <pbrobinson@gmail.com>
|
|
|
|
Date: Fri, 6 Mar 2015 10:32:40 +0000
|
2015-03-21 17:40:21 +00:00
|
|
|
Subject: [PATCH 05/14] add back adding console= to the bootargs if not
|
2014-11-26 05:17:04 +00:00
|
|
|
present.
|
|
|
|
|
2015-03-06 13:05:47 +00:00
|
|
|
A better soloution is needed, not upstreamable
|
2014-11-26 05:17:04 +00:00
|
|
|
---
|
|
|
|
common/cmd_pxe.c | 20 ++++++++++++++++++--
|
|
|
|
1 file changed, 18 insertions(+), 2 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
|
|
|
|
index 7e32c95..4f3c15d 100644
|
|
|
|
--- a/common/cmd_pxe.c
|
|
|
|
+++ b/common/cmd_pxe.c
|
|
|
|
@@ -673,18 +673,34 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label)
|
|
|
|
if ((label->ipappend & 0x3) || label->append) {
|
|
|
|
char bootargs[CONFIG_SYS_CBSIZE] = "";
|
|
|
|
char finalbootargs[CONFIG_SYS_CBSIZE];
|
|
|
|
+ char console[30] = "";
|
|
|
|
+ /* check for a console line in the boot args passed in from the
|
|
|
|
+ * config file. If there is no console line and the enviornment
|
|
|
|
+ * has a console variable add it to the bootargs
|
|
|
|
+ */
|
|
|
|
+ if ( !strstr(label->append, "console=") ) {
|
|
|
|
+ printf("no console= \n");
|
|
|
|
+ if (getenv("console")) {
|
|
|
|
+ sprintf(console, " console=%s",
|
|
|
|
+ getenv("console"));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
|
|
if (strlen(label->append ?: "") +
|
|
|
|
- strlen(ip_str) + strlen(mac_str) + 1 > sizeof(bootargs)) {
|
|
|
|
- printf("bootarg overflow %zd+%zd+%zd+1 > %zd\n",
|
|
|
|
+ strlen(ip_str) + strlen(mac_str) + strlen(console) +
|
|
|
|
+ 1 > sizeof(bootargs)) {
|
|
|
|
+ printf("bootarg overflow %zd+%zd+%zd+%zd+1 > %zd\n",
|
|
|
|
strlen(label->append ?: ""),
|
|
|
|
strlen(ip_str), strlen(mac_str),
|
|
|
|
+ strlen(console),
|
|
|
|
sizeof(bootargs));
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (label->append)
|
|
|
|
strcpy(bootargs, label->append);
|
|
|
|
+ if (strlen(console) > 0)
|
|
|
|
+ strcat(bootargs, console);
|
|
|
|
strcat(bootargs, ip_str);
|
|
|
|
strcat(bootargs, mac_str);
|
|
|
|
|
|
|
|
--
|
2015-03-21 17:40:21 +00:00
|
|
|
2.3.2
|
2014-11-26 05:17:04 +00:00
|
|
|
|