mirror of
https://github.com/openharmony/vendor_telink.git
synced 2026-06-30 20:47:55 -04:00
64a44bd2af
rename a feature of sys_installer_lite Signed-off-by: zhangcan42 <zhangcan42@h-partners.com>
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)
{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.