automatically add console line from u-boot environment to bootargs
- when there is no console argument in the extlinux.conf file
This commit is contained in:
parent
cdfe32ba2c
commit
0f9011f0f2
@ -0,0 +1,60 @@
|
||||
From 838ea5b6076ba27c6d20c6370ff0a996acaa5eec Mon Sep 17 00:00:00 2001
|
||||
From: Dennis Gilmore <dennis@ausil.us>
|
||||
Date: Wed, 23 Apr 2014 15:54:57 -0500
|
||||
Subject: [PATCH 16/17] automatically add console= to bootline when not
|
||||
existing
|
||||
|
||||
if there is a console variable in the u-boot environment and not one on
|
||||
the append line from syslinux config add what is in the environment to
|
||||
the bootargs, allows us to not need to modify the config in a disk image
|
||||
---
|
||||
common/cmd_pxe.c | 18 +++++++++++++++++-
|
||||
1 file changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
|
||||
index 9c43e63..eb5f9c3 100644
|
||||
--- a/common/cmd_pxe.c
|
||||
+++ b/common/cmd_pxe.c
|
||||
@@ -606,6 +606,7 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label)
|
||||
char initrd_str[22];
|
||||
char mac_str[29] = "";
|
||||
char ip_str[68] = "";
|
||||
+ char console[30] = "";
|
||||
char *bootargs;
|
||||
int bootm_argc = 3;
|
||||
int len = 0;
|
||||
@@ -665,8 +666,21 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label)
|
||||
}
|
||||
#endif
|
||||
|
||||
- if (label->append)
|
||||
+ if (label->append) {
|
||||
len += strlen(label->append);
|
||||
+ /* 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"));
|
||||
+ len += strlen(console);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
|
||||
if (len) {
|
||||
bootargs = malloc(len + 1);
|
||||
@@ -675,6 +689,8 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label)
|
||||
bootargs[0] = '\0';
|
||||
if (label->append)
|
||||
strcpy(bootargs, label->append);
|
||||
+ if (strlen(console) > 0)
|
||||
+ strcat(bootargs, console);
|
||||
strcat(bootargs, ip_str);
|
||||
strcat(bootargs, mac_str);
|
||||
|
||||
--
|
||||
1.9.0
|
||||
|
25
0017-make-bootdelay-match-the-generic-distro-default.patch
Normal file
25
0017-make-bootdelay-match-the-generic-distro-default.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 84f7df44e38f8d721e17a585b95dce4027062ada Mon Sep 17 00:00:00 2001
|
||||
From: Dennis Gilmore <dennis@ausil.us>
|
||||
Date: Wed, 23 Apr 2014 15:58:49 -0500
|
||||
Subject: [PATCH 17/17] make bootdelay match the generic distro default
|
||||
|
||||
---
|
||||
include/configs/ti_armv7_common.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
|
||||
index 656d939..679b278 100644
|
||||
--- a/include/configs/ti_armv7_common.h
|
||||
+++ b/include/configs/ti_armv7_common.h
|
||||
@@ -64,7 +64,7 @@
|
||||
/*
|
||||
* Default to a quick boot delay.
|
||||
*/
|
||||
-#define CONFIG_BOOTDELAY 1
|
||||
+#define CONFIG_BOOTDELAY 2
|
||||
|
||||
/*
|
||||
* DDR information. If the CONFIG_NR_DRAM_BANKS is not defined,
|
||||
--
|
||||
1.9.0
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Name: uboot-tools
|
||||
Version: 2014.04
|
||||
Release: 1%{?candidate:.%{candidate}}%{?dist}
|
||||
Release: 2%{?candidate:.%{candidate}}%{?dist}
|
||||
Summary: U-Boot utilities
|
||||
|
||||
Group: Development/Tools
|
||||
@ -27,6 +27,8 @@ Patch21: 0012-cleanup-duplicate-options-in-paz00-config.patch
|
||||
Patch22: 0013-add-hackish-utilite-build-based-on-wandboard.patch
|
||||
Patch23: 0014-add-to-ti_armv7_common.h-generic-distro-environment-.patch
|
||||
Patch24: 0015-omap4-buildfixes.patch
|
||||
Patch25: 0016-automatically-add-console-to-bootline-when-not-exist.patch
|
||||
Patch26 0017-make-bootdelay-match-the-generic-distro-default.patch
|
||||
|
||||
%ifnarch %{arm}
|
||||
BuildRequires: gcc-arm-linux-gnu
|
||||
@ -108,6 +110,8 @@ u-boot bootloader binaries for armv7 boards
|
||||
%patch22 -p1
|
||||
%patch23 -p1
|
||||
%patch24 -p1
|
||||
%patch25 -p1
|
||||
%patch26 -p1
|
||||
|
||||
mkdir builds
|
||||
# convert fedora logo to bmp for use in u-boot
|
||||
@ -355,6 +359,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Apr 23 2014 Dennis Gilmore <dennis@ausil.us> - 2014.04-2
|
||||
- automatically add console line from u-boot environment to bootargs
|
||||
- when there is no console argument in the extlinux.conf file
|
||||
|
||||
* Mon Apr 21 2014 Dennis Gilmore <dennis@ausil.us> - 2014.04-1
|
||||
- update to final 2014.04
|
||||
- put all images into a single rpm
|
||||
|
Loading…
Reference in New Issue
Block a user