Difference between revisions of "Linux user guide"

From Rockchip open source Document
Jump to: navigation, search
Line 37: Line 37:
 
If you insist on developing on your own environment, please make sure the version of&nbsp;<span style="font-size: 13px;">gcc-arm-linux-gnueabihf and gcc-aarch64-linux-gnu is&nbsp;less than 6.</span>
 
If you insist on developing on your own environment, please make sure the version of&nbsp;<span style="font-size: 13px;">gcc-arm-linux-gnueabihf and gcc-aarch64-linux-gnu is&nbsp;less than 6.</span>
  
 +
&nbsp;
  
 
= Getting the Sources =
 
= Getting the Sources =
Line 69: Line 70:
 
Please refer to [[Rockchip_Kernel|kernel]]&nbsp;for how to build Kernel
 
Please refer to [[Rockchip_Kernel|kernel]]&nbsp;for how to build Kernel
  
 +
&nbsp;
  
 
= Building rootfs =
 
= Building rootfs =
Line 74: Line 76:
 
Debian:&nbsp;Please refer to [[Debian|Debian user guide]]&nbsp;for how to build Debian
 
Debian:&nbsp;Please refer to [[Debian|Debian user guide]]&nbsp;for how to build Debian
  
Buildroot:&nbsp;Please refer to [[Buildroot]]&nbsp;for how to build Buildroot
+
Buildroot:&nbsp;Please refer to [[Buildroot|Buildroot]]&nbsp;for how to build Buildroot
  
 
= Pack Image =
 
= Pack Image =
Line 104: Line 106:
  
 
Linux: Please refer to [[Upgradetool|upgrade tool]] for how to flash image to device
 
Linux: Please refer to [[Upgradetool|upgrade tool]] for how to flash image to device
 +
 +
= Download Rootfs Image =
 +
 +
We provide prebuilt for all the board we support.
 +
 +
RK3399:&nbsp;https://pan.baidu.com/s/1u-BM6U-vNpnmbAciOYvkzQ
 +
 +
RK3288:&nbsp;https://pan.baidu.com/s/1zdp1vfBYCDO707rawF19QA
 +
 +
RK3328:&nbsp;https://pan.baidu.com/s/1-FZRWaf-aZ-8N4GFDsJumw
  
 
= Booting the Board =
 
= Booting the Board =

Revision as of 09:51, 19 April 2018

 

 

Overall

This guide provides information which will help you get started with rockchip opensource linux. If you have any questions, please report to us on github project issue page.

We are providing 2 kind of rootfs. prebuilt Debian and Buildroot. You can choose the way you prefer. 

  • Buildroot: An easy and small embedded Linux system. Recommend for your product development. 
  • Prebuilt Debian: A generic desktop Distro. Only for your evaluation. 

You will need below firmware/image for a full Linux OS and flash them to different locations:

  • Rockchip miniloader: This is the first level boot loader
  • U-Boot: This is the second level boot loader
  • Trusted: ARM Trusted Firmware
  • Resource: Kernel dtb, It is only used for development. 
  • Kernel: Kernel image, It is only used for development. 
  • Boot: It is Android boot image format. Pack kernel dtb and image to one partition. Use it for production. 
  • System: Rootfs

 

 

Environment

Please use Ubuntu 16.04 or later version. The early version can't work.

Here are some necessary packages for building the project.

$ sudo apt-get install repo git-core gitk git-gui u-boot-tools device-treecompiler mtools parted libudev-dev libusb-1.0-0-dev lib32gcc-7-dev python-linaro-image-tools linaro-image-tools gcc-4.8-multilib-arm-linux-gnueabihf gcc-arm-linuxgnueabihf gcc-aarch64-linux-gnu g++-7 libstdc++-7-dev autoconf autotools-dev libsigsegv2 m4 intltool libdrm-dev curl sed make binutils build-essential gcc g++ bash patch gzip bzip2 perl tar cpio python unzip rsync file bc wget libncurses5 libqt4-dev libglib2.0-dev libgtk2.0-dev libglade2-dev cvs git mercurial rsync openssh-client subversion asciidoc w3m dblatex graphviz python-matplotlib libssl-dev pv e2fsprogs fakeroot devscripts

If you insist on developing on your own environment, please make sure the version of gcc-arm-linux-gnueabihf and gcc-aarch64-linux-gnu is less than 6.

 

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.

git clone https://github.com/rockchip-linux/repo
mkdir linux
cd linux

To download RK3399 Linux SDK: 

../repo/repo init --repo-url=https://github.com/rockchip-linux/repo -u https://github.com/rockchip-linux/manifests -b master -m rk3399_linux_release.xml 
../repo/repo sync

To download RK3288 Linux SDK: 

../repo/repo init --repo-url=https://github.com/rockchip-linux/repo -u https://github.com/rockchip-linux/manifests -b master -m rk3288_linux_release.xml
../repo/repo sync

To download RK3328 Linux SDK: 

../repo/repo init --repo-url=https://github.com/rockchip-linux/repo -u https://github.com/rockchip-linux/manifests -b master -m rk3328_linux_release.xml
../repo/repo sync

Build U-Boot

Please refer to U-Boot for how to build U-Boot

Building kernel

Please refer to kernel for how to build Kernel

 

Building rootfs

Debian: Please refer to Debian user guide for how to build Debian

Buildroot: Please refer to Buildroot for how to build Buildroot

Pack Image

Go back to root directory of Linux

Please use below command to pack image for Debian

./mk_firmware.sh debian

Please use below command to pack image for Buildroot

./mk_firmware.sh buildroot

It will generate all the image you need in the rockimg directory.

rockimg/
├── kernel.img
├── MiniLoaderAll.bin
├── parameter.txt
├── resource.img
├── rootfs.img
├── trust.img
└── uboot.img

Flash image

Windows: Please refer to AndroidTool for how to flash image to device

Linux: Please refer to upgrade tool for how to flash image to device

Download Rootfs Image

We provide prebuilt for all the board we support.

RK3399: https://pan.baidu.com/s/1u-BM6U-vNpnmbAciOYvkzQ

RK3288: https://pan.baidu.com/s/1zdp1vfBYCDO707rawF19QA

RK3328: https://pan.baidu.com/s/1-FZRWaf-aZ-8N4GFDsJumw

Booting the Board

Then you can chose a suitable way for you to boot the board with flash all the image to media device.

Customization

Boot_Time

Boot_Logo

Image_Size

Firmware_Upgrade