From Estone Technology Wiki
Jump to: navigation, search

Building Environment

$ sudo apt-get install git-core gitk git-gui gcc-arm-linux-gnueabihf u-boot-tools
$ sudo apt-get install device-tree-compiler gcc-aarch64-linux-gnu mtools parted pv

Getting Source Codes

$ mkdir som-5300
$ cd som-5300
$ git clone build
$ git clone -b SOM-5300-V1.0 u-boot
$ git clone -b SOM-5300-V1.0 kernel
$ git clone rkbin
$ git clone rootfs

Compiling Kernel

$ build/ habey

Compiling U-boot

$ build/ habey

Compiling Rootfs

Building Base Debian System

$ cd rootfs
$ sudo apt-get install binfmt-support qemu-user-static
$ sudo dpkg -i ubuntu-build-service/packages/*
$ sudo apt-get install -f
$ TARGET=desktop ARCH=armhf ./

Building Rk-debian Rootfs

$ ARCH=armhf ./

Creating The ext4 Image

$ ./

Building Images

Build one boot image

Combine kernel and extlinux as boot.img

$ build/ -c rk3288 -t boot

Build one system image

$ build/ -c rk3288 -t system -s 4000 -r rootfs/linaro-rootfs.img

Flashing Image

Pre-built image:

You can download a prebuilt image here

1. Enter ROM Mode
2. Use OTG cable to connect to Ubuntu host
3. Flash to MMC

$ build/  -c rk3288 -p system  -i  out/system.img

Flash Kernel

$ build/ -p boot -i out/boot.img

Flash U-boot

$ build/ -p loader -i out/u-boot/u-boot.out