System Software Package

TB-RK3588X pre-installed debian11 image provides the following software packages.

Toybrick Property

Introduction

Toybrick Property implements related interfaces of Android system attributes based on D-bus: getprop, setprop and C/C++ library function.

Software Package

toybrick-prop

  1. Contain runtime link libraries (path: /usr/lib/aarch64-linux-gnu): libtoybrick_prop.so.0 and libtoybrick_prop.so.0.0.0

  2. Execute the following command to install toybrick-prop.

    sudo -y install toybrick-prop toybrick-log
    

toybrick-prop-bin

  1. Contain executables and start service:

    1. Executables (path: /usr/bin): toybrick_propd,getprop,setprop,toybrick-prop.sh

    2. Start service (path: /usr/lib/systemd/system): toybrick-prop.service

  2. Execute the following command to install toybrick-prop-bin.

    sudo -y install toybrick-prop-bin
    
  3. Startup service:

    sudo systemctl enable toybrick-prop.service
    
  4. Help

    • List all system properties

      getprop
      
      [persist.dev.model]: [TB-RK3588X0]
      [persist.sys.usb.config]: [adb]
      [dev.model]: [TB-RK3588X0]
      [sys.usb.config]: [adb]
      [sys.usb.touch.width]: [1920]
      [sys.usb.touch.height]: [1080]
      [sys.usb.touch.points]: [10]
      [sys.usb.touch.in]: [/dev/hidg2]
      [sys.usb.touch.report.id]: [4]
      [sys.usb.touch.report.size]: [64]
      [sys.usb.touch.feature.id]: [2]
      [sys.usb.keyboard.in]: [/dev/hidg0]
      [sys.usb.mouse.in]: [/dev/hidg1]
      

      Note: The system properties start with persist are saved in the /etc/prop/ directory. After the system restarts, the system automatically loads configurations.

    • List all system properties whose prefix is the specified field.

      getprop list sys.usb
      
      [sys.usb.config]: [adb]
      [sys.usb.touch.width]: [1920]
      [sys.usb.touch.height]: [1080]
      [sys.usb.touch.points]: [10]
      [sys.usb.touch.in]: [/dev/hidg2]
      [sys.usb.touch.report.id]: [4]
      [sys.usb.touch.report.size]: [64]
      [sys.usb.touch.feature.id]: [2]
      [sys.usb.keyboard.in]: [/dev/hidg0]
      [sys.usb.mouse.in]: [/dev/hidg1]
      
    • View single system property.

      getprop sys.usb.config
      
      adb
      
    • Setting system properties (Need root permission).

      sudo setprop dev.version v0.1    // set dev.version property, Discard after restart
      sudo setprop persist.dev.version v0.1   //set persist.dev.version property,saved in /etc/prop/dev.json
      
    • Delete the specified property.

      sudo setprop dev.version   //delete dev.version property
      sudo setprop persist.dev.version //delete dev.version property, and delete related configuration in /etc/prop/dev.json
      

toybrick-prop-dev

  1. Include the compile link related file:

    • Header file (path:/usr/include/toybrick): toybrick_properties.h,properties.h and system_properties.h

    • Link libraries (path: /usr/lib/aarch64-linux-gnu): libtoybrick_prop.so

    • pkgconfig (path: /usr/lib/aarch64-linux-gnu/pkgconfig): toybrick_prop.pc

  2. Execute the following command to install toybrick-prop-dev

    sudo -y install toybrick-prop-dev toybrick-log
    
  3. Compile link option:

    LDDFLAG=`pkg-config --libs toybrick_prop`
    CFLAG=`pkg-config --cflags toybrick_prop`
    
  4. Include header file:

    #include <toybrick/toybrick_properties.h>
    #include <toybrick/properties.h>
    #include <toybrick/system_properties.h>
    
  5. Sample code: test.c

    #include <toybrick/toybrick_properties.h>
    #include <stdio.h>
    
    int main(int argc, char **argv)
    {
    	const char *key = "dev.model";
    	const char *default_value = "TB-RK3588X0";
    	char value[PROPERTY_VALUE_MAX];
    	int ret;
    
    	ret = property_get(key, value, default_value);
    	printf("key %s, value %s, len %d\n", key, value, ret);
    	return ret;
    }
    

compile command:

gcc test.c `pkg-config --libs toybrick_prop` `pkg-config --cflags toybrick_prop` -o test

