Netbooting ROCK64

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Netbooting ROCK64

Greg V
Hi,

I (still) cannot boot the ROCK64 over the network.

Updated to ayufan's latest U-Boot build (U-Boot 2017.09-ge3eae80 (Jul
03 2018 - 21:32:05 +0000), Build: jenkins-linux-build-rock-64-273),
FreeBSD 12-CURRENT snapshot from 2018-07-09.

loader.efi "Can't find device by handle" and terminates — I guess
it's talking about the Ethernet device, the one it recognized as
"MAC(..)".

UART log:


Using ethernet@ff540000 device
TFTP from server 192.168.1.2; our IP address is 192.168.1.186
Filename 'loader.efi'.
Load address: 0x2000000
Loading: #############################
         4.3 MiB/s
done
Bytes transferred = 423456 (67620 hex)
## Starting EFI application at 02000000 ...
Card did not respond to voltage select!
mmc_init: -95, time 12
Scanning disk [hidden email]...
Card did not respond to voltage select!
mmc_init: -95, time 12
Scanning disk [hidden email]...
Found 2 disks
Consoles: EFI console
efipart_inithandles failed 2, expect failuresCommand line arguments:
loader.efi
Image base: 0x2000000
EFI version: 2.05
EFI Firmware: Das U-boot (rev 0.00)

FreeBSD/arm64 EFI loader, Revision 1.1
(Mon Jul  9 18:05:19 UTC 2018 [hidden email])
   Load Path: loader.efi
   Load Device: MAC(06d4ce39aa76,0x0)
   BootCurrent: 0000
   BootOrder: 0008 0000[*] 0000[*] 0000[*] 2f10 0000[*] 0000[*] 0000[*]
0000[*] 0000[*] 2f30 0000[*] 3b50 fcf0 0000[*] 0000[*] 4ddc fef4 0000
[*] 0000[*] 3b10 fcf0 0000[*] 0000[*] 4da8 fef4 0000[*] 0000[*] 3ba0
fcf0 0000[*] 0000[*] 2d40 fef4 0000[*] 0000[*] 8cf7 dffe b6f3 7f3d 39b0
5d06 b2e7 17d8 3b80 fcf0 0000[*] 0000[*] 0c30 fef7 0000[*] 0000[*]
0000[*] 0000[*] 0000[*] 0000[*] 0003 0000[*] 0000[*] 0000[*] 06e8 fefa
000
0[*] 0000[*] 3be8 fcf0 0000[*] 0000[*] a108 fef6 0000[*] 0000[*] 57dc
5baf d956 2fed d6a0 fcf4 0000[*] 0000[*] 5fe3 ff37 62bf 9568 3c90 fcf0
0000[*] 0000[*] a25c fef6 0000[*] 0000[*] 06e8 fefa 0000[*] 0000[*]
0000[*] 0820 0000[*] 0000[*]
Can't find device by handle
Failed to find bootable partition
## Application terminated, r = 14 in 1 seconds

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Netbooting ROCK64

Emmanuel Vadot-7
On Wed, 11 Jul 2018 21:20:09 +0300
Greg V <[hidden email]> wrote:

