Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save TinkerTeam/6286550ce70d34f6b3d483cd803da786 to your computer and use it in GitHub Desktop.
Save TinkerTeam/6286550ce70d34f6b3d483cd803da786 to your computer and use it in GitHub Desktop.
How to Compile Debian Kernel for Tinker Board

How to Compile Kernel for Tinker Board

- Build environment

Installing the build tools

sudo apt-get install git-core gitk git-gui gcc-arm-linux-gnueabihf device-tree-compiler gcc-aarch64-linux-gnu mtools parted libssl-dev

- Build Kernel

1. Compile the kernel

make ARCH=arm miniarm-rk3288_defconfig -j16
make zImage ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j16
make modules ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j16
make ARCH=arm rk3288-miniarm.dtb CROSS_COMPILE=arm-linux-gnueabihf- -j16

Note: As of 2018-01-05, if may be necessary to edit the Makefile to add -Wno-misleading-indentation to the CFLAGS_MODULE if you are using GCC 6 and up. Ref: https://github.com/TinkerBoard/debian_kernel/commit/9be94537ea733f70f42bdaa55aff68d0d1b06d70

2. Install WIFI module to root file system

  1. Insert sd card to linux pc and then mount partition2 (root file system) Example:
sudo mkdir –p /media/users/sdx2
sudo mount /dev/sdx2 /media/users/sdx2
  1. Open terminal to kernel folder and enter the following com mands
sudo make ARCH=arm INSTALL_MOD_PATH=/media/users/sdx2 modules_install
sudo umount /media/users/sdx2

3. Replace the kernel image

  1. Insert sd card to linux pc and then mount partition1 (root file system) Example:
sudo mkdir –p /media/users/sdx1
sudo mount /dev/sdx1 /media/users/sdx1
  1. Open terminal to kernel folder and copy zImage and rk3288- miniarm.dtb to partition1(boot partition)
cp arch/arm/boot/zImage /media/users/sdx1
cp arch/arm/boot/dts/rk3288-miniarm.dtb /media/users/sdx1
sudo umount /media/users/sdx1
@giseleznev
Copy link

Hi, is there any instructions for tinker board 2 kernel compiling? analog of rk3288-tinker.dts, rk3399-tinker.dts is missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment