Replies: 4 comments
-
Finished a lot of work on dtb.zig, first in making it more or less feature-complete enough for our needs, then in trying it out and realising it allocates way too much memory while parsing a regular-sized device tree. It seemed like a good place to try Zig's This culminated in dainboot being able to hastily hack apart the device tree with a loop, and hopefully scope out the UART: Lines 19 to 87 in e33551d The heuristic is awful. I don't even check |
Beta Was this translation helpful? Give feedback.
-
Today was huge! I got the ROCKPro64 brought up to the same level as QEMU. There were some key realisations of things we needed to do on real hardware that we didn't on virtualised:
Everything's a hack right now -- we're just about ready to start loading from the dtb in the kernel -- but there's a cute easter egg on boot now. |
Beta Was this translation helpful? Give feedback.
-
Refactored the kernel to use the DTB to establish what kind of UART we have, and then use that "driver". (QEMU and ROCKPro64 UARTs have different register configurations; they work the same for just writing bytes out, but reading back needs a different touch.) Generally cleaned up a lot of hacks and invalidated some old assumptions about things I needed to be doing. Got waylaid realising that UEFI gives a DTB, and I should preferably use that as the earlier boot stage might modify the DTB it got before giving it to us. (End goal is to get a working PSCI reset or shutdown going.) |
Beta Was this translation helpful? Give feedback.
-
Lately:
I've started work on the riscv port. There was a lot to do to get dainboot going because LLVM can't produce a riscv COFF file. It just won't. Nothing will. Turns out everyone([1] [2] [3]) hacks around this by prepending a PE32+ header manually, and then doing all the ELF relocations yourself. So now do we:
Now it's time to get started on MMU setup on riscv64. #2 has the code in progress. |
Beta Was this translation helpful? Give feedback.
-
I thought I'd make a log here of notes while working.
I need to head off now, so current progress:
Beta Was this translation helpful? Give feedback.
All reactions