> Hi,
>
> I (still) cannot boot the ROCK64 over the network.
>
> Updated to ayufan's latest U-Boot build (U-Boot 2017.09-ge3eae80 (Jul
> 03 2018 - 21:32:05 +0000), Build: jenkins-linux-build-rock-64-273),
> FreeBSD 12-CURRENT snapshot from 2018-07-09.
>
> loader.efi "Can't find device by handle" and terminates ? I guess
> it's talking about the Ethernet device, the one it recognized as
> "MAC(..)".
>
> UART log:
>
>
> Using ethernet@ff540000 device
> TFTP from server 192.168.1.2; our IP address is 192.168.1.186
> Filename 'loader.efi'.
> Load address: 0x2000000
> Loading: #############################
>          4.3 MiB/s
> done
> Bytes transferred = 423456 (67620 hex)
> ## Starting EFI application at 02000000 ...
> Card did not respond to voltage select!
> mmc_init: -95, time 12
> Scanning disk [hidden email]...
> Card did not respond to voltage select!
> mmc_init: -95, time 12
> Scanning disk [hidden email]...
> Found 2 disks
> Consoles: EFI console
> efipart_inithandles failed 2, expect failuresCommand line arguments:
> loader.efi
> Image base: 0x2000000
> EFI version: 2.05
> EFI Firmware: Das U-boot (rev 0.00)
>
> FreeBSD/arm64 EFI loader, Revision 1.1
> (Mon Jul  9 18:05:19 UTC 2018 [hidden email])
>    Load Path: loader.efi
>    Load Device: MAC(06d4ce39aa76,0x0)
>    BootCurrent: 0000
>    BootOrder: 0008 0000[*] 0000[*] 0000[*] 2f10 0000[*] 0000[*] 0000[*]
> 0000[*] 0000[*] 2f30 0000[*] 3b50 fcf0 0000[*] 0000[*] 4ddc fef4 0000
> [*] 0000[*] 3b10 fcf0 0000[*] 0000[*] 4da8 fef4 0000[*] 0000[*] 3ba0
> fcf0 0000[*] 0000[*] 2d40 fef4 0000[*] 0000[*] 8cf7 dffe b6f3 7f3d 39b0
> 5d06 b2e7 17d8 3b80 fcf0 0000[*] 0000[*] 0c30 fef7 0000[*] 0000[*]
> 0000[*] 0000[*] 0000[*] 0000[*] 0003 0000[*] 0000[*] 0000[*] 06e8 fefa
> 000
> 0[*] 0000[*] 3be8 fcf0 0000[*] 0000[*] a108 fef6 0000[*] 0000[*] 57dc
> 5baf d956 2fed d6a0 fcf4 0000[*] 0000[*] 5fe3 ff37 62bf 9568 3c90 fcf0
> 0000[*] 0000[*] a25c fef6 0000[*] 0000[*] 06e8 fefa 0000[*] 0000[*]
> 0000[*] 0820 0000[*] 0000[*]
> Can't find device by handle
> Failed to find bootable partition

 ^^^^

 This is your problem.
 Do you have a nfs export serving the freebsd files ?

> ## Application terminated, r = 14 in 1 seconds
>
> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "[hidden email]"


--
Emmanuel Vadot <[hidden email]> <[hidden email]>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Netbooting ROCK64

Greg V


On Thu, Jul 12, 2018 at 1:04 PM, Emmanuel Vadot <[hidden email]>
wrote:

> On Wed, 11 Jul 2018 21:20:09 +0300
> Greg V <[hidden email]> wrote:
>>
>>  FreeBSD/arm64 EFI loader, Revision 1.1
>>  (Mon Jul  9 18:05:19 UTC 2018 [hidden email])
>>     Load Path: loader.efi
>>     Load Device: MAC(06d4ce39aa76,0x0)
>>     BootCurrent: 0000
>>     BootOrder: 0008 0000[*] 0000[*] 0000[*] 2f10 0000[*] 0000[*]
>> 0000[*]
>>  0000[*] 0000[*] 2f30 0000[*] 3b50 fcf0 0000[*] 0000[*] 4ddc fef4
>> 0000
>>  [*] 0000[*] 3b10 fcf0 0000[*] 0000[*] 4da8 fef4 0000[*] 0000[*] 3ba0
>>  fcf0 0000[*] 0000[*] 2d40 fef4 0000[*] 0000[*] 8cf7 dffe b6f3 7f3d
>> 39b0
>>  5d06 b2e7 17d8 3b80 fcf0 0000[*] 0000[*] 0c30 fef7 0000[*] 0000[*]
>>  0000[*] 0000[*] 0000[*] 0000[*] 0003 0000[*] 0000[*] 0000[*] 06e8
>> fefa
>>  000
>>  0[*] 0000[*] 3be8 fcf0 0000[*] 0000[*] a108 fef6 0000[*] 0000[*]
>> 57dc
>>  5baf d956 2fed d6a0 fcf4 0000[*] 0000[*] 5fe3 ff37 62bf 9568 3c90
>> fcf0
>>  0000[*] 0000[*] a25c fef6 0000[*] 0000[*] 06e8 fefa 0000[*] 0000[*]
>>  0000[*] 0820 0000[*] 0000[*]
>>  Can't find device by handle
>>  Failed to find bootable partition
>
>  ^^^^
>
>  This is your problem.
>  Do you have a nfs export serving the freebsd files ?

