about netbooting on armv6 [was: Fwd: SDIO Patch D4761.diff Not Building For Me]

Bernd Walter ticso at cicely7.cicely.de
Fri Mar 1 03:41:04 UTC 2019


On Fri, Mar 01, 2019 at 04:23:26AM +0100, Bernd Walter wrote:
> On Thu, Feb 28, 2019 at 08:14:49PM -0700, Ian Lepore wrote:
> > On Fri, 2019-03-01 at 04:12 +0100, Bernd Walter wrote:
> > > On Wed, Mar 23, 2016 at 10:43:34AM -0600, Ian Lepore wrote:
> > > > 
> > > > The quick and easy config for netbooting armv6 these days is to set
> > > > a
> > > > few vars in your uboot env.  This assumes that you let uboot load
> > > > ubldr.bin from sdcard, and then have ubldr load the kernel and the
> > > > kernel will mount nfsroot.
> > > > 
> > > > If you have a dhcp server to provide an IP, this is all you need in
> > > > uboot env:
> > > > 
> > > >   loaderdev=net
> > > >   rootpath=<nfs server ip>:/<rootpath>
> > > > 
> > > > If you manually configure the ip, add these:
> > > > 
> > > >   ipaddr=<ip addr>
> > > >   netmask=255.etc.etc.etc
> > > 
> > > Ok - I'm lost with this.
> > > 
> > > I've setup a card for a Pi1-B with just the DOS partition on it.
> > > This is what I get:
> > > MMC:   mmc at 7e300000: 1
> > > Loading Environment from FAT... In:    serial
> > > Out:   vidconsole
> > > Err:   vidconsole
> > > Net:   No ethernet found.
> > > starting USB...
> > > USB0:   scanning bus 0 for devices... 3 USB Device(s) found
> > >        scanning usb for storage devices... 0 Storage Device(s) found
> > > Hit any key to stop autoboot:  0 
> > > MMC Device 0 not found
> > > no mmc device at slot 0
> > > switch to partitions #0, OK
> > > mmc1 is current device
> > > Scanning mmc 1:1...
> > > Found EFI removable media binary efi/boot/bootarm.efi
> > > libfdt fdt_check_header(): FDT_ERR_BADMAGIC
> > > Scanning disk mmc at 7e300000.blk...
> > > Found 2 disks
> > > FDT memrsv map 0: Failed to add to map
> > > 583472 bytes read in 56 ms (9.9 MiB/s)
> > > libfdt fdt_check_header(): FDT_ERR_BADMAGIC
> > > FDT memrsv map 0: Failed to add to map
> > > ## Starting EFI application at 00080000 ...
> > > Consoles: EFI console  
> > > FreeBSD/arm EFI loader, Revision 1.1
> > > 
> > >    Command line arguments: l
> > >    EFI version: 2.70
> > >    EFI Firmware: Das U-Boot (rev 8216.2304)
> > >    Console: efi (0)
> > >    Load Path: /\efi\boot\bootarm.efi
> > >    Load Device: /VenHw(e61d73b9-a384-4acc-aeab-
> > > 82e828f3628b)/SD(1)/SD(0)/HD(1,0x01,0,0x800,0x19000)
> > > Trying ESP: /VenHw(e61d73b9-a384-4acc-aeab-
> > > 82e828f3628b)/SD(1)/SD(0)/HD(1,0x01,0,0x800,0x19000)
> > > Setting currdev to disk0p1:
> > > Failed to find bootable partition
> > > Startup error in /boot/lua/loader.lua: seconds
> > > LUA ERROR: cannot open /boot/lua/loader.lua: no such file or
> > > directory.
> > > 
> > > can't load 'kernel'
> > > 
> > > Type '?' for a list of commands, 'help' for more detailed help.
> > > OK  
> > > 
> > > So - ok it can't find its partition on the card.
> > > But how can I setup those variables?
> > > MMC:   mmc at 7e300000: 1
> > > Loading Environment from FAT... In:    serial
> > > Out:   vidconsole
> > > Err:   vidconsole
> > > Net:   No ethernet found.
> > > starting USB...
> > > USB0:   scanning bus 0 for devices... 3 USB Device(s) found
> > >        scanning usb for storage devices... 0 Storage Device(s) found
> > > Hit any key to stop autoboot:  0 
> > > U-Boot> loaderdev=net
> > > U-Boot> saveenv
> > > Saving Environment to FAT... Failed (1)
> > > 
> > > Same problem with saveenv not being functional on the original image
> > > as well,
> > > not just on mine.
> > > I've tried uEnv.txt, but it is just as it isn't there.
> > > 
> > 
> > All of what I said back then is valid only for ubldr.  EFI is a whole
> > 'nother story.  I've never gotten netbooting to work with EFI.  So
> > mostly I just use old u-boot (from the 2015-2016 era) on all my boards.
> 
> Oh - that's the difference.

Just from the loader it looks good:
...
Failed to find bootable partition
Startup error in /boot/lua/loader.lua: seconds
LUA ERROR: cannot open /boot/lua/loader.lua: no such file or directory.

can't load 'kernel'

Type '?' for a list of commands, 'help' for more detailed help.
OK  lsdev
disk devices:
    disk0:    15523841 X 512 blocks (removable)
      disk0s1: DOS/Windows
net devices:
    net0:
OK show
console=efi
currdev=disk0p1:
efi-version=2.70
interpret=OK
loaddev=disk0p1:
prompt=${interpret}
script.lang=lua
twiddle_divisor=1
OK set currdev=net0
OK ls
Waiting for Ethernet connection... done.
net0: cannot set rx. filters (status=3)
/
 d  dev
 d  var
 d  boot
 d  tmp
 d  mnt
 d  root
 d  proc
 d  home
    .profile
 d  rescue
    firstboot
 d  lib
    COPYRIGHT
 d  media
 d  sbin
 d  bin
 d  usr
    .cshrc
 d  libexec
 d  net
 d  .snap
 d  etc
OK
And yes - it actually boots from that point.
The question is how to get currdev properly into the loader.
It is using the DOS partition, so maybe I can add a loader script
onto that partition instead.
I have to deal with something being on the card anyways.

-- 
B.Walter <bernd at bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.


More information about the freebsd-arm mailing list