* [9front] Booting 9front ARM64 on QEMU with UEFI
@ 2025-03-05 10:30 zamfofex
2025-03-05 18:31 ` Jacob Moody
0 siblings, 1 reply; 10+ messages in thread
From: zamfofex @ 2025-03-05 10:30 UTC (permalink / raw)
To: 9front@9front.org
I was told 9front has support for UEFI, so I have been investigating building a 9front ARM64 image that can boot on QEMU with UEFI.
I am using QEMU_EFI.fd from here as firmware: <https://releases.linaro.org/components/kernel/uefi-linaro/latest/release/qemu64/> and I was able to boot a Linux distro.
Now, reading the mkfile on sys/lib/dist, it seems like UEFI is only supported in 386, is that right? Could it be possible to hack a quick modification of the mkfile to support UEFI on ARM64, or is this a hopeless task?
Some further thoughts: This is (kind of) a followup to the endeavors I brought up recently on IRC of running 9front on a Hetzner ARM64 VPS. I am still not fully convinced that Hetzner virtualised hardware differs much from just plain QEMU virtualisation, so I decided to persist a bit more. However, I have reduced my scope to just running 9front on QEMU locally for now, so that I can see if at least that is possible with UEFI.
Thanks in advance!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9front] Booting 9front ARM64 on QEMU with UEFI
2025-03-05 10:30 [9front] Booting 9front ARM64 on QEMU with UEFI zamfofex
@ 2025-03-05 18:31 ` Jacob Moody
2025-03-05 21:00 ` Jacob Moody
0 siblings, 1 reply; 10+ messages in thread
From: Jacob Moody @ 2025-03-05 18:31 UTC (permalink / raw)
To: 9front
On 3/5/25 04:30, zamfofex wrote:
> I was told 9front has support for UEFI, so I have been investigating building a 9front ARM64 image that can boot on QEMU with UEFI.
>
> I am using QEMU_EFI.fd from here as firmware: <https://releases.linaro.org/components/kernel/uefi-linaro/latest/release/qemu64/> and I was able to boot a Linux distro.
>
> Now, reading the mkfile on sys/lib/dist, it seems like UEFI is only supported in 386, is that right? Could it be possible to hack a quick modification of the mkfile to support UEFI on ARM64, or is this a hopeless task?
>
> Some further thoughts: This is (kind of) a followup to the endeavors I brought up recently on IRC of running 9front on a Hetzner ARM64 VPS. I am still not fully convinced that Hetzner virtualised hardware differs much from just plain QEMU virtualisation, so I decided to persist a bit more. However, I have reduced my scope to just running 9front on QEMU locally for now, so that I can see if at least that is possible with UEFI.
>
> Thanks in advance!
We do have arm64 support in our efi bootloader (see /sys/src/boot/efi/mkfile for bootaa64.efi), the existing arm64 qemu target specifically targets u-boot
for booting the kernel. You could attempt to use the efi bootloader (by making an img as you described) instead but there is no promises that it won't require changes
or modifications to the kernel in order to facilitate this. In regards to this, even through we have this arm64 qemu build it still requires quite specific settings
on the qemu side for working. The details are discussed in the FQA: https://fqa.9front.org/fqa3.html#3.3.1.1.1
So to start with, I would find it highly unlikely that Hetzner's arm64 machines match these settings exactly, not impossible just highly improbable.
You could boot linux on them and manually verify that they have the following knobs all tweaked to the correct value as a first step, but that still
is no promise that the existing code will work as-is without needing to roll up your sleeves and write some kernel code even if all the values are
set the same.
Thanks,
moody
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9front] Booting 9front ARM64 on QEMU with UEFI
2025-03-05 18:31 ` Jacob Moody
@ 2025-03-05 21:00 ` Jacob Moody
2025-03-06 13:58 ` zamfofex
0 siblings, 1 reply; 10+ messages in thread
From: Jacob Moody @ 2025-03-05 21:00 UTC (permalink / raw)
To: 9front
On 3/5/25 12:31, Jacob Moody wrote:
> On 3/5/25 04:30, zamfofex wrote:
>> I was told 9front has support for UEFI, so I have been investigating building a 9front ARM64 image that can boot on QEMU with UEFI.
>>
>> I am using QEMU_EFI.fd from here as firmware: <https://releases.linaro.org/components/kernel/uefi-linaro/latest/release/qemu64/> and I was able to boot a Linux distro.
>>
>> Now, reading the mkfile on sys/lib/dist, it seems like UEFI is only supported in 386, is that right? Could it be possible to hack a quick modification of the mkfile to support UEFI on ARM64, or is this a hopeless task?
>>
>> Some further thoughts: This is (kind of) a followup to the endeavors I brought up recently on IRC of running 9front on a Hetzner ARM64 VPS. I am still not fully convinced that Hetzner virtualised hardware differs much from just plain QEMU virtualisation, so I decided to persist a bit more. However, I have reduced my scope to just running 9front on QEMU locally for now, so that I can see if at least that is possible with UEFI.
>>
>> Thanks in advance!
>
> We do have arm64 support in our efi bootloader (see /sys/src/boot/efi/mkfile for bootaa64.efi), the existing arm64 qemu target specifically targets u-boot
> for booting the kernel. You could attempt to use the efi bootloader (by making an img as you described) instead but there is no promises that it won't require changes
> or modifications to the kernel in order to facilitate this. In regards to this, even through we have this arm64 qemu build it still requires quite specific settings
> on the qemu side for working. The details are discussed in the FQA: https://fqa.9front.org/fqa3.html#3.3.1.1.1
>
> So to start with, I would find it highly unlikely that Hetzner's arm64 machines match these settings exactly, not impossible just highly improbable.
> You could boot linux on them and manually verify that they have the following knobs all tweaked to the correct value as a first step, but that still
> is no promise that the existing code will work as-is without needing to roll up your sleeves and write some kernel code even if all the values are
> set the same.
>
>
A small addition here, the original author of the qemu arm64 kernel has informed me that there is a WIP patch for making the qemu kernel boot with UEFI.
https://shithub.us/kws/wip/83a46e69f4f8497df5e03a7f288de0d84b9ca91b/qemu-efi.diff/f.html
No promises that this works or will still apply cleanly, but if you want to jump in to this problem this is likely a good first step.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9front] Booting 9front ARM64 on QEMU with UEFI
2025-03-05 21:00 ` Jacob Moody
@ 2025-03-06 13:58 ` zamfofex
2025-03-06 14:07 ` theinicke
0 siblings, 1 reply; 10+ messages in thread
From: zamfofex @ 2025-03-06 13:58 UTC (permalink / raw)
To: 9front, Jacob Moody
> A small addition here, the original author of the qemu arm64 kernel has informed me that there is a WIP patch for making the qemu kernel boot with UEFI.
>
> https://shithub.us/kws/wip/83a46e69f4f8497df5e03a7f288de0d84b9ca91b/qemu-efi.diff/f.html
>
> No promises that this works or will still apply cleanly, but if you want to jump in to this problem this is likely a good first step.
Thanks for the heads up and advice. Unfortunately, I don’t think I’m knowledgeable enough to work on this myself.
An alternative approach I can think of for what I want to accomplish would be getting a Raspberry Pi to run 9front.
The release notes mention that the “pi3” image works for the Pi 4 too, but makes no mention of Pi 5. I assume that’s because no-one has tried it yet, but I wonder whether it’s likely or unlikely that it would work on the Pi 5, or if I should stick to getting a Raspberry Pi 4 instead.
(I know there are probably “no guarantees” either way, I’m just wondering whether it’s likely or unlikely to work.)
Thanks in advance again!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9front] Booting 9front ARM64 on QEMU with UEFI
2025-03-06 13:58 ` zamfofex
@ 2025-03-06 14:07 ` theinicke
2025-03-06 19:38 ` Jacob Moody
2025-11-28 21:10 ` radiohotline
0 siblings, 2 replies; 10+ messages in thread
From: theinicke @ 2025-03-06 14:07 UTC (permalink / raw)
To: 9front
Quoth zamfofex <zamfofex@twdb.moe>:
> > A small addition here, the original author of the qemu arm64 kernel has informed me that there is a WIP patch for making the qemu kernel boot with UEFI.
> >
> > https://shithub.us/kws/wip/83a46e69f4f8497df5e03a7f288de0d84b9ca91b/qemu-efi.diff/f.html
> >
> > No promises that this works or will still apply cleanly, but if you want to jump in to this problem this is likely a good first step.
>
> Thanks for the heads up and advice. Unfortunately, I don’t think I’m knowledgeable enough to work on this myself.
>
> An alternative approach I can think of for what I want to accomplish would be getting a Raspberry Pi to run 9front.
>
> The release notes mention that the “pi3” image works for the Pi 4 too, but makes no mention of Pi 5. I assume that’s because no-one has tried it yet, but I wonder whether it’s likely or unlikely that it would work on the Pi 5, or if I should stick to getting a Raspberry Pi 4 instead.
>
> (I know there are probably “no guarantees” either way, I’m just wondering whether it’s likely or unlikely to work.)
>
> Thanks in advance again!
This is because pi3 and pi4 both are arm64 - the image includes a kernel for both architectures,
similarly pi2 and pi1 both being arm are targeted with the same image, also including 2 kernels.
However for pi5 there is no kernel available, hence it is not only unlikely, it won't work.
Pi4 on the other hand runs perfectly!
--
Tobias Heinicke
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9front] Booting 9front ARM64 on QEMU with UEFI
2025-03-06 14:07 ` theinicke
@ 2025-03-06 19:38 ` Jacob Moody
2025-03-06 20:41 ` zamfofex
2025-11-28 21:10 ` radiohotline
1 sibling, 1 reply; 10+ messages in thread
From: Jacob Moody @ 2025-03-06 19:38 UTC (permalink / raw)
To: 9front
On 3/6/25 08:07, theinicke@pheist.org wrote:
> Quoth zamfofex <zamfofex@twdb.moe>:
>>> A small addition here, the original author of the qemu arm64 kernel has informed me that there is a WIP patch for making the qemu kernel boot with UEFI.
>>>
>>> https://shithub.us/kws/wip/83a46e69f4f8497df5e03a7f288de0d84b9ca91b/qemu-efi.diff/f.html
>>>
>>> No promises that this works or will still apply cleanly, but if you want to jump in to this problem this is likely a good first step.
>>
>> Thanks for the heads up and advice. Unfortunately, I don’t think I’m knowledgeable enough to work on this myself.
>>
>> An alternative approach I can think of for what I want to accomplish would be getting a Raspberry Pi to run 9front.
>>
What is it that you're trying to accomplish that you need arm64 hardware?
If you don't mind me asking.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9front] Booting 9front ARM64 on QEMU with UEFI
2025-03-06 19:38 ` Jacob Moody
@ 2025-03-06 20:41 ` zamfofex
2025-03-06 21:06 ` Jacob Moody
0 siblings, 1 reply; 10+ messages in thread
From: zamfofex @ 2025-03-06 20:41 UTC (permalink / raw)
To: 9front, Jacob Moody
> What is it that you're trying to accomplish that you need arm64 hardware?
> If you don't mind me asking.
Literally just using something other than x86. Mostly just for the sake of saying I did it.
I could give a similar answer to “why do you need to use 9front?”, just s/x86/UNIX
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9front] Booting 9front ARM64 on QEMU with UEFI
2025-03-06 20:41 ` zamfofex
@ 2025-03-06 21:06 ` Jacob Moody
0 siblings, 0 replies; 10+ messages in thread
From: Jacob Moody @ 2025-03-06 21:06 UTC (permalink / raw)
To: 9front
On 3/6/25 14:41, zamfofex wrote:
>> What is it that you're trying to accomplish that you need arm64 hardware?
>> If you don't mind me asking.
>
> Literally just using something other than x86. Mostly just for the sake of saying I did it.
>
> I could give a similar answer to “why do you need to use 9front?”, just s/x86/UNIX
Sure that works. If I can make a suggestion though, if you do plan on using a pi4
I would suggest having a typical amd64 machine as your fs. Using a disk filesystem off a pi4
sd card is not ideal.
If you would call yourself a newcomer to plan 9 and 9front at large I would suggest using something
more traditional for getting a foothold in the system before trying something more involved.
The pi has generated a lot of animosity from folks working on it, and given the relative power and
memory constraints I think its not a great first introduction to the system. But that's just my two
cents, I encourage you to do whatever you want to do.
Thanks,
moody
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9front] Booting 9front ARM64 on QEMU with UEFI
2025-03-06 14:07 ` theinicke
2025-03-06 19:38 ` Jacob Moody
@ 2025-11-28 21:10 ` radiohotline
2025-11-28 23:20 ` ori
1 sibling, 1 reply; 10+ messages in thread
From: radiohotline @ 2025-11-28 21:10 UTC (permalink / raw)
To: 9front; +Cc: theinicke
On 2025-03-06 17:07, theinicke@pheist.org wrote:
> However for pi5 there is no kernel available, hence it is not only
> unlikely, it won't work.
Information about the pi5 kernel is available in the Raspberry Pi Linux
GitHub repo according to the documentation
(https://www.raspberrypi.com/documentation/computers/linux_kernel.html),
if that is what is needed. Kindly excuse my ignorance if not.
I am very interested in running 9front on a Raspberry Pi 5 and would
commit to learning about kernel development or porting to contribute if
necessary. One major reason I look forward to it is because the Rpi5
supports SSD usage. If this remains unlikely still, I will have to
settle for my regular old amd64 laptop.
- Troy
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [9front] Booting 9front ARM64 on QEMU with UEFI
2025-11-28 21:10 ` radiohotline
@ 2025-11-28 23:20 ` ori
0 siblings, 0 replies; 10+ messages in thread
From: ori @ 2025-11-28 23:20 UTC (permalink / raw)
To: 9front; +Cc: theinicke
Quoth radiohotline@disroot.org:
>
> I am very interested in running 9front on a Raspberry Pi 5 and would
> commit to learning about kernel development or porting to contribute if
> necessary. One major reason I look forward to it is because the Rpi5
> supports SSD usage. If this remains unlikely still, I will have to
> settle for my regular old amd64 laptop.
>
Sure, patches would be welcome, and if you're interested in
doing the work, people will help out. There's nothing crazy
about doing kernel development in Plan 9.
The main thing is getting a good debug setup; figuring out
how to easily reload the kernel so you can test things. Then,
get the bootloader to load something, anything, that you build
from plan 9; make that blink the LEDs. Then draw the rest of
the owl -- piece by piece, wire up the MMU code, interrupts,
drivers, etc.
Not the easiest starter project, but trying things out is how
you learn.
You'll still want a Plan 9 machine to act as the development
host as you hack on this, and having netbooting is very very
helpful when trying things out.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-11-28 23:21 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-05 10:30 [9front] Booting 9front ARM64 on QEMU with UEFI zamfofex
2025-03-05 18:31 ` Jacob Moody
2025-03-05 21:00 ` Jacob Moody
2025-03-06 13:58 ` zamfofex
2025-03-06 14:07 ` theinicke
2025-03-06 19:38 ` Jacob Moody
2025-03-06 20:41 ` zamfofex
2025-03-06 21:06 ` Jacob Moody
2025-11-28 21:10 ` radiohotline
2025-11-28 23:20 ` ori
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).