Skip to content

Instantly share code, notes, and snippets.

@rfrht
Last active February 26, 2020 20:05
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save rfrht/5f0fa113f12fbacf832e57ff4967785a to your computer and use it in GitHub Desktop.
Save rfrht/5f0fa113f12fbacf832e57ff4967785a to your computer and use it in GitHub Desktop.
Building a Tinkerboard Armbian Kernel in a RHEL / CentOS 7 using Docker
=== CONSOLE FALLBACK: SERIAL PORT, SINCE NO HDMI SUPPORT IS PROVIDED IN THIS BUILD ===
Tinkerboard Kernel console serial port: UART2.
Using: Raspberry Pi as a console client. Disable local console so it can be used by minicom:
# systemctl mask serial-getty@ttyAMA0.service
==PINOUTS==
RASPI: PIN 6 (GND, GREEN), PIN 8 (TX, WHITE), PIN 10 (RX, BLUE)
TINKERBOARD: ====== Uses UART2 and NOT UART0!!!!!!!! ======
PIN30 (GND, GREEN), PIN 32 (TX, BLUE), PIN 33 (RX, WHITE)
At the raspi:
# minicom -D /dev/ttyAMA0
============
At the RHEL box:
yum install -y git docker httpd
for i in docker httpd ; do
systemctl enable $i
systemctl start $i
done
mkdir ~/git
cd ~/git/
git clone --depth 1 https://github.com/armbian/build
mv build build-armbian
cd build-armbian
docker build -t armbian_dev .
mkdir /dev/shm/build-cachedir
docker run -dit --entrypoint=/bin/bash -v /dev/shm/cache:/tmp armbian_dev
docker attach armbian_dev
--
passwd
apt-get install -y ssh vim
sed -i -e 's/PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
mkdir /var/run/sshd
chmod 0755 /var/run/sshd
/usr/sbin/sshd
<^P^Q>
--
ssh root@172.17.0.2
cd armbian
./compile.sh BOARD=tinkerboard BRANCH=default
After the 1st build:
mv ./patch/kernel/rockchip-default/ ./patch/kernel/rockchip-default.orig
./compile.sh KERNEL_KEEP_CONFIG=yes CLEAN_LEVEL=debs BOARD=tinkerboard BRANCH=default IGNORE_UPDATES=yes FORCE_CHECKOUT=no BUILD_KSRC=no
cd ./cache/sources/linux-rockchip/release-4.4/debian/tmp/lib/modules/
tar -cvf /dev/shm/modules.tar *
scp /dev/shm/modules.tar /srv/tools-rf/armbian/cache/sources/linux-rockchip/release-4.4/arch/arm/boot/zImage root@172.16.88.13:~
--
mount /dev/mmcblk0p1 /mnt ; cd /mnt/boot/ ; cp ~/zImage vmlinuz-rfreire7 ; unlink zImage ; ln -s vmlinuz-rfreire7 zImage ; ll
cd /lib/modules
tar -xvf ~/modules.tar
=== KCONFIG CHANGELOG ===
/srv/tools-rf/armbian/output/config/linux-rockchip-default.config
beleza1 - Convert modules, wifi, bluetooth, graphics
beleza2 - strip filesystems, bridge, vxlan,
beleza3 - namespaces, timer=server
Beleza4 - perf, kdump, suspend-to-ram, VSOCKETS, NETLINK_DIAG, SWITCHDEV, NET CGROUP, IPVS
Beleza5 - IIO, PHY/DRV NET: Everything but Rockchip
Beleza6 - USB net, joystick
Beleza7 - novideo
Beleza8 - s/-Os/-O2/g ; sched_deadline, no cgroup_block, notracer, arm_crypto_accel
Beleza9 - Crypto rebuild
Beleza10 - Crypto as a module
==== CURRENT STATE IN ROOM TEMPERATURE AND ASUS-SHIPPED HEATSINK ====
CPU temp: 43°C
root@tinkerboard:~# cat /proc/version
Linux version 4.4.120-beleza8-rockchip (root@f1b58cf9c773) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11) ) #20 SMP Sun Apr 8 14:51:03 UTC 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment