config_distro_bootcmd.h: Prefer booting from bootable paritions
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Wed, 25 Feb 2015 22:23:52 +0000 (23:23 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 25 Mar 2015 16:15:18 +0000 (12:15 -0400)
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@collabora.co.uk>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
include/config_distro_bootcmd.h

index 73f093f..d71e58d 100644 (file)
                "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 "               \