Lichee RV D1
Official Images
The official images from AllWinner requires a proprietary tool to flash: PhoneixCard. You can alternatively use the Ubuntu image which is just a plain disk image, or you can use the open-source OpenixCard to deal with the official images.
Without a valid bootable SD card, the board will go to FEL mode.
UART
If you have the dock, then there's no need to solder the on-board UART pins.
See linux-sunxi.org for the pinout.
OpenSBI and U-Boot
Follow linux-sunxi.org/AllWinner_Nezha for how to build mainline OpenSBI and U-Boot.
% git clone https://github.com/riscv-software-src/opensbi
% pushd opensbi
% make CROSS_COMPILE=riscv64-linux-gnu- PLATFORM=generic FW_PIC=y
% popd
% git clone https://github.com/smaeul/u-boot -b d1-wip
% pushd u-boot
% make CROSS_COMPILE=riscv64-linux-gnu- nezha_defconfig
% make CROSS_COMPILE=riscv64-linux-gnu- OPENSBI=../opensbi/build/platform/generic/firmware/fw_dynamic.bin
The final file is u-boot-sunxi-with-spl.bin
.
This version of OpenSBI has ethernet support (and it thinks that there're ethernet adapters), but in fact the Lichee D1 board doesn't support ethernet.
The U-Boot has UEFI support, and it perfectly boots Grub.
SPI Starting Location
The hard-coded start location is at 8KiB loc of the SD card. As seen at linux-sunxi.org/Bootable_SD_card:
% dd if=u-boot-sunxi-with-spl.bin of=${card} bs=1024 seek=8
This location conflicts with the GPT header. We can reduce the GPT partition
entries from 128 to 56. Thus, the first usable LBA is 16, which is exactly
8KiB. Linux fdisk(1) x
expert menu can do this.
Make sure to create an empty partition from LBA 16, with 1MiB size. This will tell the OS not to override the OpenSBI and U-Boot.
Created: November 5, 2023