diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e3b6fa3ee..3db19ff91 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -365,3 +365,5 @@ docs/compute-module/cm3/low-level-dev/u-boot.md @nascs static/img/general-tutorial/tpu_ai/llama3_web_demo.webp @vamrs-feng docs/rock3/rock3b/_image.mdx @nascs docs/orion/o6/cix-sdk/README.md @RadxaYuntian +docs/orion/o6/cix-sdk/get-source.md @RadxaYuntian +i18n/en/docusaurus-plugin-content-docs/current/orion/o6/cix-sdk/get-source.md @RadxaYuntian diff --git a/docs/orion/o6/cix-sdk/build.md b/docs/orion/o6/cix-sdk/build.md index 59fa31ab4..97e8296ac 100644 --- a/docs/orion/o6/cix-sdk/build.md +++ b/docs/orion/o6/cix-sdk/build.md @@ -10,7 +10,7 @@ title: 软件编译 sudo apt-get update . ./build-scripts/envtool.sh newer_env -sudo apt-get install python-is-python3 +sudo apt-get install python-is-python3 7zip meson apt-utils ``` 此时方可执行以下命令来下载并解压额外的二进制资源: @@ -24,7 +24,9 @@ get_cix_ext() { while wget "$(get_cix_ext "$i")"; do i=$((i + 1)) done -7z x cix-sdk-ext.7z.001 +7zz x cix-sdk-ext.7z.001 +# Later system should use 7z instead of 7zz, as the command was renamed. +# Optionally, remove the downloaded files: # rm cix-sdk-ext.7z.* ``` @@ -36,3 +38,11 @@ done - `help`:显示 SDK 命令帮助 - `build radxa`:编译所有组件,并最终生成可运行镜像 + +## 生成产物 + +当`build radxa`执行完毕时,你可以找到以下的生成产物: + +- `output/cix_evb/images/linux-fs.sdcard`:系统镜像 +- `output/cix_evb/images/cix_debian.iso`:修改后的 Debian 安装 ISO +- `output/cix_evb/images/cix_flash_all_O6.bin`:BIOS 镜像 diff --git a/docs/orion/o6/cix-sdk/get-source.md b/docs/orion/o6/cix-sdk/get-source.md index 6289378ee..d13ba308a 100644 --- a/docs/orion/o6/cix-sdk/get-source.md +++ b/docs/orion/o6/cix-sdk/get-source.md @@ -6,7 +6,8 @@ sidebar_position: 0 经此芯授权,瑞莎在 GitLab 上发布了此芯 SDK 的可公开部分。用户可以自行通过该 SDK 对 O6 进行二次开发。 :::info -此芯 SDK 仅支持在 Debian 11 / Ubuntu 22.04 系统上进行编译。 +此芯 SDK 仅支持在 Debian 11 / Ubuntu 22.04 系统上进行编译。系统可用储存空间至少需 100GiB。 + SDK 在容器内运行时可能会遇到权限问题,建议使用实体机或虚拟机进行编译。 ::: @@ -32,6 +33,8 @@ sudo apt-get install repo mkdir cix-sdk cd cix-sdk repo init https://gitlab.com/cix-linux/linux_repo/cix-manifest.git +# Optionally, init with a specific version of manifest: +# repo init -m release//default.xml https://gitlab.com/cix-linux/linux_repo/cix-manifest.git repo sync ``` diff --git a/i18n/en/docusaurus-plugin-content-docs/current/orion/o6/cix-sdk/README.md b/i18n/en/docusaurus-plugin-content-docs/current/orion/o6/cix-sdk/README.md new file mode 100644 index 000000000..7c1c56f2e --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/orion/o6/cix-sdk/README.md @@ -0,0 +1,5 @@ +--- +title: CIX SDK +--- + + diff --git a/i18n/en/docusaurus-plugin-content-docs/current/orion/o6/cix-sdk/build.md b/i18n/en/docusaurus-plugin-content-docs/current/orion/o6/cix-sdk/build.md new file mode 100644 index 000000000..d1187aeb0 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/orion/o6/cix-sdk/build.md @@ -0,0 +1,48 @@ +--- +title: Software Compilation +--- + +## Initialize the Compilation Environment of the CIX SDK + +Please execute the following commands in the root directory of the SDK to load the compilation tools and install the compilation dependencies: + +```bash +sudo apt-get update +. ./build-scripts/envtool.sh +newer_env +sudo apt-get install python-is-python3 7zip meson apt-utils +``` + +Only at this time can you execute the following commands to download and extract the additional binary resources: + +```bash +i=$((1)) +get_cix_ext() { + local block="$(printf "%03d" $1)" + echo "https://github.com/radxa-pkg/cix-prebuilt/releases/download/$EX_CUSTOMER-$EX_PROJECT-$EX_VERSION/cix-sdk-ext.7z.$block" +} +while wget "$(get_cix_ext "$i")"; do + i=$((i + 1)) +done +7zz x cix-sdk-ext.7z.001 +# Later system should use 7z instead of 7zz, as the command was renamed. +# Optionally, remove the downloaded files: +# rm cix-sdk-ext.7z.* +``` + +Now the system is ready for SDK compilation. + +## Common Commands and Compilation Targets + +The following commands can only be run after loading `envtoo.sh`: + +- `help`: Display the SDK command help. +- `build radxa`: Compile all components and finally generate a runnable image. + +## Build Artifacts + +When the `build radxa` command is executed, you can find the following build artifacts: + +- `output/cix_evb/images/linux-fs.sdcard`: System image. +- `output/cix_evb/images/cix_debian.iso`: The modified Debian installation ISO. +- `output/cix_evb/images/cix_flash_all_O6.bin`: BIOS image. diff --git a/i18n/en/docusaurus-plugin-content-docs/current/orion/o6/cix-sdk/get-source.md b/i18n/en/docusaurus-plugin-content-docs/current/orion/o6/cix-sdk/get-source.md new file mode 100644 index 000000000..f3b4780c4 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/orion/o6/cix-sdk/get-source.md @@ -0,0 +1,40 @@ +--- +title: Obtain the Source Code +sidebar_position: 0 +--- + +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. + +:::info +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. + +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. +::: + +## Obtain the `repo` Tool + +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. + +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: + +```bash +sudo apt-get update +sudo apt-get install repo +``` + +For reference on the usage of the `repo` command, please refer to the [`AOSP` documentation](https://source.android.com/docs/setup/reference/repo). + +## Pull the Code + +Please execute the following commands: + +```bash +mkdir cix-sdk +cd cix-sdk +repo init https://gitlab.com/cix-linux/linux_repo/cix-manifest.git +# Optionally, init with a specific version of manifest: +# repo init -m release//default.xml https://gitlab.com/cix-linux/linux_repo/cix-manifest.git +repo sync +``` + +After all the code has been downloaded, you can proceed with [software compilation](build).