Skip to content

Commit 74e6e9d

Browse files
Merge pull request #745 from RadxaYuntian/orion-o6
更新CIX SDK使用文档
2 parents 4feac23 + 9ce7078 commit 74e6e9d

File tree

6 files changed

+111
-3
lines changed

6 files changed

+111
-3
lines changed

.github/CODEOWNERS

+2
Original file line numberDiff line numberDiff line change
@@ -365,3 +365,5 @@ docs/compute-module/cm3/low-level-dev/u-boot.md @nascs
365365
static/img/general-tutorial/tpu_ai/llama3_web_demo.webp @vamrs-feng
366366
docs/rock3/rock3b/_image.mdx @nascs
367367
docs/orion/o6/cix-sdk/README.md @RadxaYuntian
368+
docs/orion/o6/cix-sdk/get-source.md @RadxaYuntian
369+
i18n/en/docusaurus-plugin-content-docs/current/orion/o6/cix-sdk/get-source.md @RadxaYuntian

docs/orion/o6/cix-sdk/build.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ title: 软件编译
1010
sudo apt-get update
1111
. ./build-scripts/envtool.sh
1212
newer_env
13-
sudo apt-get install python-is-python3
13+
sudo apt-get install python-is-python3 7zip meson apt-utils
1414
```
1515

1616
此时方可执行以下命令来下载并解压额外的二进制资源:
@@ -24,7 +24,9 @@ get_cix_ext() {
2424
while wget "$(get_cix_ext "$i")"; do
2525
i=$((i + 1))
2626
done
27-
7z x cix-sdk-ext.7z.001
27+
7zz x cix-sdk-ext.7z.001
28+
# Later system should use 7z instead of 7zz, as the command was renamed.
29+
# Optionally, remove the downloaded files:
2830
# rm cix-sdk-ext.7z.*
2931
```
3032

@@ -36,3 +38,11 @@ done
3638

3739
- `help`:显示 SDK 命令帮助
3840
- `build radxa`:编译所有组件,并最终生成可运行镜像
41+
42+
## 生成产物
43+
44+
`build radxa`执行完毕时,你可以找到以下的生成产物:
45+
46+
- `output/cix_evb/images/linux-fs.sdcard`:系统镜像
47+
- `output/cix_evb/images/cix_debian.iso`:修改后的 Debian 安装 ISO
48+
- `output/cix_evb/images/cix_flash_all_O6.bin`:BIOS 镜像

docs/orion/o6/cix-sdk/get-source.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ sidebar_position: 0
66
经此芯授权,瑞莎在 GitLab 上发布了此芯 SDK 的可公开部分。用户可以自行通过该 SDK 对 O6 进行二次开发。
77

88
:::info
9-
此芯 SDK 仅支持在 Debian 11 / Ubuntu 22.04 系统上进行编译。
9+
此芯 SDK 仅支持在 Debian 11 / Ubuntu 22.04 系统上进行编译。系统可用储存空间至少需 100GiB。
10+
1011
SDK 在容器内运行时可能会遇到权限问题,建议使用实体机或虚拟机进行编译。
1112
:::
1213

@@ -32,6 +33,8 @@ sudo apt-get install repo
3233
mkdir cix-sdk
3334
cd cix-sdk
3435
repo init https://gitlab.com/cix-linux/linux_repo/cix-manifest.git
36+
# Optionally, init with a specific version of manifest:
37+
# repo init -m release/<version>/default.xml https://gitlab.com/cix-linux/linux_repo/cix-manifest.git
3538
repo sync
3639
```
3740

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: CIX SDK
3+
---
4+
5+
<DocCardList />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: Software Compilation
3+
---
4+
5+
## Initialize the Compilation Environment of the CIX SDK
6+
7+
Please execute the following commands in the root directory of the SDK to load the compilation tools and install the compilation dependencies:
8+
9+
```bash
10+
sudo apt-get update
11+
. ./build-scripts/envtool.sh
12+
newer_env
13+
sudo apt-get install python-is-python3 7zip meson apt-utils
14+
```
15+
16+
Only at this time can you execute the following commands to download and extract the additional binary resources:
17+
18+
```bash
19+
i=$((1))
20+
get_cix_ext() {
21+
local block="$(printf "%03d" $1)"
22+
echo "https://github.com/radxa-pkg/cix-prebuilt/releases/download/$EX_CUSTOMER-$EX_PROJECT-$EX_VERSION/cix-sdk-ext.7z.$block"
23+
}
24+
while wget "$(get_cix_ext "$i")"; do
25+
i=$((i + 1))
26+
done
27+
7zz x cix-sdk-ext.7z.001
28+
# Later system should use 7z instead of 7zz, as the command was renamed.
29+
# Optionally, remove the downloaded files:
30+
# rm cix-sdk-ext.7z.*
31+
```
32+
33+
Now the system is ready for SDK compilation.
34+
35+
## Common Commands and Compilation Targets
36+
37+
The following commands can only be run after loading `envtoo.sh`:
38+
39+
- `help`: Display the SDK command help.
40+
- `build radxa`: Compile all components and finally generate a runnable image.
41+
42+
## Build Artifacts
43+
44+
When the `build radxa` command is executed, you can find the following build artifacts:
45+
46+
- `output/cix_evb/images/linux-fs.sdcard`: System image.
47+
- `output/cix_evb/images/cix_debian.iso`: The modified Debian installation ISO.
48+
- `output/cix_evb/images/cix_flash_all_O6.bin`: BIOS image.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: Obtain the Source Code
3+
sidebar_position: 0
4+
---
5+
6+
With the authorization of CIX, Risha has released the publicly available part of the CIX SDK on GitLab. Users can conduct secondary development of the O6 through this SDK by themselves.
7+
8+
:::info
9+
The CIX SDK only supports compilation on Debian 11 / Ubuntu 22.04 systems. The available storage space of the system should be at least 100GiB.
10+
11+
When the SDK runs in a container, permission issues may occur. It is recommended to use a physical machine or a virtual machine for compilation.
12+
:::
13+
14+
## Obtain the `repo` Tool
15+
16+
The SDK provides a [manifest](https://gitlab.com/cix-linux/linux_repo/cix-manifest) that is compatible with the [`repo`](https://gerrit.googlesource.com/git-repo) tool to help users quickly restore the code file structure locally.
17+
18+
Before downloading the SDK, users should first install this tool on the system they are using. For Debian systems, you can refer to the following commands:
19+
20+
```bash
21+
sudo apt-get update
22+
sudo apt-get install repo
23+
```
24+
25+
For reference on the usage of the `repo` command, please refer to the [`AOSP` documentation](https://source.android.com/docs/setup/reference/repo).
26+
27+
## Pull the Code
28+
29+
Please execute the following commands:
30+
31+
```bash
32+
mkdir cix-sdk
33+
cd cix-sdk
34+
repo init https://gitlab.com/cix-linux/linux_repo/cix-manifest.git
35+
# Optionally, init with a specific version of manifest:
36+
# repo init -m release/<version>/default.xml https://gitlab.com/cix-linux/linux_repo/cix-manifest.git
37+
repo sync
38+
```
39+
40+
After all the code has been downloaded, you can proceed with [software compilation](build).

0 commit comments

Comments
 (0)