Getting a First Picture on my Nezha RISC-V Board
What is a vacation without a nice side project? – My small x-mas project was to get my RISC-V Allwinner D1 Nezha board finally into a state that it shows anything on the connected HDMI-port. Any, “yeah!!!”, it works:

This picture shows qmlscene rendering a rotating yellow rectangle at 2 fps (speed is limited due to yet missing HW acceleration support).
A few words about the board
Compared to other embedded boards that I have, this one is surprisingly well documented; given you find the right webpages (list at the end). The vendor page itself is in a rather typical state, where an online translator occasionally comes handy to translate Chinese into something I understand But then, there is the really nice sunxi community wiki with has all extra information that you need.
For the device itself, some months ago I decided to get this one mostly because of the reasons price and delivery date. However, it has a big disadvantage for me when I use it for testing the KDE Yocto layers: There is only a 2D GPU on the board (namely a “G2D” unit) for which also no Kernel drivers are present at the moment (except those from the Kernel source blob by the device vendor). However, for all other parts there is impressive community work. Most notably, coming with Kernel 6.2, there is finally the HDMI driver support that made the above picture possible.
The few steps left for me
As said, there is a really good documentation about compiling a close-to-mainline Kernel and u-boot for this board. Moreover, the meta-riscv Yocto layer provides recipes to build a full device image with Kernel 5.16 and a patched/hacked u-boot (using an older boot sequence) with a nice out-of-the-box experience.
So, to get graphics/HDMI working on the board, all that was left for me was following the wiki documentation and:
- switch to the latest Kernel fork based on 6.1 with all the relevant patches
- and adapt U-Boot to a more recent fork that can boot this more mainline Kernel fork.
The details are summarized in this PR for the meta-riscv layer. It essentially drops as much non-mainline tweaks as possible and adapts the recipes along the way. Simple as it looks, it was quite a fun ride down the rabbit hole until I got my first booting Kernel I really think that this tinkering around with hardware is the best way to learn its concepts. Even though I attended many talks in the past about the steps I did, it is so different when you are doing it yourself.
What comes next
Unfortunately, I do not expect any Plasma or KDE application running on the Nezha board in the sooonish future (at least not accelerated via the G2D chip)… Yet, if you recall, at FOSDEM 2019 Alistair already demonstrated Plasma running on a HiFive Unleashed board, using an expansion board for graphics. Finally, there is right now another very interesting and not too expensive RISC-V board becoming available with on-board 3D GPU and it is already on my shopping list… I am looking forward to 2023
Collected Links
- https://linux-sunxi.org/Allwinner_Nezha – General introduction and bring-up by the sunxi community
- https://linux-sunxi.org/U-Boot – flashing instructions by the sunxi community
- https://fedoraproject.org/wiki/Architectures/RISC-V/Allwinner – Fedora wiki for D1 support (note: it uses the “old” boot up)
- https://www.rvboards.org/mkdocs/en/nezha-d1/ – English documentation by the HW vendor
- https://github.com/YuzukiTsuru/OpenixCard – a nice tool that can convert Allwinner PhoenixCard images to default IMG files that can be flashed via
dd
on Linux (e..g when you want to test the vendor image)