9front - general discussion about 9front
 help / color / mirror / Atom feed
* UEFI boot on ARM / RPi
@ 2020-05-21 23:51 raingloom
  2020-05-22  2:14 ` [9front] " Roman Shaposhnik
  0 siblings, 1 reply; 15+ messages in thread
From: raingloom @ 2020-05-21 23:51 UTC (permalink / raw)
  To: 9front

Hi folks!

So, I recently found out about EDK2 for Raspberry Pi and since I had
plenty of issues trying to boot from my external HDD connected via USB,
and this seems to solve it, at least for kernels that support UEFI,
which 9front does not.

My question is, obviously, could someone help add support for it? As I
understand it, it would also help booting on other ARM platforms that
have UEFI support.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] UEFI boot on ARM / RPi
  2020-05-21 23:51 UEFI boot on ARM / RPi raingloom
@ 2020-05-22  2:14 ` Roman Shaposhnik
  2020-05-22  2:29   ` ori
  0 siblings, 1 reply; 15+ messages in thread
From: Roman Shaposhnik @ 2020-05-22  2:14 UTC (permalink / raw)
  To: 9front

On Thu, May 21, 2020 at 4:51 PM raingloom <raingloom@riseup.net> wrote:
> Hi folks!
>
> So, I recently found out about EDK2 for Raspberry Pi

WFWI, you now have eve more choice with UEFI payloads on RPi:
     https://github.com/ARM-software/u-boot/blob/master/doc/README.uefi

I am actually using that (and so does SuSE for example)

> and since I had
> plenty of issues trying to boot from my external HDD connected via USB,
> and this seems to solve it, at least for kernels that support UEFI,
> which 9front does not.
>
> My question is, obviously, could someone help add support for it? As I
> understand it, it would also help booting on other ARM platforms that
> have UEFI support.

My immediate question is around build tooling: UEFI presupposes that
you're producing a PE/COFF binary from your build toolchain. On Linux
you do with things like linker scripts, not sure what a native Plan9
equivalent would be.

Thanks,
Roman.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] UEFI boot on ARM / RPi
  2020-05-22  2:14 ` [9front] " Roman Shaposhnik
@ 2020-05-22  2:29   ` ori
  2020-05-22  8:23     ` hiro
                       ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: ori @ 2020-05-22  2:29 UTC (permalink / raw)
  To: roman, 9front

> My immediate question is around build tooling: UEFI presupposes that
> you're producing a PE/COFF binary from your build toolchain. On Linux
> you do with things like linker scripts, not sure what a native Plan9
> equivalent would be.

We support that in 8l for UEFI boot support: take a look at '-3' or '-4'.
You'd need to teach the appropriate arm linker about this too.



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] UEFI boot on ARM / RPi
  2020-05-22  2:29   ` ori
@ 2020-05-22  8:23     ` hiro
  2020-05-22 15:16       ` raingloom
  2020-05-22 10:59     ` cinap_lenrek
  2020-05-23 23:13     ` Ethan Gardener
  2 siblings, 1 reply; 15+ messages in thread
From: hiro @ 2020-05-22  8:23 UTC (permalink / raw)
  To: 9front

this is useless. just put the kernel on sd card and then your external
disks should work just fine for everything else.

stop mashing keys.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] UEFI boot on ARM / RPi
  2020-05-22  2:29   ` ori
  2020-05-22  8:23     ` hiro
@ 2020-05-22 10:59     ` cinap_lenrek
  2020-05-25  3:14       ` Roman Shaposhnik
  2020-05-23 23:13     ` Ethan Gardener
  2 siblings, 1 reply; 15+ messages in thread
From: cinap_lenrek @ 2020-05-22 10:59 UTC (permalink / raw)
  To: 9front

... not using any of this in 9boot on 386/amd64 tho. just linking
a headerless file (-H3) hand hand crafting the PE header in the
assembler. with 6l, i'm even just generating a a.out and stripping
off the a.out header with dd.

see /sys/src/boot/efi/pe32.s and /sys/src/boot/efi/pe64.s

--
cinap


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] UEFI boot on ARM / RPi
  2020-05-22  8:23     ` hiro
@ 2020-05-22 15:16       ` raingloom
  2020-05-22 16:58         ` hiro
  0 siblings, 1 reply; 15+ messages in thread
From: raingloom @ 2020-05-22 15:16 UTC (permalink / raw)
  To: 9front

On Fri, 22 May 2020 08:23:46 +0000
hiro <23hiro@gmail.com> wrote:

> this is useless. just put the kernel on sd card and then your external
> disks should work just fine for everything else.
> 
> stop mashing keys.

That's what I used to do, and it did mostly work, but having to edit
config.txt whenever I want to boot something else is cumbersome,
especially when the kernel or bootloader is broken or corrupted.
I'd much rather use the microSD as just a bootloader and boot whatever
from wherever I'd like. So it's definitely useful for me.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] UEFI boot on ARM / RPi
  2020-05-22 15:16       ` raingloom
