port panda board to upstreamed geneic boot commands

- append the console line automatically again
This commit is contained in:
Dennis Gilmore 2014-10-27 21:47:17 -05:00
parent 4dc247c418
commit 64a5c15160
14 changed files with 172 additions and 17 deletions

View File

@ -1,7 +1,7 @@
From 43a31dc85859cef2bc0b24ff2516d6fb069f4eec Mon Sep 17 00:00:00 2001 From 43a31dc85859cef2bc0b24ff2516d6fb069f4eec Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis@ausil.us> From: Dennis Gilmore <dennis@ausil.us>
Date: Tue, 14 Oct 2014 00:38:28 -0500 Date: Tue, 14 Oct 2014 00:38:28 -0500
Subject: [PATCH 01/11] make sure that the filesystem is a type of fat Subject: [PATCH 01/13] make sure that the filesystem is a type of fat
parted marks the partition table as being fat32 though we may pyt a fat16 parted marks the partition table as being fat32 though we may pyt a fat16
filesystem on it. filesystem on it.

View File

@ -1,7 +1,7 @@
From 2ca45b547dedc76f403ed25405ddf9b69afa07a6 Mon Sep 17 00:00:00 2001 From 2ca45b547dedc76f403ed25405ddf9b69afa07a6 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org> From: Vagrant Cascadian <vagrant@debian.org>
Date: Wed, 1 Oct 2014 13:20:53 -0700 Date: Wed, 1 Oct 2014 13:20:53 -0700
Subject: [PATCH 02/11] Allow checking in multiple partitions for Subject: [PATCH 02/13] Allow checking in multiple partitions for
scan_dev_for_boot. scan_dev_for_boot.
--- ---

View File

@ -1,7 +1,7 @@
From 1f21a89342cf8897aa140a75fe4302908baf2431 Mon Sep 17 00:00:00 2001 From 1f21a89342cf8897aa140a75fe4302908baf2431 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org> From: Vagrant Cascadian <vagrant@debian.org>
Date: Wed, 1 Oct 2014 12:55:58 -0700 Date: Wed, 1 Oct 2014 12:55:58 -0700
Subject: [PATCH 03/11] Allow overriding boot_partitions default value by Subject: [PATCH 03/13] Allow overriding boot_partitions default value by
setting BOOTENV_BOOT_PARTITIONS before including config_distro_bootcmd. setting BOOTENV_BOOT_PARTITIONS before including config_distro_bootcmd.
--- ---

View File

@ -1,7 +1,7 @@
From 8ecd007b88f92de2e5c585f434d3dcffdfe6ee7e Mon Sep 17 00:00:00 2001 From 8ecd007b88f92de2e5c585f434d3dcffdfe6ee7e Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org> From: Vagrant Cascadian <vagrant@debian.org>
Date: Tue, 30 Sep 2014 20:02:26 -0700 Date: Tue, 30 Sep 2014 20:02:26 -0700
Subject: [PATCH 04/11] Add BOOTENV_INIT_COMMAND for commands that may be Subject: [PATCH 04/13] Add BOOTENV_INIT_COMMAND for commands that may be
needed to run before bootcmd, such as setting the fdt file variables for needed to run before bootcmd, such as setting the fdt file variables for
platfroms that detect on boot. platfroms that detect on boot.

View File

@ -1,7 +1,7 @@
From 92f36f70d6df4ce4024e8b0b9e88dc9b8b055e31 Mon Sep 17 00:00:00 2001 From 92f36f70d6df4ce4024e8b0b9e88dc9b8b055e31 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org> From: Vagrant Cascadian <vagrant@debian.org>
Date: Wed, 1 Oct 2014 14:04:01 -0700 Date: Wed, 1 Oct 2014 14:04:01 -0700
Subject: [PATCH 05/11] Add BOOTENV_POST_COMMAND, which is appended to the end Subject: [PATCH 05/13] Add BOOTENV_POST_COMMAND, which is appended to the end
of bootcmd. of bootcmd.
--- ---

View File

@ -1,7 +1,7 @@
From d4ec2d9e7134d8deb403f82577b04c63e724ab08 Mon Sep 17 00:00:00 2001 From d4ec2d9e7134d8deb403f82577b04c63e724ab08 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org> From: Vagrant Cascadian <vagrant@debian.org>
Date: Tue, 30 Sep 2014 20:34:19 -0700 Date: Tue, 30 Sep 2014 20:34:19 -0700
Subject: [PATCH 06/11] Only set CONFIG_BOOTDELAY if not already set. Subject: [PATCH 06/13] Only set CONFIG_BOOTDELAY if not already set.
--- ---
include/config_distro_defaults.h | 2 ++ include/config_distro_defaults.h | 2 ++

View File