Yeah, of course.

And the u-boot script is explicitly configured to use it:

env set serverip 192.168.1.2
env set baudrate 115200
env set bootargs boot.nfsroot.server=${serverip}
boot.nfsroot.path=<PATH> comconsole_speed=${baudrate}
tftpboot ${kernel_addr_r} loader.efi
bootefi ${kernel_addr_r} ${fdtcontroladdr}

It's not getting to NFS. tcpdump shows no nfs activity from the board's
IP address. Only ARP, TFTP and some weird UDP ports, all before
loader.efi starts.

A Raspberry Pi 3 boots fine with about the same setup (minus baudrate,
plus fdt from file).

Also, just checked: the nfs command in U-Boot actually tries to
connect, 'sunrpc' and 'cadlock2' show up on tcpdump.
Nothing shows up with loader.efi, and it terminates *instantly*.
It clearly cannot find the Ethernet device itself.

Could you please send me the loader.efi that works for you?
And which version of U-Boot you use it with.

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Netbooting ROCK64

Emmanuel Vadot-7
On Thu, 12 Jul 2018 13:49:30 +0300
Greg V <[hidden email]> wrote:

>
>
> On Thu, Jul 12, 2018 at 1:04 PM, Emmanuel Vadot <[hidden email]>
> wrote:
> > On Wed, 11 Jul 2018 21:20:09 +0300
> > Greg V <[hidden email]> wrote:
> >>
> >>  FreeBSD/arm64 EFI loader, Revision 1.1
> >>  (Mon Jul  9 18:05:19 UTC 2018 [hidden email])
> >>     Load Path: loader.efi
> >>     Load Device: MAC(06d4ce39aa76,0x0)
> >>     BootCurrent: 0000
> >>     BootOrder: 0008 0000[*] 0000[*] 0000[*] 2f10 0000[*] 0000[*]
> >> 0000[*]
> >>  0000[*] 0000[*] 2f30 0000[*] 3b50 fcf0 0000[*] 0000[*] 4ddc fef4
> >> 0000
> >>  [*] 0000[*] 3b10 fcf0 0000[*] 0000[*] 4da8 fef4 0000[*] 0000[*] 3ba0
> >>  fcf0 0000[*] 0000[*] 2d40 fef4 0000[*] 0000[*] 8cf7 dffe b6f3 7f3d
> >> 39b0
> >>  5d06 b2e7 17d8 3b80 fcf0 0000[*] 0000[*] 0c30 fef7 0000[*] 0000[*]
> >>  0000[*] 0000[*] 0000[*] 0000[*] 0003 0000[*] 0000[*] 0000[*] 06e8
> >> fefa
> >>  000
> >>  0[*] 0000[*] 3be8 fcf0 0000[*] 0000[*] a108 fef6 0000[*] 0000[*]
> >> 57dc
> >>  5baf d956 2fed d6a0 fcf4 0000[*] 0000[*] 5fe3 ff37 62bf 9568 3c90
> >> fcf0
> >>  0000[*] 0000[*] a25c fef6 0000[*] 0000[*] 06e8 fefa 0000[*] 0000[*]
> >>  0000[*] 0820 0000[*] 0000[*]
> >>  Can't find device by handle
> >>  Failed to find bootable partition
> >
> >  ^^^^
> >
> >  This is your problem.
> >  Do you have a nfs export serving the freebsd files ?
>
> Yeah, of course.
>
> And the u-boot script is explicitly configured to use it:
>
> env set serverip 192.168.1.2
> env set baudrate 115200

 This is a wrong baudrate, RK SoC is using 1.5Mbps

> env set bootargs boot.nfsroot.server=${serverip}
> boot.nfsroot.path=<PATH> comconsole_speed=${baudrate}
> tftpboot ${kernel_addr_r} loader.efi
> bootefi ${kernel_addr_r} ${fdtcontroladdr}

 I've never used nfs with loader like this, do you control the dhcp ?
 If so just set the correct rootpath in it and in uboot just do :
 setenv boot_targets dhcp
 saveenv

