- 1 How to select board config
- 2 Overall
- 3 Getting the Sources
- 4 Building the Sources
- 5 Flash Image
- 6 Mainline/Upstream
- 7 Demo Layer
- 8 Available
- 9 Developer Guide
How to select board config
We use opensource idbloader(See Boot_option) on some chips (rk3036, rk3288) and its dmc driver can't support ddr-type autodetct, so the wrong ddr dts settings will make the board failed to enter u-boot.
PMIC setting usually is just important in kernel, but for the board using rk818, USB input current should be configured during boot stage.
Please note some board have disable emmc in u-boot though the hardware actually have emmc. (firefly-rk3288）
Yocto has a powerful customization architecture that allows people create their own custom Linux distribution for their projectes. Compare to the desktop linux distribution(debian), it's more flexible to develop system/applcation with yocto. For examples, when we want to cross-compile gstreamer-rockchip on debian, we need prepare debian docker and write debian rules, on yocto, it just need a single bitbake file.
Though it have lots of advantages, it's not recommend to use it to bring up new boards unless you are familier with rockchip stuff. Please follow the Linux_user_guide and build/flash kernel/u-boot separately!
Getting the Sources
The rockchip linux SDK source tree is located in multi Git repository hosted by Github.
The SDK uses repo to sync down source code.
Create an empty directory to hold your working files
mkdir rk-yocto-bsp cd rk-yocto-bsp
To initialize Yocto SDK source tree
repo init --repo-url=https://github.com/rockchip-linux/repo -u https://github.com/rockchip-linux/manifests -b yocto repo sync
The above command will choose "master" branch of poky (rolling update).
If you want to use a stable yocto branch, then use below comands.
repo init --repo-url=https://github.com/rockchip-linux/repo -u https://github.com/rockchip-linux/manifests -b yocto -m pyro.xml
Building the Sources
The essential and graphical support packages you need for a supported Ubuntu or Debian distribution are shown in the following command. see here for detail.
sudo apt-get install gawk wget git-core diffstat unzip texinfo build-essential chrpath socat cpio python python3 pip3 pexpect libsdl1.2-dev xterm make xsltproc docbook-utils fop dblatex xmlto python-git libssl-dev pv
Setup Yocto Environment
For example, if you want to build a x11 backend image for tinker board, you should use "MACHINE=tinker-rk3288 DISTRO=rk-x11".
mkdir <build_dir> MACHINE=<MACHINE> DISTRO=<DISTRO> . ./setup-environment -b <build_dir>
Now you can find images under <build_dir>/tmp/deploy/images/<MACHINE>/.
*gpt.img is as same as system.img, which conatins the complete image.
./flash_tool.sh -c rk3288 -p system -i <build_dir>/tmp/deploy/images/<MACHINE>/*gpt.img
./flash_tool.sh -c rk3288 -d /dev/sdc -p system -i <build_dir>/tmp/deploy/images/<MACHINE>/*gpt.img
To update kernel/dtb/extlinux, boot partition should be updated.
./flash_tool.sh -c rk3288 -p boot -i <build_dir>/tmp/deploy/images/<MACHINE>/*boot.img
To update u-boot, it's kind of complex, please refer to Boot_option. All necessary binarys can be found in the deploy directory and rkbin directory.
Meta-rockchip layer support mainline kernel and have patch it for GPU/VPU features.
To use mainline kernel, please change
PREFERRED_PROVIDER_virtual/kernel = "linux-rockchip"
in machine/include/*.conf to
PREFERRED_PROVIDER_virtual/kernel = "linux-mainline"
Mainline U-boot/ARM-Trust-Firmware are also available, by including
There are some layers for the spefic prototype under meta-rockchip-extra/demo.
|QT Player||A play based on QT EGLFS plugin + QTMultimedia, make the video layer at the bottom.|
|rk-image-base||Rockchip base Image.|
|rk-image-multimedia||Image with Rockchip's multimedia packages.|
|rk-image-machine-test||Image with Test tools for developing, testing and benchmark.|
|qt5-image||Image with qt packages.|
All build file and code source are in the tmp/work/ or tmp/work-shared subdirectory of the Build Directory.
e.g : u-boot : tmp/work/excavator_rk3399-rk-linux/u-boot-rockchip/20170901-r0/git
Once you have update the code, you should issue command like "bitbake u-boot-rockchip -c compile -f && bitbake u-boot-rockchip" to force it recompile and deploy.
- To make an image for suitable of development, you can add "tools-debug debug-tweaks dbg-pkgs" to EXTRA_IMAGE_FEATURES in local.conf to get tools like gdb and add " sshfs-fuse dhcp-client" to "IMAGE_INSTALL_append" to use sshfs for remote transfer. e.g. EXTRA_IMAGE_FEATURES = "tools-debug tools-profile tools-testapps dbg-pkgs debug-tweaks" IMAGE_INSTALL_append = “ sshfs-fuse dhcp-client”
- To use local source, you could change SRC_URI in bb file to "git:///home/debian/kernel.git;protocol=file;nocheckout=1;branch=release-4.4"