From a2dd0638b33cea375e46e6597b8ca18c0d112c52 Mon Sep 17 00:00:00 2001 From: JianyuWang <140773670+JianyuWang0623@users.noreply.github.com> Date: Wed, 11 Sep 2024 21:56:23 +0800 Subject: [PATCH] Documentation: Add guide for fastboot See https://github.com/apache/nuttx-apps/pull/2562 Signed-off-by: wangjianyu3 --- .../applications/system/fastboot/index.rst | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Documentation/applications/system/fastboot/index.rst b/Documentation/applications/system/fastboot/index.rst index 6e9eb7b6a6e..a8ea7baf4a5 100644 --- a/Documentation/applications/system/fastboot/index.rst +++ b/Documentation/applications/system/fastboot/index.rst @@ -1,3 +1,34 @@ ====================== ``fastboot`` fastbootd ====================== +Prepare +========================== + +- Check fastboot tool(Host): :code:`fastboot --version` +- Download fastboot tool and install(Host): `platform-tools `__ +- Enable the fastbootd application(Device): :code:`CONFIG_USBFASTBOOT=y` and :code:`CONFIG_SYSTEM_FASTBOOTD=y` +- Start fastbootd(Device): :code:`fastbootd &` + +Commands +========================== +- :code:`fastboot reboot [FLAG]`: Reboot the device, more details for :code:`[FLAG]`: `g_resetflag `__ and `boardioc_softreset_subreason_e `__ +- :code:`fastboot flash `: Flash partition :code:`` using the given :code:`` +- :code:`fastboot erase `: Erase given partition +- Get Variables + - :code:`fastboot getvar product`: Get product name + - :code:`fastboot getvar kernel`: Get kernel name + - :code:`fastboot getvar version`: Get OS version string + - :code:`fastboot getvar slot-count`: Get slot count + - :code:`fastboot getvar max-download-size`: Get max download size +- OEM + - :code:`fastboot oem filedump [OFFSET] [LENGTH]`: Get :code:`` (full by default) bytes of :code:`` from :code:`` (zero by default) + - :code:`fastboot oem memdump
`: Dump :code:`` bytes memory from address :code:`
` +- :code:`fastboot get_staged `: Writes data staged by the last command to file :code:``. e.g. "oem filedump" and "oem memdump" + +Examples +========================== +- Exit fastboot mode: :code:`fastboot reboot` +- Flash app.bin to partition /dev/app: :code:`fastboot flash app ./app.bin` +- Erase partition /dev/userdata: :code:`fastboot erase userdata` +- Dump partition /dev/app: :code:`fastboot filedump /dev/app` and then :code:`fastboot get_staged ./dump_app.bin` +- Dump memory from 0x44000000 to 0x440b6c00: :code:`fastboot oem memdump 0x44000000 0xb6c00` and then :code:`fastboot get_staged ./mem_44000000_440b6c00.bin`