🛠 Tina Linux : l'OpenWrt vendor d'Allwinner pour le Lichee RV, installation et sysconfig
Objectives
There are two worlds for the D1: the vendor ecosystem (Tina Linux, Allwinner's OpenWrt 14.07 distribution provided with the Sipeed BSP SDK) and the mainline ecosystem (the board's device tree merged into the kernel for v6.3, Ubuntu 24.04/Buildroot images). This tutorial installs Tina Linux on a microSD card, explores its OpenWrt-style shell (UCI, sysconfig), and explains when to choose one over the other: Tina brings Sipeed documentation and the Cedar multimedia stack; mainline brings a recent kernel, T-Head errata fixes, and modern packages. By the end, you will flash both and switch between them by swapping the microSD card.
Hardware
- Lichee RV Dock + module, USB-A to USB-C cable, serial console at 115200 baud
- Blank 8 GB+ microSD card and reader on a Linux PC
- Vendor image archive from the Sipeed wiki (Lichee RV page, download section; Debian images are on a mega.nz mirror listed by the wiki)
Complete code
# 1) Récupérer l'image vendor (Tina ou Debian) depuis le wiki Sipeed, décompresser,
# puis écrire sur microSD (VÉRIFIER sdX avec lsblk !) :
sudo dd if=tina-lichee-rv-dock.img of=/dev/sdX bs=4M status=progress conv=fsync
sync
# 2) Boot sur série 115200 : BROM -> U-Boot -> Tina (invite root sans mot de passe).
# Inventaire façon OpenWrt :
cat /etc/openwrt_version 2>/dev/null ; cat /etc/tinaversion 2>/dev/null
uci show network 2>/dev/null | head
sysconfig 2>/dev/null | less # menu de config vendor (board, dts, features)
# 3) Ce que dit la carte de sa chaîne de boot :
dmesg | grep -iE 'opensbi|machine'
cat /sys/firmware/devicetree/base/compatible # allwinner,sun20i-d1 (vendor)
# 4) Retour au mainline : éteindre, écrire l'image Ubuntu/Buildroot sur une AUTRE
# microSD, rebrancher — le BROM boote la carte insérée. Pas de dual boot
# logiciel : c'est la carte physique qui choisit l'image.
Expected verification
Under Tina, the OpenWrt-style prompt root@(none):/# appears on the serial console and cat /etc/openwrt_version responds (base 14.07). Vendor tools (sysconfig) exist, but are absent from mainline images. When rebooting on the other card, /proc/device-tree/compatible displays sipeed,lichee-rv-dock (upstream device tree) instead of the vendor name — proof that the mainline kernel recognizes the board. Switching between Tina and mainline is done simply by swapping the microSD card.
Common errors
- Looking for Tina on openwrt.org: Upstream OpenWrt does NOT have a RISC-V sunxi target (the sunxi target there is
ARCH:=arm, with ARM-only sub-targets); only the Sipeed/Allwinner vendor path provides Tina for the D1. - Writing a raw vendor archive without reading the Sipeed flash tutorial: some vendor distributions require PhoenixCard/xfel rather than a simple dd.
- Expecting a rich and up-to-date opkg: vendor feeds are old, sometimes defunct; for modern packages, it is better to use the mainline image or the BSP SDK.
- Mixing a mainline rootfs with a vendor kernel (or vice versa): modules not found, silent network; keep separate, labeled cards.
- Forgetting the A-to-C cable during each manipulation (CC pin trap on the module).
Other tutorials for this board
- Premier boot du Lichee RV Dock avec Ubuntu 24.04 RISC-V
- LEDs du Lichee RV Dock : LED verte et RGB WS2812 pilotée par le LEDC du D1
- Audio sur le Dock : enregistrer au micro numérique et jouer sur le haut-parleur 3 W
- Wi-Fi et Bluetooth du module RTL8723DS sur le Lichee RV Dock
- GPIO, touche utilisateur ADC et PWM sur le connecteur 2×20 du Lichee RV
- Construire une image mainline complète avec Buildroot (defconfig officiel du Dock)
Code examples for this board
clignotante.pyPythonbouton-gpio.pyPythoncapteur-i2c.shBashsurveillance-temperature.shBashcapteur-dht11.pyPythonservo-pwm-sysfs.shBash