Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4486

Beginners • RPI bootloader from scratch

$
0
0
I am following this tutorial to understand the inner workings of an RPI.

I have an RPI 4B, I compiled with gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf toolchain from ARM

I modified the LOADER address to 0x80000 in boot.s and linker.ld, and uart_init(2); to uart_init(4);
I compiled and copied the final kernel8.img to an SD card that already contains an raspbian OS, replaced kernel8.Img with mine.

I inserted the SD card and couldn't display the "Hello, kernel World!", I get an RGB colored screen with no message.
Since it is writing to UART, I tried to read from pins 8 and 10 but I can't read anything from them.

I am pretty sure the person behind this tutorial made it work. So I wonder if it comes from :

- different compiler used, I couldn't find aarch64-elf crosstools, and used aarch64-none-elf, used it in an Ubuntu Virtual machine, I used gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf toolchain from ARM

- Or from the kernel.c :

Code:

case 4:  MMIO_BASE = 0xFE000000; break;
Where did he get 0xFE000000 from ? in BCM2835 datasheet, the BASE_ADDRESS is 0x7C000000, maybe 0xFExx.. maps to 0x7Exx.. ?

Statistics: Posted by sof — Fri Apr 19, 2024 8:28 am — Replies 2 — Views 37



Viewing all articles
Browse latest Browse all 4486

Trending Articles