• sales

    +86-0755-88291180

Milk-V Duo linux Compile kernel Tutorial

[] Preparatory work


Local environment windows11 64 bit


Compilation environment: VMware Ubuntu 22.04.4.2 LTS

(If you don't have Ubuntu installed, you need to install one locally or in a virtual machine.)


Prepare an SD card

milk-v duo


[] Installation:

sudo apt-get update


sudo apt install dialog python3-dev make git bc gcc flex bison ninja-build libssl-dev rsync pkg-config device-tree-compiler squashfs-tools parted dosfstools


Installation cmake


sudo apt-get install cmake


Create a development environment directory:

mkdir duo && cd duo


[] Download the development package cvi_mmf_sdk.zip:

wget -c https://link.zhihu.com/?target=https%3A//codeload.github.com/sophgo/cvi_mmf_sdk/zip/refs/heads/v4.1.0 -O cvi_mmf_sdk.zip


Then decompress:

unzip cvi_mmf_sdk.zip

mv cvi_mmf_sdk-4.1.0/ cvi_mmf_sdk/


[] Download tool chain:

wget https://link.zhihu.com/?target=https%3A//sophon-file.sophon.cn/sophon-prod-s3/drive/23/03/07/16/host-tools.tar.gz


Then decompress:

tar xvf host-tools.tar.gz

Move to the development package:

mv host-tools/ cvi_mmf_sdk/


[] Start compiling in a single step as follows:

cd cvi_mmf_sdk/

source build/cvisetup.sh

defconfig cv1800b_sophpi_duo_sd

clean_all

build_all

pack_sd_image


Note: If you are prompted that libssl.so.1.1 is missing during compilation, install it as follows.

wget

http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1-1ubuntu2.1~18.04.23_amd64.deb

(If the link fails, you can download it yourself here http://security.ubuntu.com/ubuntu/pool/main/o/openssl/)


sudo dpkg -i libssl1.1_1.1.1-1ubuntu2.1_18.04.21_amd64.deb


After the final compilation is completed, an install folder will be generated under the folder.


install/soc_cv1800b_sophpi_duo_sd The folder directory is as follows:



[] Write system to SD card:


cd install/soc_cv1800b_sophpi_duo_sd/


You can find the *.img file. SD card and insert it into the computer.


Write image to SD card using command line.

sudo dd if=./sophpi-duo-*.img of=/dev/sdx bs=32M status=progress oflag=direct

("sophpi-duo-*.img" and "sdx" Change it to your name.)


Or copy the *.img file. Use the software to directly burn the image to the SD card, refer to Milk-V Duo Image writing


[] Start the system:


The SD card is plugged into the board, connected to the board's serial port 0 by TTL serial port (no power supply is needed), and then the serial port is opened on the computer with serial debugging tools, and the board is connected to the computer with TYPEC cable, and the system can be entered after a while.



Note that RNDIS protocol is not added to this version of the system kernel, so the DUO development board cannot be recognized in the device manager after it is plugged into USB!

TAG: ESP32 S3 AI 0.85inch mini tiny Development Board 0.85 inch DeepSeek RGB LED ESP32 S3 Development Board 4.3 inch LCD Capacitive Touch Screen 4.3inch Display 800×480 N16R8 ESP32-S3 Industrial CAN FD RS232/RS485 bidirectional converter CAN2.0A/B Raspberry Pi Pico Basics User Guide Mini TOF Time-of-Flight Laser Ranging Radar Sensor Compatible RS485 with Arduino Raspberry Pi ESP32 and Pico D-Robotics RDK X3 Development Board Horizon Sunrise Pi ARM Cortex-A53 5Tops 2GB/4GB RAM Raspberry Pi 2-Channel Isolated CAN Bus Expansion HAT Dual Chips Solution Built-In Multi Protections Industrial USB TO RS485 Isolated Bidirectional Converter Original (E) FT232RNL 1200m Long Distance Sipeed-Lichee-Tang-Nano-FPGA-Series-IDE-Install X1301 Raspberry Pi 5 HDMI to CSI-2 Shield 1080P@60fps & Audio & Video Also For 4B/3B D-Robotics RDK X3 Module Core MD Module Horizon Sunrise Pi ARM Cortex-A53 5Tops Size Compatible With Raspberry Pi CM4 Size Spotpear ESP32 Thermal imaging ESP32 C3 LCD Development Board 1.3 inch Display Screen ST7789 240x240 3D Transparent Refractive Prism Mini TV For Arduino Jetson Nano Fan MP2.5GD Raspberry Pi 5 PCIe to Dual 2.5G Double Ethernet HAT Pi5 RTL8125 Jetson Nano Development Kit JETSON-NANO-DEV-KIT Replace For Jetson-Nano-Developer-Kit-B01 DeepSeek AI Voice Chat Camera Robot BOX ESP32-S3 Development Board 2 inch LCD N16R8 Touchscreen Display Camera Modbus POE ETH Relay Waveshare User Guide