From 8e97c09f47f15986f619a7cfd4380bb7100729c1 Mon Sep 17 00:00:00 2001 From: Ian Lepore Date: Tue, 11 Mar 2014 22:02:49 +0000 Subject: Enhance the mechanism that lets you configure the ubldr boot device by setting the u-boot environment variable loaderdev=. It used to accept only 'disk' or 'net'. Now it allows specification of unit, slice, and partition as well. In addition to the generic 'disk' it also accepts specific storage device types such as 'mmc' or 'sata'. If there isn't a loaderdev env var, the historical behavior is maintained. It will use the first storage device it finds, or a network device if no working storage device exists. 99% of the work on this was done by Patrick Kelsey, but I made some changes, so if anything goes wrong, blame me. Submitted by: Patrick Kelsey --- sys/boot/uboot/lib/libuboot.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/boot/uboot/lib/libuboot.h') diff --git a/sys/boot/uboot/lib/libuboot.h b/sys/boot/uboot/lib/libuboot.h index bf07ad380a6d..82410a08a720 100644 --- a/sys/boot/uboot/lib/libuboot.h +++ b/sys/boot/uboot/lib/libuboot.h @@ -32,9 +32,9 @@ struct uboot_devdesc struct devsw *d_dev; int d_type; int d_unit; + void *d_opendata; union { struct { - void *data; int slice; int partition; off_t offset; @@ -70,6 +70,8 @@ extern struct file_format uboot_elf; void reboot(void); +int uboot_diskgetunit(int type, int type_unit); + #if defined(LOADER_FDT_SUPPORT) extern int fdt_setup_fdtp(); extern int fdt_copy(vm_offset_t); -- cgit v1.2.3