Skip to contentSkip to conversation

Switch am335x_evm.h based boards to use config_distro_bootcmd.

RFC PATCH New Vagrant Cascadian 4 participants 14 messages Oct 3, 2014 – Oct 27, 2014

lore
Share & tools
lore
#0 lore raw

cover Switch am335x_evm.h based boards to use config_distro_bootcmd.

In order to not change behavior significantly, several changes to config_distro_bootcmd were added to make it more flexible, and am335x_evm.h was adapted to make use of them:

- Allow multiple partitions per device, rather than only searching on partition 1. Make the number of partitions configurable.

- Added BOOTENV_INIT_COMMAND and BOOTENV_POST_COMMAND as definitions for commands that need to be run before or after the standard "bootcmd".

- Added support for importing uEnv.txt files to
config_distro_bootcmd.h.

 include/config_distro_bootcmd.h   | 53 ++++++++++++++++++++++++++++++++++++++++++++++-------
 include/config_distro_defaults.h  |  2 ++
 include/configs/am335x_evm.h      | 26 +++++++++++++++++---------
 include/configs/ti_armv7_common.h |  1 +
 4 files changed, 66 insertions(+), 16 deletions(-)

Vagrant Cascadian (7):
Allow checking in multiple partitions for scan_dev_for_boot. Allow overriding boot_partitions default value by setting
BOOTENV_BOOT_PARTITIONS before including config_distro_bootcmd.
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.
Add BOOTENV_POST_COMMAND, which is appended to the end of bootcmd. Only set CONFIG_BOOTDELAY if not already set.
Add support for loading environment from uEnv.txt in
config_distro_bootcmd.
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_bootcmd.

 include/config_distro_bootcmd.h   | 53 +++++++++++++++++++++++++++++++++------
 include/config_distro_defaults.h  |  2 ++
 include/configs/am335x_evm.h      | 26 ++++++++++++-------
 include/configs/ti_armv7_common.h |  1 +
 4 files changed, 66 insertions(+), 16 deletions(-)
Signature · 1 line
2.1.0
#1 lore raw

RFC 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(-)
include/config_distro_bootcmd.h +8 -5
index be616e8..5e5e5e3 100644
@@ -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)                                  \
Signature · 1 line
2.1.0
#2 lore raw

RFC PATCH 1/7 Allow checking in multiple partitions for scan_dev_for_boot.

On 10/03/2014 03:08 PM, Vagrant Cascadian wrote:

Some standalone description of this change, and justification for it, should really be present in the commit message. Patch 0/7 doesn't get applied anywhere.

include/config_distro_bootcmd.h line 166

Quoted 4 lines
include/config_distro_bootcmd.h +1 -1
 
-	"bootpart=1\0" \
+	"boot_partitions=1\0" \

Instead of searching a hard-coded list of partitions, I think it'd be better to have the script automatically determine which partition to boot from based on the partition tables' bootable flag or partition type. I had always intended these scripts to do that, but never got around to doing it. I think the $dev:$part syntax already chooses the first partition marked bootable if you don't specify a partition. Would that work?

#3 lore raw

RFC PATCH 1/7 Allow checking in multiple partitions for scan_dev_for_boot.

Thanks for the review!

Quoted 5 lines · Stephen Warren

On 10/03/2014 03:08 PM, Vagrant Cascadian wrote:

Some standalone description of this change, and justification for it, should really be present in the commit message. Patch 0/7 doesn't get applied anywhere.

Of course; that was a consequence of learning how patman/git-send-email work... trial by fire... I'll use more verbose commit messages in the future.

Quoted 12 lines

include/config_distro_bootcmd.h line 166

Quoted 4 lines
include/config_distro_bootcmd.h +1 -1
 
-	"bootpart=1\0" \
+	"boot_partitions=1\0" \

Instead of searching a hard-coded list of partitions, I think it'd be better to have the script automatically determine which partition to boot from based on the partition tables' bootable flag or partition type. I had always intended these scripts to do that, but never got around to doing it. I think the $dev:$part syntax already chooses the first partition marked bootable if you don't specify a partition. Would that work?

I suspect that might work. I merely went with the simplest approach to extend what was already there, by supporting an arbitrary number of partitions to search, and leaving the defaults as is.

The BeagleBone Black board ships with various boot files on the first FAT partition, but newer images available for it moved boot files (kernel/initrd/dtb/uEnv.txt) onto the second (ext4?) partition, as the FAT partition is exported as a multifunction device over USB... So ideally u-boot could support multiple partitions to search, to support multiple generations of images without having to manually configure u-boot.

live well,
vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141006/e638dc33/attachment.pgp>

#4 lore raw

RFC PATCH 2/7 Allow overriding boot_partitions default value by setting BOOTENV_BOOT_PARTITIONS before including config_distro_bootcmd.

