[uboot-tools/f21] port panda board to upstreamed geneic boot commands

Dennis Gilmore ausil at fedoraproject.org
Tue Oct 28 02:48:10 UTC 2014


commit 64a5c151605e1173e0da57990d11a3166da8a74a
Author: Dennis Gilmore <dennis at ausil.us>
Date:   Mon Oct 27 21:47:17 2014 -0500

    port panda board to upstreamed geneic boot commands
    
    - append the console line automatically again

 ...sure-that-the-filesystem-is-a-type-of-fat.patch |    2 +-
 ...ing-in-multiple-partitions-for-scan_dev_f.patch |    2 +-
 ...iding-boot_partitions-default-value-by-se.patch |    2 +-
 ..._INIT_COMMAND-for-commands-that-may-be-ne.patch |    2 +-
 ..._POST_COMMAND-which-is-appended-to-the-en.patch |    2 +-
 ...y-set-CONFIG_BOOTDELAY-if-not-already-set.patch |    2 +-
 ...-for-loading-environment-from-uEnv.txt-in.patch |    2 +-
 ...5x_evm.h-to-use-config_distro_defaults-an.patch |    6 +-
 ...-wandboard-port-to-generic-distro-booting.patch |    4 +-
 ...otboard-to-distro-generic-configs-patch-b.patch |    4 +-
 ...t-utilite-to-distro-generic-boot-commands.patch |    4 +-
 ...4-boards-to-use-config_distro_defaults-an.patch |   90 ++++++++++++++++++++
 ...ding-console-to-the-bootargs-if-not-prese.patch |   57 ++++++++++++
 uboot-tools.spec                                   |   10 ++-
 14 files changed, 172 insertions(+), 17 deletions(-)
---
diff --git a/0001-make-sure-that-the-filesystem-is-a-type-of-fat.patch b/0001-make-sure-that-the-filesystem-is-a-type-of-fat.patch
index 6ef322f..f691551 100644
--- a/0001-make-sure-that-the-filesystem-is-a-type-of-fat.patch
+++ b/0001-make-sure-that-the-filesystem-is-a-type-of-fat.patch
@@ -1,7 +1,7 @@
 From 43a31dc85859cef2bc0b24ff2516d6fb069f4eec Mon Sep 17 00:00:00 2001
 From: Dennis Gilmore <dennis at ausil.us>
 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
 filesystem on it.
diff --git a/0002-Allow-checking-in-multiple-partitions-for-scan_dev_f.patch b/0002-Allow-checking-in-multiple-partitions-for-scan_dev_f.patch
index 0a0ec47..8a66dd3 100644
--- a/0002-Allow-checking-in-multiple-partitions-for-scan_dev_f.patch
+++ b/0002-Allow-checking-in-multiple-partitions-for-scan_dev_f.patch
@@ -1,7 +1,7 @@
 From 2ca45b547dedc76f403ed25405ddf9b69afa07a6 Mon Sep 17 00:00:00 2001
 From: Vagrant Cascadian <vagrant at debian.org>
 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.
 
 ---
diff --git a/0003-Allow-overriding-boot_partitions-default-value-by-se.patch b/0003-Allow-overriding-boot_partitions-default-value-by-se.patch
index 2f8f96e..c58aaf6 100644
--- a/0003-Allow-overriding-boot_partitions-default-value-by-se.patch
+++ b/0003-Allow-overriding-boot_partitions-default-value-by-se.patch
@@ -1,7 +1,7 @@
 From 1f21a89342cf8897aa140a75fe4302908baf2431 Mon Sep 17 00:00:00 2001
 From: Vagrant Cascadian <vagrant at debian.org>
 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.
 
 ---
diff --git a/0004-Add-BOOTENV_INIT_COMMAND-for-commands-that-may-be-ne.patch b/0004-Add-BOOTENV_INIT_COMMAND-for-commands-that-may-be-ne.patch
index 20503c1..55a0688 100644
--- a/0004-Add-BOOTENV_INIT_COMMAND-for-commands-that-may-be-ne.patch
+++ b/0004-Add-BOOTENV_INIT_COMMAND-for-commands-that-may-be-ne.patch
@@ -1,7 +1,7 @@
 From 8ecd007b88f92de2e5c585f434d3dcffdfe6ee7e Mon Sep 17 00:00:00 2001
 From: Vagrant Cascadian <vagrant at debian.org>
 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
  platfroms that detect on boot.
 
diff --git a/0005-Add-BOOTENV_POST_COMMAND-which-is-appended-to-the-en.patch b/0005-Add-BOOTENV_POST_COMMAND-which-is-appended-to-the-en.patch
index 5d29040..0a7e8e5 100644
--- a/0005-Add-BOOTENV_POST_COMMAND-which-is-appended-to-the-en.patch
+++ b/0005-Add-BOOTENV_POST_COMMAND-which-is-appended-to-the-en.patch
@@ -1,7 +1,7 @@
 From 92f36f70d6df4ce4024e8b0b9e88dc9b8b055e31 Mon Sep 17 00:00:00 2001
 From: Vagrant Cascadian <vagrant at debian.org>
 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.
 
 ---
