树莓派启动sd卡kernel8.img实现加载arceos-raspi4.bin的全过程 #18
limingth
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
1. 修改 bcm2xxx_pl011_uart.rs 的波特率为 115200
参考 https://github.com/chenlongos/rust-raspberrypi-OS-tutorials/tree/master/06_uart_chainloader
src/bsp/device_driver/bcm/bcm2xxx_pl011_uart.rs
$ BSP=rpi4 make
在 make 之前必须加上 BSP=rpi4
2. 修改 main.rs 最后的加载程序逻辑,改为从 src_addr 拷贝 100000 个字节到 0x80000,然后跳转过去执行
3. 修改编译 arceos 代码,生成树莓派4b上的 helloworld_aarch64-raspi4.bin 文件
4. 把 kernel8.img 和 helloworld_aarch64-raspi4.bin 通过 cat 命令拼接到一个 bin 文件中,仍然取名为 kernel8.img
5. 把新生成的 kernel8.img 拷贝到 sd 卡上,重新启动树莓派板子,可以看到上电后输出 miniload 并进入到 arceos helloworld 里
All reactions