Skip to content

Commit f9d39c7

Browse files
authored
Merge pull request #129 from KevinMX/meles-20241229
Meles/RevyOS: update to 20241229
2 parents 33b0c04 + 8e056b8 commit f9d39c7

File tree

6 files changed

+204
-59
lines changed

6 files changed

+204
-59
lines changed

Meles/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,19 @@ cpu_core: XuanTie C910 + XuanTie C906 + XuanTie E902
1010

1111
### Operating System Information
1212

13-
- RevyOS (provided by official source)
14-
- Download link: https://github.com/milkv-meles/meles-images/releases
13+
- RevyOS
14+
- Download link: https://mirror.iscas.ac.cn/revyos/extra/images/meles/20241229/
1515
- Reference Installation Document: https://milkv.io/zh/docs/meles/getting-started/boot
1616

1717
### Hardware Information
1818

19-
- Milk-V Meles 4GB/8GB
19+
- Milk-V Meles 4GB/8GB/16GB
20+
- The board tested here in the documents is the 16GB variant
2021

2122
## Test Results
2223

23-
| Software Category | Package Name | Test Results (Test Report) |
24-
|-------------------|--------------|---------------------------------------|
25-
| RevyOS Image Boot | N/A | [CFT][RevyOS] (Milk-V Official Image) |
24+
| Software Category | Package Name | Test Results (Test Report) |
25+
| ----------------- | ------------ | -------------------------- |
26+
| RevyOS Image Boot | N/A | [Good][RevyOS] |
2627

2728
[RevyOS]: ./RevyOS/README.md

Meles/README_zh.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@
44

55
### 操作系统信息
66

7-
- RevyOS(官方提供)
8-
- 下载链接:https://github.com/milkv-meles/meles-images/releases
7+
- RevyOS
8+
- 下载链接:https://mirror.iscas.ac.cn/revyos/extra/images/meles/20241229/
99
- 参考安装文档:https://milkv.io/zh/docs/meles/getting-started/boot
1010

1111
### 硬件开发板信息
1212

13-
- Milk-V Meles 4GB/8GB
13+
- Milk-V Meles 4GB/8GB/16GB
14+
- 文档中测试的为 16GB 版本
1415

1516
## 测试结果
1617

17-
| 软件分类 | 软件包名 | 测试结果(测试报告) |
18-
|-------------|----------|----------------------------|
19-
| RevyOS 镜像启动 | N/A | [CFT][RevyOS](Milk-V 厂商镜像) |
18+
| 软件分类 | 软件包名 | 测试结果(测试报告) |
19+
| --------------- | -------- | -------------------- |
20+
| RevyOS 镜像启动 | N/A | [Good][RevyOS] |
2021

2122
[RevyOS]: ./RevyOS/README_zh.md

Meles/RevyOS/README.md

Lines changed: 98 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
sys: revyos
3-
sys_ver: 12
3+
sys_ver: 20241229
44
sys_var: null
55

6-
status: cft
7-
last_update: 2024-06-21
6+
status: good
7+
last_update: 2025-01-02
88
---
99

1010
# RevyOS Meles Version Test Report
@@ -13,29 +13,89 @@ last_update: 2024-06-21
1313

1414
### Operating System Information
1515

16-
- System Version: root-meles-20231210_134926.ext4.tar.gz
17-
- Download Link: https://github.com/milkv-meles/meles-images/releases
16+
- System Version: RevyOS Meles 20241229
17+
- Download Link: https://mirror.iscas.ac.cn/revyos/extra/images/meles/20241229/
18+
- iw-single-line binary: https://mirror.iscas.ac.cn/revyos/extra/images/meles/20240720/iw-single-line.bin
1819
- Reference Installation Document: https://milkv.io/zh/docs/meles/getting-started/boot
1920

2021
### Hardware Information
2122

22-
- Milk-V Meles 4GB/8GB
23+
- Milk-V Meles 4GB/8GB/16GB
2324
- eMMC module > 16GB
2425
- A USB A to C cable
25-
- Optional: A USB-TTL Debugger
26+
- Optional: A USB-TTL Debugger (Flash U-Boot with SPL to SPI NOR Flash)
2627
- Optional: Keyboard, monitor, mouse (for graphical interface testing)
2728