diff --git a/0006-Only-set-CONFIG_BOOTDELAY-if-not-already-set.patch b/0006-Only-set-CONFIG_BOOTDELAY-if-not-already-set.patch
index b132835..26a52d5 100644
--- a/0006-Only-set-CONFIG_BOOTDELAY-if-not-already-set.patch
+++ b/0006-Only-set-CONFIG_BOOTDELAY-if-not-already-set.patch
@@ -1,7 +1,7 @@
 From d4ec2d9e7134d8deb403f82577b04c63e724ab08 Mon Sep 17 00:00:00 2001
 From: Vagrant Cascadian <vagrant at debian.org>
 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 ++
diff --git a/0007-Add-support-for-loading-environment-from-uEnv.txt-in.patch b/0007-Add-support-for-loading-environment-from-uEnv.txt-in.patch
index 2d37059..b1c90a8 100644
--- a/0007-Add-support-for-loading-environment-from-uEnv.txt-in.patch
+++ b/0007-Add-support-for-loading-environment-from-uEnv.txt-in.patch
@@ -1,7 +1,7 @@
 From e35f16a3b1d651e2ce0b07ec67572f55fafff092 Mon Sep 17 00:00:00 2001
 From: Vagrant Cascadian <vagrant at debian.org>
 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.
 
 ---
diff --git a/0008-Switch-am335x_evm.h-to-use-config_distro_defaults-an.patch b/0008-Switch-am335x_evm.h-to-use-config_distro_defaults-an.patch
index 50093e3..44c4d12 100644
--- a/0008-Switch-am335x_evm.h-to-use-config_distro_defaults-an.patch
+++ b/0008-Switch-am335x_evm.h-to-use-config_distro_defaults-an.patch
@@ -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 at debian.org>
 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
  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(-)
 
 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
 +++ b/include/configs/am335x_evm.h
 @@ -18,6 +18,21 @@
diff --git a/0009-wandboard-port-to-generic-distro-booting.patch b/0009-wandboard-port-to-generic-distro-booting.patch
index c380dc7..c822ead 100644
--- a/0009-wandboard-port-to-generic-distro-booting.patch
+++ b/0009-wandboard-port-to-generic-distro-booting.patch
@@ -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 at ausil.us>
 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.
 ---
diff --git a/0010-port-the-riotboard-to-distro-generic-configs-patch-b.patch b/0010-port-the-riotboard-to-distro-generic-configs-patch-b.patch
index 2202ba0..3d26385 100644
--- a/0010-port-the-riotboard-to-distro-generic-configs-patch-b.patch
+++ b/0010-port-the-riotboard-to-distro-generic-configs-patch-b.patch
@@ -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 at ausil.us>
 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
 
 ---
diff --git a/0011-port-utilite-to-distro-generic-boot-commands.patch b/0011-port-utilite-to-distro-generic-boot-commands.patch
index dbdd209..fc793e0 100644
--- a/0011-port-utilite-to-distro-generic-boot-commands.patch
+++ b/0011-port-utilite-to-distro-generic-boot-commands.patch
@@ -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 at ausil.us>
 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 +++++++++++------------------------------------
diff --git a/0012-Switch-omap4-boards-to-use-config_distro_defaults-an.patch b/0012-Switch-omap4-boards-to-use-config_distro_defaults-an.patch
new file mode 100644
index 0000000..ac5ec3b
--- /dev/null
+++ b/0012-Switch-omap4-boards-to-use-config_distro_defaults-an.patch
@@ -0,0 +1,90 @@
+From 7624d0d511378fc8149703050aec2d78ce4217e1 Mon Sep 17 00:00:00 2001
+From: Dennis Gilmore <dennis at 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
+
diff --git a/0013-add-back-adding-console-to-the-bootargs-if-not-prese.patch b/0013-add-back-adding-console-to-the-bootargs-if-not-prese.patch
new file mode 100644
index 0000000..3263b04
--- /dev/null
+++ b/0013-add-back-adding-console-to-the-bootargs-if-not-prese.patch
@@ -0,0 +1,57 @@
+From 19ce73f64ee92451cf28e8ebfa76eacb2f3fd50d Mon Sep 17 00:00:00 2001
+From: Dennis Gilmore <dennis at 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
+
diff --git a/uboot-tools.spec b/uboot-tools.spec
index edc98c2..7ac04b3 100644
--- a/uboot-tools.spec
+++ b/uboot-tools.spec
@@ -2,7 +2,7 @@
 
 Name:           uboot-tools
 Version:        2014.10
-Release:        3%{?candidate:.%{candidate}}%{?dist}
+Release:        4%{?candidate:.%{candidate}}%{?dist}
 Summary:        U-Boot utilities
 
 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
 Patch13: 0011-port-utilite-to-distro-generic-boot-commands.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:  fedora-logos, netpbm-progs
@@ -95,6 +97,8 @@ git am %{patches} </dev/null
 git config --unset user.email 
 git config --unset user.name 
 
+rm -rf .git
+
 mkdir builds
 # convert fedora logo to bmp for use in u-boot
 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
 
 %changelog
+* Mon Oct 27 2014 Dennis Gilmore <dennis at 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 at ausil.us> - 2014.10-3
 - scan both the first and second partitions for boot configs on beaglebone
 


More information about the scm-commits mailing list