Re: Tftpboot on arm64 is not yet implemented?

2018-03-06 Thread Christian Weisgerber
On 2018-03-05, qweqwe.2009...@gmail.com  wrote:

> I need network boot on my Raspberry Pi 3B. I compiled u-boot and OpenBSD
> efiboot from the latest sources, and got following result:

TFTP network booting on arm64 is implemented.  It works with the
OverDrive 1000, which has a UEFI BIOS.

I have no idea how the Pi3 boots, though.

-- 
Christian "naddy" Weisgerber  na...@mips.inka.de



Re: Tftpboot on arm64 is not yet implemented?

2018-03-06 Thread Mark Kettenis
> From: Christian Weisgerber 
> Date: Tue, 6 Mar 2018 19:10:32 - (UTC)
> 
> On 2018-03-05, qweqwe.2009...@gmail.com  wrote:
> 
> > I need network boot on my Raspberry Pi 3B. I compiled u-boot and OpenBSD
> > efiboot from the latest sources, and got following result:
> 
> TFTP network booting on arm64 is implemented.  It works with the
> OverDrive 1000, which has a UEFI BIOS.
> 
> I have no idea how the Pi3 boots, though.

U-Boot.  New versions of U-Boot implement the necessary UEFI
interfaces, but they'll only work if U-Boot has a driver for the
network interface.  You should probably check whether the network
interface works within U-Boot first.



Re: Tftpboot on arm64 is not yet implemented?

2018-03-06 Thread Patrick Wildt
On Tue, Mar 06, 2018 at 08:24:04PM +0100, Mark Kettenis wrote:
> > From: Christian Weisgerber 
> > Date: Tue, 6 Mar 2018 19:10:32 - (UTC)
> > 
> > On 2018-03-05, qweqwe.2009...@gmail.com  wrote:
> > 
> > > I need network boot on my Raspberry Pi 3B. I compiled u-boot and OpenBSD
> > > efiboot from the latest sources, and got following result:
> > 
> > TFTP network booting on arm64 is implemented.  It works with the
> > OverDrive 1000, which has a UEFI BIOS.
> > 
> > I have no idea how the Pi3 boots, though.
> 
> U-Boot.  New versions of U-Boot implement the necessary UEFI
> interfaces, but they'll only work if U-Boot has a driver for the
> network interface.  You should probably check whether the network
> interface works within U-Boot first.

Actually... No, this is not the issue.  U-Boot has an implementation
for the Network Subsystem, which means that you can read/write raw
UDP packets.  The implementation on arm64 makes use of a higher level
TFTP implementation which proper EFI implementations provide.  This
can be seen on the OverDrive 1000.  It provides an interface to "get
files".  This means the EFI layer does the actual TFTP protocol.

u-boot does not provide this layer.  If you need network boot support
on u-boot based machines, you either need to implement this layer in
u-boot, our you need to extend our arm64 bootloader to do raw network
packets and the TFTP protocol.

Patrick



Re: Tftpboot on arm64 is not yet implemented?

2018-03-06 Thread Mark Kettenis
> Date: Tue, 6 Mar 2018 21:13:50 +0100
> From: Patrick Wildt 
> 
> On Tue, Mar 06, 2018 at 08:24:04PM +0100, Mark Kettenis wrote:
> > > From: Christian Weisgerber 
> > > Date: Tue, 6 Mar 2018 19:10:32 - (UTC)
> > > 
> > > On 2018-03-05, qweqwe.2009...@gmail.com  wrote:
> > > 
> > > > I need network boot on my Raspberry Pi 3B. I compiled u-boot and OpenBSD
> > > > efiboot from the latest sources, and got following result:
> > > 
> > > TFTP network booting on arm64 is implemented.  It works with the
> > > OverDrive 1000, which has a UEFI BIOS.
> > > 
> > > I have no idea how the Pi3 boots, though.
> > 
> > U-Boot.  New versions of U-Boot implement the necessary UEFI
> > interfaces, but they'll only work if U-Boot has a driver for the
> > network interface.  You should probably check whether the network
> > interface works within U-Boot first.
> 
> Actually... No, this is not the issue.  U-Boot has an implementation
> for the Network Subsystem, which means that you can read/write raw
> UDP packets.  The implementation on arm64 makes use of a higher level
> TFTP implementation which proper EFI implementations provide.  This
> can be seen on the OverDrive 1000.  It provides an interface to "get
> files".  This means the EFI layer does the actual TFTP protocol.
> 
> u-boot does not provide this layer.  If you need network boot support
> on u-boot based machines, you either need to implement this layer in
> u-boot, our you need to extend our arm64 bootloader to do raw network
> packets and the TFTP protocol.

Ah you're right.  U-Boot implements TFTP but it isn't exposed through
its EFI interface.



Re: Tftpboot on arm64 is not yet implemented?

2018-03-06 Thread Jiri B
On Tue, Mar 06, 2018 at 09:30:34PM +0100, Mark Kettenis wrote:
> > Actually... No, this is not the issue.  U-Boot has an implementation
> > for the Network Subsystem, which means that you can read/write raw
> > UDP packets.  The implementation on arm64 makes use of a higher level
> > TFTP implementation which proper EFI implementations provide.  This
> > can be seen on the OverDrive 1000.  It provides an interface to "get
> > files".  This means the EFI layer does the actual TFTP protocol.
> > 
> > u-boot does not provide this layer.  If you need network boot support
> > on u-boot based machines, you either need to implement this layer in
> > u-boot, our you need to extend our arm64 bootloader to do raw network
> > packets and the TFTP protocol.
> 
> Ah you're right.  U-Boot implements TFTP but it isn't exposed through
> its EFI interface.

IIUC, on rpi3 you can boot either directly (bootcode.bin) after enabling it,
or you use U-Boot.

https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/net.md

So what's the flow?

- first stage BL
- bootcode.bin over tftp?
- start.elf over tftp?
- kernel.img -> symlink to bsd, over tftp?

Jiri