nuttx-apps/system/fastboot/Kconfig
wangjianyu3 536e2ccac6 system/fastboot: Add support for fastboot oem shell
To support executing custom commands.

Usage

  fastboot oem shell <command>

Tests

  # Configuration "esp32s3-devkit:fastboot" with `SYSTEM_FASTBOOTD_SHELL` enabled

  $ fastboot --version
  fastboot version 35.0.2-12147458

  $ fastboot oem shell ls /FILE_NOT_EXISTS
  FAILED (remote: 'error detected 0xff00 4')
  fastboot: error: Command failed

  $ fastboot oem shell ps
    PID GROUP PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK            STACK COMMAND
      0     0   0 FIFO     Kthread   - Ready              0000000000000000 0003056 Idle_Task
      1     0 224 RR       Kthread   - Waiting  Semaphore 0000000000000000 0001976 hpwork 0x3fc8bd50 0x3fc8bd80
      2     2 100 RR       Task      - Waiting  Semaphore 0000000000000000 0004048 nsh_main
      3     3 100 RR       Task      - Ready              0000000000000000 0001992 fastbootd
      4     4 100 RR       Task      - Running            0000000000000000 0001992 popen -c ps
  OKAY [  0.010s]
  Finished. Total time: 0.010s

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-02-25 08:23:37 +01:00

45 lines
1 KiB
Text

#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
menuconfig SYSTEM_FASTBOOTD
bool "fastbootd"
default n
depends on USBFASTBOOT
---help---
support usb fastboot function.
if SYSTEM_FASTBOOTD
config SYSTEM_FASTBOOTD_PRIORITY
int "USB-fastboot task priority"
default 100
config SYSTEM_FASTBOOTD_STACKSIZE
int "USB-fastboot stack size"
default DEFAULT_TASK_STACKSIZE
config SYSTEM_FASTBOOTD_DOWNLOAD_MAX
int "USB-fastboot download buffer size"
default 40960
config SYSTEM_FASTBOOTD_USB_BOARDCTL
bool "USB Board Control"
default n
depends on BOARDCTL
depends on BOARDCTL_USBDEVCTRL
---help---
Connect usbdev before running fastboot daemon.
config SYSTEM_FASTBOOTD_SHELL
bool "Execute custom commands"
default n
depends on SCHED_CHILD_STATUS
depends on SYSTEM_POPEN
---help---
Enable to support executing custom commands.
e.g. fastboot oem shell ps
e.g. fastboot oem shell "mkrd -m 10 -s 512 640"
endif # SYSTEM_FASTBOOTD