@ -1,7 +1,7 @@
From e35f16a3b1d651e2ce0b07ec67572f55fafff092 Mon Sep 17 00:00:00 2001 From e35f16a3b1d651e2ce0b07ec67572f55fafff092 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org> From: Vagrant Cascadian <vagrant@debian.org>
Date: Wed, 1 Oct 2014 10:29:36 -0700 Date: Wed, 1 Oct 2014 10:29:36 -0700
Subject: [PATCH 07/11] Add support for loading environment from uEnv.txt in Subject: [PATCH 07/13] Add support for loading environment from uEnv.txt in
config_distro_bootcmd. config_distro_bootcmd.
--- ---

View File

@ -1,7 +1,7 @@
From 2a0974e667c0b19d5ebce0f4db576f9123f33c7e Mon Sep 17 00:00:00 2001 From 455018f78aa4d96378c804f2883e86b5f986e7cb Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org> From: Vagrant Cascadian <vagrant@debian.org>
Date: Wed, 1 Oct 2014 13:28:18 -0700 Date: Wed, 1 Oct 2014 13:28:18 -0700
Subject: [PATCH 08/11] Switch am335x_evm.h to use config_distro_defaults and Subject: [PATCH 08/13] Switch am335x_evm.h to use config_distro_defaults and
config_distro_bootcmd. Add scriptaddr to DEFAULT_LINUX_BOOT_ENV, as config_distro_bootcmd. Add scriptaddr to DEFAULT_LINUX_BOOT_ENV, as
scriptaddr is used for boot scripts in config_distro_defaults. scriptaddr is used for boot scripts in config_distro_defaults.
@ -11,7 +11,7 @@ Subject: [PATCH 08/11] Switch am335x_evm.h to use config_distro_defaults and
2 files changed, 18 insertions(+), 9 deletions(-) 2 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 476430d..3452b61 100644 index 476430d..4af8dc4 100644
--- a/include/configs/am335x_evm.h --- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h
@@ -18,6 +18,21 @@ @@ -18,6 +18,21 @@

View File

@ -1,7 +1,7 @@
From 3574f372237e9861461801d518830df92f1d70c3 Mon Sep 17 00:00:00 2001 From 28f99d4a43668b40960b2201468dbf6c5337c19a Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis@ausil.us> From: Dennis Gilmore <dennis@ausil.us>
Date: Tue, 14 Oct 2014 19:42:32 -0500 Date: Tue, 14 Oct 2014 19:42:32 -0500
Subject: [PATCH 09/11] wandboard: port to generic distro booting Subject: [PATCH 09/13] wandboard: port to generic distro booting
set the variables and functions needed for generic distro booting. set the variables and functions needed for generic distro booting.
--- ---

View File

@ -1,7 +1,7 @@
From f1258593e81ec2445f45f2a15cf20c9238f51fdb Mon Sep 17 00:00:00 2001 From 1f69e87ebfe9b8f6bc3ad4e541a6ed22be8ee5a2 Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis@ausil.us> From: Dennis Gilmore <dennis@ausil.us>
Date: Mon, 13 Oct 2014 23:17:32 -0500 Date: Mon, 13 Oct 2014 23:17:32 -0500
Subject: [PATCH 10/11] port the riotboard to distro generic configs, patch by Subject: [PATCH 10/13] port the riotboard to distro generic configs, patch by
pbrobinson pbrobinson
--- ---

View File

@ -1,7 +1,7 @@
From b51bfda152ff4f738a96a0864cac2b4b039500e8 Mon Sep 17 00:00:00 2001 From fb3ce7db4e100e9a051aaa19b96d33d67f02d1f2 Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis@ausil.us> From: Dennis Gilmore <dennis@ausil.us>
Date: Mon, 13 Oct 2014 23:58:13 -0500 Date: Mon, 13 Oct 2014 23:58:13 -0500
Subject: [PATCH 11/11] port utilite to distro generic boot commands Subject: [PATCH 11/13] port utilite to distro generic boot commands
--- ---
include/configs/cm_fx6.h | 112 +++++++++++------------------------------------ include/configs/cm_fx6.h | 112 +++++++++++------------------------------------

View File

