aboutsummaryrefslogtreecommitdiff
path: root/sys/boot/uboot/lib/libuboot.h
diff options
context:
space:
mode:
authorIan Lepore <ian@FreeBSD.org>2014-03-11 22:02:49 +0000
committerIan Lepore <ian@FreeBSD.org>2014-03-11 22:02:49 +0000
commit8e97c09f47f15986f619a7cfd4380bb7100729c1 (patch)
tree6f1e249744f8a0ac420c8648b55bde3298f920a2 /sys/boot/uboot/lib/libuboot.h
parent5d2613ad282b460d8b930135579ccca8c75a29ef (diff)
downloadsrc-8e97c09f47f15986f619a7cfd4380bb7100729c1.tar.gz
src-8e97c09f47f15986f619a7cfd4380bb7100729c1.zip
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 <kelsey@ieee.org>
Notes
Notes: svn path=/head/; revision=263052
Diffstat (limited to 'sys/boot/uboot/lib/libuboot.h')
-rw-r--r--sys/boot/uboot/lib/libuboot.h4
1 files changed, 3 insertions, 1 deletions
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);