Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

RockpiS/dev/otg

< RockpiS‎ | dev
Revision as of 07:56, 28 October 2019 by Stephen (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
    ROCK Pi S >  Development >  Using OTG for ROCK Pi S

Requirement

  • ROCK Pi S
  • USB Type C to USB-A cable

Step 1: Connecting your ROCK Pi S on PC

Using USB Type C to USB-A cable connect your ROCK Pi S and PC.

Step 2: Make sure rkdeveloptool is set up on host computer Linux

Linux

To build rkdeveloptool on a debian based Linux distribution, follow the instruction below:

Install build dependency:

 sudo apt-get install libudev-dev libusb-1.0-0-dev dh-autoreconf

Clone the source code and build:

 git clone https://github.com/rockchip-linux/rkdeveloptool
 cd rkdeveloptool
 autoreconf -i
 ./configure
 make

If you encounter compile error like below

   ./configure: line 4269: syntax error near unexpected token `LIBUSB1,libusb-1.0'
   ./configure: line 4269: `PKG_CHECK_MODULES(LIBUSB1,libusb-1.0)'


You should install pkg-config libusb-1.0

   sudo apt-get install pkg-config libusb-1.0

Then re-run

   autoreconf -i
   ./configure
   make

Now you have rkdeveloptool executable at the current directory.

 sudo cp rkdeveloptool /usr/local/bin/

MacOS

To build rkdeveloptool on macOS, you need homebrew(or similar package manager) to install required packages.

Install build dependency:

   brew install automake autoconf libusb

Clone the source code and build:

   git clone https://github.com/rockchip-linux/rkdeveloptool
   cd rkdeveloptool
   autoreconf -i
   ./configure
   make

If you encounter compile error like below

   ./configure: line 4269: syntax error near unexpected token `LIBUSB1,libusb-1.0'
   ./configure: line 4269: `PKG_CHECK_MODULES(LIBUSB1,libusb-1.0)'


You should install pkg-config libusb-1.0

   brew install pkg-config

Then re-run

   autoreconf -i
   ./configure
   make

Now you have rkdeveloptool executable at the current directory.

   sudo cp rkdeveloptool /usr/local/bin/

Step 3: Testing connected and get help

On linux host:

  $ rkdeveloptool ld

If you can see the information for device your connection is successful, if you want to get help you can type:

  $ rkdeveloptool ?