Update to 2014.10 rc3, Add proposed distro patches from Debian, Add BBone with distro support

This commit is contained in:
Peter Robinson 2014-10-08 16:35:09 +01:00
parent 2f89fe5a6e
commit 4b8ad3fef7
9 changed files with 349 additions and 8 deletions

View File

@ -0,0 +1,44 @@
From a28aee469dd0c3efb5407295d8d7d792327236e4 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Wed, 1 Oct 2014 13:20:53 -0700
Subject: [PATCH 1/7] Allow checking in multiple partitions for
scan_dev_for_boot.
---
include/config_distro_bootcmd.h | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index be616e8..5e5e5e3 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -163,7 +163,7 @@
"boot_prefixes=/ /boot/\0" \
"boot_scripts=boot.scr.uimg boot.scr\0" \
BOOTENV_BOOT_TARGETS \
- "bootpart=1\0" \
+ "boot_partitions=1\0" \
\
"boot_extlinux=" \
"sysboot ${devtype} ${devnum}:${bootpart} any " \
@@ -194,10 +194,13 @@
"done\0" \
\
"scan_dev_for_boot=" \
- "echo Scanning ${devtype} ${devnum}...; " \
- "for prefix in ${boot_prefixes}; do " \
- "run scan_dev_for_extlinux; " \
- "run scan_dev_for_scripts; " \
+ "for partition in ${boot_partitions}; do " \
+ "echo Scanning ${devtype} ${devnum}:${partition}...; " \
+ "setenv bootpart ${partition};" \
+ "for prefix in ${boot_prefixes}; do " \
+ "run scan_dev_for_extlinux; " \
+ "run scan_dev_for_scripts; " \
+ "done;" \
"done\0" \
\
BOOT_TARGET_DEVICES(BOOTENV_DEV) \
--
2.1.0

View File

@ -0,0 +1,37 @@
From 63067bd8536deefd1017992954538721c92ab794 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Wed, 1 Oct 2014 12:55:58 -0700
Subject: [PATCH 2/7] Allow overriding boot_partitions default value by setting
BOOTENV_BOOT_PARTITIONS before including config_distro_bootcmd.
---
include/config_distro_bootcmd.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index 5e5e5e3..a93354a 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -152,6 +152,10 @@
#define BOOTENV_BOOT_TARGETS \
"boot_targets=" BOOT_TARGET_DEVICES(BOOTENV_DEV_NAME) "\0"
+#ifndef BOOTENV_BOOT_PARTITIONS
+#define BOOTENV_BOOT_PARTITIONS "1"
+#endif
+
#define BOOTENV_DEV(devtypeu, devtypel, instance) \
BOOTENV_DEV_##devtypeu(devtypeu, devtypel, instance)
#define BOOTENV \
@@ -163,7 +167,7 @@
"boot_prefixes=/ /boot/\0" \
"boot_scripts=boot.scr.uimg boot.scr\0" \
BOOTENV_BOOT_TARGETS \
- "boot_partitions=1\0" \
+ "boot_partitions="BOOTENV_BOOT_PARTITIONS"\0" \
\
"boot_extlinux=" \
"sysboot ${devtype} ${devnum}:${bootpart} any " \
--
2.1.0

View File

@ -0,0 +1,39 @@
From dfc773d1d2f33dbfbf6c75d001f5f0be371db795 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Tue, 30 Sep 2014 20:02:26 -0700
Subject: [PATCH 3/7] 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.
---
include/config_distro_bootcmd.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index a93354a..515a2f9 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -156,6 +156,10 @@
#define BOOTENV_BOOT_PARTITIONS "1"
#endif
+#ifndef BOOTENV_INIT_COMMAND
+#define BOOTENV_INIT_COMMAND
+#endif
+
#define BOOTENV_DEV(devtypeu, devtypel, instance) \
BOOTENV_DEV_##devtypeu(devtypeu, devtypel, instance)
#define BOOTENV \
@@ -209,7 +213,8 @@
\
BOOT_TARGET_DEVICES(BOOTENV_DEV) \
\
- "bootcmd=" BOOTENV_SET_USB_NEED_INIT BOOTENV_SET_SCSI_NEED_INIT \
+ "bootcmd=" BOOTENV_INIT_COMMAND \
+ BOOTENV_SET_USB_NEED_INIT BOOTENV_SET_SCSI_NEED_INIT \
"for target in ${boot_targets}; do " \
"run bootcmd_${target}; " \
"done\0"
--
2.1.0

View File

