Ported Ubunutu Core to Asus TinkerBoard S

Hey Guys.

I try to get running ubuntu core on Tinkerboard rk3288 Chip arm/armhf architecture

I have cloned @ogra github for the nano-pi: https://github.com/ogra1/nanopi-air-gadget

And modify some stuff, but it won’t boot nether from SD also from emmc


Here is my gadget yaml

device-tree: rk3288-tinker.dtb
device-tree-origin: kernel
bootloader: u-boot
schema: mbr
- name: system-boot
type: 0C
filesystem: vfat
offset: 4194304
filesystem-label: system-boot
size: 128M
- source: bootcopy/
target: /
- name: u-boot
type: bare
size: 4012440
- image: u-boot.bin

and my snapcraft.yaml

name: rk3288
version: 16-0.1
summary: ASUS TinkerBoard
description: |
Bootloader files and partitoning data to create a
bootable Ubuntu Core image for the ASUS TinkerBoard.
type: gadget
confinement: strict
grade: stable
plugin: nil
source: git://git.denx.de/u-boot.git
source-branch: v2018.05
override-build: |
set -e
git apply …/…/…/uboot.patch
make tinker-rk3288_defconfig
cp spl/u-boot-spl-dtb.bin $SNAPCRAFT_PART_INSTALL/
cp arch/arm/dts/rk3288-tinker.dtb $SNAPCRAFT_PART_INSTALL/
tools/mkenvimage -r -s 65536 -o $SNAPCRAFT_PART_INSTALL/uboot.env …/…/…/uboot.env.in
ln -s uboot.env $SNAPCRAFT_PART_INSTALL/uboot.conf
- bc
- bison
- build-essential
- device-tree-compiler
- flex
- html2text
- libpython2.7-dev
- python-minimal
- swig
- wget
source: bootcopy
plugin: nil
override-build: |
set -e
cp -r * $SNAPCRAFT_PART_INSTALL/bootcopy
source: .
plugin: nil
override-build: |
set -e
cd initrd && find . | cpio --quiet -o -H newc| lzma >>$SNAPCRAFT_PART_INSTALL/initrd-extra.img
- ttf-ubuntu-font-family
- cpio
- findutils
- xz-utils

maybe i miss some files?

Content of bootcopy

u-boot.env => u-boot.conf /Symlink
extlinux => extlinux.conf

content of extlinux.conf

label ASUS Tinker Board Ubuntut Core
kernel /zImage
fdt /rk3288-tinker.dtb
append earlyprintk console=tty1 root=/dev/mmcblk0p2 rw init=/sbin/init

maybe somefiles are missing and or needs copy to other folder.


1 Like

Funnily i just got my hands on a tinkerboard S yesterday and quickly made a gadget:

you can build it using snapcraft --target-arch=armhf on an x86 host… it uses the denx upstream u-boot which means you need to use the serial port on GPIO pins 32/33

i sadly dont have a fully working kernel yet (i was hoping i could just re-use my linux-generic-allwinner snap but that seems to have issues supporting framebuffer and MMC/SD-card)

Hey @ogra thanks for this, will build and try, maybe my kernel is working for that…

There is an image now (with a custom 4,15 kernel) at:

feel free to play with it … the kernel uses the multi_v7_defconfig … all bits used to assemble the image are in the above dir.

1 Like

Hey @ogra,

you are my hero of the day :slight_smile:

It works, I play now around and add the GPIO’s to the gadget. I will also test with the EMMC stuff


Hey @ogra, can you push the tinkerboard kernel snap into your allwinner branch?

it looks that the gpio are not loaded correctly and the SPI interfaces also not.

I can see on the Core image:


but in /sys/class/ the directory gpio doesn’t exist, to export the gpio’s

May you can help?

The Working TinkerBoard wiringPi library is here based:

I did some more patch work to fix wireless as well as the hang on reboot (not sure if you noticed that yet) and since it isnt really allwinner centric i have created a new branch (and name) at:

i’ll update the image and the rest of the files on the http://people.canonical.com/~ogra/snappy/tinkerboard/ account tomorrow …

Hey @ogra, thx, I just build the kernel and works so far, I see i2c devices and SPI devices but the gpio pins current not, wifi is working with network-manager


well, i have been looking into gpio but cant really find whats missing yet, so that might still take a while (i’m traveling a lot this and next week, that limits my hacking time a bit) … but feel free to send PRs if you find the magic bullet :slight_smile:

I will check, i have found some differences during compare the TinkerBoard Debian kernel and the ubuntu kernel

I will check how I can set the diffs into the place from miniarm into the tinker also i have found some diffs in the gpio stuff

1 Like

@ogra, I have found out that we miss the gpio library i guess, I have installed on the core an classic snap and compiled the TinkerBoard WiringPi lib and it works but not in normal mode, I guess we need to inlcude this files into the kernel stuff also.

the folder gpio is missing, also the /sys/class/gpio folder is missing.

in: /sys/devices/platform/pinctrl looks so:

