- Milk-V Duo is an ultra-compact embedded development platform based on the CV1800B chip. It can run Linux and RTOS, providing a reliable, low-cost, and high-performance platform for professionals, industrial ODMs, AIoT enthusiasts, DIY hobbyists, and creators.
Milk-V Duo is an ultra-compact embedded development platform based on the CV1800B chip. It can run Linux and RTOS, providing a reliable, low-cost, and high-performance platform for professionals, industrial ODMs, AIoT enthusiasts, DIY hobbyists, and creators.
## Hardware
## Hardware
- CPU: CVITEK CV1800B (C906@1Ghz + C906@700MHz)
- CPU: CVITEK CV1800B (C906@1Ghz + C906@700MHz)
- Dual RV64 Core up to 1GHz
- Dual RV64 Core up to 1GHz
- 64MB RAM
- 64MB RAM
- Provides 10/100Mbps Ethernet via optional add-on board
- Provides 10/100Mbps Ethernet via optional add-on board
<br>
# SDK Directory Structure
# SDK Directory Structure
```
```text
├── build // compilation scripts and board configs
├── build // compilation scripts and board configs
Additionally, the mkimage command in the SDK relies on `libssl1.1`. Sometimes the system won't contain that because it has been deprecated, use `dpkg -s libssl1.1` to check if you have installed it.
```
Additionally, the mkimage command in the SDK relies on `libssl1.1`, which is no longer available in Ubuntu 22.04. It needs to be manually installed. The following two methods are both applicable:
If not, the following two methods are both applicable:
1. Installation with additional repositories
1. Installation with additional repositories
```
```bash
echo"deb http://security.ubuntu.com/ubuntu focal-security main" | sudo tee /etc/apt/sources.list.d/focal-security.list
echo"deb http://security.ubuntu.com/ubuntu focal-security main" | sudo tee /etc/apt/sources.list.d/focal-security.list
sudo apt update
sudo apt update
sudo apt install libssl1.1
sudo apt install libssl1.1
```
```
2. Manual download and installation of the deb package
2. Manual download and installation of the deb package
- Execute the one-click compilation script `build_milkv.sh`
- Execute the one-click compilation script `build_milkv.sh`
```
```
cd duo-buildroot-sdk/
cd duo-buildroot-sdk/
./build_milkv.sh
./build_milkv.sh
```
```
- After a successful compilation, you can find the generated SD card burning image `milkv-duo-XXX.img` in the `out` directory
- After a successful compilation, you can find the generated SD card burning image `milkv-duo-*-*.img` in the `out` directory
*Note: The first compilation will automatically download the required toolchain, which is approximately 840MB in size. Once downloaded, it will be automatically extracted to the `host-tools` directory in the SDK directory. For subsequent compilations, if the `host-tools` directory is detected, the download will not be performed again*
*Note: The first compilation will automatically download the required toolchain, which is approximately 840MB in size. Once downloaded, it will be automatically extracted to the `host-tools` directory in the SDK directory. For subsequent compilations, if the `host-tools` directory is detected, the download will not be performed again*
If you need to perform step-by-step compilation, you can enter the following commands sequentially
### Step-by-step Compilation
```
If you wish to perform step-by-step compilation, you can enter the following commands sequentially
```bash
export MILKV_BOARD=milkv-duo
export MILKV_BOARD=milkv-duo
source milkv/boardconfig-milkv-duo.sh
source milkv/boardconfig-milkv-duo.sh
...
@@ -117,6 +136,7 @@ clean_all
...
@@ -117,6 +136,7 @@ clean_all
build_all
build_all
pack_sd_image
pack_sd_image
```
```
Location of the generated image: `install/soc_cv1800b_milkv_duo_sd/milkv-duo.img`
Location of the generated image: `install/soc_cv1800b_milkv_duo_sd/milkv-duo.img`
## SD card burning
## SD card burning
...
@@ -125,35 +145,42 @@ Location of the generated image: `install/soc_cv1800b_milkv_duo_sd/milkv-duo.img
...
@@ -125,35 +145,42 @@ Location of the generated image: `install/soc_cv1800b_milkv_duo_sd/milkv-duo.img
- To write the generated image to a microSD card on Windows, you can use tools like `balenaEtcher`, `Rufus`, or `Win32 Disk Imager`
- To write the generated image to a microSD card on Windows, you can use tools like `balenaEtcher`, `Rufus`, or `Win32 Disk Imager`
- To write the generated image to a microSD card on Linux, use the `dd` command. **Please make sure to carefully confirm that the `of` device `/dev/sdX` corresponds to the microSD card you want to burn**
- To write the generated image to a microSD card on Linux, use the `dd` command. **Please make sure to carefully confirm that the `of` device `/dev/sdX` corresponds to the microSD card you want to burn**
```
```
sudo dd if=milkv-duo-XXX.img of=/dev/sdX
sudo dd if=milkv-duo-*-*.img of=/dev/sdX
```
```
## Power ON
## Power ON
- Insert the microSD card into the microSD card slot of the Milk-V Duo
- Insert the microSD card into the microSD card slot of the Milk-V Duo
- Connect the serial cable (optional)
- Connect the serial cable (optional)
- Power on, the Duo will boot up and enter the system normally
- Power on, the Duo will boot up and enter the system normally
- If a serial cable is connected, you can view the boot logs in the serial console. After entering the system, you can use the serial console to log in to the terminal and execute relevant Linux commands
- If a serial cable is connected, you can view the boot logs in the serial console. After entering the system, you can use the serial console to log in to the terminal and execute relevant Linux commands
### The method to log in to the Duo terminal
### The method to log in to the Duo terminal
- Using a serial cable
- Using a serial cable
- Using a USB network (RNDIS)
- Using a USB network (RNDIS)
- Using the Ethernet interface (requires the IO-Board)
- Using the Ethernet interface (requires the IO-Board)
The username and password for logging into the Duo terminal are as follows:
The username and password for logging into the Duo terminal are as follows:
```
```text
root
root
milkv
milkv
```
```
### To disable LED blinking
### To disable LED blinking
If you want to disable the LED blinking feature on the Duo, you can execute the following command in the Duo terminal:
If you want to disable the LED blinking feature on the Duo, you can execute the following command in the Duo terminal:
Note that when using the IO-Board, the USB network (RNDIS) is not available, Please use the Ethernet interface on the IO-Board
Note that when using the IO-Board, the USB network (RNDIS) is not available, Please use the Ethernet interface on the IO-Board
If you need to assign a fixed MAC address to the Ethernet port of the IO-Board, please execute the following command(**Replace the MAC address in the command with the MAC address you want to set, and please note that MAC addresses of different devices within the same network segment must not be duplicated**)
If you need to assign a fixed MAC address to the Ethernet port of the IO-Board, please execute the following command(**Replace the MAC address in the command with the MAC address you want to set, and please note that MAC addresses of different devices within the same network segment must not be duplicated**)
For example, if a USB flash drive is connected to the USB port on the IO-Board, you can use the command `ls /dev/sd*` to check if the device is detected
For example, if a USB flash drive is connected to the USB port on the IO-Board, you can use the command `ls /dev/sd*` to check if the device is detected
To mount the USB drive and view its contents in the system (taking /dev/sda1 as an example):
To mount the USB drive and view its contents in the system (taking /dev/sda1 as an example):
```
```bash
mkdir /mnt/udisk
mkdir /mnt/udisk
mount /dev/sda1 /mnt/udisk
mount /dev/sda1 /mnt/udisk
```
```
Verify if the contents in the `/mnt/udisk` directory match the expectations
Verify if the contents in the `/mnt/udisk` directory match the expectations
```
```bash
ls /mnt/udisk
ls /mnt/udisk
```
```
The command to unmount a USB flash drive
The command to unmount a USB flash drive
```
```bash
umount /mnt/udisk
umount /mnt/udisk
```
```
To restore the functionality of the USB network (RNDIS) when not using the IO-Board, you can follow these steps
To restore the functionality of the USB network (RNDIS) when not using the IO-Board, you can follow these steps
```
```bash
rm /mnt/system/usb.sh
rm /mnt/system/usb.sh
ln-s /mnt/system/usb-rndis.sh /mnt/system/usb.sh
ln-s /mnt/system/usb-rndis.sh /mnt/system/usb.sh
sync
sync
```
```
then reboot the board
<br>
then reboot the board
# FAQs
# FAQs
...
@@ -212,26 +247,15 @@ then reboot the board
...
@@ -212,26 +247,15 @@ then reboot the board
Because a portion of the RAM is allocated to [ION](https://github.com/milkv-duo/duo-buildroot-sdk/blob/develop/build/boards/default/dts/cv180x/cv180x_default_memmap.dtsi#L15), which is the memory used when running algorithms with the camera. If you're not using the camera, you can modify the value of this [ION_SIZE](https://github.com/milkv-duo/duo-buildroot-sdk/blob/develop/build/boards/cv180x/cv1800b_milkv_duo_sd/memmap.py#L43) to 0 and then recompile to generate the image
Because a portion of the RAM is allocated to [ION](https://github.com/milkv-duo/duo-buildroot-sdk/blob/develop/build/boards/default/dts/cv180x/cv180x_default_memmap.dtsi#L15), which is the memory used when running algorithms with the camera. If you're not using the camera, you can modify the value of this [ION_SIZE](https://github.com/milkv-duo/duo-buildroot-sdk/blob/develop/build/boards/cv180x/cv1800b_milkv_duo_sd/memmap.py#L43) to 0 and then recompile to generate the image
<br>
## Links to some documentation from the chip manufacturer
## Links to some documentation from the chip manufacturer
- CV181x/CV180x MMF SDK Development Documents
- CV181x/CV180x MMF SDK Development Documents (Chinese): [MultiMedia Framework Software Development Document](https://developer.sophgo.com/thread/471.html)
<br>
- CV Series Chip TPU SDK Development Documentation Compilation (Chinese): [CV series chip TPU SDK development data summary](https://developer.sophgo.com/thread/473.html)