Toybrick Usbconfig

Introduction

Toybrick Usbconfig implements virtual USB devices based on Type-C OTG, such as: adb, ntb, rndis, virtual camera, virtual sound card, virtual mouse, and touch screen, etc.

Software Package

toybrick-usbd

Contain executables and start service.

  • Executables (path: /usr/bin): toybrick_usbd,toybrick_adbd, etc

  • Start service (path:/usr/lib/systemd/system): toybrick-usb.service

  • Execute the following command to install toybrick-usbd.

  sudo apt -y install toybrick-usbd
  • Starting up service:

  sudo systemctl enable toybrick-usb.service
  • USB Config configuration

    sudo setprop sys.usb.config adb  //Currently supports adb function, the next version, plans to support the adb,ntb,rdnis,key,touch,keyboard,uvc,uvc,etc.
    sudo setprop persist.sys.usb.config adb  //written to disk,and permanent effect.
    

Rockchip ISP

Introduction

Rockchip ISP runs RKISP 3A tunning service and camera sample code, support imx327, imx415, imx464, os04a10hk, ov3855 and ov50c40 modules by default.

Software Package

rockchip-isp

Contain executables, iqfile and start service.

  • Executables (path: /usr/bin): rkaiq_3A_server

  • Sart service (path: /usr/lib/systemd/system): rockchip-isp.service

  • Execute the following command to install rockchip-isp.

    sudo apt -y install rockchip-isp
    
  • Startup service:

    sudo systemctl enable rockchip-isp.service
    
  • Add iqFile: Copy the iqfile file to the /etc/iqfiles directory and restart the service.

    cp ${IQFILE} /etc/iqfiles/
    sudo systemctl restart rockchip-isp.service
    

rockchip-isp-sample

  1. Include camera sample code (path: /usr/share/camera)

  2. Compile sample code:

cp -r /usr/share/camera ./
cd camera
make

Edge Utils

Introduction

Edge Utils contains bluetooth, WIFI, IO, network configuration, display, camera and other utility tools.

Software Package

edge-utils

  1. Include system related tools (path: /usr/local/bin)

  2. Execute the following command to install edge-utils.

sudo apt -y install edge-utils

Toybrick Vendor

Introduction

Toybrick vendor offers /dev/vendor-storage SN and MAC read and write commands, C language call interfaces, and sample codes.

Software Package

toybrick-vendor-bin

  • Include /dev/vendor-storage SN, MAC read and write commands(/usr/bin/toybrick_vendor)

  • Execute the following command to install toybrick-vendor-bin.

    sudo apt -y install toybrick-vendor-bin
    
  • Help

    toybrick_vendor --help
    Usage:
      toybrick_vendor get {sn | product | id } len
      toybrick_vendor set {sn | product | id } data
      toybrick_vendor get mac count
      toybrick_vendor set mac mac0 mac1 ...
    e.g.
      toybrick_vendor set mac 329bb75e915e 329bb75e915f        //write two mac address
      toybrick_vendor get mac 2                                //read two mac address
      toybrick_vendor set sn xxxxxxxx                          //write SN
      toybrick_vendor get sn 16                                //read SN,and the value of count must greater than actual SN length.
    

toybrick-vendor-dev

  1. Contain compile link relevant files

    • Header file (path: /usr/include/toybrick): toybrick-vendor.h

    • Link libraries (path: /usr/lib/aarch64-linux-gnu): libtoybrick_vendor.so

    • pkgconfig (path: /usr/lib/aarch64-linux-gnu/pkgconfig): toybrick_vendor.pc

  2. Execute the following command to install toybrick-vendor-dev.

    sudo -y install toybrick-vendor-dev
    
  3. Compling link option:

    LDDFLAG=`pkg-config --libs toybrick_vendor`
    CFLAG=`pkg-config --cflags toybrick_vendor`
    
  4. Include header file:

    #include <toybrick/toybrick-vendor.h>
    
  5. Sample code: test.c

    #include <toybrick/toybrick-vendor.h>
    #include <stdio.h>
    
    int main(int argc, char **argv)
    {
    	const char *sn = "xxxxxxxx";
    
    	return vendor_set_sn(sn, strlen(sn));
    }
    

Compile command:

gcc test.c `pkg-config --libs toybrick_vendor` `pkg-config --cflags toybrick_vendor` -o test