> It's not getting to NFS. tcpdump shows no nfs activity from the board's
> IP address. Only ARP, TFTP and some weird UDP ports, all before
> loader.efi starts.
>
> A Raspberry Pi 3 boots fine with about the same setup (minus baudrate,
> plus fdt from file).
>
> Also, just checked: the nfs command in U-Boot actually tries to
> connect, 'sunrpc' and 'cadlock2' show up on tcpdump.
> Nothing shows up with loader.efi, and it terminates *instantly*.
> It clearly cannot find the Ethernet device itself.
>
> Could you please send me the loader.efi that works for you?
> And which version of U-Boot you use it with.

 I use loader.efi from head and u-boot from ayufan.

--
Emmanuel Vadot <[hidden email]> <[hidden email]>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Netbooting ROCK64

Ian Lepore-3
On Thu, 2018-07-12 at 16:00 +0200, Emmanuel Vadot wrote:
> > env set bootargs boot.nfsroot.server=${serverip} 
> > boot.nfsroot.path=<PATH> comconsole_speed=${baudrate}
> > tftpboot ${kernel_addr_r} loader.efi
> > bootefi ${kernel_addr_r} ${fdtcontroladdr}
>
>  I've never used nfs with loader like this, do you control the dhcp ?
>  If so just set the correct rootpath in it and in uboot just do :
>  setenv boot_targets dhcp
>  saveenv

This is really not a good enough answer.  Many people have dhcp, not
nearly as many have easy access to control the config of that dhcp
server.

It MUST be possible to set tftp and/or nfs boot parms from some
persisent config on the system being booted, or we just don't have a
viable netboot solution.

Pre-efi, all you had to do for netbooting was

  setenv loaderdev net
  setenv rootpath serverip:/path/to/rootfs
  boot

It sure would be nice if we could maintain that level of simplicity
with efi uboot.

-- Ian
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Netbooting ROCK64

Emmanuel Vadot-7
On Thu, 12 Jul 2018 08:07:40 -0600
Ian Lepore <[hidden email]> wrote:

> On Thu, 2018-07-12 at 16:00 +0200, Emmanuel Vadot wrote:
> > > env set bootargs boot.nfsroot.server=${serverip} 
> > > boot.nfsroot.path=<PATH> comconsole_speed=${baudrate}
> > > tftpboot ${kernel_addr_r} loader.efi
> > > bootefi ${kernel_addr_r} ${fdtcontroladdr}
> >
> >  I've never used nfs with loader like this, do you control the dhcp ?
> >  If so just set the correct rootpath in it and in uboot just do :
> >  setenv boot_targets dhcp
> >  saveenv
>
> This is really not a good enough answer.  Many people have dhcp, not
> nearly as many have easy access to control the config of that dhcp
> server.

 Yes and it seems to work with rpi3.
 But u-boot on rpi is using 2018.03, not 2017.09 like on Rock64.
 I want to be sure that his setup is working.

> It MUST be possible to set tftp and/or nfs boot parms from some
> persisent config on the system being booted, or we just don't have a
> viable netboot solution.
>
> Pre-efi, all you had to do for netbooting was
>
>   setenv loaderdev net
>   setenv rootpath serverip:/path/to/rootfs
>   boot
>
> It sure would be nice if we could maintain that level of simplicity
> with efi uboot.
>
> -- Ian


--
Emmanuel Vadot <[hidden email]> <[hidden email]>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Netbooting ROCK64

Greg V
In reply to this post by Emmanuel Vadot-7


On Thu, Jul 12, 2018 at 5:00 PM, Emmanuel Vadot <[hidden email]>
wrote:

