Open cjacker opened 1 year ago
Please try with my changed post-build.sh and see if it works for you, then i will create a pull request.
Two things here:
So I'm reluctant to do this unless the changes don't impact the existing workflow.
(Also, we have a yocto image now available that is a bit more flexible with regards to packages etc. I want to keep the buildroot and yocto rootfs images compatible with the low load/bl808-firmware so it's easy to swap between images).
My changes should just create a additional image in the binary folder and leave the rest untouched
Two things here:
* bflb_iot_tool (and BLDevCube) are being depreciated. We should use the BLFlashCube/BLFlashCommand instead but as I understand it, there is no separate download for those tools available for users that do not wish to install bl_mu_sdk.
Off topic:
It seems other tools couldn't be be replaced by BLFlashCube/Command, and seems upstream didn't intend to do that, they just create two new tools for bl_mcu_sdk and it lacks a lot of features other tools have. but it did one thing right, flash the firmware to an exact address, just like iot-tool single image did.
BL upstream really made things complex. no matter partition tables, old or new firmwares can be preprocessed and finally use a unified tool to flash to a specific address. but upstream choose process them with different tools when flashing and seems all these different tools have the same core code base.
* there are users that have their own firmware to run on M0 (such as uboot). In addition, we hope for a update soon where m0 low load will not be required for Linux to operate.
Sound reasonable.
Then just leave it here as reference in case anyone need this. actually other firmwares can be processed this way and generate a whole or several seperate firmwares and can be programmed by DevCube, BLFlashCommand/Cube or bf-iot-tool.
bf-mcu-tool is another story, it will add a 0x2000 offset to addr specified by cli arg.
Thanks for this, I was having issues with the MCU tab of BLDevCube on macOS (group0 img len error, get 61664 except 1075840
for anyone searching/wondering. I suspect some sort of file read/write race condition, as the generated file does seem to actually be 1075840 bytes), and this was a workaround.
One note, the default LANG
on macOS will cause problems with the first command, so to be safe, that should be redefined inline with tr
dd if=/dev/zero bs=8388608 count=1 | LC_ALL=C tr "\000" "\377" > openbouffalo-bl808.bin
Combine m0/d0 lowload and bl808-firmware.bin together:
create a empty image with size 0x800000, fill it with "0xFF". 0x800000 is the start addr of "bl808-firmware.bin", it will be appended later.
copy "m0_lowload_bl808_m0.bin" to the start of whole firmware.
copy d0 lowload to 0x100000 of whole firmware
append bl808-firmware.bin to the end
The final 'openbouffalo-bl808.bin' can be programed from CLI as:
it can also able to be programmed by BLDevCube from IOT page.