Vendor Firmware

Introduction

Vendor Firmware include WIFI and bluetooth module firmware.

Software Package

vendor-firmware

  1. Include system related tools (path: /vendor,/system)

  2. Execute the following command to install vendor-firmware.

sudo apt -y install vendor-firmware

Toybrick Server

Introduction

Toybrick Server integrates start service, run the toybrick-server.sh script to start the Bluetooth service, and call /usr/local/bin/toybrick-custom.sh .

Notice: toybrick-server.sh will be overwritten due to package upgrade. If you need to add boot scripts, please create or modify /usr/local/bin/toybrick-custom.sh.

Software Package

toybrick-server

Contain executables and start service.

  • Executables (path: /usr/bin): toybrick-server.sh

  • Start service (path: /usr/lib/systemd/system): toybrick.service

  • Execute the following command to install toybrick-server.

    sudo apt -y install toybrick-server
    
  • Starting up service:

    sudo systemctl enable toybrick.service
    

Rockchip MPP

Introduction

Rockchip MPP integrates VPU video codec library, header file and test command.

For MPP development guide please refer to documents under docs/common/MPP/ directory of the EDGE SDK project.

Software Package

rockchip-mpp

  1. Contain runtime link libraries (path: /usr/lib/aarch64-linux-gnu): librockchip_mpp*.so.*

  2. Execute the following command to install rockchip-mpp.

    sudo -y install rockchip-mpp
    

rockchip-mpp-sample

  1. Contain MPP sample code:

    • Sample code (path: /usr/share/rockchip-mpp/sample)

  2. Execute the following command to compile the sample code:

    sudo apt -y install rockchip-mpp-dev
    cp -r /usr/share/rockchip-mpp/sample ~/
    cd ~/sample/build
    ./make.sh
    
  3. Execute the following command to install rockchip-mpp-sample:

    sudo -y install rockchip-mpp-sample
    

rockchip-mpp-dev

  1. Contain compile link relevant files.

    • Header file (path: /usr/include/rockchip): MPP header file

    • Compile link library (path: /usr/lib/aarch64-linux-gnu): librockchip_mpp.so

    • pkgconfig (path: /usr/lib/aarch64-linux-gnu/pkgconfig): rockchip_mpp.pc

  2. Execute the following command to install rockchip-mpp-dev.

    sudo -y install rockchip-mpp-dev
    
  3. Compile link option:

    LDDFLAG=`pkg-config --libs rockchip_mpp`
    CFLAG=`pkg-config --cflags rockchip_mpp`
    

Rockchip RGA

Introduction

Rockchip RGA integrates RGA 2D image acceleration libraries, header file and test command.

For RGA development guide please refer to documents under docs/edge/rga/ directory of the EDGE SDK project.

Software Package

rockchip-rga

  1. Contain runtime link libraries (path: /usr/lib/aarch64-linux-gnu): librga*.so.*

  2. Execute the following command to install rockchip-rga.

    sudo -y install rockchip-rga
    

rockchip-rga-bin

  1. Contain executables:

    Executables (path: /usr/bin): rgaImDemo, etc.

  2. Execute the following command to install rockchip-rga-bin.

    sudo -y install rockchip-rga-bin
    

rockchip-rga-sample

  1. Contain RGA sample code:

    • sample code (path: /usr/share/rockchip-rga/sample)

  2. Execute the following command to compile the sample code:

    sudo apt -y install rockchip-rga-dev libdrm-dev
    cp -r /usr/share/rockchip-rga/sample ~/
    cd ~/sample/build
    ./make.sh
    
  3. Execute the following command to install rockchip-rga-bin.

    sudo -y install rockchip-rga-bin
    

rockchip-rga-dev

  1. Contain compile link relevant files.

    • Header file (path: /usr/include/rockchip): RGA related header file.

    • Compile link library (path: /usr/lib/aarch64-linux-gnu): librga.so

    • pkgconfig (path: /usr/lib/aarch64-linux-gnu/pkgconfig): rockchip_rga.pc

  2. Execute the following command to install rockchip-rga-dev.

    sudo -y install rockchip-rga-dev
    
  3. Compile link option:

    LDDFLAG=`pkg-config --libs rockchip_rga`
    CFLAG=`pkg-config --cflags rockchip_rga`