This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
products:sbc:common:development:edges-rockchip-linux-sdk [2024/12/31 01:32] nick |
products:sbc:common:development:edges-rockchip-linux-sdk [2025/02/27 20:08] (current) gray [Get SDK] Add update repo |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Edge2 Yocto SDK developer guide ====== | + | ====== Edge2 Rockchip Linux SDK developer guide ====== |
Line 5: | Line 5: | ||
- | The Rockchip | + | The Rockchip |
For readability, | For readability, | ||
===== Preparation ===== | ===== Preparation ===== | ||
- | + | Install essential dependencies. | |
- | Install essential dependencies. It is recommended to use Ubuntu 22.04 for compilation. | + | |
```shell | ```shell | ||
- | sudo apt-get update && sudo apt-get install | + | $ sudo apt update && sudo apt install |
liblz4-tool expect expect-dev g++ patchelf chrpath gawk texinfo chrpath \ | liblz4-tool expect expect-dev g++ patchelf chrpath gawk texinfo chrpath \ | ||
diffstat binfmt-support qemu-user-static live-build bison flex fakeroot \ | diffstat binfmt-support qemu-user-static live-build bison flex fakeroot \ | ||
Line 23: | Line 22: | ||
===== Get SDK ===== | ===== Get SDK ===== | ||
- | |||
1. Download the base SDK packages here: [[https:// | 1. Download the base SDK packages here: [[https:// | ||
<WRAP important > | <WRAP important > | ||
- | Need download all 5 compress | + | You need to download all 5 compressed |
+ | * khadas_edges_yocto_sdk_base.tar.gz00 | ||
+ | * khadas_edges_yocto_sdk_base.tar.gz01 | ||
+ | * khadas_edges_yocto_sdk_base.tar.gz02 | ||
+ | * khadas_edges_yocto_sdk_base.tar.gz03 | ||
+ | * khadas_edges_yocto_sdk_base.tar.gz04 | ||
</ | </ | ||
+ | <WRAP tip > | ||
+ | You can also download the [[dl> | ||
+ | |||
+ | ```shell | ||
+ | $ md5sum -c md5sum/* | ||
+ | khadas_edges_yocto_sdk_base.tar.gz00: | ||
+ | khadas_edges_yocto_sdk_base.tar.gz01: | ||
+ | khadas_edges_yocto_sdk_base.tar.gz02: | ||
+ | khadas_edges_yocto_sdk_base.tar.gz03: | ||
+ | khadas_edges_yocto_sdk_base.tar.gz04: | ||
+ | ``` | ||
+ | </ | ||
2. Create and enter the working directory: | 2. Create and enter the working directory: | ||
```shell | ```shell | ||
- | $ mkdir ~/project && cd ~/project | + | $ mkdir -p ~/project/ |
``` | ``` | ||
3. Decompress base SDK: | 3. Decompress base SDK: | ||
+ | |||
```shell | ```shell | ||
- | $ cat path/to/SDK_packages/ | + | $ cat path/to/sdk-base-packages/ |
``` | ``` | ||
- | 4. Then you can see '' | + | 4. Then you can see '' |
+ | |||
+ | ```shell | ||
+ | $ ls -al ~/ | ||
+ | total 12 | ||
+ | drwxrwxr-x 3 nick nick 4096 Dec 31 14:40 . | ||
+ | drwxrwxr-x 3 nick nick 4096 Dec 31 14:39 .. | ||
+ | drwxrwxr-x 7 nick nick 4096 Dec 30 16:21 .repo | ||
+ | ``` | ||
5. Sync and update code: | 5. Sync and update code: | ||
+ | |||
```shell | ```shell | ||
+ | $ cd .repo/repo | ||
+ | $ git pull | ||
+ | $ cd - | ||
$ .repo/ | $ .repo/ | ||
$ .repo/ | $ .repo/ | ||
+ | $ ls | ||
+ | Copyright_Statement.md | ||
``` | ``` | ||
- | 6. Create a work branch for each repository: | + | 6. Sync large files: |
+ | |||
+ | ```shell | ||
+ | $ .repo/ | ||
+ | ``` | ||
+ | |||
+ | 7. If you need to build Yocto, please disable the auto-detaching feature of git gc: | ||
+ | ```shell | ||
+ | $ git config --global gc.autoDetach false | ||
+ | ``` | ||
+ | |||
+ | 8. Create a work branch for each repository: | ||
```shell | ```shell | ||
$ .repo/ | $ .repo/ | ||
Line 58: | Line 99: | ||
In the future, you can use the following command to update the SDK code: | In the future, you can use the following command to update the SDK code: | ||
```shell | ```shell | ||
- | $ cd ~/project/ | + | $ cd ~/project/edge2-linux-sdk |
$ .repo/ | $ .repo/ | ||
``` | ``` | ||
Line 178: | Line 219: | ||
- | === Build U-Boot === | + | === Build u-boot === |
Line 185: | Line 226: | ||
``` | ``` | ||
- | === Build Kernel | + | === Build kernel |
Line 192: | Line 233: | ||
``` | ``` | ||
- | === Build Rootfs | + | === Build rootfs |
Line 199: | Line 240: | ||
``` | ``` | ||
- | ==== Help Messages | + | ==== Help messages |
Line 214: | Line 255: | ||
khadas_rk3588s_edge2_debian_defconfig | khadas_rk3588s_edge2_debian_defconfig | ||
khadas_rk3588s_edge2_yocto_defconfig | khadas_rk3588s_edge2_yocto_defconfig | ||
- | rockchip_defconfig | ||
- | rockchip_rk3588_evb1_lp4_v10_defconfig | ||
- | rockchip_rk3588_evb7_v11_defconfig | ||
- | rockchip_rk3588s_evb1_lp4x_v10_defconfig | ||
| | ||
| | ||
Line 298: | Line 335: | ||
==== Install Docker ==== | ==== Install Docker ==== | ||
- | |||
Please refer to [[https:// | Please refer to [[https:// | ||
==== Add User to a Docker Group ==== | ==== Add User to a Docker Group ==== | ||
- | |||
```shell | ```shell | ||
Line 312: | Line 347: | ||
You need to logout or reboot the system to take effect. | You need to logout or reboot the system to take effect. | ||
</ | </ | ||
- | |||
- | |||
- | ==== Check Docker ==== | ||
- | |||
- | |||
- | ```shell | ||
- | $ docker run hello-world | ||
- | ``` | ||
- | |||
- | If you see the following print-out, Docker has installed successfully: | ||
- | |||
- | ```txt | ||
- | Unable to find image ' | ||
- | latest: Pulling from library/ | ||
- | ca4f61b1923c: | ||
- | Digest: sha256: | ||
- | Status: Downloaded newer image for hello-world: | ||
- | |||
- | Hello from Docker! | ||
- | This message shows that your installation appears to be working correctly. | ||
- | |||
- | To generate this message, Docker took the following steps: | ||
- | 1. The Docker client contacted the Docker daemon. | ||
- | 2. The Docker daemon pulled the " | ||
- | (amd64) | ||
- | 3. The Docker daemon created a new container from that image which runs the | ||
- | executable that produces the output you are currently reading. | ||
- | 4. The Docker daemon streamed that output to the Docker client, which sent it | ||
- | to your terminal. | ||
- | |||
- | To try something more ambitious, you can run an Ubuntu container with: | ||
- | $ docker run -it ubuntu bash | ||
- | |||
- | Share images, automate workflows, and more with a free Docker ID: | ||
- | | ||
- | |||
- | For more examples and ideas, visit: | ||
- | | ||
- | ``` | ||
==== Build SDK in Docker ==== | ==== Build SDK in Docker ==== | ||
Line 358: | Line 354: | ||
```shell | ```shell | ||
- | $ cd ~/project/ | ||
$ docker pull wesion/ | $ docker pull wesion/ | ||
``` | ``` | ||
Line 365: | Line 360: | ||
```shell | ```shell | ||
+ | $ cd ~/ | ||
$ docker run --rm -it --privileged --device=/ | $ docker run --rm -it --privileged --device=/ | ||
| | ||
Line 377: | Line 373: | ||
===== Install OS ===== | ===== Install OS ===== | ||
- | |||
==== Preparation ==== | ==== Preparation ==== | ||
- | |||
1. Copy upgrade tool to your local path | 1. Copy upgrade tool to your local path | ||
Line 390: | Line 384: | ||
2. Put your Edge2 into upgrade mode. Ref: | 2. Put your Edge2 into upgrade mode. Ref: | ||
- | ==== Install OS into eMMc ==== | + | ==== Install OS into eMMC ==== |
+ | Please check [[products: | ||
- | ```shell | ||
- | $ upgrade_tool uf < | ||
- | ``` | ||
==== Partition Upgrade ==== | ==== Partition Upgrade ==== | ||
Line 409: | Line 401: | ||
$ sudo upgrade_tool di -uboot < | $ sudo upgrade_tool di -uboot < | ||
``` | ``` | ||
- | ==== Upgrade | + | ==== Upgrade |
Line 416: | Line 408: | ||
``` | ``` | ||
- | ==== Upgrade | + | ==== Upgrade |