smaeul
released this
19 Feb 20:29
U-Boot port for BL808, 2023-02-19 release
Based on upstream v2023.04-rc2.
M0 variant:
- defconfig: ox64_m0_defconfig
- UART: GPIO14/15 at 115200 baud (matches M1s dock)
- build instructions:
make CROSS_COMPILE=riscv32-linux-musl- ox64_m0_defconfig
make CROSS_COMPILE=riscv32-linux-musl-
bflb-mcu-tool --chipname bl808 --port /dev/ttyUSB1 \
--baudrate 2000000 --firmware u-boot.bin
D0 variant:
- defconfig: ox64_d0_defconfig
- UART: GPIO16/17 at 115200 baud (matches M1s dock)
- works with latest upstream OpenSBI or
https://github.com/openbouffalo/opensbi/commits/bl808
- build instructions:
make CROSS_COMPILE=riscv64-linux-musl- ox64_d0_defconfig
make CROSS_COMPILE=riscv64-linux-musl-
cd ../opensbi
make CROSS_COMPILE=riscv64-linux-musl- PLATFORM=generic \
FW_FDT_PATH=../u-boot/arch/riscv/dts/bl808-d0-ox64.dtb \
FW_PAYLOAD_FDT_ADDR=0x50080000 \
FW_PAYLOAD_OFFSET=0x100000 \
FW_PAYLOAD_PATH=../u-boot/u-boot.bin \
FW_TEXT_START=0x50000000
strip --strip-all build/platform/generic/firmware/fw_payload.elf
Booting D0 from M0:
# Load fw_payload.elf from MMC
load mmc 0:1 51000000 fw_payload.elf
# Or load it over Ethernet (this may require multiple attempts)
dhcp
tftpboot 51000000 fw_payload.elf
# Unpack the ELF and start up D0.
# You can repeat the last command to reload/reset D0.
rproc init 0
rproc stop 0; rproc load 0 51000000 100000; rproc start 0