In reply to Vagrant Cascadian

---

 include/config_distro_bootcmd.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
include/config_distro_bootcmd.h +5 -1
index 5e5e5e3..a93354a 100644
@@ -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 "           \
Signature · 1 line
2.1.0
#5 lore raw

RFC 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.

In reply to Vagrant Cascadian

---

 include/config_distro_bootcmd.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
include/config_distro_bootcmd.h +6 -1
index a93354a..515a2f9 100644
@@ -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"
Signature · 1 line
2.1.0
#6 lore raw

RFC PATCH 4/7 Add BOOTENV_POST_COMMAND, which is appended to the end of bootcmd.

In reply to Vagrant Cascadian

---

 include/config_distro_bootcmd.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
include/config_distro_bootcmd.h +7 -1
index 515a2f9..2503431 100644
@@ -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 */
Signature · 1 line
2.1.0
#7 lore raw

RFC PATCH 5/7 Only set CONFIG_BOOTDELAY if not already set.

In reply to Vagrant Cascadian

---

 include/config_distro_defaults.h | 2 ++
 1 file changed, 2 insertions(+)
include/config_distro_defaults.h +2 -0
index 5d18a4b..fc67c42 100644
@@ -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
Signature · 1 line
2.1.0
#8 lore raw

RFC PATCH 6/7 Add support for loading environment from uEnv.txt in config_distro_bootcmd.

In reply to Vagrant Cascadian

---

 include/config_distro_bootcmd.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
include/config_distro_bootcmd.h +21 -0
index 2503431..aaa010e 100644
@@ -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"                                                  \
 	\
Signature · 1 line
2.1.0
#9 lore raw

RFC PATCH 6/7 Add support for loading environment from uEnv.txt in config_distro_bootcmd.

include/config_distro_bootcmd.h line 236

Quoted 7 lines · Vagrant Cascadian
include/config_distro_bootcmd.h +1 -0
 
 			"for prefix in ${boot_prefixes}; do "             \
 				"run scan_dev_for_extlinux; "             \
 				"run scan_dev_for_scripts; "              \
+				"run scan_dev_for_uenv_files; "           \
 			"done;"                                           \

I've always thought of uEnv.txt being stored in a single hard-coded location, and used to set e.g. $boot_targets to influence which locations get searched for boot files. However, this patch appears to use it to house actual boot command sequences.

In other words, I intended:

* (Optionally, and preferably via CONFIG_PREBOOT) load uEnv.txt from a hard-coded location.
* Search a list of locations for boot files, of type extlinux.conf (or for legacy reasons, boot .scr)

However, this patch now allows:

* Search a list of locations for boot files, of type extlinux.conf, or for legacy reasons, boot .scr, or uEnv.txt

I don't think that's something we should encourage in config_distro_bootcmd.h; the entire point of this header file is to define a single way (extlinux.conf) for distros to define the available boot options. Yes unfortunately we have boot.scr too as a legacy option, but perhaps someday we can drop that. If we grow more options (allowing boot scripts in uEnv.txt) that removes the standardization.

If we absolutely have to support uEnv.txt for legacy reasons on some platforms, we should at least make it optional so that we don't add support for it to all the other platforms that don't want to pick up legacy stuff. Perhaps we should "run scan_dev_hook" and allow boards to define arbitrary stuff there, so there's no mention at all of uEnv.txt in config_distro_bootcmd.h.

#10 lore raw

RFC PATCH 6/7 Add support for loading environment from uEnv.txt in config_distro_bootcmd.

Quoted 4 lines · Stephen Warren
Quoted 1 line · Vagrant Cascadian
include/config_distro_bootcmd.h +0 -0
Quoted 10 lines

include/config_distro_bootcmd.h line 236

Quoted 5 lines
include/config_distro_bootcmd.h +1 -0
 			"for prefix in ${boot_prefixes}; do "             \
 				"run scan_dev_for_extlinux; "             \
 				"run scan_dev_for_scripts; "              \
+				"run scan_dev_for_uenv_files; "           \
 			"done;"                                           \

I've always thought of uEnv.txt being stored in a single hard-coded location, and used to set e.g. $boot_targets to influence which locations get searched for boot files. However, this patch appears to use it to house actual boot command sequences.

I took the behavior of the am335x_evm.h based boards and tryed to generalize it. If that's not desired, then allowing for some hook to maintain backwards compatibility for those boards would be nice to make it feasible for boards to migrate to config_distro_bootcmd without breaking backwards compatibility.

Quoted 12 lines

In other words, I intended:

* (Optionally, and preferably via CONFIG_PREBOOT) load uEnv.txt from a hard-coded location.
* Search a list of locations for boot files, of type extlinux.conf (or for legacy reasons, boot .scr)

However, this patch now allows:

