SOM-5300

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 https://github.com/estonetechnology/emb-7350-build.git build
$ git clone -b SOM-5300-V1.0 https://github.com/estonetechnology/rk3288-linux-uboot.git u-boot
$ git clone -b SOM-5300-V1.0 https://github.com/estonetechnology/rk3288-linux-kernel.git kernel
$ git clone https://github.com/estonetechnology/emb-7350-rkbin.git rkbin
$ git clone https://github.com/estonetechnology/emb-7350-rootfs.git rootfs

Compiling Kernel

$ build/mk-kernel.sh habey

Compiling U-boot

$ build/mk-uboot.sh 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 ./mk-base-debian.sh

Building Rk-debian Rootfs

$ ARCH=armhf ./mk-rootfs.sh

Creating The ext4 Image

$ ./mk-image.sh

Building Images

Build one boot image

Combine kernel and extlinux as boot.img

$ build/mk-image.sh -c rk3288 -t boot

Build one system image

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

Flashing Image

Pre-built image:

You can download a prebuilt image here https://www.dropbox.com/s/7l3xhp5y6fif7uu/rk3288-out.zip?dl=0

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

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

Flash Kernel

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

Flash U-boot

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