[U-Boot] [PATCH 3/3] config_distro_bootcmd.h: Prefer booting from bootable paritions

Sjoerd Simons sjoerd.simons at collabora.co.uk
Thu Feb 19 21:53:41 CET 2015


List bootable partitions and only scan those for bootable files, falling
back to partition 1 if there are no bootable partitions

Signed-off-by: Sjoerd Simons <sjoerd.simons at collabora.co.uk>
---
 include/config_distro_bootcmd.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index 07a0b3b..ad2dda1 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -197,7 +197,8 @@
 		"done\0"                                                  \
 	\
 	"scan_dev_for_boot_part="                                         \
-		"part list ${devtype} ${devnum} devplist; "               \
+		"part list ${devtype} ${devnum} -bootable devplist; "     \
+		"env exists devplist || setenv devplist 1; "              \
 		"for bootpart in ${devplist}; do "                        \
 			"if fstype ${devtype} ${devnum}:${bootpart} "     \
 					"bootfstype; then "               \
-- 
2.1.4



More information about the U-Boot mailing list