mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-02 03:46:26 +00:00
Add a serial transport alongside the existing USB and TCP backends. The serial backend reuses the TCP v1 wire framing (FB01 handshake plus an 8-byte big-endian length prefix) so the host side needs no new tool: socat bridges the UART to a TCP socket and the standard fastboot tool connects via tcp:. The serial port path is configured at build time through Kconfig SYSTEM_FASTBOOTD_SERIAL_PORT. Signed-off-by: fangpeina <fangpeina@xiaomi.com>
89 lines
2.4 KiB
Text
89 lines
2.4 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 || (NET_TCP && NET_TCPBACKLOG) || SERIAL
|
|
---help---
|
|
Fastboot daemon supporting multiple transports concurrently.
|
|
Enable at least one transport (USB, TCP, Serial).
|
|
The USB transport depends on USBFASTBOOT.
|
|
The TCP network transport depends on NET_TCP and NET_TCPBACKLOG.
|
|
The Serial transport depends on SERIAL.
|
|
Each transport can be individually disabled via
|
|
SYSTEM_FASTBOOTD_USB / SYSTEM_FASTBOOTD_TCP below.
|
|
|
|
if SYSTEM_FASTBOOTD
|
|
|
|
config SYSTEM_FASTBOOTD_PRIORITY
|
|
int "fastboot task priority"
|
|
default 100
|
|
|
|
config SYSTEM_FASTBOOTD_STACKSIZE
|
|
int "fastboot stack size"
|
|
default DEFAULT_TASK_STACKSIZE
|
|
|
|
config SYSTEM_FASTBOOTD_DOWNLOAD_MAX
|
|
int "fastboot download buffer size"
|
|
default 40960
|
|
|
|
config SYSTEM_FASTBOOTD_USB
|
|
bool "Fastboot USB transport"
|
|
default y
|
|
depends on USBFASTBOOT
|
|
---help---
|
|
Enable USB transport for fastboot daemon.
|
|
|
|
config SYSTEM_FASTBOOTD_USB_BOARDCTL
|
|
bool "USB Board Control"
|
|
default n
|
|
depends on BOARDCTL
|
|
depends on BOARDCTL_USBDEVCTRL
|
|
depends on SYSTEM_FASTBOOTD_USB
|
|
---help---
|
|
Connect usbdev before running fastboot daemon.
|
|
|
|
config SYSTEM_FASTBOOTD_TCP
|
|
bool "Fastboot TCP transport"
|
|
default y
|
|
depends on NET_TCP
|
|
depends on NET_TCPBACKLOG
|
|
---help---
|
|
Enable TCP network transport for 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"
|
|
|
|
config SYSTEM_FASTBOOTD_NET_INIT
|
|
bool "Network initialization"
|
|
default n
|
|
depends on SYSTEM_FASTBOOTD_TCP
|
|
select NETUTILS_NETINIT
|
|
---help---
|
|
This option enables/disables all network initialization in fastboot server.
|
|
|
|
config SYSTEM_FASTBOOTD_SERIAL
|
|
bool "Fastboot serial transport"
|
|
default n
|
|
depends on SERIAL
|
|
---help---
|
|
Enable serial (UART) transport for fastboot daemon.
|
|
Reuses TCP v1 wire framing (FB01 handshake + 8-byte length prefix).
|
|
The host side can use socat to bridge the UART to a TCP socket.
|
|
|
|
config SYSTEM_FASTBOOTD_SERIAL_PORT
|
|
string "Serial device path"
|
|
default "/dev/ttyS1"
|
|
depends on SYSTEM_FASTBOOTD_SERIAL
|
|
|
|
endif # SYSTEM_FASTBOOTD
|