* [U-Boot] can u-boot NFS mount my beaglebone rootfs over USB tether?
@ 2013-07-21 11:07 Robert P. J. Day
2013-07-21 14:35 ` Albert ARIBAUD
0 siblings, 1 reply; 9+ messages in thread
From: Robert P. J. Day @ 2013-07-21 11:07 UTC (permalink / raw)
To: u-boot
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.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 9+ messages in thread* [U-Boot] can u-boot NFS mount my beaglebone rootfs over USB tether? 2013-07-21 11:07 [U-Boot] can u-boot NFS mount my beaglebone rootfs over USB tether? Robert P. J. Day @ 2013-07-21 14:35 ` Albert ARIBAUD 2013-07-21 15:10 ` Robert P. J. Day 0 siblings, 1 reply; 9+ messages in thread From: Albert ARIBAUD @ 2013-07-21 14:35 UTC (permalink / raw) To: u-boot Hi Robert, On Sun, 21 Jul 2013 04:07:17 -0700 (PDT), "Robert P. J. Day" <rpjday@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? > rday Amicalement, -- Albert. ^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] can u-boot NFS mount my beaglebone rootfs over USB tether? 2013-07-21 14:35 ` Albert ARIBAUD @ 2013-07-21 15:10 ` Robert P. J. Day 2013-07-21 17:00 ` Albert ARIBAUD 0 siblings, 1 reply; 9+ messages in thread From: Robert P. J. Day @ 2013-07-21 15:10 UTC (permalink / raw) To: u-boot 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@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="? -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ======================================================================== ^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] can u-boot NFS mount my beaglebone rootfs over USB tether? 2013-07-21 15:10 ` Robert P. J. Day @ 2013-07-21 17:00 ` Albert ARIBAUD 2013-07-21 17:43 ` Robert P. J. Day 2013-07-21 20:43 ` Robert P. J. Day 0 siblings, 2 replies; 9+ messages in thread From: Albert ARIBAUD @ 2013-07-21 17:00 UTC (permalink / raw) To: u-boot Hi Robert, On Sun, 21 Jul 2013 08:10:15 -0700 (PDT), "Robert P. J. Day" <rpjday@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@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. Amicalement, -- Albert. ^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] can u-boot NFS mount my beaglebone rootfs over USB tether? 2013-07-21 17:00 ` Albert ARIBAUD @ 2013-07-21 17:43 ` Robert P. J. Day 2013-07-21 20:43 ` Robert P. J. Day 1 sibling, 0 replies; 9+ messages in thread From: Robert P. J. Day @ 2013-07-21 17:43 UTC (permalink / raw) To: u-boot 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@crashcourse.ca> wrote: > > 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. that's the one part i'm unsure of and i'll have to look at. right now, the BBB connects over the network via USB just fine, so all i need to do is verify that that doesn't require any loadable modules. on the BBB, i have this from /proc/config.gz: CONFIG_USB_NET_RNDIS_HOST=m CONFIG_USB_NET_RNDIS_WLAN=m CONFIG_USB_ETH_RNDIS=y CONFIG_USB_FUNCTIONFS_RNDIS=y CONFIG_USB_G_MULTI_RNDIS=y and from lsmod, the only apparently related module is "g_multi": g_multi 55905 2 libcomposite 15228 1 g_multi but i don't know anything about that module. so first guess is that the kernel on the BBB might have everything it needs, unless someone who knows way more about RNDIS than i do can spot a flaw. will test all this shortly, thanks for your help. rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ======================================================================== ^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] can u-boot NFS mount my beaglebone rootfs over USB tether? 2013-07-21 17:00 ` Albert ARIBAUD 2013-07-21 17:43 ` Robert P. J. Day @ 2013-07-21 20:43 ` Robert P. J. Day 2013-07-21 21:55 ` Tom Rini 1 sibling, 1 reply; 9+ messages in thread From: Robert P. J. Day @ 2013-07-21 20:43 UTC (permalink / raw) To: u-boot 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@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@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 ======================================================================== ^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] can u-boot NFS mount my beaglebone rootfs over USB tether? 2013-07-21 20:43 ` Robert P. J. Day @ 2013-07-21 21:55 ` Tom Rini 2013-07-21 22:34 ` Robert P. J. Day 0 siblings, 1 reply; 9+ messages in thread From: Tom Rini @ 2013-07-21 21:55 UTC (permalink / raw) To: u-boot On Sun, Jul 21, 2013 at 01:43:29PM -0700, Robert P. J. Day wrote: > 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. I'm a little unclear on what you're trying to do right now. But, the gadget ethernet works in U-Boot, just setenv ethact usb_ether. On the linux host side, it will be usb0 (or usb1 and so on). -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130721/b4ea130a/attachment.pgp> ^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] can u-boot NFS mount my beaglebone rootfs over USB tether? 2013-07-21 21:55 ` Tom Rini @ 2013-07-21 22:34 ` Robert P. J. Day 2013-07-21 23:25 ` Tom Rini 0 siblings, 1 reply; 9+ messages in thread From: Robert P. J. Day @ 2013-07-21 22:34 UTC (permalink / raw) To: u-boot On Sun, 21 Jul 2013, Tom Rini wrote: > On Sun, Jul 21, 2013 at 01:43:29PM -0700, Robert P. J. Day wrote: > > > 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. > > I'm a little unclear on what you're trying to do right now. But, > the gadget ethernet works in U-Boot, just setenv ethact usb_ether. > On the linux host side, it will be usb0 (or usb1 and so on). in a nutshell, i just want to do *all* my networking over the USB tether ... TFTP kernel images, NFS mount rootfs, etc. i could have sworn i tried "setenv ethact usb_ether" earlier and that didn't work, but i'll try it again. i posted a more detailed explanation on the beagleboard list -- given my situation, the *only* customization i can make to the BBB is to let it boot normally the first time, then replace the uEnv.txt file in the FAT partition with something new. i have no freedom to do anything else. so, along with that "setenv ethact usb_ether", how would the normal ways to TFTP kernel images and NFS mount root filesystems change in any way? how much more would i need to add to something like this? setenv ethact usb_ether autoload=no serverip=192.168.7.1 ipaddr=192.168.7.2 rootpath=/home/rpjday/rootfs uenvcmd=run netargs; bootm ${loadaddr} - ${fdtaddr} i know how to do *normal* TFTP and NFS, but i have no idea how any of that changes in the context of using usb_ether. rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ======================================================================== ^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] can u-boot NFS mount my beaglebone rootfs over USB tether? 2013-07-21 22:34 ` Robert P. J. Day @ 2013-07-21 23:25 ` Tom Rini 0 siblings, 0 replies; 9+ messages in thread From: Tom Rini @ 2013-07-21 23:25 UTC (permalink / raw) To: u-boot On Sun, Jul 21, 2013 at 03:34:58PM -0700, Robert P. J. Day wrote: > On Sun, 21 Jul 2013, Tom Rini wrote: > > > On Sun, Jul 21, 2013 at 01:43:29PM -0700, Robert P. J. Day wrote: > > > > > 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. > > > > I'm a little unclear on what you're trying to do right now. But, > > the gadget ethernet works in U-Boot, just setenv ethact usb_ether. > > On the linux host side, it will be usb0 (or usb1 and so on). > > in a nutshell, i just want to do *all* my networking over the USB > tether ... TFTP kernel images, NFS mount rootfs, etc. > > i could have sworn i tried "setenv ethact usb_ether" earlier and > that didn't work, but i'll try it again. i posted a more detailed > explanation on the beagleboard list -- given my situation, the *only* > customization i can make to the BBB is to let it boot normally the > first time, then replace the uEnv.txt file in the FAT partition with > something new. i have no freedom to do anything else. > > so, along with that "setenv ethact usb_ether", how would the normal > ways to TFTP kernel images and NFS mount root filesystems change in > any way? how much more would i need to add to something like this? > > setenv ethact usb_ether > autoload=no > serverip=192.168.7.1 > ipaddr=192.168.7.2 > rootpath=/home/rpjday/rootfs > uenvcmd=run netargs; bootm ${loadaddr} - ${fdtaddr} > > i know how to do *normal* TFTP and NFS, but i have no idea how any of > that changes in the context of using usb_ether. U-Boot is great (terrible) in this regard. When you have multiple ethernet interfaces we try round-robin to use each, starting with the last sucessful interface, and if there's not one, ethact, and if that's not set, the order 'Net: ' prints them out, which I believe is link order, but didn't go and check just now. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130721/da491103/attachment.pgp> ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-07-21 23:25 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-07-21 11:07 [U-Boot] can u-boot NFS mount my beaglebone rootfs over USB tether? Robert P. J. Day 2013-07-21 14:35 ` Albert ARIBAUD 2013-07-21 15:10 ` Robert P. J. Day 2013-07-21 17:00 ` Albert ARIBAUD 2013-07-21 17:43 ` Robert P. J. Day 2013-07-21 20:43 ` Robert P. J. Day 2013-07-21 21:55 ` Tom Rini 2013-07-21 22:34 ` Robert P. J. Day 2013-07-21 23:25 ` Tom Rini
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox