Re: Tftpboot on arm64 is not yet implemented?

2018-04-18 Thread Nikolai Borodin
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?



Re: Tftpboot on arm64 is not yet implemented?

2018-04-16 Thread Patrick Wildt
On Mon, Apr 16, 2018 at 01:43:52AM +0300, qweqwe.2009...@gmail.com 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.



Re: Tftpboot on arm64 is not yet implemented?

2018-04-15 Thread 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?



Re: Tftpboot on arm64 is not yet implemented?

2018-04-10 Thread Jonathan Gray
On Tue, Apr 10, 2018 at 08:47:02PM +0300, Nikolai Borodin wrote:
> Hopefully, the message is not garbled this time ...
> 
> So what do I need to do after u-boot has loaded? The best I could get up to 
> now was loading the kernel and dtb over tftp, but it is then stuck at
> "Starting kernel".

I believe U-Boot UEFI does not fully implement networking protocols in
the previous release.

> 
>  Are these kernels bootable by u-boot at all or do they still need conversion 
> to uimage? The mkuboot command is supposed to
> do that but I am not sure about the -e and -l addresses. Additionally, the 
> image size increases and then the u-boot.bin in the miniroot
> complains about the size limit. When I compile a custom u-boot with support 
> for larger kernel sizes it is then still stuck at "starting
> kernel".
> 
> Is there some documentation on how the u-boot.bin for OpenBSD was build? Is 
> it derived from mainline u-boot or some custom fork? There
> is the -o option for mkuboot which accepts "Linux" and "OpenBSD" as 
> arguments. I saw "Linux" being used on the mail list, when I choose
> "OpenBSD" to convert the kernel u-boot throws some error about the OS not 
> being supported. I build my u-boot on linux but I see some options in the
> source regarding OpenBSD , so does the u-boot.bin need to be build on OpenBSD?
> 
> Regards,
> Nikolai

U-Boot loads BOOTARM.EFI or BOOTAA64.EFI which load the kernel.
Wrapping kernels with mkuboot is no longer done/used.

U-Boot binaries included in install images are built from
sysutils/u-boot in ports.



Re: Tftpboot on arm64 is not yet implemented?

2018-04-10 Thread Nikolai Borodin
Hopefully, the message is not garbled this time ...

So what do I need to do after u-boot has loaded? The best I could get up to now 
was loading the kernel and dtb over tftp, but it is then stuck at
"Starting kernel".

 Are these kernels bootable by u-boot at all or do they still need conversion 
to uimage? The mkuboot command is supposed to
do that but I am not sure about the -e and -l addresses. Additionally, the 
image size increases and then the u-boot.bin in the miniroot
complains about the size limit. When I compile a custom u-boot with support for 
larger kernel sizes it is then still stuck at "starting
kernel".

Is there some documentation on how the u-boot.bin for OpenBSD was build? Is it 
derived from mainline u-boot or some custom fork? There
is the -o option for mkuboot which accepts "Linux" and "OpenBSD" as arguments. 
I saw "Linux" being used on the mail list, when I choose
"OpenBSD" to convert the kernel u-boot throws some error about the OS not being 
supported. I build my u-boot on linux but I see some options in the
source regarding OpenBSD , so does the u-boot.bin need to be build on OpenBSD?

Regards,
Nikolai



Re: Tftpboot on arm64 is not yet implemented?

2018-04-06 Thread Nikolai Borodin
So what do I need to do after u-boot has loaded? The best I could get up
to now was loading the kernel and dtb over tftp, but it is then stuck at
"Starting kernel".� Are these kernels bootable by u-boot at all or do
they still need conversion to uimage ? The mkuboot command is supposed to
do that but I am not sure about the -e and -l addresses. Additionally,
the image size increases and then the u-boot.bin in the miniroot
complains about the size limit. When I compile a custom u-boot with
support for larger kernel sizes it is then still stuck at "starting
kernel".� Is there some documentation on how the u-boot.bin for openbsd
was build? Is it derived from mainline u-boot or some custom fork?There
is the -o option for mkuboot which accepts "Linux" and "OpenBSD" as
arguments. I saw "Linux" being used on the mail list, when I choose
"OpenBSD" to convert the kernel u-boot throws some error about the OS not
being supported.I build my u-boot on linux but I see some options in the
source regarding OpenBSD , so does the u-boot.bin need to be build on
OpenBSD?� Regards,Nikolai


Re: Tftpboot on arm64 is not yet implemented?

2018-03-09 Thread 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



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



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 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
> 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 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