2829
## Installation Steps
2930

30-
### Flashing Image using `fastboot` onto the Development Board
31+
Milk-V Meles' Bootloader is stored inside the onboard SPI NOR Flash, which can be upgraded using `cct` tool provided by `yoctools`. This is different from Lichee Pi 4A which uses the same TH1520 SoC.
32+
33+
You'll need UART serial connection to flash the firmware.
34+
35+
> Note: please do not try to use `fastboot flash uboot` method to upgrade U-Boot firmware, which is the same as the LPi4A.
36+
> This method will NOT flash U-Boot to SPI NOR Flash which is loaded on boot by default. Thus you must use `cct` to flash the firmware.
37+
38+
Known issue: some AMD boards might not pick up Meles in fastboot mode.
39+
40+
Workaround: try connect Meles to a external USB Hub rather than the USB ports directly provided by the motherboard/PCH.
41+
42+
### Use `cct` to flash Bootloader into SPI NOR Flash
43+
44+
`cct` is the image flashing tool provided by `yoctools`, which requires Python 3.6~3.11 and Linux.
45+
46+
If your distro has already upgrade to Python 3.12+, then you'll need to manually install Python 3.11, create a Python virtual environment with it.
47+
48+
Since Python 3.12 and [PEP 668](https://peps.python.org/pep-0668/), you can not use `pip` to install packages globally.
3149

32-
Download the system image and U-Boot SPL from [GitHub release](https://github.com/milkv-meles/meles-images/releases).
50+
And `yoctools` still depends on some packages which were already deprecated/replaced in Python 3.12+, thus you must create a Python venv in order to use `yoctools`.
3351

34-
U-Boot with SPL version selection:
35-
- 4GB Version -> u-boot-with-spl-**single**rank.bin
36-
- 8GB Version -> u-boot-with-spl-**dual**rank.bin
52+
Take Arch Linux as an example. By the time this article was written (2025.01), the default Python is Python 3.13, directly install `yoctools` will not work. You should install Python 3.11 from [AUR](https://aur.archlinux.org/packages/python311/) and creating a virtual environment using this version in order to flash the firmware.
53+
54+
Prepare Python 3.11 environment:
55+
56+
```shell
57+
paru python311
58+
sudo pacman -S python-virtualenv
59+
virtualenv -p 3.11 meles
60+
source meles/bin/activate
61+
pip install yoctools
62+
cd meles/bin
63+
```
64+
65+
For those distros still staying at Python 3.6~3.11, you can install `yoctools` directly with `pip`. Python venv is not required.
66+
67+
Download the firmware:
68+
69+
```shell
70+
wget https://mirror.iscas.ac.cn/revyos/extra/images/meles/20240720/iw-single-line.bin
71+
wget https://mirror.iscas.ac.cn/revyos/extra/images/meles/20241229/u-boot-with-spl-meles.bin
72+
```
3773

38-
Press and hold the download button near the GPIO interface on the development board and connect the board to the computer.
74+
Note: choose the correct version depending on your board's RAM:
75+
76+
- 4GB -> u-boot-with-spl-meles-4g.bin
77+
- 8GB -> u-boot-with-spl-meles.bin
78+
- 16GB -> u-boot-with-spl-meles-16g.bin
79+
80+
For `iw-single-line.bin`, you can use it with all RAM versions.
81+
82+
Connect the board and your PC with UART debugger. **DO NOT** run tools like `minicom` or `tio` which will occupy the serial port.
83+
84+
Hold the recovery button and **THEN** power on the board.
85+
86+
> The recovery button is located at the edge of the board near the GPIO pins, on the inner side it's the eMMC boot button. Don't mixed them.
87+
> For details please refer to: https://milkv.io/docs/meles/hardware/meles-main-board
88+
89+
```shell
90+
sudo ./cct list -u /dev/ttyUSB0
91+
#Please change accordingly. Depending on your debugger, e.g. for CH343P it's ttyACM0 rather than ttyUSB0
92+
sudo ./cct download -d ram0 -f iw-single-line.bin -v checksum -r
93+
sudo ./cct download -u /dev/ttyUSB0 -d qspi0 -f ./u-boot-with-spl-meles.bin -v checksum -r -t 1200
94+
```
95+
96+
Wait for the flashing progress to complete, then power off the board, hold the recovery button and reconnect it to PC.
97+
98+
### Flashing Image using `fastboot` onto the Development Board
3999

40100
Check connection status:
41101

@@ -44,19 +104,24 @@ $ lsusb | grep T-HEAD
44104
Bus 001 Device 045: ID 2345:7654 T-HEAD USB download gadget
45105
```
46106

47-
Next, use `fastboot` to flash the image.
107+
Next, execute the following commands to download, extract and flash the images to your board's eMMC.
48108

49-
If `fastboot` doesn't recognize the device or you encounter flashing issues, check the device connection and try running `fastboot` as a privileged user (`sudo`).
109+
> If `fastboot` doesn't pick up the board or you encounter flashing issues, check the device connection and try running `fastboot` as a privileged user (i.e. `sudo`). Doing so is usually required under Linux since the default USB VID/PID is not in the default udev rules.
50110
51111
```shell
52-
fastboot flash ram u-boot-with-spl-dualrank.bin
53-
fastboot reboot
54-
fastboot flash uboot u-boot-with-spl-dualrank.bin
55-
fastboot flash boot boot.ext4
56-
tar xvf root-meles-20231210_134926.ext4.tar.gz
57-
fastboot flash root root-meles-20231210_134926.ext4
112+
wget https://mirror.iscas.ac.cn/revyos/extra/images/meles/20241229/boot-meles-20241229_032258.ext4.zst
113+
wget https://mirror.iscas.ac.cn/revyos/extra/images/meles/20241229/root-meles-20241229_032258.ext4.zst
114+
zstd -T0 -dv *.ext4.zst
115+
sudo fastboot flash ram u-boot-with-spl-meles.bin
116+
sudo fastboot reboot
117+
sudo fastboot flash boot boot-meles-20241229_032258.ext4
118+
sudo fastboot flash root root-meles-20241229_032258.ext4
58119
```
59120

121+
After the flashing process, reset the board and you're good to go.
122+
123+
Better do a system upgrade via `sudo apt update; sudo apt upgrade` after flashing. There's a kernel upgrade which fixed some known issues (e.g. the onboard Wi-Fi might not work)
124+
60125
### Logging into the System
61126

62127
Logging into the system via serial port or graphical interface.
@@ -68,13 +133,21 @@ Default Password: `debian`
68133

69134
The system should boot up normally and allow login through the serial port.
70135

136+
HDMI output works and the user can login to the desktop environment.
137+
71138
## Actual Results
72139

73-
CFT
140+
The actual results matches the expected results.
141+
142+
### Boot Log
143+
144+
[![asciicast](https://asciinema.org/a/GowOSUJ7oFYVH4igmtqB0s4ub.svg)](https://asciinema.org/a/GowOSUJ7oFYVH4igmtqB0s4ub)
145+
146+
![](image/2025-01-02-19-41-20.png)
74147

75-
### Boot Information
148+
![](image/2025-01-02-19-45-05.png)
76149

77-
CFT
150+
(The screenshots are from an HDMI capture card.)
78151

79152
## Test Criteria
80153

@@ -84,4 +157,4 @@ Failed: The actual result does not match the expected result.
84157

85158
## Test Conclusion
86159

87-
CFT
160+
Test successful.

Meles/RevyOS/README_zh.md

Lines changed: 92 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,87 @@
44

55
### 操作系统信息
66

7-
- 系统版本:root-meles-20231210_134926.ext4.tar.gz
8-
- 下载链接:https://github.com/milkv-meles/meles-images/releases
7+
- 系统版本:RevyOS Meles 20241229
8+
- 下载链接:https://mirror.iscas.ac.cn/revyos/extra/images/meles/20241229/
9+
- iw-single-line 烧录工具:https://mirror.iscas.ac.cn/revyos/extra/images/meles/20240720/iw-single-line.bin
910
- 参考安装文档:https://milkv.io/zh/docs/meles/getting-started/boot
1011

1112
### 硬件信息
1213

13-
- Milk-V Meles 4GB/8GB
14+
- Milk-V Meles 4GB/8GB/16GB
1415
- eMMC 模组 > 16GB
1516
- USB A to C 线缆一条
16-
- 可选:USB-TTL 调试器一个
17+
- USB-TTL 调试器一个(用于烧录 U-Boot with SPL 至 SPI NOR Flash)
1718
- 可选:键盘、显示器、鼠标(测试图形界面)
1819

1920
## 安装步骤
2021

21-
### 使用 `fastboot` 刷写镜像至开发板
22+
与同为 TH1520 SoC 的 Lichee Pi 4A 稍有不同,Milk-V Meles 的 Bootloader 存储在板载 SPI NOR Flash 中,需要使用 `yotcools` 中的 `cct` 工具烧录。
2223

23-
[GitHub release](https://github.com/milkv-meles/meles-images/releases) 下载系统镜像和 U-Boot SPL
24+
这一过程需要使用 UART 串口连接
2425

25-
u-boot-with-spl 版本选择:
26-
- 4GB 版本 -> u-boot-with-spl-**single**rank.bin
27-
- 8GB 版本 -> u-boot-with-spl-**dual**rank.bin
26+
> Note: 请勿按照刷写 LPi4A 的方式使用 `fastboot flash uboot` 来更新 U-Boot 固件。
27+
> 这一操作并不会将 U-Boot 刷写至开机默认加载的 SPI NOR Flash 中。使用 `cct` 刷写固件是必须的。
2828
29-
按住开发板 GPIO 接口附近的下载按钮并将开发板连接至计算机。
29+
已知问题:部分 AMD 主板可能会无法识别处于 fastboot 模式下的 Meles。
30+
31+
规避方法:尝试将 Meles 连接至外接的 USB Hub,而非主板/桥片直接引出的 USB 端口。
32+
33+
### 使用 `cct` 将 Bootloader 写入 SPI NOR Flash
34+
35+
`cct``yoctools` 提供的镜像刷写工具,`yoctools` 目前依赖 Python 3.6~3.11 和 Linux 系统。
36+
37+
若您所使用的发行版已经升级到 Python 3.12+,则需要手动安装 Python 3.11 并创建对应版本的 Python 虚拟环境 / venv。
38+
39+
Python 3.12 后受 [PEP 668](https://peps.python.org/pep-0668/) 影响,不能直接全局使用 `pip` 安装;此外由于 `yoctools` 仍依赖部分 Python 3.12+ 中已被替换的包,创建虚拟环境的步骤是必须的。
40+
41+
以 Arch Linux 为例,截止 2025.01,软件源内提供的 Python 版本为 3.13,在这一版本下安装 `yoctools` 后无法正常使用。需要从 [AUR](https://aur.archlinux.org/packages/python311/) 获取 Python 3.11,然后创建虚拟环境进行刷写操作。
42+
43+
准备 Python 3.11 虚拟环境:
44+
45+
```shell
46+
paru python311
47+
sudo pacman -S python-virtualenv
48+
virtualenv -p 3.11 meles
49+
source meles/bin/activate
50+
pip install yoctools
51+
cd meles/bin
52+
```
53+
54+
对于 Python 版本为 3.6~3.11 的发行版,可直接通过 `pip` 安装 `yoctools`,创建虚拟环境不是必须的。
55+
56+
获取所需固件:
57+
58+
```shell
59+
wget https://mirror.iscas.ac.cn/revyos/extra/images/meles/20240720/iw-single-line.bin
60+
wget https://mirror.iscas.ac.cn/revyos/extra/images/meles/20241229/u-boot-with-spl-meles.bin
61+
```
62+
63+
注意根据开发板内存大小选择正确的 `u-boot-with-spl` 固件:
64+
65+
- 4GB 版本 -> u-boot-with-spl-meles-4g.bin
66+
- 8GB 版本 -> u-boot-with-spl-meles.bin
67+
- 16GB 版本 -> u-boot-with-spl-meles-16g.bin
68+
69+
`iw-single-line.bin` 是通用的,不区分内存大小。
70+
71+
通过 UART 调试器连接开发板和计算机。烧录 U-Boot SPL 时**不要**运行 `minicom``tio` 等程序占用串口。
72+
73+
按住下载按钮,**然后**给开发板上电。
74+
75+
> 下载按钮位于 GPIO 插针附近,PCB 边缘,其内侧为 eMMC 启动按钮,注意区分。
76+
> 详情请参照:https://milkv.io/zh/docs/meles/hardware/meles-main-board
77+
78+
```shell
79+
sudo ./cct list -u /dev/ttyUSB0
80+
#取决于您的调试器型号,如 CH343P 则此处为 ttyACM0,请根据实际情况更改
81+
sudo ./cct download -d ram0 -f iw-single-line.bin -v checksum -r
82+
sudo ./cct download -u /dev/ttyUSB0 -d qspi0 -f ./u-boot-with-spl-meles.bin -v checksum -r -t 1200
83+
```
84+
85+
等待烧写完成后,给开发板断电,然后按住下载按钮,将开发板重新连接至计算机。
86+
87+
### 使用 `fastboot` 刷写镜像
3088

3189
检查连接状态:
3290

@@ -35,19 +93,25 @@ $ lsusb | grep T-HEAD
3593
Bus 001 Device 045: ID 2345:7654 T-HEAD USB download gadget
3694
```
3795

38-
接下来使用 `fastboot` 刷写镜像
96+
执行如下命令,下载,解压并刷写镜像至 eMMC
3997

40-
如果出现 `fastboot` 不识别设备、无法刷写等情况,请检查设备连接,并尝试以特权用户身份(`sudo`)执行 `fastboot`
98+
> 如果出现 `fastboot` 不识别设备、无法刷写等情况,请检查设备连接,并尝试以特权用户身份(`sudo`)执行 `fastboot`
99+
> 通常在 Linux 下是需要使用 `sudo` 的,原因是 USB VID/PID 不在默认的 udev 规则内。
41100
42101
```shell
43-
fastboot flash ram u-boot-with-spl-dualrank.bin
44-
fastboot reboot
45-
fastboot flash uboot u-boot-with-spl-dualrank.bin
46-
fastboot flash boot boot.ext4
47-
tar xvf root-meles-20231210_134926.ext4.tar.gz
48-
fastboot flash root root-meles-20231210_134926.ext4
102+
wget https://mirror.iscas.ac.cn/revyos/extra/images/meles/20241229/boot-meles-20241229_032258.ext4.zst
103+
wget https://mirror.iscas.ac.cn/revyos/extra/images/meles/20241229/root-meles-20241229_032258.ext4.zst
104+
zstd -T0 -dv *.ext4.zst
105+
sudo fastboot flash ram u-boot-with-spl-meles.bin
106+
sudo fastboot reboot
107+
sudo fastboot flash boot boot-meles-20241229_032258.ext4
108+
sudo fastboot flash root root-meles-20241229_032258.ext4
49109
```
50110

111+
刷写完成后,重启开发板即可。
112+
113+
进入系统后,建议执行一次系统升级(`sudo apt update; sudo apt upgrade`)。更新的内核修复了一些已知问题(如无线网卡可能不工作)。
114+
51115
### 登录系统
52116

53117
通过串口或图形界面登录系统。
@@ -57,15 +121,21 @@ fastboot flash root root-meles-20231210_134926.ext4
57121

58122
## 预期结果
59123

60-
系统正常启动,能够通过串口登录。
124+
系统正常启动,能够通过串口登录,HDMI 正常输出,能够登录进桌面
61125

62126
## 实际结果
63127

64-
CFT
128+
与预期结果一致。
65129

66130
### 启动信息
67131

68-
CFT
132+
[![asciicast](https://asciinema.org/a/GowOSUJ7oFYVH4igmtqB0s4ub.svg)](https://asciinema.org/a/GowOSUJ7oFYVH4igmtqB0s4ub)
133+
134+
![](image/2025-01-02-19-41-20.png)
135+
136+
![](image/2025-01-02-19-45-05.png)
137+
138+
(截图来自 HDMI 采集卡)
69139

70140
## 测试判定标准
71141

@@ -75,4 +145,4 @@ CFT
75145

76146
## 测试结论
77147

78-
CFT
148+
测试成功。
1.46 MB
Loading
1.61 MB
Loading

0 commit comments

Comments
 (0)