Milk-V Duo is an development board based on the CV1800B chip from HashLayer. By participating in an activity, I obtained a demo unit. The development board is compact in size, similar to the size of the Raspberry Pi Pico, with similar pins but more powerful functionality, able to run operating systems based on LINUX and RTOS. Here are the opening photos:
As the development environment is based on Linux and my local machine does not have a Linux operating system, installing a virtual machine is cumbersome and occupies a lot of disk space. Therefore, I choose to use an Alibaba Cloud cloud host as the development platform, which can be rented hourly. The lowest configuration only costs 0.1 yuan per hour.
I selected Ubuntu 20.04 as the operating system, and after a few minutes, the remote cloud host was created successfully.
After logging into the system, I first performed system updates by executing the following command:
sudo apt update && sudo apt upgrade
Then I installed the compilation prerequisite programs by executing the following command:
sudo apt install pkg-config build-essential ninja-build automake autoconf libtool wget curl git gcc libssl-dev bc slib squashfs-tools android-sdk-libsparse-utils jq python3-distutils scons parallel tree python3-dev python3-pip device-tree-compiler ssh cpio fakeroot libncurses5 flex bison libncurses5-dev genext2fs rsync unzip dosfstools mtools tclsh ssh-client android-sdk-ext4-utils
CMake v3.26.4 needs to be manually installed.
Download the CMake installation program from GitHub:
wget https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-linux-x86_64.sh
Make the program executable:
chmod +x cmake-3.26.4-linux-x86_64.sh
Execute the installation command:
sudo sh cmake-3.26.4-linux-x86_64.sh --skip-license --prefix=/usr/local/
Manually installed CMake is in /usr/local/bin. Use the cmake --version command to check the version number should be:
cmake version 3.26.4
Next, get the Milk-V SDK:
git clone https://github.com/milkv-duo/duo-buildroot-sdk.git
Enter the duo-buildroot-sd directory and execute ./build_milkv.sh, the system will automatically download and install the compilation environment, compile and package into an img file. Burn the img file onto a SD card, insert the SD card into the slot on the board and power it up. After a few seconds, the blue light on the development board flashes, as shown in the following figure:
To set up the Python development environment, you need to modify the compilation configuration file and manually execute the following commands:
export MILKV_BOARD=milkv-duo
source milkv/boardconfig-milkv-duo.sh
source build/milkvsetup.sh
defconfig cv1800b_milkv_duo_sd
menuconfig
When executing menuconfig
, select the option to install the Python3 package as shown in the following image:
After saving and exiting, continue executing the following commands:
clean_all
build_all
pack_sd_image
This will generate a new img image file. Burn the img file to an SD card, insert it into the development board slot, and restart. After installing the ndis driver on your computer, remote login to 192.168.42.1, and you can start developing Python applications on the development board.
This article is reprinted from: 【Milk-V Duo Development Board Free Trial】Setting Up the Python Development Environment, Author: mayuanbao