Nezha board is a development board that is designed by an AWOL. This project
uses a D1 SoC from Allwinner which is used for the first time by the general
public. Probably this board is the first massive produced and available SBC
based at RISC-V architecture taking in mind a fact that BeagleV™
was canceled in august this year after the pilot program with version beta of
the board. The Nezha board can be acquired at Aliexpress from
This article is such an opening to the series of posts about Neza D1 where
the basic facts, specification and firmware stack of this SBC are described and
The name of this board is taken from a fictional character from Chinese literature.
“Nezha” also means “The third prince” and he is a God which was fighting with
dragons and snakes. His sign can be found on the board:
The Nezha uses Allwinner D1 SoC with single-core XuanTie C906 64-bit RISC-V
processor running at 1.0GHz. This SoC has also a blocks as HiFi4 DSP or
G2D 2D graphics accelerators. It has 1GB DDR3 RAM memory and 256MB SPI NAND
flash. As massive storage also a microSD card can be used. Board has also a
various of the peripheries such as Ethernet, WiFi & Bluetooth module, HDMI,
type-c USB OTG, type-a USB HOST, and dedicated header for serial communication
(UART) which at the board is described as DEBUG. To power up this board the
5V/2A power adapter will be needed. For full specification please
refer to the official site.
The presented copy comes with a quite extensive package which contains board,
USB-UART converter, 2xUSB type-c cables, and screws.
Firmware & Operating System
For now, the D1 Nezha development board comes with Tina Linux system which is
a fork of the OpenWRT. You can find information about it
It supports kernels such as Linux3.4, Linux3.10, Linux4.4, Linux4.9, Linux5.4,
and others. There are also other distributions available such as Debian
(Sipeed and PerfXLab versions) and Fedora. All of them can be found and
On the other hand boot firmware on D1 consists of three parts, which largely
correspond to the components used by 64-bit ARM SoCs:
boot0 - it is modified for this board and used as SPL due to features such
as enabling the T-HEAD ISA and MMU extensions.
OpenSBI - supervisor which is an interface between too less privileged modes
boot0 and TPL bootloader.
U-Boot - TPL bootloader which initializes additional hardware and loads
kernel from storage or the network.
HELLO! BOOT0 is starting!
BOOT0 commit : 27369ab
set pll start
periph0 has been enabled
set pll end
[pmu]: bus read error
board init ok
DRAM only have internal ZQ!!
[AUTO DEBUG] two rank and full DQ!
[AUTO DEBUG] rank 0row=15[AUTO DEBUG] rank 0bank=8[AUTO DEBUG] rank 0 page size=2 KB
[AUTO DEBUG] rank 1row=15[AUTO DEBUG] rank 1bank=8[AUTO DEBUG] rank 1 page size=2 KB
rank1 config same as rank0
DRAM BOOT DRIVE INFO: V0.24
DRAM CLK=792 MHz
DRAM Type=3(2:DDR2,3:DDR3)DRAMC ZQ value: 0x7b7bfb
DRAM ODT value: 0x42.
DRAM SIZE=1024 M
DRAM simple test OK.
dram size=1024card no is 0sdcard 0 line count 4[mmc]: mmc driver ver 2021-04-2 16:45
[mmc]: Wrong media type 0x0
[mmc]: ***Try SD card 0***
[mmc]: HSSDR52/SDR25 4 bit
[mmc]: 50000000 Hz
[mmc]: 121896 MB
[mmc]: ***SD/MMC 0 init OK!!!***
Loading boot-pkg Succeed(index=0).
mmc not para
Jump to second Boot.
____ _____ ____ _____
/ __ \ / ____| _ \_ _|
| | | |_ __ ___ _ __ | (___ | |_)|| |
| | | | '_ \ / _ \ '_ \ \___ \| _ < | |
| |__| | |_) | __/ | | |____) | |_)|| |_
\____/| .__/ \___|_| |_|_____/|____/_____|
Platform Name : T-HEAD Xuantie Platform
Platform HART Features : RV64ACDFIMSUVX
Platform Max HARTs : 1
Current Hart : 0
Firmware Base : 0x40000400
Firmware Size : 75 KB
Runtime SBI Version : 0.2
MIDELEG : 0x0000000000000222
MEDELEG : 0x000000000000b1ff
PMP0 : 0x0000000040000000-0x000000004001ffff (A)
PMP1 : 0x0000000040000000-0x000000007fffffff (A,R,W,X)
PMP2 : 0x0000000080000000-0x00000000bfffffff (A,R,W,X)
PMP3 : 0x0000000000020000-0x0000000000027fff (A,�
U-Boot 2018.05-g0a88ac9 (Apr 302021 - 11:23:28 +0000) Allwinner Technology
[00.362]DRAM: 1 GiB
[00.364]Relocation Offset is: 3def0000
[00.368]secure enable bit: 0[00.370]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz
[00.377]flash init start
[00.379]workmode= 0,storage type=1[00.382][mmc]: mmc driver ver uboot2018:2021-04-16 14:23:00-1
[00.388][mmc]: get sdc_type fail and use default host:tm1.
[00.394][mmc]: can't find node "mmc0",will add new node
[00.399][mmc]: fdt err returned <no error>
[00.403][mmc]: Using default timing para
[00.407][mmc]: SUNXI SDMMC Controller Version:0x50310
[00.431]sunxi flash init ok
__clk_init: clk pll_periph0x2 already initialized
register fix_factor clk error
request pwm success, pwm2:pwm2:0x2000c00.
[00.466]set disp.dev2_output_type fail. using defval=0
partno erro : can't find partition bootloader
54 bytes read in 1 ms (52.7 KiB/s)[01.016]bmp_name=bootlogo.bmp size 3072054[01.070]LCD open finish
3072054 bytes read in 130 ms (22.5 MiB/s)[01.185]Loading Environment from SUNXI_FLASH... OK
[01.204]out of usb burn from boot: not need burn key
root_partition is rootfs
set root to /dev/mmcblk0p5
[01.214]update part info
[01.220]change working_fdt 0x7eaafda8 to 0x7ea8fda8
Hit any key to stop autoboot: 0
Android's image name: d1-nezha
No reserved memory region found in source FDT
Starting kernel ...
[01.672][mmc]: MMC Device 2 not found
[01.675][mmc]: mmc 2 not find, so not exit(...)
As you can see bootlog is different than for the Tina Linux. Basically, this
difference is visible in logs from boot0 where we can read the information
that this time the SDCard is detected and start to read data from it.
Debian GNU/Linux 11 RVBoards ttyS0
RVBoards login: root
Linux RVBoards 5.4.61 #12 PREEMPT Thu Jun 3 08:39:01 UTC 2021 riscv64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed May 19 18:39:24 CST 2021 on ttyS0
The system starts up and enters the login interface after powering on for about
1 minute. During this process, the LED light will turn on in blue and go out
after 5 seconds.
Note: Password to this distro is rvboards.
Test of the wireless connection
Now let’s test a WiFi connection. For this purpose, it is needed to do some
bring up the wireless interface,
create wpa_supplicant.conf which contain information about the network we
want to be connected,
start a new instance of wpa_supplicant after we close existing processes,
use dhclient to receive IP address,
install iperf3 at the Nezha board and your host machine.
After these steps we are prepared to proceed with a test as follows:
run iperf server at the host
$ iperf3 -s
test connection between client and server
# iperf3 -c <host ip>
As result, we receive information about sender and receiver speed. The board
was connected to 2.4GHz network:
The numbers have spoken! I can say that it is a not bad speed, but it is a half,
I got in comparison with my Huawei Matebook D.
Certainly, Nezha’s design is interesting. Many of the key elements for the
operation of the system is still being developed and we would like to have some
contribution to the software for D1 Nezha, for example, support in the Yocto
Project. Please let us know in the comments what do you think about this board
and what should we check?
If you think we can help in improving the security of your firmware or you
looking for someone who can boost your product by leveraging advanced features
of used hardware platform, feel free to book a call with us
or drop us email to email@example.com. If you are interested in similar
content feel free to sign up to our newsletter.
Junior embedded systems developer at 3mdeb. Require a lot from himself and want to extend his knowledge. He's now focused on Linux embedded systems but also is interested in the modern automotive industry and microcontroller programming.