Files
zhangcan42 64a44bd2af update ota_demo/config.json.
rename a feature of sys_installer_lite

Signed-off-by: zhangcan42 <zhangcan42@h-partners.com>
2024-05-29 06:14:12 +00:00
..
2022-12-29 11:29:56 +08:00
2022-08-23 15:20:39 +03:00
2023-08-31 11:44:22 +03:00
2023-08-31 11:44:22 +03:00
2024-05-29 06:14:12 +00:00
2022-08-23 15:20:39 +03:00
2022-10-21 11:34:44 +03:00

Commands

Upload

{u<size> where <size> is firmware size in bytes. Can be generated by this command:

echo {u$(stat -c%s out/b91_devkit/ota_demo/bin/ota_demo.bin)

Print

{p<start> [<size>] - print uploaded firmware bytes. <size> - first byte number. Optional <size> - count of printed bytes, if ommited - print one page.

Cancel

{cancel - cancel update.

Hash

{h<start> <size> - calculate and print sha256 hash of uploaded firmware.

Restart

{restart - restart and run new firmware.

Rollback

{back - restart and run previous firmware.

Signature verification

{s<sign> - run signature verification, where <sign> is signature in hex.

Generate certificate:

openssl genrsa -out myprivate.pem 512
openssl rsa -in myprivate.pem -pubout > mypublic.pem

Write mypublic.pem content to file device/soc/telink/b91/adapter/hals/update/hal_hota_board.c as content of mypublic_pem variable.

Generate signature

openssl dgst -sha256 -sign myprivate.pem out/b91_devkit/ota_demo/bin/ota_demo.bin | xxd -ps -c200

Please note, you should have installed vim to use xxd command.