Skip to content

Commit 6f8962c

Browse files
committed
Merge branch 'develop'
2 parents 0545e9d + e7b0c79 commit 6f8962c

31,838 files changed

Lines changed: 4885853 additions & 891887 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: duo-ci
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
branches:
8+
- '*'
9+
pull_request:
10+
workflow_dispatch:
11+
12+
env:
13+
ARCH: riscv
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-22.04
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
model: [duo, duo256m, duos]
22+
toolchains: [glibc-arm64, musl-riscv64]
23+
flash: [sd, emmc]
24+
exclude:
25+
- model: duo
26+
toolchains: glibc-arm64
27+
- model: duo
28+
toolchains: musl-riscv64
29+
flash: emmc
30+
- model: duo256m
31+
flash: emmc
32+
33+
steps:
34+
- name: Update Apt Cache
35+
run: sudo apt update
36+
37+
- name: Free Disk Space (Ubuntu)
38+
uses: jlumbroso/free-disk-space@main
39+
with:
40+
# this might remove tools that are actually needed,
41+
# if set to "true" but frees about 6 GB
42+
tool-cache: true
43+
# all of these default to true, but feel free to set to
44+
# "false" if necessary for your workflow
45+
android: true
46+
dotnet: true
47+
haskell: true
48+
large-packages: true
49+
docker-images: true
50+
swap-storage: true
51+
52+
- name: Install Software
53+
run: |
54+
sudo apt install -y pkg-config build-essential ninja-build automake autoconf libtool wget curl \
55+
git gcc libssl-dev bc slib squashfs-tools android-sdk-libsparse-utils jq tree \
56+
python3-distutils scons parallel tree python3-dev python3-pip device-tree-compiler \
57+
ssh cpio fakeroot libncurses5 flex bison libncurses5-dev genext2fs rsync unzip \
58+
dosfstools mtools tcl openssh-client cmake expect python-is-python3 python3-jinja2 zstd
59+
60+
- name: Checkout Repo
61+
uses: actions/checkout@v4
62+
63+
- name: Checkout Host Tools
64+
uses: actions/checkout@v4
65+
with:
66+
repository: 'milkv-duo/host-tools'
67+
path: 'host-tools'
68+
69+
- name: Download packages
70+
run: |
71+
wget https://github.com/milkv-duo/duo-buildroot-sdk-v2/releases/download/dl/dl.tar
72+
tar xf dl.tar -C buildroot/
73+
74+
- name: Build ${{ matrix.model }}-${{ matrix.toolchains }}-${{ matrix.flash }}
75+
run: |
76+
TARGET="milkv-${{ matrix.model }}-${{ matrix.toolchains }}-${{ matrix.flash }}"
77+
./build.sh ${TARGET}
78+
79+
- name: Compress ${{ matrix.model }}-${{ matrix.toolchains }}-${{ matrix.flash }}
80+
run: |
81+
pushd out
82+
zstd *
83+
popd
84+
85+
- name: Upload ${{ matrix.model }}-${{ matrix.toolchains }}-${{ matrix.flash }}
86+
uses: actions/upload-artifact@v4
87+
with:
88+
name: ${{ matrix.model }}-${{ matrix.toolchains }}-${{ matrix.flash }}
89+
path: out/*.zst
90+
retention-days: 30

.github/workflows/release.yml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: duo-release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
permissions:
12+
contents: "write"
13+
runs-on: ubuntu-22.04
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
model: [duo, duo256m, duos]
19+
toolchains: [glibc-arm64, musl-riscv64]
20+
flash: [sd, emmc]
21+
exclude:
22+
- model: duo
23+
toolchains: glibc-arm64
24+
- model: duo
25+
toolchains: musl-riscv64
26+
flash: emmc
27+
- model: duo256m
28+
flash: emmc
29+
30+
steps:
31+
- name: Update Apt Cache
32+
run: sudo apt update
33+
34+
- name: Free Disk Space (Ubuntu)
35+
uses: jlumbroso/free-disk-space@main
36+
with:
37+
# this might remove tools that are actually needed,
38+
# if set to "true" but frees about 6 GB
39+
tool-cache: false
40+
41+
# all of these default to true, but feel free to set to
42+
# "false" if necessary for your workflow
43+
android: true
44+
dotnet: true
45+
haskell: true
46+
large-packages: false
47+
docker-images: true
48+
swap-storage: true
49+
50+
- name: Checkout Repo
51+
uses: actions/checkout@v4
52+
53+
- name: Checkout Host Tools
54+
uses: actions/checkout@v4
55+
with:
56+
repository: 'milkv-duo/host-tools'
57+
path: 'host-tools'
58+
59+
- name: Download Packages
60+
run: |
61+
wget https://github.com/milkv-duo/duo-buildroot-sdk-v2/releases/download/dl/dl.tar
62+
tar xf dl.tar -C buildroot/
63+
64+
- name: Set Environment
65+
run: |
66+
echo "REF=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
67+
echo "BOARD=milkv-${{ matrix.model }}-${{ matrix.toolchains }}-${{ matrix.flash }}" >> $GITHUB_ENV
68+
tag=$(git tag --points-at HEAD)
69+
if [ -z "$tag" ]; then
70+
echo "TAG=$(date +"%Y.%m.%d")" >> $GITHUB_ENV
71+
else
72+
echo "TAG=$(git tag --points-at HEAD | tail -n 1)" >> $GITHUB_ENV
73+
fi
74+
75+
- name: Check Environment
76+
run: |
77+
echo "env.REF: ${{ env.REF }}"
78+
echo "env.BOARD: ${{ env.BOARD }}"
79+
echo "evn.TAG: ${{ env.TAG }}"
80+
81+
- name: Run Docker Container
82+
run: |
83+
docker run --privileged -itd --name duodocker -v $(pwd):/home/work milkvtech/milkv-duo:latest /bin/bash
84+
85+
- name: Build ${{ env.BOARD }}
86+
run: |
87+
docker exec duodocker /bin/bash -c "cd /home/work && export FORCE_UNSAFE_CONFIGURE=1 && ./build.sh ${{ env.BOARD }}"
88+
89+
- name: Compress ${{ env.BOARD }}
90+
run: |
91+
ls -lh out
92+
mkdir release
93+
for file in out/*; do
94+
if [[ $file == *".zip" ]]; then
95+
cp "$file" "release/${{ env.BOARD }}_${{ env.TAG }}.zip"
96+
elif [[ $file == *".img" ]]; then
97+
cp "$file" "release/${{ env.BOARD }}_${{ env.TAG }}.img"
98+
zip -jrm "release/${{ env.BOARD }}_${{ env.TAG }}.img.zip" "release/${{ env.BOARD }}_${{ env.TAG }}.img"
99+
fi
100+
done
101+
ls -lh release
102+
103+
- name: Upload Images
104+
uses: ncipollo/release-action@main
105+
if: success()
106+
with:
107+
tag: "${{ env.TAG }}"
108+
artifacts: "${{ github.workspace }}/release/*"
109+
allowUpdates: true
110+
removeArtifacts: false
111+
replacesArtifacts: true
112+
token: ${{ secrets.GITHUB_TOKEN }}
113+
body: |
114+
### Change log ${{ env.TAG }}
115+
- ...
116+
### Known Issues
117+
- ...
118+
### Official Documentation
119+
[https://milkv.io/docs/duo/overview](https://milkv.io/docs/duo/overview)
120+
draft: false
121+
prerelease: false

.gitignore

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
1-
build
2-
freertos
3-
fsbl
1+
2+
install/
3+
out/
4+
45
host-tools
5-
isp_tuning
6-
linux_5.10
7-
middleware
8-
opensbi
9-
osdrv
10-
ramdisk
11-
u-boot-2021.10
12-
buildroot-2021.05
13-
oss
14-
cviruntime
15-
cvikernel
16-
cvimath
17-
cvibuilder
18-
install
6+
host-tools/
7+
8+
device/target
9+
10+
*~
11+
*.swp
12+
*.swo
13+
*.bak
14+
*.rej
15+
.DS_Store
16+
17+
tags
18+
.tags*
19+
cscope.*
20+
ncscope.*
21+
.svim
1922

23+
__pycache__
24+
.vscode

.version/2024-05-07.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

.version/version.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
| Package | PATH | URL | Branch | Commit |
3+
|:---------------------------|:------------------------------------|:---------------------------------------------------------|:--------------|:-------------|
4+
| root dir | | https://github.com/sophgo/sophpi.git | sg200x-evb | 37f8c9d |
5+
| build | build | https://github.com/sophgo/build.git | sg200x-dev | bbbdab4 |
6+
| fsbl | fsbl | https://github.com/sophgo/fsbl.git | sg200x-dev | 69853ff |
7+
| opensbi | opensbi | https://github.com/sophgo/opensbi.git | sg200x-dev | 6766e9c |
8+
| u-boot-2021.10 | u-boot-2021.10 | https://github.com/sophgo/u-boot-2021.10.git | sg200x-dev | fcbb004a6b |
9+
| linux_5.10 | linux_5.10 | https://github.com/sophgo/linux_5.10.git | sg200x-dev | 571a92647f63 |
10+
| ramdisk (skip) | ramdisk | https://github.com/sophgo/ramdisk.git | sg200x-dev | 2a08fd2 |
11+
| cvi_mpi | cvi_mpi | https://github.com/sophgo/cvi_mpi.git | sg200x-dev | 587d623 |
12+
| SensorSupportList | cvi_mpi/component/isp | https://github.com/sophgo/SensorSupportList.git | sg200x-dev | 3666db3 |
13+
| isp_tuning | isp_tuning | https://github.com/sophgo/isp_tuning.git | sg200x-dev | f7b2301 |
14+
| osdrv | osdrv | https://github.com/sophgo/osdrv.git | sg200x-dev | c7aeabf |
15+
| oss | oss | https://github.com/sophgo/oss.git | master | 48f06b5 |
16+
| freertos | freertos | https://github.com/sophgo/freertos.git | sg200x-dev | eb9faf5fe |
17+
| FreeRTOS-Kernel | freertos/Source | https://github.com/sophgo/FreeRTOS-Kernel.git | sg200x-dev | d52c1b6e6 |
18+
| Lab-Project-FreeRTOS-POSIX | freertos/Source/FreeRTOS-Plus-POSIX | https://github.com/sophgo/Lab-Project-FreeRTOS-POSIX.git | sg200x-dev | 5042bfd |
19+
| cvibuilder | cvibuilder | https://github.com/sophgo/cvibuilder.git | sg200x-dev | 4309f2a |
20+
| cvikernel | cvikernel | https://github.com/sophgo/cvikernel.git | sg200x-dev | 9f1f57a |
21+
| cviruntime | cviruntime | https://github.com/sophgo/cviruntime.git | sg200x-dev | 3f49386 |
22+
| cvimath | cvimath | https://github.com/sophgo/cvimath.git | sg200x-dev | ce8705f |
23+
| cnpy | cnpy | https://github.com/sophgo/cnpy.git | tpu | 2f56f4c |
24+
| flatbuffers | flatbuffers | https://github.com/sophgo/flatbuffers.git | master | 6da1cf7 |
25+
| buildroot-2021.05 | buildroot-2021.05 | https://github.com/sophgo/buildroot-2021.05.git | sg200x-dev | 5b7acd1b |
26+
| ive | ive | https://github.com/sophgo/ive.git | sg200x-dev | d398610 |
27+
| cvi_rtsp | cvi_rtsp | https://github.com/sophgo/cvi_rtsp.git | sg200x-dev | 9f66540 |
28+
| tdl_sdk | tdl_sdk | https://github.com/sophgo/tdl_sdk.git | v1 | f8f36927 |

README.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
# sg200x-evb boards.
1+
# Milk-V Duo series buildroot SDK V2
22

3-
step1:
43
```
5-
git clone -b sg200x-evb git@github.com:sophgo/sophpi.git
6-
cd sophpi
7-
./scripts/repo_clone.sh --gitclone scripts/subtree.xml
8-
```
9-
step2:
10-
```
11-
source build/cvisetup.sh
12-
defconfig sg2002_wevb_riscv64_sd
13-
clean_all
14-
build_all
4+
./build.sh lunch
155
```
6+
7+
For more detailed documentation, please refer to: [https://milkv.io/docs/duo/getting-started/buildroot-sdk](https://milkv.io/docs/duo/getting-started/buildroot-sdk)
8+

0 commit comments

Comments
 (0)