NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: u-boot banana pi armv7



Ok, I finally found the right incantation to boot Netbsd-9.1 on my banana pi sata disk but haven't figured out how to make it run automatically yet:

1) Grab a pre-built armv7.img (u-boot and mini-root) from http://www.armbsd.org/arm/
2) Write it to my sdcard

Via serial console, interrupt u-boot and run the following u-boot commands:

scsi scan
scsi dev 0
fatload scsi 0:1 $fdt_addr_r dtb/$fdtfile
fatload scsi 0:1 $kernel_addr_r EFI/boot/bootarm.efi
bootefi $kernel_addr_r $fdt_addr_r

[Interrupt EFI boot]

boot hd0a:netbsd
================================
So, I can make a boot.scr with the u-boot commands and put it on /dev/ld0e (msdos boot partition on sdcard), but I don't know how to tell bootarm.efi to find netbsd on hd0a.  I assume I need to set some environment variable or pass more args to the bootefi command???  I feel like I'm really close now.

-- 
  George Morgan
  gmorgan%fastmail.fm@localhost

On Fri, Jan 15, 2021, at 8:42 AM, George Morgan wrote:
> Hi Markus,
> 
> This explains a lot...I had noticed the files in the sata drive boot 
> partition were much simpler than the boot partition on the sdcard.  It 
> is my understanding that the Banana pi M1 cannot boot directly off a 
> sata disk so I expect the following to be the new flow:
> 
> 1) u-boot 
>   - preps and scans scsi for sata devices
>   - loads bootarm.efi off sdcard (mmc dev)
>   - runs bootarm.efi
> 2) bootarm.efi
>   - reads efiboot.plist sata boot partition
>   - loads netbsd efi kernel from sata boot partition
>   - launches netbsd efi kernel
> 
> I may have to reimage my sdcard to get it back to a point where it will 
> boot the sdcard image and then tweak the settings so that it will efi 
> boot.  I also need to make sure I have the ftd file specific to the 
> Banana Pi (assuming it is enough different from other armv7 boards)  
> Probabaly makes sense to move this discussion to port-arm at this point.
> 
> Thanks again!
> 
> -- 
>   George Morgan
>   gmorgan%fastmail.fm@localhost
> 
> On Fri, Jan 15, 2021, at 2:30 AM, Markus Kilbinger wrote:
> > Am Fr., 15. Jan. 2021 um 06:18 Uhr schrieb George Morgan <gmorgan%fastmail.fm@localhost>:
> > >
> > > Hi All,
> > >
> > > I recently installed NetBSD 9.1 on my Banana Pi M1 but can't seem to get u-boot to like booting of the sata connected hard drive.  I followed the instructions at:
> > > [...]
> > 
> > on my cubietruck I had to add
> > 
> >   scsi reset
> >   scsi scan
> > 
> > at the beginning of "boot.cmd" (-> consecutively "boot.scr") to make
> > u-boot aware of its sata harddisk.
> > Alter that "bootarm.efi" (on the sdcard) was capable with an
> > appropriate "efiboot.plist" to boot "netbsd" of the sata harddisk (gpt
> > prepared).
> > 
> > See  http://mail-index.netbsd.org/port-arm/2019/03/31/msg005592.html
> > 
> > My "/etc/efiboot.plist" looks like:
> > 
> > <plist>
> > <dict>
> >         <key>environment-variables</key>
> >         <dict>
> >                 <key>rootdev</key>
> >                 <string>hd0b</string>
> >                 <key>bootargs</key>
> >                 <string>root=dk1</string>
> >         </dict>
> > </dict>
> > </plist>
> > 
> > Maybe this helps ...
> > 
> > Best regards, Markus.
> >



Home | Main Index | Thread Index | Old Index