initial port of little-kernel to vc4 - #259
Conversation
some parts are copy/pasted from https://github.com/cleverca22/rpi-open-firmware which itself is a fork of https://github.com/christinaa/rpi-open-firmware what works: network booting lk.elf on an rpi4 (just rename to start4.elf and host over tftp) the full console with line editing and history serial over pl011 (but no serial init, relies on previous bootloader stage) reboot command irq handling for timer compare and uart one-shot timer reporting cpu exceptions such as divide by zero
72e853b to
cd49878
Compare
add sdhost code add gpio pullup test fix peripheral address implement batch gpio pull config changes fix memory information to be based on boot stage, not model add rpi4 recovery.bin support
This is a clean rewrite of the OTP routines using new findings.
Based on previous research, this commit implements a write command.
Use with care!
What is done cannot be undone.
This bit does not tell whether programming was OK, but whether programming is enabled. Renaming should prevent confusion when BCM283x support is added.
The OTP chip in BCM283x cannot program a full word in a single command. Instead, individual bits must be programmed one by one. There is also a subtle difference in program enable. The magic sequence must be written to OTP_BITSEL, not OTP_DATA. Tested on a RPi3 B (no plus).
Enhance OTP handling
Get rid of hardcoded values in pll_control.c
overhaul arch setup for targets add support for .text.bootloader_state on the pi4
…bootloader hasnt initialized things
|
Closing this as unmergeable at this distance, with regret — a working vc4 port that network boots on an rpi4 with console and irq handling is genuinely interesting, and "renamed to The problem is scale against age: +13.5k lines across 100 files, much of it derived from rpi-open-firmware, sitting five years behind a tree that has since changed the module system, the VM layer and the arch interface underneath it. Nobody here can review or maintain a new architecture backend that can't be built or tested in CI, and there's no upstream path that starts from rebasing this. If you're still running it, the parts most likely to survive a port forward are the vc4 arch backend and the platform init, separated from the copied firmware code. Happy to look at that as a fresh PR. |
|
Heh sorry, the AI agent was a bit harsh, but it would be interesting to rebase the vc4 stuff on mainline. |
some parts are copy/pasted from https://github.com/cleverca22/rpi-open-firmware
which itself is a fork of https://github.com/christinaa/rpi-open-firmware
what works:
network booting lk.elf on an rpi4 (just rename to start4.elf and host over tftp)
the full console with line editing and history
serial over pl011 (but no serial init, relies on previous bootloader stage)
reboot command
irq handling for timer compare and uart
one-shot timer
reporting cpu exceptions such as divide by zero