New NanoPi NEO Air Ubuntu Core developer image

Along with the already existing beaglebone (black), hummingboard imx6, sabrelite imx6 and nanopi-neo images, there is now also an image for the wifi-only NanoPi NEO Air on my daily builds page ready for downloading and tinkering.

Compared to the others this image is slightly special since you can actually install it completely unmodified to the internal eMMC of the board so that no SD card is required after installation.

In case you own such a device and are trying the image, feedback in this thread would be appreciated.

The image uses the linux-generic-allwinner kernel snap (like the nanopi-neo) which is a build of the upcoming linux-generic tree for 17.10 from (if you find any instabilities or missing options, please let me know) with the allwinner configuration options enabled.

The source for the gadget snap can be found on my github page


To install to the internal eMMC plug your SD into your PC’s SD card reader…
Make sure the card is not mounted, mine shows up as “sdc” so i do the following:

sudo umount /dev/sdc1
sudo umount /dev/sdc2

Write the image to SD:

xzcat ubuntu-core-16-nanopi-air.img.xz | sudo dd of=/dev/sdc bs=32M

Attach the serial cable to the board and fire up screen:

sceen /dev/ttyUSB0 115200

Put the card in the board, attach the antenna, apply power and run through the configuration wizard.

Remove power and plug the SD back into your PC, wait til it auto-mounts (or mount it manually if you have this turned off on your desktop)

cp ubuntu-core-16-nanopi-air.img.xz /media/<user>/writable/user-data/<user>/

Unmount the SD and plug it back into the board … boot it.
Log in with the ssh credentials you received when doing the first configuiration:

ssh ogra@

xzcat ubuntu-core-16-nanopi-air.img.xz | sudo dd of=/dev/mmcblk1 bs=16M
sudo sync

Shut down the board and remove the card … now boot again and it will boot to eMMC and run the configuration from scratch for the internal install.

Ogra, You mentioned “wifi-only” in your message, What does that mean? I need to work with both wifi and ble on this unit. Thanks

It means that the newest device to have been enabled and is being reported upon in the original post does not support Ethernet in any way whatsoever:

Hi! I see that this image is for Ubuntu Core 16.

Would it be hard to port it to a newer kernel version with a newer GPU driver?

A bit of context.

I do not own a NanoPi NEO Air (yet). What I’d need for a hobby project is a board:

  • smaller than 50x50mm
  • lighter than 10 grams
  • with MIPI camera support
  • with WiFi and Bluetooth
  • with a GPU “usable for image processing”, even in a hacky way using vertex shaders with offline rendering
  • with a kernel that supports the newer GPIO interface (the character device one)

(and, I know, the obvious complimentary pony…)

Forgetting about the pony, the NanoPi NEO Air would qualify if I could use a modern kernel and a recent Mesa :slight_smile:

So, in this context: would it be “easy” to build such an image? Or would I need to look for a different board?

Thanks! Massi

well, teh source for teh gadte is at:

feel free to re-work it for base: core18 i’m happy to answer questions if you run into issues …

regarding a kernel … i’d check the 5.4 ubuntu-focal branch on and adjust the snapcraft.yaml there to enable the necessary bits for allwinner, start with the kconfigs: overrides from:

Thanks for the quick reply!

I forked your repo here. On the base-core18 branch there are the modifications I had to do to build it using basing it on core18. It builds :slight_smile:

Now, forgive my ignorance, but:

  • how do I obtain an image file from the snap?
  • how do I change the kernel in the snap?

At this point I’ll also order the board…

i think this might help …

for using locally built kernel and gadget snaps you will need to use the --snap argument in the ubuntu-umage call that is described there.

Thanks for the hints, I’m getting there…

Now i am building your Ubuntu-4.15.0-106.107 kernel snap, after it builds and boots I’ll pass to a 5.x one.

However I am stuck at the xradio-driver step when building the kernel, the error is:

  CC [M]  /root/parts/xradio-driver/build/fwio.o
In file included from ./include/asm-generic/int-ll64.h:11:0,
                 from ./arch/arm/include/uapi/asm/types.h:5,
                 from ./include/uapi/linux/types.h:5,
                 from ./include/linux/compiler.h:169,
                 from ./include/linux/init.h:5,
                 from /root/parts/xradio-driver/build/fwio.c:12:
./include/uapi/asm-generic/int-ll64.h:12:10: fatal error: asm/bitsperlong.h: No such file or directory
 #include <asm/bitsperlong.h>
compilation terminated.

Indeed, bitsperlong.h does not exist for 32 bits arm archs on that kernel source tree…

I checked and both ARCH and CROSS_COMPILE are correctly defined.
I also added KSRC=/root/parts/kernel but it changed nothing (btw, I do the build in a snap and not on the host, by setting build-base: core18 and fixing a few environment details like actually installing the cross compiler).

I have two questions about this problem.

  1. how do I fix it
  2. is xradio-driver still needed for the nanpi air with a 5.x kernel?

Thanks again,

i think xradio is teh only existing linux driver for that hardware (i’d be happy to be wrong though, given it is an awfully buggy and hackish driver)

i dont think i have used build-base for my kernel builds of that generation … try dropping it and also make sure to use --target-arch=armhf for snapcraft …

I tried without build-base: core18, the error was the same.

It was building on my host so I had to install gcc-arm-linux-gnueabihf:amd64 myself.

The snap I am using is a fork of your linux-generic-allwinner.
The only changes are:

  • I use build-on: amd64 instead of build-on: armhf because I am cross compiling
  • inside the kernel part I had to add a apt install -y libc-dev otherwist the config scripts (c files) would not build (missing sys/types.h)
  • I force the installation of gcc-arm-linux-gnueabihf:amd64 because the on amd64 to armhf: condition is not detected

I think you are right, the problem could be related to cross compilation.
How did you cross compile given that the snap states - build-on: armhf?
Is there any other env var I should set?


snapcraft --destructive-mode --target-arch=armhf

(note though that i havent built this kernel in quite a while, it might fail (things change and there are manually added dtbs and such))

Buinding with --destructive-mode turned out being even worse (mostly because it interfered with my host).

But I has another ides: I sow that the kernel snap does not ask for a specific version of xradio, it just pulls git master.

My question is: which is the revision of xradio that is supposed to build against a 4.15 kernel?
Probably it’s normal that it fails: the current master branch is supposed to work with current kernels, not old ones.

Could I be right, or am I totally off track?

i dont think there are any revisions (i mean, the upstream has not bothered to create any tags or such) …

you could try the “original” branch though

Thanks for your help!
However, in searching for a bootable image with a modern kernel I found armbian, and since it works I’m just using that at this point…