drwxr-xr-x 3 root root 0 Feb 20 15:21 gpiochip0
drwxr-xr-x 3 root root 0 Feb 20 15:21 gpiochip1
drwxr-xr-x 3 root root 0 Feb 20 15:21 gpiochip2
drwxr-xr-x 3 root root 0 Feb 20 15:21 gpiochip3
drwxr-xr-x 3 root root 0 Feb 20 15:21 gpiochip4
drwxr-xr-x 3 root root 0 Feb 20 15:21 gpiochip5
drwxr-xr-x 3 root root 0 Feb 20 15:21 gpiochip6
drwxr-xr-x 3 root root 0 Feb 20 15:21 gpiochip7
drwxr-xr-x 3 root root 0 Feb 20 15:21 gpiochip8

on my armbian image looks so in /sys/class/gpio

–w------- 1 root root 4096 Feb 19 16:17 export
lrwxrwxrwx 1 root root 0 Feb 19 16:17 gpio146 -> …/…/devices/platform/pinctrl/gpiochip4/gpio/gpio146
lrwxrwxrwx 1 root root 0 Feb 19 16:17 gpio149 -> …/…/devices/platform/pinctrl/gpiochip4/gpio/gpio149
lrwxrwxrwx 1 root root 0 Feb 19 16:17 gpio151 -> …/…/devices/platform/pinctrl/gpiochip4/gpio/gpio151
lrwxrwxrwx 1 root root 0 Jan 18 2013 gpiochip0 -> …/…/devices/platform/pinctrl/gpio/gpiochip0
lrwxrwxrwx 1 root root 0 Jan 18 2013 gpiochip120 -> …/…/devices/platform/pinctrl/gpio/gpiochip120
lrwxrwxrwx 1 root root 0 Jan 18 2013 gpiochip152 -> …/…/devices/platform/pinctrl/gpio/gpiochip152
lrwxrwxrwx 1 root root 0 Jan 18 2013 gpiochip184 -> …/…/devices/platform/pinctrl/gpio/gpiochip184
lrwxrwxrwx 1 root root 0 Jan 18 2013 gpiochip216 -> …/…/devices/platform/pinctrl/gpio/gpiochip216
lrwxrwxrwx 1 root root 0 Jan 18 2013 gpiochip24 -> …/…/devices/platform/pinctrl/gpio/gpiochip24
lrwxrwxrwx 1 root root 0 Jan 18 2013 gpiochip248 -> …/…/devices/platform/pinctrl/gpio/gpiochip248
lrwxrwxrwx 1 root root 0 Jan 18 2013 gpiochip56 -> …/…/devices/platform/pinctrl/gpio/gpiochip56
lrwxrwxrwx 1 root root 0 Jan 18 2013 gpiochip88 -> …/…/devices/platform/pinctrl/gpio/gpiochip88
–w------- 1 root root 4096 Jan 18 2013 unexport

in …/…/devices/platform/pinctrl/gpiochip4/ as example looks on core so:

-r–r--r-- 1 root root 4096 Feb 20 15:22 dev
lrwxrwxrwx 1 root root 0 Feb 20 15:22 of_node -> …/…/…/…/firmware/devicetree/base/pinctrl/gpio4@ff7b0000
drwxr-xr-x 2 root root 0 Feb 20 15:22 power
lrwxrwxrwx 1 root root 0 Feb 20 15:22 subsystem -> …/…/…/…/bus/gpio
-rw-r–r-- 1 root root 4096 Feb 20 15:22 uevent

gpio folder is missing.

Greets Tony

@ogra, i have found, the trick is to add in the multi_v7_defconfig follow:


because this line doesn’t exist in this file.

Now I have the gpio folder in /sys/class

And I can modify the gadget and will more testing now

i have added that change to my branch now

thx, I try to use the correct way of the slots, it seems that the device hangs sometimes on boot during the gadget.

Hey @ogra,

I have found here maybe some interesting patches for the tinkerboard can we use this maybe in the kernel and u-boot stuff?


Greets Tony

hey, sorry fort the late reply but i was traveling for a week, i’ll take a look, note that the above is all 4.4 stuff and might have landed in 4.15 (which i used for that port) so thats a bit of time consuming work going over all of them …

if you have anything pressing feel free to create PRs in my github branches though …

Hi @ogra, I have tried to make a core image using : ubuntu-image snap --channel edge --extra-snaps tinkerboard_16-0.1_armhf.snap --extra-snaps linux-multi-v7_4.15.0-45.48_armhf.snap tinkerboard.model
but it seems not working. The .img.zx you have made works correctly on my tinkerboard s from sd card. The img I have made cannot start from sd on tinkerboard s. which shows black screen(not graphic output).

Can you help me with this? Thank you very much for all the jobs you have done.

Hi @ogra, I found the kernel has been replaced from linux-multi-v7 to allwinner ? so the .img.xz in http://people.canonical.com/~ogra/snappy/tinkerboard/ is not using the kernel linux-multi-v7.

oops, i might have messed up something, will check and fix today … (and ping back once it is solved)

Thank you, you are very kind.