@ -0,0 +1,38 @@
From 310ce4053e0d32eb8b8d0ab6490c2c8924951884 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Wed, 1 Oct 2014 14:04:01 -0700
Subject: [PATCH 4/7] Add BOOTENV_POST_COMMAND, which is appended to the end of
bootcmd.
---
include/config_distro_bootcmd.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index 515a2f9..2503431 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -160,6 +160,10 @@
#define BOOTENV_INIT_COMMAND
#endif
+#ifndef BOOTENV_POST_COMMAND
+#define BOOTENV_POST_COMMAND
+#endif
+
#define BOOTENV_DEV(devtypeu, devtypel, instance) \
BOOTENV_DEV_##devtypeu(devtypeu, devtypel, instance)
#define BOOTENV \
@@ -217,6 +221,8 @@
BOOTENV_SET_USB_NEED_INIT BOOTENV_SET_SCSI_NEED_INIT \
"for target in ${boot_targets}; do " \
"run bootcmd_${target}; " \
- "done\0"
+ "done;" \
+ BOOTENV_POST_COMMAND \
+ "\0"
#endif /* _CONFIG_CMD_DISTRO_BOOTCMD_H */
--
2.1.0

View File

@ -0,0 +1,26 @@
From 6a683c290cd95de0bc1a77f2291a4ab2e82ceeb3 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Tue, 30 Sep 2014 20:34:19 -0700
Subject: [PATCH 5/7] Only set CONFIG_BOOTDELAY if not already set.
---
include/config_distro_defaults.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/config_distro_defaults.h b/include/config_distro_defaults.h
index 5d18a4b..fc67c42 100644
--- a/include/config_distro_defaults.h
+++ b/include/config_distro_defaults.h
@@ -45,7 +45,9 @@
#define CONFIG_CMDLINE_EDITING
#define CONFIG_AUTO_COMPLETE
+#ifndef CONFIG_BOOTDELAY
#define CONFIG_BOOTDELAY 2
+#endif
#define CONFIG_SYS_LONGHELP
#define CONFIG_MENU
#define CONFIG_DOS_PARTITION
--
2.1.0

View File

@ -0,0 +1,59 @@
From 38339ff8554ca8b70c87d6939aeea86f4960a6ee Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Wed, 1 Oct 2014 10:29:36 -0700
Subject: [PATCH 6/7] Add support for loading environment from uEnv.txt in
config_distro_bootcmd.
---
include/config_distro_bootcmd.h | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index 2503431..aaa010e 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -174,6 +174,7 @@
BOOTENV_SHARED_IDE \
"boot_prefixes=/ /boot/\0" \
"boot_scripts=boot.scr.uimg boot.scr\0" \
+ "boot_uenv_files=uEnv.txt\0" \
BOOTENV_BOOT_TARGETS \
"boot_partitions="BOOTENV_BOOT_PARTITIONS"\0" \
\
@@ -205,6 +206,25 @@
"fi; " \
"done\0" \
\
+ "import_uenv_file=" \
+ "load ${devtype} ${devnum}:${bootpart} " \
+ "${scriptaddr} ${prefix}${uenv_file}; " \
+ "env import -t -r ${scriptaddr} ${filesize}\0; " \
+ "if test -n $uenvcmd; then " \
+ "echo Running uenvcmd ...;" \
+ "run uenvcmd;" \
+ "fi;\0" \
+ \
+ "scan_dev_for_uenv_files=" \
+ "for uenv_file in ${boot_uenv_files}; do " \
+ "if test -e ${devtype} ${devnum}:${bootpart} " \
+ "${prefix}${uenv_file}; then " \
+ "echo Found U-boot env file" \
+ "${prefix}${uenv_file}; " \
+ "run import_uenv_file; " \
+ "fi; " \
+ "done\0" \
+ \
"scan_dev_for_boot=" \
"for partition in ${boot_partitions}; do " \
"echo Scanning ${devtype} ${devnum}:${partition}...; " \
@@ -212,6 +232,7 @@
"for prefix in ${boot_prefixes}; do " \
"run scan_dev_for_extlinux; " \
"run scan_dev_for_scripts; " \
+ "run scan_dev_for_uenv_files; " \
"done;" \
"done\0" \
\
--
2.1.0

View File

