Robert Lipe explains why Apple hardware and Nezha D1 do not work together using a USB-C to USB-C cable. It should be possible to work around the problem using the USB-A to USB-C cable(s) supplied with the board.
Kernel 5.4.61 (as reported by Gabe R):
# cat /proc/mtd dev: size erasesize name mtd0: 00100000 00040000 "boot0" mtd1: 00400000 00040000 "uboot" mtd2: 00100000 00040000 "secure_storage" mtd3: 0fa00000 00040000 "sys"
In this thread Samuel Holland notes that this partitioning is an effect of Allwinner firmware, which is not compatible with upstream Linux.
Kernel 5.16.0-rc2:
# cat /proc/mtd dev: size erasesize name mtd0: 10000000 00020000 "spi0.0"
The same stands for kernels in the Ubuntu 22.04 image below.
The USB serial adapter that comes with the board connects to the 3-pin "DEBUG" header on the board as follows:
Peter Gutmann notes that the supplied serial cable can be faulty. If this is the case, it needs to be replaced with a serial adapter that uses 3.3V levels.
With kernel 5.16.0 (which is available in some disk images and does not boot by default) it is possible to control the RGB LED of the board, which is labelled "LED" and sits next to the red "PWR" LED:
LED=/sys/class/leds/rgb:indicator echo 0 50 50 >"$LED"/multi_intensity echo mmc0 >"$LED"/trigger
The same stands for kernels in the Ubuntu 22.04 image below.
Some kernels (at least those in Ubuntu 22.04 disk image) support the temperature sensor built into the board/chip:
# sensors cpu_thermal-virtual-0 Adapter: Virtual device temp1: +32.2°C (crit = +110.0°C)
Filename and Description | Packed Size | Packed SHA-1 | Unpacked Size | Unpacked SHA-1 | Notes |
---|---|---|---|---|---|
ubuntu-22.04.3-preinstalled-server-riscv64+nezha.img.xz
Ubuntu Server 22.04.3, xz-compressed plain disk image |
775841376 bytes (739.90 MiB, 775.84 MB) |
87b02e0f5e70a070d701df0b4ab1ddb7650b7d71 | 4831838208 bytes (4.50 GiB, 4.83 GB) |
e2361b78d4528e0160b9bae3489dd520ecc38dc1 | 13, 14 |
ubuntu-23.04-preinstalled-server-riscv64+nezha.img.xz
Ubuntu Server 23.04, xz-compressed plain disk image |
811976084 bytes (774.36 MiB, 811.98 MB) |
b38697d318572ef298b2439878313378b4b05587 | 4831838208 bytes (4.50 GiB, 4.83 GB) |
02e7fec90171b27a976fb06003d18ef7e6e28b57 | 13 |
ubuntu-22.04.2-preinstalled-server-riscv64+nezha.img.xz
Ubuntu Server 22.04.2, xz-compressed plain disk image |
754729720 bytes (719.77 MiB, 754.73 MB) |
d1fde1b94576d92b728b534f44b32521140da420 | 4831838208 bytes (4.50 GiB, 4.83 GB) |
3df9b820fc8357b5ed9ca80c9d27bfbd7a68e2f9 | 13, 14 |
D1_boot_Ubuntu-22.04.2_complete_2023-05-04.txt
boot log for the above |
64026 bytes | ||||
ubuntu-22.10-preinstalled-server-riscv64+nezha.img.xz
Ubuntu Server 22.10, xz-compressed plain disk image |
762542840 bytes (727.22 MiB, 762.54 MB) |
994e5bca0b916d8a06e655804e384b6e491fb7d1 | 4831838208 bytes (4.50 GiB, 4.83 GB) |
f191586649c62ad35142fdbad6153007e435a651 | 13 |
ubuntu-22.04.1-preinstalled-server-riscv64+nezha.img.xz
Ubuntu Server 22.04.1, xz-compressed plain disk image |
787562356 bytes (751.08 MiB, 787.56 MB) |
f65ec64b9730a2dea307f5411457c15ee792c422 | 4831838208 bytes (4.50 GiB, 4.83 GB) |
065ec1585e06b1964d53088f4f5779115b746ce4 | 13, 14 |
D1_boot_Ubuntu-22.04_complete_2022-10-23.txt
boot log for the above |
20150 bytes | ||||
fedora-disk-developer-xfce_allwinner_d1_test-F36-20220716-000826.n.0-sda.raw.zst
Fedora, zstd-compressed plain disk image |
2497462045 bytes (2.33 GiB, 2.50 GB) |
a81789198c1190c311a7b0c117046ded8830e605 | 13589544960 bytes (12.66 GiB, 13.59 GB) |
4781a8d449a497d2df0e545b791b351211c08e90 | 6 |
fedora-riscv64-d1-developer-xfce-rawhide-Rawhide-20220117-135925.n.0-sda.raw.zst
Fedora, zstd-compressed plain disk image (original file) |
3060402609 bytes (2.85 GiB, 3.06 GB) |
aadb8ca1fcd0b67f1f65466ab31418a1eb0ca030 | 13589544960 bytes (12.66 GiB, 13.59 GB) |
f18e69e165ef5520e0b36cb93241572b60b5de9d | 6, 7, 8, 10, 11 |
fedora-2022-01-17_kernel_5.4.61_extlinux_manual_1GB.txt
boot log for the above Fedora image (kernel 5.4.61 via original U-Boot, extlinux and manual input) |
79549 bytes | 7 | |||
fedora-riscv64-d1-developer-xfce-rawhide-Rawhide-20211130-010217.n.0-sda.raw.zst
Fedora, zstd-compressed plain disk image (original file) |
2949853513 bytes (2.75 GiB, 2.95 GB) |
46d9baf4c2ab47bb476cee0ec5c68ab5fcd58929 | 13589544960 bytes (12.66 GiB, 13.59 GB) |
5fa09af0a1af148f7fe70a97aaf028ee47899fe0 | 6, 7, 8, 9, 10 |
fedora-2021-11-30_kernel_5.4.61_extlinux_manual_1GB.txt
boot log for the above Fedora image (kernel 5.4.61 via original U-Boot, extlinux and manual input) |
76059 bytes | 7 | |||
fedora-2021-11-30_kernel_5.16.0-rc2_manual_GRUB.txt
boot log for the above Fedora image (kernel 5.16.0-rc2 via custom U-Boot, GRUB and manual input) |
73595 bytes | 8 | |||
fedora-2021-11-30_D1-1GB_bootloader.bin
custom D1-1GB bootloader block for the above Fedora image |
1384960 bytes (1.32 MiB, 1.38 MB) |
8ac5752e14ef8db5cc6d82d26e70684c05e4d4eb | 9 | ||
minicom1.cap.txt
OpenWrt boot log |
39125 bytes | 5 | |||
minicom2.cap.txt
U-Boot default environment and available commands |
5053 bytes | 5 |
Fedora-riscv64-d1-developer-xfce-with-esp-Rawhide-20210912.n.0 Boot Options. 1: Fedora-riscv64-d1-developer-xfce-with-esp-Rawhide (5.4.61+ 2G) 2: Fedora-riscv64-d1-developer-xfce-with-esp-Rawhide (5.4.61+ 1G) 3: Fedora-riscv64-d1-developer-xfce-with-esp-Rawhide (5.4.61+ 512M) 4: Fedora-riscv64-d1-developer-xfce-with-esp-Rawhide (5.4.61+ 128M) Enter choice: 1: Fedora-riscv64-d1-developer-xfce-with-esp-Rawhide (5.4.61+ 2G) [...] Retrieving file: /aw_nezha_d1_2G.dtbIf you try to use more RAM than the D1 board actually has, it will sooner or later crash. The following commands can be used to change the default to 1 GB:
# For the 2021-09-12 revision: echo 'default Fedora-riscv64-d1-developer-xfce-with-esp-Rawhide (5.4.61+ 1G)' >>/boot/extlinux/extlinux.conf # For the 2021-11-30 revision: echo 'default Fedora-riscv64-d1-developer-xfce-with-esp-Rawhide (5.4.16.riscv64.fc33.riscv64 1G)' >>/boot/extlinux/extlinux.conf # For the 2022-01-17 revision: echo 'default Fedora-riscv64-d1-developer-xfce-with-esp-Rawhide (kernel-5.4.61 HDMI 1080p 1G RAM)' >>/boot/extlinux/extlinux.conf
[...] Importing environment from mmc0 ... Autoboot in 2 seconds <---------------------------------- press "v" [Nezha]# [Nezha]# run boot_grub 4681728 bytes read in 808 ms (5.5 MiB/s) Scanning disk mmc@4020000.blk... Scanning disk mmc@4021000.blk... Disk mmc@4021000.blk not ready Found 4 disks No EFI system partition Booting /\EFI\fedora\grubriscv64.efi Welcome to GRUB! [...]The following command can be used after booting to have U-Boot load GRUB by default:
echo 'bootcmd=run boot_grub' >>/boot/boot/uEnv.txt
dd if=fedora-2021-11-30_D1-1GB_bootloader.bin bs=512 seek=32800 of=/dev/mmcblk0
sed --in-place=.orig 's/\/dtbs\/5.16.0+\//\/5.16.0-rc2+\//g' /boot/grub.cfg # 0 is the default (2GB), 1 is 1GB sed --in-place 's/^set default=0/set default=1/' /boot/grub.cfgHowever, kernel 5.16.0 in this disk image disregards DeviceTree data anyway and boots assuming 2GB RAM (possibly using the memory size from U-boot). In all likelihood this disk image cannot boot kernel 5.16.0 on D1-1GB.