Installing RevyOS on the LicheePi 4A (Windows)
This page provides a tutorial for flashing the LicheePi 4A image on Windows. If you want to flash the image on a Linux, or view other image flashing tutorials, please view the links in the table below.
Other Flashing Tutorial | Link |
---|---|
LicheePi4A (Installing using Linux) | Installation guilde for Linux |
Milk-V Pioneer | Flashing Tutorial |
Attention!
Before following this tutorial, please compare your board with the image below to ensure it matches. Only proceed with the tutorial after confirming the match.
Demonstration Environment
All image flashing operations in this tutorial use the following environment:
- Operating System: Windows 11 24H2 OS Build 26100.3194
- Architecture: x86_64
- LicheePi4A Board Specifications: 16G RAM + 128G eMMC
All operations in this tutorial are reproducible in this environment. If you encounter any issues while flashing the image in this environment, please refer to this page to submit an issue.
Boot Methods Introduction
LicheePi4A currently supports two boot methods: Booting from SD card and Booting from eMMC. This tutorial provides instructions for both methods. Please click to jump to the section that matches your desired flashing method.
Please note that regardless of the flashing method used, existing user data will be lost. Make sure to back up your data before proceeding with the flashing process!
Booting from SD card
Note: Booting from an SD card does not require changing the DIP switch! Set the DIP switch to eMMC boot!
The DIP switch is located on the bottom of the carrier board and can only be seen after removing the LM4A SoM. The correct setting should be BOOT_SEL[1:0]=0 0
, i.e. SW1=SW2=off
.
Note! Some early versions of LicheePi4A boards do not have a DIP switch.
Preparation
Obtaining the SD card image
Download the LicheePi4A SD card boot system image with the prefix sdcard-
from the following links:
-
Latest version: 20250123
The 20240720 image uses the 5.10 kernel, which is currently in a more mature state and performs more stably in video encoding/decoding and various applications.
The 20250123 image uses the 6.6 kernel, which may have some unknown issues. Known issues include video stuttering and USB power loss, which are currently being fixed.
Please choose the appropriate image based on your needs after reading the above information.
Using the 20250123 image as an example:
There are two ways to download the image:
- Through a web browser. Simply click the link to download.
- Through command line. Open PowerShell and run the following command:
curl.exe -OL https://mirror.iscas.ac.cn/revyos/extra/images/lpi4a/20250123/sdcard-lpi4a-20250123_195216.img.zst
Note:
curl.exe
is shipped in Windows as a default component since Windows 10. Ifcurl.exe
isn't working, use web browser.
Wait for the progress to reach 100% to complete the download.
Both methods will result in a compressed image file named sdcard-lpi4a-20250123_195216.img.zst
. Due to the possibility of transmission errors during download, it is recommended to perform a hash verification step to verify the accuracy of the image.
Image Verification (Optional, Recommended)
Open File Explorer, navigate to the folder containing the image file, right-click and select "Open in terminal"
Click to open the PowerShell terminal. Enter the following command to get the md5sum.txt
checksum from the mirror site:
curl.exe -L https://mirror.iscas.ac.cn/revyos/extra/images/lpi4a/20250123/md5sum.txt
This should display the checksums for various image files. Run the following command to calculate the local image checksum:
Get-FileHash -Algorithm MD5 .\sdcard-lpi4a-20250123_195216.img.zst
Compare the two checksums, they should match. If not, you need to re-download the image.
Extracting the Image
The image is compressed with zstd
, you can use compression tools like PeaZip or 7-zip Zstd version to extract it.
Note: After extraction, the image itself and the compressed file will occupy about 10.2GB of space, please ensure you have enough space!
Hardware Preparation
Prepare a MicroSD card reader and a MicroSD card. There are currently compatibility issues with MicroSD cards. RevyOS provides a list of tested MicroSD cards.
If your MicroSD card is not on the known working list and you encounter issues with flashing the image or booting after flashing, please refer to this page to submit an issue, and try following the Booting from eMMC image flashing tutorial.
Using BalenaEtcher to Write the Image to MicroSD Card
Download the flashing tool BalenaEtcher from the official website https://etcher.balena.io/. When downloading, please choose the file according to your machine's specifications. Choose Etcher for Windows to download and install.
- Insert the SD card into the card reader and plug it into your computer.
- Run BalenaEtcher to write the image to the SD card.
- In the BalenaEtcher window, first click "Flash from file" to select the image file.
- After selecting the image file, choose the device to write to in the second column.
- After selecting both items, click "Flash" to write the image.
- After waiting for a while, it will show that the flashing is complete.
Booting the System from SD Card
After writing the image, insert the SD card into the slot shown in the image.
First connect the HDMI cable (if you need an external display), then connect the USB-C end of the USB-A to USB-C data cable (included in the box) to the development board, and the other end to a USB power supply with at least 5V2A output to start.
Booting from eMMC
When booting the image from eMMC, there are two ways to flash the image: with or without connecting to a serial port. Considering that connecting to a serial port is not necessary, the default method is flashing without connecting to a serial port. If you have a serial cable, you can also choose to refer to the section on flashing with a serial connection. There are some differences in the operations involved. If you want to flash with a serial cable connected, please refer to the relevant section in the Linux Flashing Tutorial.
Please note: Remove the SD Card before booting from eMMC!
Preparation
Installing the Image Flashing Tool
Booting from eMMC requires flashing u-boot files, boot files, and root files into eMMC using the fastboot tool, so you need to first confirm whether fastboot is installed.
You can use an indexing tool like Everything to search for fastboot.exe
on your computer. If you don't have it, please download the Android SDK Platform Tools and extract it to an appropriate location.
Open PowerShell in the folder containing fastboot.exe
, run .\fastboot.exe --version
to determine if fastboot.exe
can run normally.
If it can display the version number normally as shown above, it proves the installation was successful.
Obtaining the Image
Download the LicheePi4A system image through the above links.
Note: The uboot files for different memory versions of LicheePi4A are not interchangeable. Please choose the corresponding image according to your LiChee Pi4A SoM version.
Memory Storage Combination | Corresponding uboot Image |
---|---|
8G RAM + 8G eMMC | u-boot-with-spl-lpi4a-main_8gemmc.bin |
8G RAM + 32G eMMC | u-boot-with-spl-lpi4a-main.bin |
16G RAM | u-boot-with-spl-lpi4a-16g-main.bin |
If you can't confirm the specifications of the Lichee Pi4A SoM, you can scan the QR code on the SoM to check. When LicheePi4A boards are sold, there will be a QR code sticker on both the SoM and the motherboard. After scanning the QR code sticker on the SoM/motherboard, it will display the memory and storage configuration of the SoM.
For example, on a 16G RAM + 128G SoM, the sticker is in the part shown in the image
The display after scanning the QR code is as follows
In the result after scanning, the second part of the number is the memory + storage configuration of the SoM.
After confirming the board specifications, download, verify, and extract the corresponding uboot, boot, and root files (the uboot file does not need to be extracted). This part can refer to the "Booting from SD Card" section above.
Connecting the Board and Installing the Driver
While holding down the BOOT button on the board, connect the Type-C port near the BOOT button to the computer. The board will enter flashing mode.
Right-click on the Windows logo, open Device Manager. If you see "USB download gadget" under "Other devices", it means the device has been correctly recognized. However, the driver is not installed.
To install the fastboot driver, you need to download the Google USB Driver (proxy required), download and extract it to a location.
- Right-click on "USB download gadget" in Device Manager, click "Update driver"
- Choose "Browse my computer for drivers"
- Select "Let me pick from a list of available drivers on my computer"
- Select "Show All Devices" and click "Next"
- Click "Have Disk"
- Click "Browse", select the inf file under the Google USB Driver, click OK
- Select "Android Bootloader Interface", click "Next", click "Yes" in the pop-up dialog, click "Install" in the Windows Security Center dialog that pops up
- Successfully installed the fastboot driver
If there are problems with the above steps, please go back to Device Manager, find the device, click "Uninstall driver", then unplug and replug the development board and try again.
Return to the PowerShell terminal containing fastboot.exe
, enter the following command, the program should output one line of information indicating that one device is connected.
.\fastboot.exe devices
.\fastboot.exe flash ram .\u-boot-with-spl-lpi4a-16g.bin # Replace with the path to the uboot file corresponding to your board specifications, you can drag and drop the file in File Explorer to the terminal to quickly input the file path
.\fastboot reboot
Then proceed with flashing the image files
Note: After the development board restarts, the computer may again detect an unknown device named "USB download gadget". Please follow the driver installation tutorial above to reinstall the driver for this device before continuing with the steps below.
# Replace the following three lines with the paths to the uboot, boot, root files corresponding to your board specifications, you can drag and drop the files in File Explorer to the terminal to quickly input the file paths
.\fastboot.exe flash uboot u-boot-with-spl-lpi4a-16g.bin
.\fastboot.exe flash boot boot-lpi4a-20240720_171951.ext4
.\fastboot.exe flash root root-lpi4a-20240720_171951.ext4
The uboot file and boot file flash quickly, while the root file takes about 5 minutes to complete. If when flashing the root file, it's not 30+ data blocks but 2000+ or 3000+(shown below), it indicates that the previous flashing operation was incorrect. In this case, the image will not boot after writing is complete. Please perform the flashing operation again.
At this point, the image flashing is complete, and you can start the system by unplugging and plugging in the power cord.
User Login
Below are the default system account and password
- Login account: debian
- Account password: debian
You can use the above user password to log in when first booting the image.
For security reasons, please be sure to change the password after the first login to avoid problems.