loaderdev

Balanga Bar balanga.bar at gmail.com
Thu Apr 18 07:31:05 UTC 2019


How does uBoot know how to load ubldr? Is this specific to a particular
version of uBoot? I'm using a customised uBoot which lets me boot OpenWrt,
Debian, Arch Linux or FreeBSD depending on the contents of a USB stick.

Currently I have a /boot/uEnv.txt file on a FAT partition which includes

bootfile=ubldr

Will I no longer need a FAT partition?

If loaderdev is set to disk, then where is ubldr loaded from since, AFAIK,
uBoot can only read FAT or EXT3 partitions?

On Wed, Apr 17, 2019 at 9:58 PM Ian Lepore <ian at freebsd.org> wrote:

> On Wed, 2019-04-17 at 22:40 +0100, Balanga Bar wrote:
> > I've looked for info on possible values for loaderdev, but have not
> > seen
> > anything, although I notice when booting my GoFlex Home I see
> >
> > U-Boot env: loaderdev not set, will probe all devices.
> >
> > What should I set loaderdev to and where does this line come from?
> >
>
> Set loaderdev in the uboot environment, ubldr will read it from there
> using a uboot API call.  The basic values are 'disk' or 'net'.
>
> If you use 'net' you need to also set rootpath=ip:/nfs/root/path and
> serverip=<ip of nfs server> in the uboot env.  This will use nfs to
> load the kernel, and also will mount that nfs filesystem as the rootfs.
>
> If you use 'disk' it will probe all disk-like devices to find a freebsd
> partition marked active (or just the first freebsd partition it finds
> if none has the active flag in the MBR).  Instead of just disk, you can
> also use specific device types, like mmc, usb, sata.  Also, you can
> append a unit, slice, and partition parameter, like 'disk0:2.1 to boot
> from the first disk device, slice 2 partition 1 (equivelent to da0s2a
> or mmcsd0s2a).  In freebsd 13 you can use the more common 's2a' syntax,
> but I haven't merged those changes back to 12 or 11 yet.
>
> -- Ian
>
>


More information about the freebsd-arm mailing list