NetBSD is Now Running on Allwinner H3 Boards

Most people will run Linux kernel on development boards because it does the job, and that’s usually the only option. But others have been working on NetBSD kernel for Allwinner H3 boards, and it’s now running on various H3 boards with serial console, USB, Ethernet, SD card, and eMMC flash working.


Jared McNeill explains they first had to deal with low-level code to initialize the CPU and MMU, before using a U-boot layer to disguise NetBSD as the Linux kernel in order to load kernel and device tree file. The code then jumps to the generic ARM FDT implementation of initarm to relocate DTB data and perform other steps, and finally they can enumerated devices. This is explained in greater details in the aforelinked blog post on NetBSD website.

Jared tested the implementation on NanoPi NEO and Orange Pi Plus 2E, but others have reported success on various hardware based on Allwinner H3 processor. Other ARM development boards have been supported since 2015 by NetBSD 7.0 and greater with Raspberry Pi 2, ODROID-C1, BeagleBone Black, Allwinner A20/A31 boards, and others, but the work done on Allwinner H3 is different, as it’s the first implementation to use device tree, and eventually it should be possible to ship a single GENERIC evbarm kernel for all boards.

Thanks to Geokon for the tip.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
8 Comments
oldest
newest
tkaiser
tkaiser
7 years ago

:
‘Another person also leveraged Jared’s work to run FreeBSD to NanoPi NEO board instead of NetBSD’. This is not directly related to the new NetBSD approach above since Jared and other FreeBSD folks already work for a very long time on Allwinner boards. And FreeBSD in some areas set and still sets the pace (eg cpufreq/DVFS working way earlier on A64/A83T there compared to mainline Linux).

Jerry
Jerry
7 years ago

I’m guessing few questions about the Mali support will appear any time soon.

jqpabc123
jqpabc123
7 years ago

“…disguise NetBSD as the Linux kernel in order to load…”

So some unique Linux features or operational modes have somehow been built into the hardware?

tkaiser
tkaiser
7 years ago

@Jean-Luc Aufranc (CNXSoft) The real news got totally lost. Jared introduced a new NetBSD kernel that makes use of u-boot passing the DTB (device tree blob) over to the kernel (that’s the only reason they pretend to be a Linux). He was able to boot with a single kernel binary (using the same kernel config!) different sunxi architectures (sun8i-h3, sun8i-a83t and sun6i-a31). That’s the real news: one kernel for different SoCs and all the differentiation happening solely based on device tree definitions handed over by u-boot. Situation with Linux is still different here (we need to build one kernel per… Read more »

cortex-a72
cortex-a72
7 years ago

@jqpabc123 it’s a very strange conclusion. it’s called not “unique features”, it’s just uboot is not exactly “universal” bootloader, it’s a mess for loading linux only. so others have to pretend they are linux. anyway, ideally, all those SoC vendors and board vendors should take care of supplying a really standard boot firmware. considering what a mess uboot code is, I don’t get it why all these, not direct their efforts at porting Tianocore to their SoCs/boards. and ACPI as well instead of pulled of from an absolutely different standard device tree. this way, the situation would be no worse… Read more »

Tim
Tim
6 years ago

NetBSD doesn’t support the Odroid C2, it supports the Odroid C1/C1+.

Boardcon Rockchip and Allwinner SoM and SBC products