Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Apr 2019 09:30:42 +0100
From:      Balanga Bar <balanga.bar@gmail.com>
To:        Ian Lepore <ian@freebsd.org>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: loaderdev
Message-ID:  <CADocevCOY%2BkgKCg8mcjnKZ-HbuTKfBvmm8DTEnWEa2e505kQTw@mail.gmail.com>
In-Reply-To: <a0660f746d4634258fc24981887b166e7a84f90b.camel@freebsd.org>
References:  <CADocevCdU6FwXVtJsTY54LTi6FHaqSAzLUZWaTw8QgEHs9v%2BSA@mail.gmail.com> <a0660f746d4634258fc24981887b166e7a84f90b.camel@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADocevCOY%2BkgKCg8mcjnKZ-HbuTKfBvmm8DTEnWEa2e505kQTw>