Open Fishwaldo opened 1 year ago
Got it, thanks !
I will try it later and update the tutorial.
create a file with length = 0x100000 and fill it with "FF"
dd if=/dev/zero bs=1048576 count=1| tr "\000" "\377" >whole_bin_m0d0_lowload.bin
write "m0_lowload_bl808_m0.bin" to the start of "whole_bin_m0d0_lowload.bin"
dd conv=notrunc if=m0_lowload_bl808_m0.bin of=whole_bin_m0d0_lowload.bin
append "d0_lowload_bl808_d0.bin" to "whole_bin_m0d0_lowload.bin"
cat d0_lowload_bl808_d0.bin >> whole_bin_m0d0_lowload.bin
This 'm0d0_lowload.bin' can be programmed as:
bflb-iot-tool --chipname bl808 --interface uart --port /dev/ttyUSB1 --baudrate 2000000 --firmware whole_bin_m0d0_lowload.bin --addr 0x0 --single
After lowload programmed, program "bl808-firmware.bin" as:
bflb-iot-tool --chipname bl808 --interface uart --port /dev/ttyUSB1 --baudrate 2000000 --firmware bl808-firmware.bin --addr 0x800000 --single
create a empty image of size 0x800000, fill it with "0xFF". 0x800000 is the start addr of "bl808-firmware.bin", "bl808-firmware.bin" will be appended later.
dd if=/dev/zero bs=8388608 count=1| tr "\000" "\377" >openbouffalo-bl808.bin
copy "m0_lowload_bl808_m0.bin" to the start.
dd conv=notrunc if=m0_lowload_bl808_m0.bin of=openbouffalo-bl808.bin
copy d0 lowload to 0x100000
dd conv=notrunc if=d0_lowload_bl808_d0.bin of=openbouffalo-bl808.bin seek=1048576 bs=1
append bl808-firmware.bin to the end
cat bl808-firmware.bin >> openbouffalo-bl808.bin
The final 'openbouffalo-bl808.bin' can be programed as:
bflb-iot-tool --chipname bl808 --interface uart --port /dev/ttyUSB1 --baudrate 2000000 --firmware openbouffalo-bl808.bin --addr 0x0 --single
You may want to update the Linux instructions to https://github.com/openbouffalo/buildroot_bouffalo. It has updated kernel with additional drivers and a rootfs on the SD card. Bouffalo have said they will not be maintaining their initial Linux release at the moment.