• 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: Raspberry Pi Zero 4G Cat1 With USB Hub Expansion Board LTE/GPS/EA/EU also For Zero 2W Raspberry-Pi-Game-1.54inch-LCD-touchscreen-display-ST7789 Industrial Modbus RTU RS485 4-ch Relay With isolation protection and guide rail Raspberry Pi 5 5V5A Power Arduino IR Thermal Imaging Camera ESP32 S3 Development Board 1.64 inch AMOLED Display 1.64inch TouchScreen For Arduino LVGL With SD-Port/ QMI8658C 6-Axis Sensor Pi5 Heatsink 14 inch Dual LCD Computer PC Monitor Display Double Secondary Screen Type C Mini HDMI 1080P For Windows/MacOS Sipeed NanoCluster Mini Cluster Board mini data center For Raspberry Pi CM45 / Computer /LM3H /M4N SpotPear Serial UART Bus Servo TTL ST3235 30KG.CM Magnetic Encoder 360° High Precision And Large Torque 1.54 inch Passive NFC e-Paper ink (G) RYBW Display Screen No Need Battery Wireless Power & Data Transfer ESP32 C3 Round LCD Development Board Electronic EYE 0.71 inch Display Watch Screen GC9D01 160x160 Milk-V Duo Raspberry Pi 4 Sound Card Raspberry Pi 3.5 inch LCD G Display Resistive TouchScreen 60fps ST7796 320x480 Also For Arduino/Pico2/ESP32/RP2040/RP2350 Jetson Nano IO Board 1.54inch LCD TouchScreen Display 240×240 ST7789S For Arduino /Raspberry Pi /ESP32 /Pico /STM32 Raspberry Pi Starlight Camera IR-CUT IMX462 (A) Sensor 2MP 90 Degree Raspberry Pi 8.8 inch DSI MIPI Display LCD Capacitive TouchScreen 480x1920