@ 2020-05-22 16:58         ` hiro
  2020-05-22 22:44           ` raingloom
  0 siblings, 1 reply; 15+ messages in thread
From: hiro @ 2020-05-22 16:58 UTC (permalink / raw)
  To: 9front

then just use 9front as the bootloader.
two-stage 9front kernel loading
/dev/reboot


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] UEFI boot on ARM / RPi
  2020-05-22 16:58         ` hiro
@ 2020-05-22 22:44           ` raingloom
  2020-05-22 22:52             ` Daniel Morandini
  2020-05-23  7:34             ` hiro
  0 siblings, 2 replies; 15+ messages in thread
From: raingloom @ 2020-05-22 22:44 UTC (permalink / raw)
  To: 9front

On Fri, 22 May 2020 16:58:25 +0000
hiro <23hiro@gmail.com> wrote:

> then just use 9front as the bootloader.
> two-stage 9front kernel loading
> /dev/reboot

When I last tried that it didn't work. Not sure why.
The system is slightly broken right now because all my mice stopped
working for some reason (even though the setup is basically the same
one i used a few months ago), so I'll try to reproduce it later. But I'm
pretty sure that doing what the docs said didn't work, so I just
assumed the bcm(64) kernel doesn't support it.
I also want to try out some Linux and BSD distros on it, and I'm not
sure if I can kexec between them and 9front. My conservative guess was
that I cannot, or at the very least there will be limitations.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] UEFI boot on ARM / RPi
  2020-05-22 22:44           ` raingloom
@ 2020-05-22 22:52             ` Daniel Morandini
  2020-05-23  3:34               ` raingloom
  2020-05-23  7:34             ` hiro
  1 sibling, 1 reply; 15+ messages in thread
From: Daniel Morandini @ 2020-05-22 22:52 UTC (permalink / raw)
  To: 9front

Hey,
Let me know about the mice issue please, I’m also into that but now I’ve a working setup. I have some work todo first, but I want to try fixing it.

Cheers,
dan

> Il giorno 23 mag 2020, alle ore 00:45, raingloom <raingloom@riseup.net> ha scritto:
> 
> The system is slightly broken right now because all my mice stopped
> working for some reason (even though the setup is basically the same
> one i used a few months ago), so I'll try to reproduce it later.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] UEFI boot on ARM / RPi
  2020-05-22 22:52             ` Daniel Morandini
@ 2020-05-23  3:34               ` raingloom
  0 siblings, 0 replies; 15+ messages in thread
From: raingloom @ 2020-05-23  3:34 UTC (permalink / raw)
  To: 9front

On Sat, 23 May 2020 00:52:11 +0200
Daniel Morandini <danielmorandini@me.com> wrote:

> Hey,
> Let me know about the mice issue please, I’m also into that but now
> I’ve a working setup. I have some work todo first, but I want to try
> fixing it.
> 
> Cheers,
> dan

I tried a Genius and an Acme mouse. There were no errors in the log,
only when I unplugged them. I think the only thing that could
have changed is the RPi firmware on the microSD. But right now I'm
using the ones included in the No Thinkpad release image.
I'll try to debug it properly when I have more time. I haven't tested
if it's a 9front specific issue or if Linux also suffers from it.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] UEFI boot on ARM / RPi
  2020-05-22 22:44           ` raingloom
  2020-05-22 22:52             ` Daniel Morandini
@ 2020-05-23  7:34             ` hiro
  2020-05-23 19:20               ` John Weaver
  1 sibling, 1 reply; 15+ messages in thread
From: hiro @ 2020-05-23  7:34 UTC (permalink / raw)
  To: 9front

>> /dev/reboot
>
> When I last tried that it didn't work. Not sure why.
> The system is slightly broken right now because all my mice stopped
> working for some reason (even though the setup is basically the same
> one i used a few months ago), so I'll try to reproduce it later. But I'm
> pretty sure that doing what the docs said didn't work, so I just
> assumed the bcm(64) kernel doesn't support it.
> I also want to try out some Linux and BSD distros on it, and I'm not
> sure if I can kexec between them and 9front. My conservative guess was
> that I cannot, or at the very least there will be limitations.
>

well, if you fix whatever issues /dev/reboot still have for you it
will save you time in the long run. maintaining an efi operating
system alongside the bootloader firmware and all your other bsd, linux
shit is much more complexity than you will be able to handle.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] UEFI boot on ARM / RPi
  2020-05-23  7:34             ` hiro
@ 2020-05-23 19:20               ` John Weaver
  0 siblings, 0 replies; 15+ messages in thread
