Neil Armstrong a2ae5974ed ftdi_gpio: accept new yaml config
Now local_gpio has landed, also accept a more verbose
and cleaner yaml config syntax for ftdi_gpio.

For now keep support for the current configuration string.

Closes: #42

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-11-02 18:18:18 +01:00
2023-10-30 16:16:36 +01:00
2020-06-10 10:10:23 -07:00
2023-01-30 16:00:46 -06:00
2023-09-29 00:45:24 +03:00
2020-06-29 01:02:57 -07:00
2023-10-02 17:33:10 +03:00
2023-05-08 15:02:37 -05:00
2018-03-12 17:44:17 -07:00
2023-11-02 18:18:18 +01:00
2018-02-26 21:02:30 -08:00
2023-10-30 16:16:36 +01:00
2023-10-30 16:16:36 +01:00
2023-10-30 16:16:36 +01:00
2023-10-30 16:16:36 +01:00
2023-11-02 11:32:38 +02:00
2023-09-28 11:09:46 +01:00
2023-11-02 18:18:18 +01:00

= CDBA control tool
The CDBA control tool is used for remotely booting images on development boards
attached using a CDB Assist [https://github.com/sonyxperiadev/CDB-Assist] or Conmux.

= Dependencies
sudo apt-get install libudev-dev libyaml-dev libftdi1-dev pkg-config meson for debian systems
dnf install systemd-devel libyaml-devel libftdi1-devel pkg-config meson for fedora systems

= Device side
On the host with the CDB Assist or Conmux attached the "cdba-server" executable is run
from sandbox/cdba/cdba-server. Available devices are read from $HOME/.cdba

= Build instructions

# meson . build
# ninja -C build

= Client side
The client is invoked as:

  cdba -b <board> -h <host> [-c <power-cylce-count>] boot.img

<host> will be connected to using ssh and <board> will be selected for
operation. As the board's fastboot interface shows up the given boot.img will
be transfered and booted on the device.

The board will execute until the key sequence ^A q is invoked or the board
outputs a sequence of 20 ~ (tilde) chards in a row.

If the optional -c is given, the board will upon receiving the tilde sequence
restart the board the given number of times. Each time booting the given
boot.img.

== Device configuration
The list of attached devices is read from $HOME/.cdba and is YAML formatted.

=== Example
devices:
  - board: db2k
    cdba: 00000001
    name: "DragonBoard2k"
    fastboot: abcdef1
    voltage: 8000

  - board: mtp2k
    conmux: mtp2k
    fastboot: abcdef2
    fastboot_set_active: true

  - board: evb2k
    users:
      - username
    console: /dev/ttyUSB0
    fastboot: abcdef3
    fastboot_set_active: true

  - board: qrd8550
    alpaca: /dev/serial/by-id/usb-QUALCOMM_Inc._Embedded_Power_Measurement__EPM__device_6E02020620151F14-if01
    console: /dev/serial/by-id/usb-QUALCOMM_MTP_Debug_Board_MT77TGG2-if00-port0
    name: QRD8550
    fastboot: 91671140
    fastboot_set_active: true
    fastboot_key_timeout: 2

  - board: testboard
    console: /dev/serial/by-id/usb-1234-if00-port0
    name: GPIO controller board
    local_gpio:
      - power:
          chip: gpiochip0
          line: 7
          active_low: true
      - fastboot_key:
          chip: gpiochip0
          line: 8
          active_low: true
      - power_key:
          chip: gpiochip0
          line: 14
          active_low: true
      - usb_disconnect:
          chip: gpiochip1
          line: 4
    fastboot: cacafada
    fastboot_set_active: true
    fastboot_key_timeout: 2

  - board: testboard2
    console: /dev/serial/by-id/usb-1234-if00-port0
    name: FTDI controller board
    ftdi_gpio:
      vendor: "0x0403"
      product: "0x6011"
      index: 0
      power:
        interface: D
        line: 7
        active_low: true
      fastboot_key:
        interface: D
        line: 8
        active_low: true
      power_key:
        interface: D
        line: 3
        active_low: true
      usb_disconnect:
        interface: D
        line: 2
    fastboot: cacafada
    fastboot_set_active: true
    fastboot_key_timeout: 2
Description
No description provided
Readme BSD-3-Clause 470 KiB
Languages
C 93.3%
Shell 3.8%
Meson 2.4%
Python 0.5%