🛠 Construire une image mainline complète avec Buildroot (defconfig officiel du Dock)

Sipeed Lichee RV Dock (Allwinner D1 / T-Head XuanTie C906) · avance · Schéma : IMG-sipeed-lichee-rv-dock-avance-3-licheerv-buildroot-mainline.svg — chaîne de build Buildroot pour le Lichee RV Dock : croisée riscv64, OpenSBI 1.2 (M-mode), U-Boot lichee_rv_dock (S-mode), kernel avec sun20i-d1-lichee-rv-dock.dtb, rootfs ext4 et image sdcard.img à écrire sur la microSD sous le module

Objectives

Buildroot contains official in-tree support for this board: the sipeed_lichee_rv_dock defconfig (board/sipeed/lichee_rv_dock) which assembles a complete mainline image — generic OpenSBI 1.2, U-Boot lichee_rv_dock (Samuel Holland's sunxi/d1 tree), kernel with the nezha defconfig and the allwinner/sun20i-d1-lichee-rv-dock.dtb device tree, plus RTL8723DS Wi-Fi/BT packages, wpa_supplicant, and bluez. This advanced tutorial covers: full build from an x86 PC, writing the sdcard.img, and customization (packages, rootfs overlay). This is THE reproducible method for a product on D1.

Hardware

Full Code

# 1) Sources Buildroot (master ou branche stable)
git clone https://gitlab.com/buildroot.org/buildroot.git
cd buildroot

# 2) Defconfig officielle de la carte
make sipeed_lichee_rv_dock_defconfig
make menuconfig      # optionnel : paquetals (dropbear, nginx, python...), kernel local

# 3) Build complet (long à la première exécution)
make -j"$(nproc)"

# 4) Image SD bootable (layout genimage : vfat /boot + ext4 racine)
ls -lh output/images/    # sdcard.img, fw_jump.bin/fw_dynamic.bin (OpenSBI),
                         # u-boot.bin, Image, sun20i-d1-lichee-rv-dock.dtb
lsblk   # puis écrire sur la BONNE carte :
sudo dd if=output/images/sdcard.img of=/dev/mmcblk0 bs=4M status=progress conv=fsync

# 5) Boot : microSD sous le module, câble A-vers-C, série 115200 -> invite root.
#    Vérifier la chaîne :
dmesg | grep -iE 'machine|opensbi'
ls /proc/device-tree/ | head
cat /proc/config.gz > /dev/null 2>&1 || zcat /proc/config.gz | grep THEAD

Expected Verification

output/images/sdcard.img is produced without errors; on serial boot, OpenSBI announces RISC-V SBI, U-Boot starts, the kernel loads and mounts the ext4 root; the Buildroot # prompt appears. uname -m returns riscv64, ls /sys/class/leds shows the LEDs from the upstream device tree, and ip link reveals wlan0 (RTL8723DS package included). The dtb used is indeed sun20i-d1-lichee-rv-dock (visible in the U-Boot log under "Flattened Device Tree").

Common Errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials