FlorenceOS / Sabaton

aarch64 stivale2 bootloader
BSD Zero Clause License
51 stars 5 forks source link

Raspberry PI 3/4 support #7

Open circutrider21 opened 3 years ago

circutrider21 commented 3 years ago

I am currently working on a kernel of mine that uses sabaton and was wondering if there will be support raspberry pi 3/4.

N00byEdge commented 3 years ago

6 is rpi3 support, rpi4 is planned to start once rpi3 support is finished.

circutrider21 commented 3 years ago

Ok!

circutrider21 commented 3 years ago

Although since the pull request seems a bit stale, I was wondering if I could continue from where @staticsaga stopped?

N00byEdge commented 3 years ago

I merged the pi3 code into master, works in a VM now (zig build pi3). I do have a pi3, and I would like to test it on there, but feel free to take on a pi4 port, or to improve the existing pi3 code.

N00byEdge commented 3 years ago
circutrider21 commented 3 years ago

I too personally own a rpi3 but I also don't have a rpi4. I only asked out of curiosity. As for the testing, I'll start on it tonight.

N00byEdge commented 3 years ago

With this at the bottom of the config:

enable_uart=1
initramfs flork.elf 0x200000

Only getting a rainbow screen and a single uart null byte, so no dice yet

circutrider21 commented 3 years ago

I got the same result with the rainbow screen, but I didn't see anything on the uart. Might be my diy adapter.

N00byEdge commented 3 years ago

Yeah, something is going wrong. Not working, even with all the EL2 code, relocation etc commented out, and halting on non-bsps, it's still not working. Feels like we're doing something wrong somewhere that only the HW cares about in regards to the uart init.

circutrider21 commented 3 years ago

Have you tried commenting out the code that inits the uart.

N00byEdge commented 3 years ago

No, I have not. May be worth a try to see if that lets it continue on to the display.

circutrider21 commented 3 years ago

Well, I tried that and it didn't do anything. Still getting the same old results...

N00byEdge commented 3 years ago

Yeah, I don't know what the next step to proceed would be, as I can't get any uart output and I don't have the ability to hook up jtag, so I'm kind of stuck at the moment. I'll take a look at using some existing code and comparing what works and not.

circutrider21 commented 3 years ago

Sounds good!

circutrider21 commented 3 years ago

Okay, the uart seems to work now that I have a new adapter, but the bootloader only prints 2 lines Allocating kernel memory Bytes allocated for kernel: 000000000003A000

StaticSaga commented 3 years ago

Sabaton in release modes doesn't print a lot of debugging information, switch build.zig to building with .Debug. You will get some more information about where it is failing. I think that it is hanging somewhere in the mailbox code (responsible for setting the framebuffer and querying the memory available). If you have Discord, I would join the FlorenceOS server. https://discord.gg/HpGsGjFG5S

circutrider21 commented 3 years ago

I have discord, my username is SirNT (or devlooper) so I'll join the discord. As for building in debug mode, how would I do that (I am not familiar with zig)

StaticSaga commented 3 years ago

Replace the .ReleaseSmall in build.zig with .Debug

ghost commented 2 months ago

I am currently working on a kernel of mine that uses sabaton and was wondering if there will be support raspberry pi 3/4.

Why so you can copy/paste the code? 😂👎