stand: uboot: Do not panic if we can't find a boot device

It is really anoying to panic when there is no boot device as you
cannot see the availables ones.
This commit is contained in:
manu 2018-07-02 18:23:43 +00:00
parent 1548e64fc6
commit d191c118a7

View File

@ -444,8 +444,10 @@ main(int argc, char **argv)
/*
* Enumerate U-Boot devices
*/
if ((devs_no = ub_dev_enum()) == 0)
panic("no U-Boot devices found");
if ((devs_no = ub_dev_enum()) == 0) {
printf("no U-Boot devices found");
goto do_interact;
}
printf("Number of U-Boot devices: %d\n", devs_no);
get_load_device(&load_type, &load_unit, &load_slice, &load_partition);
@ -492,6 +494,7 @@ main(int argc, char **argv)
env_setenv("loaddev", EV_VOLATILE, ldev, env_noset, env_nounset);
printf("Booting from %s\n", ldev);
do_interact:
setenv("LINES", "24", 1); /* optional */
setenv("prompt", "loader>", 1);