Blog from March, 2022

SECO Android 11 BSP for Rockchip-based boards at the moment supports only C31 SBC.

The C31 board only supports the USB OTG cable installation procedure, and only eMMC is supported as a primary boot peripheral. Future releases will include uSD/USB support.

 

Android 11 support for SECO SBC C31 includes:

  • Wifi/BT

  • ADB over ethernet

  • Sound support over HDMI

  • HDMI and LVDS display with onboard backlight

  • Double ethernet card

  • 4G modem

  • OTA update

  • recovery environment

Other supported peripherals include:

  • debug UART

  • RS232

  • I2C busses

  • eMMC

  • SDCard (storage only, not as a boot device)

  • USB (CN7, CN8 and CN10, USB-C not yet supported)

  • RTC

 

HOW TO install SECO Android 11 BSP on onboard eMMC via OTG cable

Requirements

  • A Linux PC

  • USB Type-C cable

To flash Android 11 on SECO board using an OTG cable, please follow these simple steps:

  1. Build SECO Android 11 image for C31, and prepare the distro as described in Build Android 11 for SECO Boards - SOLON (formerly SBC-C31)

    1. As an alternative, a prebuilt distro can be downloaded at https://secostorage.blob.core.windows.net/secosoftware-public/rockchip/c31/seco-rk3399-c31_android_11.0.0_v1-00-00_20220324.tar.gz

  2. Extract the distro archive

    • tar xzf <ANDROID_11_BSP>.tar.gz

  3. Change to the uncompressed folder

    • cd <ANDROID_11_BSP_FOLDER>

  4. Connect the USB Type-C cable between PC and connector CN9 on the board

  5. Insert jumper in JP4, to block watchdog timer and avoid it resetting the board during flashing

  6. Execute the script “seco_flash.sh" (requires superuser privileges).

    • ./seco_flash.sh

  7. Press button SW3 (in the center of the board), power on the board, and immediately release SW3

  8. The script waits for the USB device to flash (“Bus 001 Device 045: ID 2207:330c Fuzhou Rockchip Electronics Company RK3399 in Mask ROM mode”), completely erases the flash memory, partitions it, and writes all the images

  9. Wait until the end of the procedure

After the flashing, the board automatically reboots.

Building a custom Android 11 for SECO board is a simple operation.

In the following instructions, we consider the specific case of C31, SECO SBC based on RK339 from Rockchip. Therefore at the moment “C31” is the only valid value for <BOARD_CODE>.

Requirements:

  • a powerful PC HOST with Linux OS system (Ubuntu, Debian, ARCH Linux are valid options);

  • a docker environment installed and running;

  • a configured git and repo environment;

  • a personal access token or a deploy token, to download source code from git.seco.com;

  • 250 GB of free space on storage drive;

Detailed procedure:

  • Configure git:

    • git config --global user.name "Your Name"

    • git config --global user.email "your.name@example.com"

The full Android repo can be divided in two blocks:

  • AOSP: repositories downloaded directly from Google

  • SECO: repositories downloaded from our servers

While AOSP is freely downloadable, SECO part is shared only via access token (i.e. username and password). Therefore, for every GIT repository downloaded from git.seco.com, username and password should be inserted. Consider to speed up the procedure, adding the following section in ~/.gitconfig

[credential "https://git.seco.com"]
  username = <username>
  helper = cache --timeout=86400

Thanks to this, username is never requested, and password is requested only once, and cached for future use up to the declared timeout.

  • Init and download Android 11 repository:

    • mkdir ANDROID_11

    • cd ANDROID_11

    • repo init -u https://git.seco.com/arm/rockchip/release/android/android_11.0.0/manifest.git

    • repo sync -j 20

  • Pull the latest SECO docker for Android building image:

    • sudo docker pull secodocker/android-builder:latest

  • Run SECO docker for Android build:

    • docker run --rm -it \
          --privileged \
          --volume="/etc/passwd:/etc/passwd:ro" \
          --volume="/etc/group:/etc/group:ro" \
          --volume="/etc/shadow:/etc/shadow:ro"  \
          --volume $PWD:/workdir \
          -v ~/.bash_history:${HOME}/.bash_history:rw \
          -v ~/.vimrc:${HOME}/.vimrc:rw \
          -v ~/.vim:${HOME}/.vim:rw \
          -v ~/.cache:${HOME}/.cache:rw \
          -e BOARDCODE=${boardcode} \
          --workdir="/workdir" \
          --user $(id -u "$(stat -c "%U" Android.bp)"):$(id -g) \
          secodocker/android-builder:latest

  • Set up the Android environment and run the build commands:

    • source setup<BOARD_CODE> # for example: source setupC31

    • ./build.sh -f

  • Wait until the end of the compilation process (build process can last 1 or more hours according to the speed of your system)

  • You can produce a tar.gz archive to be used for installation by running the following script:

    • prepare_distro.sh [<IMAGE_NAME>] # Where [<IMAGE_NAME>] is an optional text string for naming the image file (default to “Android_11_<BOARD_CODE>_Distro_<DATE>.tar.gz”)

  • You will find the results of the build process in the folder ANDROID_11/Distros/

The freshly created distro includes everything you need to flash the board:

  • system binaries (bootloader, kernel, support partition images, android system…)

  • flashing tool and script to launch it easily

  • otapackage to update an already working board

What can I do now?

Install Android 11 on SECO boards - SOLON (formerly SBC-C31)

Special build options for Android 11 on SECO boards - SOLON (formerly SBC-C31)