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






Get the source code

Create top directory, rockchip-bsp.

 mkdir ~/rockchip-bsp
 cd ~/rockchip-bsp

u-boot. The second stage bootloader.

 git clone -b stable-4.4-px30

kernel. Current version is 4.4.

 git clone -b stable-4.4-px30

rkbin. Prebuilt Rockchip binaries, include first stage loader and ATF(Arm Trustzone Firmware).

 git clone -b stable-4.4-px30

build. Some script files and configuration files for building u-boot, kernel and rootfs.

 git clone -b debian

Install build tools

 sudo tar xvf gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz  -C /usr/local/
 sudo apt-get install gcc-aarch64-linux-gnu device-tree-compiler libncurses5 libncurses5-dev build-essential libssl-dev mtools
 sudo apt-get install bc python dosfstools ruby-dev
 sudo gem install fpm

Add the following lines to the ~/.bashrc file.

 export CROSS_COMPILE=/usr/local/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
 export PATH=/usr/local/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin:$PATH

Execute the following command.

 source ~/.bashrc

Check if Linaro toolchain is the default choice.

 which aarch64-linux-gnu-gcc

Build U-Boot

 ./build/ rockpropx30

The generated images will be copied to out/u-boot directory.

 ls out/u-boot/
 idbloader.img  px30_loader_v1.14.120.bin trust.img  uboot.img

Pack U-Boot

 ./build/ -b rockpropx30

The generated packages will be copied to out/packages directory.

 ls out/packages/

Build Kernel

 ./build/ rockpropx30

You will get the kernel image and dtb file

 ls out/kernel/
 Image  px30-rockpro.dtb

Pack Kernel

 ./build/ -d px30_linux_defconfig -r 1 # px30_linux_defconfig: kernel defconfig; 1: release-number

The generated packages will be copied to out/packages directory.

 ls out/packages

Build system image

Get source code.

 git clone -b master

Build docker and enter docker container.

 ./dev-shell # build docker and enter docker container

Build system image in Docker container.

 ./ # will show usage
 ./ px30-rockpropx30-debian-buster-xfce4-arm64

The generated system image will be moved to output directory.


System images are on the RockPro PX30 images site.


Install on eMMC module

Step 1:Boot the board to maskrom mode

To boot RockPro PX30 into maskrom mode, you need:

  • Plug the board to Linux Desktop with the USB Male A to Micro B cable
  • Press and hold the maskrom key, then short press reset key
  • Release maskrom key

Now on Linux PC, rkdeveloptool ld command shows the following message.

 $ rkdeveloptool ld
 DevNo=1    Vid=0x2207,Pid=0x330d,LocationID=102    Maskrom

Step 2: Write system image to eMMC Module

 $ rkdeveloptool db px30_loader_v1.14.120.bin
 $ rkdeveloptool wl 0 rockpipx30_debian_buster_xfce4_arm64_20200609_0710-gpt.img
 $ rkdeveloptool rd

Now the device should boot from eMMC now. The first boot would take several minutes.

Linux system

Default user account

Non-root User:

 User Name : rock
 Password  : rock

Serial console

The u-boot console is ttyS2 with baud rate 1500000bps, date bit 8, stop bit 1, parity none.

The kernel console is ttyS1 with baud rate 1500000bps, date bit 8, stop bit 1, parity none.

The default serial setting of serial tool on Host PC:

 baudrate: 1500000
 data bit: 8
 stop bit: 1
 parity  : none
 flow control: none

Q1: While using debug serial console, there is system startup information on the screen, but the keyboard cannot be used to input text?

A1: One of the reason would be the wrong setting of the serial tool, such as the Hardware Flow Control, etc. Here we should disable the Hardware Flow Control.