@ -0,0 +1,90 @@
From 7624d0d511378fc8149703050aec2d78ce4217e1 Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis@ausil.us>
Date: Mon, 27 Oct 2014 21:27:31 -0500
Subject: [PATCH 12/13] Switch omap4 boards to use config_distro_defaults and
config_distro_bootcmd.
Add pxefile_addr_r to DEFAULT_LINUX_BOOT_ENV, as pxefile_addr_r is used
to store the pxe boot configuation file in config_distro_defaults.
adjust adress of scriptaddr to be unique
---
include/configs/ti_armv7_common.h | 3 ++-
include/configs/ti_omap4_common.h | 40 +++++++++++++++++----------------------
2 files changed, 19 insertions(+), 24 deletions(-)
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index f405fea..fa8bc1f 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -54,7 +54,8 @@
#define DEFAULT_LINUX_BOOT_ENV \
"loadaddr=0x82000000\0" \
"kernel_addr_r=0x82000000\0" \
- "scriptaddr=0x82000000\0" \
+ "pxefile_addr_r=0x87F00000\0" \
+ "scriptaddr=0x87E00000\0" \
"fdtaddr=0x88000000\0" \
"fdt_addr_r=0x88000000\0" \
"rdaddr=0x88080000\0" \
diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h
index b0f199e..c10d2c8 100644
--- a/include/configs/ti_omap4_common.h
+++ b/include/configs/ti_omap4_common.h
@@ -82,6 +82,19 @@
#undef CONFIG_CMD_NET
#undef CONFIG_CMD_NFS
+
+#ifndef CONFIG_SPL_BUILD
+#include <config_distro_defaults.h>
+#include <config_distro_bootcmd.h>
+
+#define BOOTENV_INIT_COMMAND "run findfdt ;"
+
+#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 0) \
+ func(USB, usb, 0) \
+ func(PXE, pxe, na) \
+ func(DHCP, dhcp, na)
+
/*
* Environment setup
*/
@@ -129,30 +142,11 @@
"if test $fdtfile = undefined; then " \
"echo WARNING: Could not determine device tree to use; fi; \0" \
"loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
+ BOOTENV
-#define CONFIG_BOOTCOMMAND \
- "run findfdt; " \
- "mmc dev ${mmcdev}; if mmc rescan; then " \
- "echo SD/MMC found on device ${mmcdev};" \
- "if run loadbootscript; then " \
- "run bootscript; " \
- "else " \
- "if run loadbootenv; then " \
- "run importbootenv; " \
- "fi;" \
- "if test -n ${uenvcmd}; then " \
- "echo Running uenvcmd ...;" \
- "run uenvcmd;" \
- "fi;" \
- "fi;" \
- "if run loadimage; then " \
- "run loadfdt;" \
- "run mmcboot; " \
- "fi; " \
- "if run loaduimage; then " \
- "run uimageboot;" \
- "fi; " \
- "fi"
+#else
+#define BOOT_TARGET_DEVICES
+#endif
/*
* Defines for SPL
--
2.1.0

View File

@ -0,0 +1,57 @@
From 19ce73f64ee92451cf28e8ebfa76eacb2f3fd50d Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis@ausil.us>
Date: Mon, 27 Oct 2014 21:38:32 -0500
Subject: [PATCH 13/13] add back adding console= to the bootargs if not
present.
better soloution is needed
not upstreamable
---
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);
--
2.1.0

View File

@ -2,7 +2,7 @@
Name: uboot-tools Name: uboot-tools
Version: 2014.10 Version: 2014.10
Release: 3%{?candidate:.%{candidate}}%{?dist} Release: 4%{?candidate:.%{candidate}}%{?dist}
Summary: U-Boot utilities Summary: U-Boot utilities
Group: Development/Tools Group: Development/Tools
@ -23,6 +23,8 @@ Patch9: 0009-wandboard-port-to-generic-distro-booting.patch
Patch12: 0010-port-the-riotboard-to-distro-generic-configs-patch-b.patch Patch12: 0010-port-the-riotboard-to-distro-generic-configs-patch-b.patch
Patch13: 0011-port-utilite-to-distro-generic-boot-commands.patch Patch13: 0011-port-utilite-to-distro-generic-boot-commands.patch
Patch14: 0012-tegra-fix-jetson-pcie.patch Patch14: 0012-tegra-fix-jetson-pcie.patch
Patch15: 0012-Switch-omap4-boards-to-use-config_distro_defaults-an.patch
Patch16: 0013-add-back-adding-console-to-the-bootargs-if-not-prese.patch
BuildRequires: dtc, openssl-devel BuildRequires: dtc, openssl-devel
BuildRequires: fedora-logos, netpbm-progs BuildRequires: fedora-logos, netpbm-progs
@ -95,6 +97,8 @@ git am %{patches} </dev/null
git config --unset user.email git config --unset user.email
git config --unset user.name git config --unset user.name
rm -rf .git
mkdir builds mkdir builds
# convert fedora logo to bmp for use in u-boot # convert fedora logo to bmp for use in u-boot
pngtopnm /usr/share/pixmaps/fedora-logo.png | ppmquant 256 | ppmtobmp -bpp 8 >fedora.bmp pngtopnm /usr/share/pixmaps/fedora-logo.png | ppmquant 256 | ppmtobmp -bpp 8 >fedora.bmp
@ -474,6 +478,10 @@ install -p -m 0644 tools/env/fw_env.config $RPM_BUILD_ROOT%{_sysconfdir}
%endif %endif
%changelog %changelog
* Mon Oct 27 2014 Dennis Gilmore <dennis@ausil.us> - 2014.10-4
- port panda board to upstreamed geneic boot commands
- append the console line automatically again
* Fri Oct 24 2014 Dennis Gilmore <dennis@ausil.us> - 2014.10-3 * Fri Oct 24 2014 Dennis Gilmore <dennis@ausil.us> - 2014.10-3
- scan both the first and second partitions for boot configs on beaglebone - scan both the first and second partitions for boot configs on beaglebone