[U-Boot] can u-boot NFS mount my beaglebone rootfs over USB tether?

Robert P. J. Day rpjday at crashcourse.ca
Sun Jul 21 22:43:29 CEST 2013


On Sun, 21 Jul 2013, Albert ARIBAUD wrote:

> Hi Robert,
>
> On Sun, 21 Jul 2013 08:10:15 -0700 (PDT), "Robert P. J. Day"
> <rpjday at crashcourse.ca> wrote:
>
> > On Sun, 21 Jul 2013, Albert ARIBAUD wrote:
> >
> > > Hi Robert,
> > >
> > > On Sun, 21 Jul 2013 04:07:17 -0700 (PDT), "Robert P. J. Day"
> > > <rpjday at crashcourse.ca> wrote:
> > >
> > > >
> > > >   i have a current production version of the beaglebone black, and i'd
> > > > dearly love to NFS mount the root filesystem over the USB tether
> > > > (which typically assigns net addresses of 192.68.7.[12] to the
> > > > host/board).
> > > >
> > > >   does u-boot support that? i just found this elinux article:
> > > >
> > > > http://elinux.org/Mount_BeagleBoard_Root_Filesystem_over_NFS_via_USB
> > > >
> > > > and am about to start poring over it, but if someone already knows if
> > > > it can be done (or not), that would be great. thanks.
> > >
> > > If the kernel (and possibly initrd, for modules) is available locally,
> > > then the whole NFS and USB tether rootfs mounting is a Linux thing, not
> > > a U-boot one, isn't it?
> >
> >  hmmmmmm ... now that i'm more awake, you may be right. i guess all i
> > need is for RNDIS to kick in and assign the IP addresses to each end
> > of the connection before any attempt is made to mount the root
> > filesystem. for some reason, i thought it had to be done earlier.
> >
> >   i'll give it a shot, thanks.
> >
> > rday
> >
> > p.s. just to be clear, when the BBB is up and running, the only
> > active network interface is:
> >
> > usb0      Link encap:Ethernet  HWaddr EA:60:E8:F4:F4:BD
> >           inet addr:192.168.7.2  Bcast:192.168.7.3  Mask:255.255.255.252
> >           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
> >           RX packets:40 errors:0 dropped:0 overruns:0 frame:0
> >           TX packets:23 errors:0 dropped:0 overruns:0 carrier:0
> >           collisions:0 txqueuelen:1000
> >           RX bytes:9579 (9.3 KiB)  TX bytes:7401 (7.2 KiB)
> >
> > so you're suggesting that this requires no further tweaking of u-boot
> > other than setting "nfsroot="?
>
> Yes, I am. More precisely, I am suggesting that the only change in
> u-boot is to pass the rootfs option to the kernel; but you may want to
> make sure your kernel has support (either as a monolithic kernel or as a
> module through a local initrd) for the hardware and network features
> needed.

  assuming the kernel has everything it needs, from my playing around,
it appears that i need to have u-boot manually bring up the net
interface, but i have no idea how to do that such that it also
configures the IP address at the other end, exactly the way it's all
done during a regular MMC-based boot -- i just don't know enough about
RNDIS.

  in the end, i would *like* the host to have the IP address
192.168.7.1, and the BBB to have the IP address 192.168.7.2, and
there's one other slight complication.

  i can't assume the net connection will be represented by eth0 on the
host side -- it's entirely possible the host will already be on the
net, and eth0 will be in use, so i need to be prepared for the host to
use whatever ethX interface it prefers for 192.168.7.1.

  so is there a way to, from within u-boot, kickstart that net
interface? if i can get that, i think everything else falls into
place. i'm trying to do this *strictly* through uEnv.txt since, in the
environment i'm designing for, there will be *no* access to the u-boot
prompt.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================


More information about the U-Boot mailing list