* Search a list of locations for boot files, of type extlinux.conf, or for legacy reasons, boot .scr, or uEnv.txt

Quoted 6 lines

I don't think that's something we should encourage in config_distro_bootcmd.h; the entire point of this header file is to define a single way (extlinux.conf) for distros to define the available boot options. Yes unfortunately we have boot.scr too as a legacy option, but perhaps someday we can drop that. If we grow more options (allowing boot scripts in uEnv.txt) that removes the standardization.

Sure.

Quoted 6 lines

If we absolutely have to support uEnv.txt for legacy reasons on some platforms, we should at least make it optional so that we don't add support for it to all the other platforms that don't want to pick up legacy stuff. Perhaps we should "run scan_dev_hook" and allow boards to define arbitrary stuff there, so there's no mention at all of uEnv.txt in config_distro_bootcmd.h.

Sounds reasonable. It might be desireable to have multiple hook locations, to be able to run before or after various points. Some of the other patches in this series implement generic hooks to be run as part of "bootcmd". Obviously, there's a balance to be struck not putting too many hooks in.

Thanks for the review and comments!

live well,
vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141006/30e9fac7/attachment.pgp>

#11 lore raw

RFC 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_bootcmd.

In reply to Vagrant Cascadian

---

 include/configs/am335x_evm.h      | 26 +++++++++++++++++---------
 include/configs/ti_armv7_common.h |  1 +
 2 files changed, 18 insertions(+), 9 deletions(-)
include/configs/am335x_evm.h +17 -9
index e2f7ead..b25d990 100644
@@ -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 */
include/configs/ti_armv7_common.h +1 -0
index 85171db..f405fea 100644
@@ -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" \
Signature · 1 line
2.1.0
#12 lore raw

RFC 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_bootcmd.

Quoted 12 lines · On Fri, 3 Oct 2014 15:08:43 -0700 Vagrant Cascadian <[email protected]> wrote:

---

 include/configs/am335x_evm.h      | 26 +++++++++++++++++---------
 include/configs/ti_armv7_common.h |  1 +
 2 files changed, 18 insertions(+), 9 deletions(-)
(quoted diff) +0 -0

b/include/configs/am335x_evm.h index e2f7ead..b25d990 100644

include/configs/am335x_evm.h line 23

Quoted 6 lines
include/configs/am335x_evm.h +3 -0
@@ -18,6 +18,21 @@
 
 #include <configs/ti_am335x_common.h>
 
+#include <config_distro_defaults.h>
+
+#define BOOTENV_BOOT_PARTITIONS "2"

On Fedora we use partition 1 everywhere for /boot so this should be "1 2" though partition 2 is swap in out standard images. we really need to read the partition table and find the bootable partition.

We are defaulting to telling people to put u-boot and the MLO in raw disk space.

Quoted 47 lines
include/configs/am335x_evm.h +14 -9
+
+#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 \

include/configs/am335x_evm.h +1 -0
 	"loadaddr=0x82000000\0" \
 	"kernel_addr_r=0x82000000\0" \
+	"scriptaddr=0x82000000\0" \
 	"fdtaddr=0x88000000\0" \
 	"fdt_addr_r=0x88000000\0" \
 	"rdaddr=0x88080000\0" \
#13 lore raw

RFC 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_bootcmd.

Quoted 18 lines · Dennis Gilmore
Quoted 15 lines · On Fri, 3 Oct 2014 15:08:43 -0700 Vagrant Cascadian <[email protected]> wrote:

---

 include/configs/am335x_evm.h      | 26 +++++++++++++++++---------
 include/configs/ti_armv7_common.h |  1 +
 2 files changed, 18 insertions(+), 9 deletions(-)
(quoted diff) +0 -0

b/include/configs/am335x_evm.h index e2f7ead..b25d990 100644

include/configs/am335x_evm.h +0 -0
@@ -18,6 +18,21 @@
 
 #include <configs/ti_am335x_common.h>
 
Quoted 7 lines

include/configs/am335x_evm.h line 23

Quoted 3 lines
include/configs/am335x_evm.h +3 -0
+#include <config_distro_defaults.h>
+
+#define BOOTENV_BOOT_PARTITIONS "2"

On Fedora we use partition 1 everywhere for /boot so this should be "1 2" though partition 2 is swap in out standard images. we really need to read the partition table and find the bootable partition.

u-boot already supports looking for the (1st) bootable partition. Giving "<dev>:-" for commands will do that. I think that only works for DOS partititons, so we need to do something different for GPT partitions like looking for a certain UUID.

Quoted 2 lines

We are defaulting to telling people to put u-boot and the MLO in raw disk space.

Really? I'd think we'd want this to be a raw partition at least to be discoverable in some way. What the SOC ROM codes require is probably all over the map, so we can really only define what we would like to see.

Rob