@ -0,0 +1,73 @@
From 7ae64b5379a6fd1f3bf46df308c4b753c7357a6c Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Wed, 1 Oct 2014 13:28:18 -0700
Subject: [PATCH 7/7] 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.
---
include/configs/am335x_evm.h | 26 +++++++++++++++++---------
include/configs/ti_armv7_common.h | 1 +
2 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index e2f7ead..b25d990 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -18,6 +18,21 @@
#include <configs/ti_am335x_common.h>
+#include <config_distro_defaults.h>
+
+#define BOOTENV_BOOT_PARTITIONS "2"
+
+#define BOOTENV_INIT_COMMAND "run findfdt ;"
+#ifdef CONFIG_NAND
+#define BOOTENV_POST_COMMAND "run nandboot ;"
+#endif
+
+#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 0) \
+ func(MMC, mmc, 1)
+
+#include <config_distro_bootcmd.h>
+
#ifndef CONFIG_SPL_BUILD
# define CONFIG_FIT
# define CONFIG_TIMESTAMP
@@ -185,17 +200,10 @@
"if test $fdtfile = undefined; then " \
"echo WARNING: Could not determine device tree to use; fi; \0" \
NANDARGS \
- DFUARGS
+ DFUARGS \
+ BOOTENV
#endif
-#define CONFIG_BOOTCOMMAND \
- "run findfdt; " \
- "run mmcboot;" \
- "setenv mmcdev 1; " \
- "setenv bootpart 1:2; " \
- "run mmcboot;" \
- "run nandboot;"
-
/* NS16550 Configuration */
#define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
#define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index 85171db..f405fea 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -54,6 +54,7 @@
#define DEFAULT_LINUX_BOOT_ENV \
"loadaddr=0x82000000\0" \
"kernel_addr_r=0x82000000\0" \
+ "scriptaddr=0x82000000\0" \
"fdtaddr=0x88000000\0" \
"fdt_addr_r=0x88000000\0" \
"rdaddr=0x88080000\0" \
--
2.1.0

View File

@ -1 +1 @@
51d0986874b72b0cb075368b0b2689e7 u-boot-2014.10-rc2.tar.bz2
4f174648568bd1ec60a7f203c37f8759 u-boot-2014.10-rc3.tar.bz2

View File

@ -1,4 +1,4 @@
%global candidate rc2
%global candidate rc3
Name: uboot-tools
Version: 2014.10
@ -12,10 +12,21 @@ Source0: ftp://ftp.denx.de/pub/u-boot/u-boot-%{version}%{?candidate:-%{ca
Source1: uEnv.txt
Patch1: u-boot-fat.patch
Patch10: 0001-wandboard-port-to-generic-distro-booting.patch
Patch11: riotboard-port-to-generic-distro-booting.patch
# Debian proposed improvements to distro defaults
# http://lists.denx.de/pipermail/u-boot/2014-October/190627.html
Patch11: 0001-Allow-checking-in-multiple-partitions-for-scan_dev_f.patch
Patch12: 0002-Allow-overriding-boot_partitions-default-value-by-se.patch
Patch13: 0003-Add-BOOTENV_INIT_COMMAND-for-commands-that-may-be-ne.patch
Patch14: 0004-Add-BOOTENV_POST_COMMAND-which-is-appended-to-the-en.patch
Patch15: 0005-Only-set-CONFIG_BOOTDELAY-if-not-already-set.patch
Patch16: 0006-Add-support-for-loading-environment-from-uEnv.txt-in.patch
Patch17: 0007-Switch-am335x_evm.h-to-use-config_distro_defaults-an.patch
# Fedora patches for distro defaults support
Patch20: 0001-wandboard-port-to-generic-distro-booting.patch
Patch21: riotboard-port-to-generic-distro-booting.patch
# Bug fixes
# http://lists.denx.de/pipermail/u-boot/2014-September/190052.html
Patch12: sun7i-bananapi-fixGmac.patch
Patch30: sun7i-bananapi-fixGmac.patch
BuildRequires: dtc, openssl-devel
BuildRequires: fedora-logos, netpbm-progs
@ -79,9 +90,18 @@ u-boot bootloader binaries for armv7 boards
%setup -q -n u-boot-%{version}%{?candidate:-%{candidate}}
%patch1 -p1
%patch10 -p1 -b .wand
%patch11 -p1 -b .riot
%patch12 -p1 -b .BPgmac
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch20 -p1 -b .wand
%patch21 -p1 -b .riot
%patch30 -p1 -b .BPgmac
mkdir builds
# convert fedora logo to bmp for use in u-boot
@ -475,6 +495,11 @@ install -p -m 0644 tools/env/fw_env.config $RPM_BUILD_ROOT%{_sysconfdir}
%endif
%changelog
* Wed Oct 8 2014 Peter Robinson <pbrobinson@fedoraproject.org> 2014.10-0.6.rc3
- Update to 2014.10 rc3
- Add proposed distro patches from Debian
- Add BBone with distro support
* Fri Oct 3 2014 Peter Robinson <pbrobinson@fedoraproject.org> 2014.10-0.5.rc2
- Enable some more AllWinner devices