
I've created a series of bare metal tutorials for the Raspberry Pi 3, available on github:
https://github.com/bztsrc/raspi3-tutorial
Focuses only on AArch64, and uses C as much as possible, therefore ideal for beginners. I wrote tons of comments in the source, and my guiding principle was K.I.S.S. all along. Lot of topics covered, from the very basic infinite loop in Assembly kind to the more complex how to read a file from the SD card ones. Easy to follow, as every tutorial builds on the previous one, and only small changes at once.
Quick list:
- How to set up an AArch64 cross-compiler
- How to compile and boot kernel8.img
- How to use UART0 and UART1 with USB serial debug cable
- How to use the undocumented HRNG
- How to set screen resolution and draw a picture
- How to write string to screen using PC Screen Font (same format that Linux Console uses)
- How to read sectors from the SD card
- How to interpret FAT file system without additional libraries
- How to load and parse initial ramdisks
- How to set up virtual address space using page translation tables and MMU
If moderators find my tutorials worthy, feel free to put the github repo link on the sticky topic.
Happy coding!
bzt