You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### 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.
31
49
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`.
33
51
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.
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
39
99
40
100
Check connection status:
41
101
@@ -44,19 +104,24 @@ $ lsusb | grep T-HEAD
44
104
Bus 001 Device 045: ID 2345:7654 T-HEAD USB download gadget
45
105
```
46
106
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.
48
108
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.
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
+
60
125
### Logging into the System
61
126
62
127
Logging into the system via serial port or graphical interface.
@@ -68,13 +133,21 @@ Default Password: `debian`
68
133
69
134
The system should boot up normally and allow login through the serial port.
70
135
136
+
HDMI output works and the user can login to the desktop environment.
0 commit comments