arm64 Raspberry Pi 3
Darwin on a Raspberry Pi 3 / 3B+. Boots to a shell.
Building
nix build .#kernel-arm64-bcm2837 # or -debug
nix build .#kc-arm64-bcm2837
nix build .#image-arm64-bcm2837 # puredarwin-rpi3.img
The kernel collection installs as System/Library/Kernels/kernel.release.bcm2837.
Kexts
Ten: corecrypto, pthread, PDArmPlatformExpert, IOStorageFamily, PDBcm2835SD,
ext4, Ext4FileSystemDriver, IOPCIFamily, IOGraphicsFamily, IOGOPFramebuffer.
Storage is the SD host controller; there is no PCI on this board in any useful sense.
Boot arguments
-v debug=0x218 -nogzalloc_mode keepsyms=1 serial=1 no_interrupt_masked_debug=1
serial=1 is read-only here, the bitmask being 1 read, 2 write, 3 both. A USB serial
adapter on the GPIO header is the console you will actually use.
Development rig
The project develops this over network boot. The setup is a Kea DHCP
server plus TFTP on the host, with LK as the intermediate loader
(lk-overlay, llvm-vc4-vce branch).
r on the serial console reboots the board, and a carrier=0 report is normal once LK
is running. LK is still experimental here and does not support the board properly yet.
Networking
The Pi 3B+ Ethernet is a LAN78xx behind USB, and the driver was written clean-room from the datasheet. The MAC address comes from OTP word 28. USB on this board is the known weak point and is still being worked on.
Notable fixes on the way here
The boot arguments were being comma-joined, so only the first was ever parsed, which
made several unrelated settings look like they did nothing. And a __DATA_CONST
corruption that looked like a memory bug turned out to be check_for_panic_log zeroing
a bogus gPanicBase, because PLATFORM_PANIC_LOG_PADDR pointed outside memSize.