summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDennis Gilmore <dennis@ausil.us>2014-10-27 21:38:32 -0500
committerDennis Gilmore <dennis@ausil.us>2014-10-27 21:41:06 -0500
commit19ce73f64ee92451cf28e8ebfa76eacb2f3fd50d (patch)
tree53ca68f669fa4495aae50f5e3eb3f16a9ecfeb98
parent7624d0d511378fc8149703050aec2d78ce4217e1 (diff)
downloadu-boot-fedora.tar.gz
u-boot-fedora.tar.xz
u-boot-fedora.zip
add back adding console= to the bootargs if not present.fedora
better soloution is needed not upstreamable
-rw-r--r--common/cmd_pxe.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 7e32c95df3..4f3c15dd92 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);