From d191c118a7d66684fcbc7f77cdb4410a9ddc0f3e Mon Sep 17 00:00:00 2001 From: manu Date: Mon, 2 Jul 2018 18:23:43 +0000 Subject: [PATCH] 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. --- stand/uboot/common/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stand/uboot/common/main.c b/stand/uboot/common/main.c index 4cba1bd0e187..114fcaa64222 100644 --- a/stand/uboot/common/main.c +++ b/stand/uboot/common/main.c @@ -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);