From: John Weaver @ 2020-05-23 19:20 UTC (permalink / raw)
  To: 9front

On Sat, May 23, 2020 at 07:34:15AM +0000, hiro wrote:
> >> /dev/reboot
> >
> > When I last tried that it didn't work. Not sure why.
> > The system is slightly broken right now because all my mice stopped
> > working for some reason (even though the setup is basically the same
> > one i used a few months ago), so I'll try to reproduce it later. But I'm
> > pretty sure that doing what the docs said didn't work, so I just
> > assumed the bcm(64) kernel doesn't support it.
> > I also want to try out some Linux and BSD distros on it, and I'm not
> > sure if I can kexec between them and 9front. My conservative guess was
> > that I cannot, or at the very least there will be limitations.
> >
> 
> well, if you fix whatever issues /dev/reboot still have for you it
> will save you time in the long run. maintaining an efi operating
> system alongside the bootloader firmware and all your other bsd, linux
> shit is much more complexity than you will be able to handle.

I think the error is that reboot(8) doesn't recognize the signature of the
kernel for 9pi{,2,3,4}.  The 's' kernels so work with reboot(8).

-john


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] UEFI boot on ARM / RPi
  2020-05-22  2:29   ` ori
  2020-05-22  8:23     ` hiro
  2020-05-22 10:59     ` cinap_lenrek
@ 2020-05-23 23:13     ` Ethan Gardener
  2 siblings, 0 replies; 15+ messages in thread
From: Ethan Gardener @ 2020-05-23 23:13 UTC (permalink / raw)
  To: 9front, roman

On Fri, May 22, 2020, at 3:29 AM, ori@eigenstate.org wrote:
> We support that in 8l for UEFI boot support: take a look at '-3' or '-4'.

Do you mean 6l? I'm told 32-bit UEFI is very rare.
(I'll be happy if I was misinformed - got an idea which could use 32-bit UEFI.)


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] UEFI boot on ARM / RPi
  2020-05-22 10:59     ` cinap_lenrek
@ 2020-05-25  3:14       ` Roman Shaposhnik
  2020-05-25  6:49         ` cinap_lenrek
  0 siblings, 1 reply; 15+ messages in thread
From: Roman Shaposhnik @ 2020-05-25  3:14 UTC (permalink / raw)
  To: 9front

On Fri, May 22, 2020 at 3:59 AM <cinap_lenrek@felloff.net> wrote:
>
> ... not using any of this in 9boot on 386/amd64 tho. just linking
> a headerless file (-H3) hand hand crafting the PE header in the
> assembler. with 6l, i'm even just generating a a.out and stripping
> off the a.out header with dd.
>
> see /sys/src/boot/efi/pe32.s and /sys/src/boot/efi/pe64.s

Thanks! This is very helpful.

Btw, I'm trying to setup a development environment for Plan9/Pi
and it seems that I can't make my qemu-system-aarch64 emulate
enough of a UART for 9pi3 kernel to be happy. E.g.
   qemu-system-aarch64 -M raspi3 -kernel 9pi3 -append console=0
-serial mon:stdio
actually does the right thing and even brings up the GUI, but
it doesn't really seem to use the UART -- hence the console is empty.

If anybody has any hints as to where to dig to -- I'd appreciate it.

Thanks,
Roman.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [9front] UEFI boot on ARM / RPi
  2020-05-25  3:14       ` Roman Shaposhnik
@ 2020-05-25  6:49         ` cinap_lenrek
  0 siblings, 0 replies; 15+ messages in thread
From: cinap_lenrek @ 2020-05-25  6:49 UTC (permalink / raw)
  To: 9front

the raspi has two uarts! the uartmini and uartpl011. iirc, qemu
emulates the uartpl011. while in a real raspi, we use the mini
uart as primary. (they can be switched using gpio pin muxing).

i added a uartpl011 driver for the very reason so i could debug
in qemu (or early boot). try with console=1.

--
cinap


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-05-25  6:49 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-21 23:51 UEFI boot on ARM / RPi raingloom
2020-05-22  2:14 ` [9front] " Roman Shaposhnik
2020-05-22  2:29   ` ori
2020-05-22  8:23     ` hiro
2020-05-22 15:16       ` raingloom
2020-05-22 16:58         ` hiro
2020-05-22 22:44           ` raingloom
2020-05-22 22:52             ` Daniel Morandini
2020-05-23  3:34               ` raingloom
2020-05-23  7:34             ` hiro
2020-05-23 19:20               ` John Weaver
2020-05-22 10:59     ` cinap_lenrek
2020-05-25  3:14       ` Roman Shaposhnik
2020-05-25  6:49         ` cinap_lenrek
2020-05-23 23:13     ` Ethan Gardener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).