Open tomaka opened 4 years ago
memset(__bss_start, __bss_end, 0)
we would do something like memset(value_written_at_bss_start, value_written_at_bss_end, 0)
, which at best doesn't do much and at worst is a pretty big UB.Note for self: if I don't comment out copying kernel.img
, kernel7.img
and kernel7l.img
, the thing doesn't work. In other words, kernel8.img
isn't picked over the others.
I tried taking the known working code and replace the printing code with uart_init()
and write_uart()
. Doesn't work.
I also tried taking the known working point and replace the initialization code with our _start
function that then jumps back to the working code. Doesn't work.
At this point I'm going to personally give up and won't try again without the help of someone familiar with Raspberry Pis, or unless I get linked to serious documentation that is known to be exact.
I'm mostly opening this issue for note tracking.
A known working point is doing
cargo run -- build-image --target=arm-rpi3 --device-type sd-card --out foo.img --release
in the standalone-builder, with the following diff:We copy-paste the kernel from tutorial 11 here. (beware that not all tutorials seem to work on real hardware, at least for me) The screen has to be started with
screen /dev/ttyUSB0 230400
.In other words, the image builder works.
Now the next step is to progressively understand the difference between the tutorial code and ours, and try to get a minimal working example.