> On Thu, 12 Jul 2018 13:49:30 +0300
> Greg V <[hidden email]> wrote:
>
>>
>>
>>  On Thu, Jul 12, 2018 at 1:04 PM, Emmanuel Vadot
>> <[hidden email]>
>>  wrote:
>>  > On Wed, 11 Jul 2018 21:20:09 +0300
>>  > Greg V <[hidden email]> wrote:
>>  >>
>>  >>  FreeBSD/arm64 EFI loader, Revision 1.1
>>  >>  (Mon Jul  9 18:05:19 UTC 2018 [hidden email])
>>  >>     Load Path: loader.efi
>>  >>     Load Device: MAC(06d4ce39aa76,0x0)
>>  >>     BootCurrent: 0000
>>  >>     BootOrder: 0008 0000[*] 0000[*] 0000[*] 2f10 0000[*] 0000[*]
>>  >> 0000[*]
>>  >>  0000[*] 0000[*] 2f30 0000[*] 3b50 fcf0 0000[*] 0000[*] 4ddc fef4
>>  >> 0000
>>  >>  [*] 0000[*] 3b10 fcf0 0000[*] 0000[*] 4da8 fef4 0000[*] 0000[*]
>> 3ba0
>>  >>  fcf0 0000[*] 0000[*] 2d40 fef4 0000[*] 0000[*] 8cf7 dffe b6f3
>> 7f3d
>>  >> 39b0
>>  >>  5d06 b2e7 17d8 3b80 fcf0 0000[*] 0000[*] 0c30 fef7 0000[*]
>> 0000[*]
>>  >>  0000[*] 0000[*] 0000[*] 0000[*] 0003 0000[*] 0000[*] 0000[*]
>> 06e8
>>  >> fefa
>>  >>  000
>>  >>  0[*] 0000[*] 3be8 fcf0 0000[*] 0000[*] a108 fef6 0000[*] 0000[*]
>>  >> 57dc
>>  >>  5baf d956 2fed d6a0 fcf4 0000[*] 0000[*] 5fe3 ff37 62bf 9568
>> 3c90
>>  >> fcf0
>>  >>  0000[*] 0000[*] a25c fef6 0000[*] 0000[*] 06e8 fefa 0000[*]
>> 0000[*]
>>  >>  0000[*] 0820 0000[*] 0000[*]
>>  >>  Can't find device by handle
>>  >>  Failed to find bootable partition
>>  >
>>  >  ^^^^
>>  >
>>  >  This is your problem.
>>  >  Do you have a nfs export serving the freebsd files ?
>>
>>  Yeah, of course.
>>
>>  And the u-boot script is explicitly configured to use it:
>>
>>  env set serverip 192.168.1.2
>>  env set baudrate 115200
>
>  This is a wrong baudrate, RK SoC is using 1.5Mbps

It's using 1.5 Mbps by default, but I'm changing it here to 115200
because my UART dongle (CP2102) is not capable of 1.5Mbps, at least not
without some firmware modification
(http://www.olliw.eu/storm32bgc-wiki/How_to_configure_CP2102_USB_adapters_for_high_baud_rates)
that I haven't done.

The change works fine, it does actually switch to 115200 when starting
the loader, and when it quits I get the U-Boot shell with the low baud
rate :)

>>  env set bootargs boot.nfsroot.server=${serverip}
>>  boot.nfsroot.path=<PATH> comconsole_speed=${baudrate}
>>  tftpboot ${kernel_addr_r} loader.efi
>>  bootefi ${kernel_addr_r} ${fdtcontroladdr}
>
>  I've never used nfs with loader like this, do you control the dhcp ?
>  If so just set the correct rootpath in it and in uboot just do :
>  setenv boot_targets dhcp
>  saveenv

I have separate servers for DHCP and TFTP, so I use manual paths
because U-Boot does not respect any of the "next-server" style DHCP
options and always overwrites the TFTP IP with the DHCP server's IP.

All the auto discovery things are starting the payload the same way
anyway.

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Netbooting ROCK64

locke
In reply to this post by Greg V
It works when you put in some SD card or USB drive. See here:
https://forums.freebsd.org/threads/rock64.63647/
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Netbooting ROCK64

Greg V


On Fri, Jul 13, 2018 at 9:36 AM, [hidden email] wrote:
> It works when you put in some SD card or USB drive. See here:
> https://forums.freebsd.org/threads/rock64.63647/

Thanks! That got it to connect over NFS! What a weird bug…

---

So yeah, after that: loader.efi doesn't respect boot.nfsroot.path and
tries to mount /, so I had to adjust the DHCP server like I have
already done for the RPis: (dnsmasq)

dhcp-mac=set:rock64,06:d4:ce:__:__:__

dhcp-option-force=tag:rock64,17,"192.168.1.2:/some/path/for/rock64"


Also the dtb built into u-boot resulted in a "Fatal data abort" after:

gpio0: Cannot get clock

Using a tftp'd dtb fixed it. Finally I have a working rock64!! :)

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "[hidden email]"