Tftpboot on arm64 is not yet implemented?

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

Tftpboot on arm64 is not yet implemented?

qweqwe.2009.ab
Hello.
I need network boot on my Raspberry Pi 3B. I compiled u-boot and OpenBSD
efiboot from the latest sources, and got following result:
-----------------------------
U-Boot> bootefi 0x200000 0x100
## Starting EFI application at 00200000 ...
WARNING at drivers/mmc/bcm2835_sdhost.c:437/bcm2835_send_command()!
WARNING at drivers/mmc/bcm2835_sdhost.c:437/bcm2835_send_command()!
WARNING at drivers/mmc/bcm2835_sdhost.c:437/bcm2835_send_command()!
Card did not respond to voltage select!
Scanning disk [hidden email]...
Disk [hidden email] not ready
Card did not respond to voltage select!
Scanning disk [hidden email]...
Disk [hidden email] not ready
Found 0 disks
>> OpenBSD/arm64 BOOTAA64 0.11
open(tftp0a:/etc/boot.conf): Operation not permitted
boot>
booting tftp0a:/bsd: open tftp0a:/bsd: Operation not permitted
 failed(1). will try /bsd
boot>
booting tftp0a:/bsd: open tftp0a:/bsd: Operation not permitted
 failed(1). will try /bsd
Turning timeout off.
---------------------------
Am I doing something wrong or this boot mode is not yet implemented?
Reply | Threaded
Open this post in threaded view
|

Re: Tftpboot on arm64 is not yet implemented?

Christian Weisgerber
On 2018-03-05, [hidden email] <[hidden email]> 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                          [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Tftpboot on arm64 is not yet implemented?

Mark Kettenis
> From: Christian Weisgerber <[hidden email]>
> Date: Tue, 6 Mar 2018 19:10:32 -0000 (UTC)
>
> On 2018-03-05, [hidden email] <[hidden email]> 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.

Reply | Threaded
Open this post in threaded view
|

Re: Tftpboot on arm64 is not yet implemented?

Patrick Wildt-3
On Tue, Mar 06, 2018 at 08:24:04PM +0100, Mark Kettenis wrote:

> > From: Christian Weisgerber <[hidden email]>
> > Date: Tue, 6 Mar 2018 19:10:32 -0000 (UTC)
> >
> > On 2018-03-05, [hidden email] <[hidden email]> 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

Reply | Threaded
Open this post in threaded view
|

Re: Tftpboot on arm64 is not yet implemented?

Mark Kettenis
> Date: Tue, 6 Mar 2018 21:13:50 +0100
> From: Patrick Wildt <[hidden email]>
>
> On Tue, Mar 06, 2018 at 08:24:04PM +0100, Mark Kettenis wrote:
> > > From: Christian Weisgerber <[hidden email]>
> > > Date: Tue, 6 Mar 2018 19:10:32 -0000 (UTC)
> > >
> > > On 2018-03-05, [hidden email] <[hidden email]> 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.

Reply | Threaded
Open this post in threaded view
|

Re: Tftpboot on arm64 is not yet implemented?

Jiri B-2
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

Reply | Threaded
Open this post in threaded view
|

Re: Tftpboot on arm64 is not yet implemented?

qweqwe.2009.ab
> 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
>

No, it doesn't work. The flow is:
- first stage BL
- bootcode.bin over tftp?
- start.elf over tftp?
- kernel.img -> symlink to U-Boot over tftp

Reply | Threaded
Open this post in threaded view
|

Re: Tftpboot on arm64 is not yet implemented?

qweqwe.2009.ab
Hello everybody again.

I saw a commit (https://github.com/openbsd/src/commit/b0a12b40c03a7847ac690bf28d53883110b63b61)
that implements tftp booting using EFI's Simple Network protocol,
but nothing was changed on my Pi 3b. The output is the same:
boot>
booting tftp0a:/bsd: open tftp0a:/bsd: Operation not permitted

Am I doing something wrong or this mode is not yet implemented?

Reply | Threaded
Open this post in threaded view
|

Re: Tftpboot on arm64 is not yet implemented?

Patrick Wildt-3
On Mon, Apr 16, 2018 at 01:43:52AM +0300, [hidden email] wrote:

> Hello everybody again.
>
> I saw a commit (https://github.com/openbsd/src/commit/b0a12b40c03a7847ac690bf28d53883110b63b61)
> that implements tftp booting using EFI's Simple Network protocol,
> but nothing was changed on my Pi 3b. The output is the same:
> boot>
> booting tftp0a:/bsd: open tftp0a:/bsd: Operation not permitted
>
> Am I doing something wrong or this mode is not yet implemented?
>

I think there are changes missing that are not yet committed to the
u-boot source tree.

Reply | Threaded
Open this post in threaded view
|

Re: Tftpboot on arm64 is not yet implemented?

Nikolai Borodin
In reply to this post by qweqwe.2009.ab
If you want to boot over the network you can also use iscsi via ipxe. snp.efi is loaded via u-boot which then can mount an iscsi target like the miniroot filesystem over the network.


> Hello everybody again.
>
> I saw a commit (https://github.com/openbsd/src/commit/b0a12b40c03a7847ac690bf28d53883110b63b61)
> that implements tftp booting using EFI's Simple Network protocol,
> but nothing was changed on my Pi 3b. The output is the same:
> boot>
> booting tftp0a:/bsd: open tftp0a:/bsd: Operation not permitted
>
> Am I doing something wrong or this mode is not yet implemented?