summaryrefslogtreecommitdiff
path: root/stand/uboot
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2018-07-02 18:23:43 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2018-07-02 18:23:43 +0000
commitf127d86390d35271a3ff6527b36b73cb2b6400ce (patch)
tree3a5fcf1fc9edca9c5440a6238652c3948d5e93c3 /stand/uboot
parent32c52b48472d3d6a6e678b372c6de96417d1e28d (diff)
downloadsrc-test2-f127d86390d35271a3ff6527b36b73cb2b6400ce.tar.gz
src-test2-f127d86390d35271a3ff6527b36b73cb2b6400ce.zip
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.
Notes
Notes: svn path=/head/; revision=335869
Diffstat (limited to 'stand/uboot')
-rw-r--r--stand/uboot/common/main.c7
1 files 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);