Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:common:development:edges-rockchip-linux-sdk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
products:sbc:common:development:edges-rockchip-linux-sdk [2024/12/31 01:19]
gray [Get SDK] Add important box for download SDK files.
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 Rockchip Linux6.1 SDK developer guide+====== Edge2 Rockchip Linux SDK developer guide ======
  
-## Introduction 
  
-The Rockchip Linux6.1 SDK support Buildroot, Debian and Yocto. We will introduce how to build Edge2 firmware using the Rockchip Linux6.1 SDK here.+===== Introduction ===== 
 + 
 + 
 +The Rockchip Linux SDK support Buildroot, Debian and Yocto. We will introduce how to build Edge2 firmware using the Rockchip Linux SDK here.
 For readability, the subsequent Rockchip Linux SDK will be referred to as SDK. For readability, the subsequent Rockchip Linux SDK will be referred to as SDK.
  
-## Preparation+===== Preparation =====
  
-Install essential dependencies. It is recommended to use Ubuntu 22.04 for compilation.+Install essential dependencies. **It is recommended to use Ubuntu 22.04 for compilation**, or you can choose to [[#build-in-docker | Build in Docker]].
  
 ```shell ```shell
-sudo apt-get update && sudo apt-get install git ssh make gcc libssl-dev \+sudo apt update && sudo apt install -git ssh make gcc libssl-dev \
 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 19: Line 21:
 ``` ```
  
-## Get SDK+===== Get SDK =====
  
 1. Download the base SDK packages here: [[https://dl.khadas.com/development/yocto/khadas_edges_yocto_sdk_base/ | khadas_edges_yocto_sdk_base.tar.gz0x]] 1. Download the base SDK packages here: [[https://dl.khadas.com/development/yocto/khadas_edges_yocto_sdk_base/ | khadas_edges_yocto_sdk_base.tar.gz0x]]
 <WRAP important > <WRAP important >
-Need download all 5 compress files: khadas_edges_yocto_sdk_base.tar.gz00 khadas_edges_yocto_sdk_base.tar.gz04+You need to download all 5 compressed files: 
 +  * 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> </WRAP>
  
 +<WRAP tip >
 +You can also download the [[dl>development/yocto/khadas_edges_yocto_sdk_base/md5sum/ | md5 checksum]] to verify the downloaded files:
 +
 +```shell
 +$ md5sum -c md5sum/*
 +khadas_edges_yocto_sdk_base.tar.gz00: OK
 +khadas_edges_yocto_sdk_base.tar.gz01: OK
 +khadas_edges_yocto_sdk_base.tar.gz02: OK
 +khadas_edges_yocto_sdk_base.tar.gz03: OK
 +khadas_edges_yocto_sdk_base.tar.gz04: OK
 +```
 +</WRAP>
  
 2. Create and enter the working directory: 2. Create and enter the working directory:
 ```shell ```shell
-$ mkdir ~/project && cd ~/project+$ mkdir -p ~/project/edge2-linux-sdk && cd ~/project/edge2-linux-sdk
 ``` ```
  
 3. Decompress base SDK: 3. Decompress base SDK:
 +
 ```shell ```shell
-$ cat path/to/SDK_packages/khadas_edges_yocto_sdk_base.tar.gz* | tar -zxv+$ cat path/to/sdk-base-packages/khadas_edges_yocto_sdk_base.tar.gz* | tar -zxv -C ~/project/edge2-linux-sdk
 ``` ```
  
-4. Then you can see ''.repo'' derctory in ''~/project'' directory by using ''ls -la'' command.+4. Then you can see ''.repo'' derctory in ''~/project/edge2-linux-sdk'' directory by using ''ls -la'' command. 
 + 
 +```shell 
 +$ ls -al ~/project/edge2-linux-sdk 
 +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 sync -l  $ .repo/repo/repo sync -l 
 $ .repo/repo/repo sync -c $ .repo/repo/repo sync -c
 +$ ls
 +Copyright_Statement.md  Makefile  app  build.sh  buildroot  debian  device  docs  external  kernel  prebuilts  rkbin  rkflash.sh  tools  u-boot  yocto
 ``` ```
  
-6. Create a work branch for each repository:+6. Sync large files: 
 + 
 +```shell 
 +$ .repo/repo/repo forall -c 'git lfs pull' 
 +``` 
 + 
 +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/repo start khadas --all $ .repo/repo/repo start khadas --all
 ``` ```
  
-## Update SDK+===== Update SDK ===== 
 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/repo sync -c  $ .repo/repo/repo sync -c 
 ``` ```
  
-## Introduction to SDK project directory+===== Introduction to SDK project directory ===== 
  
 The SDK project directory includes buildroot, debian, app, kernel, u-boot, device, docs, external, etc. The SDK project directory includes buildroot, debian, app, kernel, u-boot, device, docs, external, etc.
Line 79: Line 126:
  
  
-## Compilation+===== Compilation ===== 
  
 The SDK can be easily compiled using the ''build.sh'' script. The SDK can be easily compiled using the ''build.sh'' script.
  
-### Setup the Compile Configuration+==== Setup the Compile Configuration ==== 
  
 You should setup the compile configuration before compilation. You should setup the compile configuration before compilation.
Line 143: Line 192:
 </tabbox> </tabbox>
  
-### Build the OS Image+==== Build the OS Image ==== 
  
 After setting up the compile configuration, just run ''./build.sh'' to start building.  After setting up the compile configuration, just run ''./build.sh'' to start building. 
Line 166: Line 216:
 </WRAP> </WRAP>
  
-### Other Build Commands+==== Other Build Commands ==== 
 + 
 + 
 +=== Build u-boot ===
  
-#### Build U-Boot 
  
 ```shell ```shell
Line 174: Line 226:
 ``` ```
  
-#### Build Kernel+=== Build kernel === 
  
 ```shell ```shell
Line 180: Line 233:
 ``` ```
  
-#### Build Rootfs+=== Build rootfs === 
  
 ```shell ```shell
Line 186: Line 240:
 ``` ```
  
-### Help Messages+==== Help messages ==== 
  
 You can get help messages by executing ''./build.sh help'': You can get help messages by executing ''./build.sh help'':
Line 200: 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 
  olddefconfig                      resolve any unresolved symbols in .config  olddefconfig                      resolve any unresolved symbols in .config
  savedefconfig                    save current config to defconfig  savedefconfig                    save current config to defconfig
Line 278: Line 329:
 ``` ```
  
-## Build in Docker+===== Build in Docker ===== 
  
 You can also choose to build the OS image in a Docker container. You can also choose to build the OS image in a Docker container.
  
-### Install Docker+==== Install Docker ====
  
 Please refer to [[https://docs.docker.com/engine/install/|Docker Documentation]]. Please refer to [[https://docs.docker.com/engine/install/|Docker Documentation]].
  
-### Add User to a Docker Group+==== Add User to a Docker Group ====
  
 ```shell ```shell
Line 296: Line 348:
 </WRAP> </WRAP>
  
 +==== Build SDK in Docker ====
  
-### Check Docker 
- 
-```shell 
-$ docker run hello-world 
-``` 
- 
-If you see the following print-out, Docker has installed successfully: 
- 
-```txt 
-Unable to find image 'hello-world:latest' locally 
-latest: Pulling from library/hello-world 
-ca4f61b1923c: Pull complete 
-Digest: sha256:be0cd392e45be79ffeffa6b05338b98ebb16c87b255f48e297ec7f98e123905c 
-Status: Downloaded newer image for hello-world:latest 
- 
-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 "hello-world" image from the Docker Hub. 
-    (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: 
- https://cloud.docker.com/ 
- 
-For more examples and ideas, visit: 
- https://docs.docker.com/engine/userguide/ 
-``` 
- 
-### Build SDK in Docker 
  
 Get Docker image: Get Docker image:
  
 ```shell ```shell
-$ cd ~/project/ 
 $ docker pull wesion/yocto-rockchip $ docker pull wesion/yocto-rockchip
 ``` ```
Line 346: Line 360:
  
 ```shell ```shell
 +$ cd ~/project/edge2-linux-sdk
 $ docker run --rm -it  --privileged --device=/dev/loop-control:/dev/loop-control \ $ docker run --rm -it  --privileged --device=/dev/loop-control:/dev/loop-control \
              --device=/dev/loop0:/dev/loop0 --cap-add SYS_ADMIN -v /opt:/opt \              --device=/dev/loop0:/dev/loop0 --cap-add SYS_ADMIN -v /opt:/opt \
Line 357: Line 372:
 ``` ```
  
-## Install OS+===== Install OS =====
  
-### Preparation+==== Preparation ====
  
 1. Copy upgrade tool to your local path 1. Copy upgrade tool to your local path
Line 369: Line 384:
 2. Put your Edge2 into upgrade mode. Ref:[[products:sbc:edge2:install-os:boot-into-upgrade-mode| Boot into upgrade mode]] 2. Put your Edge2 into upgrade mode. Ref:[[products:sbc:edge2:install-os:boot-into-upgrade-mode| Boot into upgrade mode]]
  
-### Install OS into eMMc+==== Install OS into eMMC ====
  
-```shell +Please check [[products:sbc:edge2:install-os:install-os-into-emmc-via-usb-tool|]]
-$ upgrade_tool uf <SDK>/output/edge2-${rootfs}-${date}.img + 
-```+ 
 +==== Partition Upgrade ====
  
-## Partition Upgrade 
 <WRAP important > <WRAP important >
 Invalid in Maskrom Mode!  Invalid in Maskrom Mode! 
 </WRAP> </WRAP>
  
-### Upgrade Uboot+==== Upgrade Uboot ==== 
  
 ```shell ```shell
 $ sudo upgrade_tool di -uboot <SDK>/output/update/Image/uboot.img $ sudo upgrade_tool di -uboot <SDK>/output/update/Image/uboot.img
 ``` ```
-### Upgrade Kernel+==== Upgrade kernel ==== 
  
 ```shell ```shell
Line 391: Line 408:
 ``` ```
  
-### Upgrade Rootfs+==== Upgrade rootfs ==== 
  
 ```shell ```shell
Line 401: Line 419:
 </WRAP> </WRAP>
  
-## User and password+===== User and password ===== 
  
 <tabbox Buildroot> <tabbox Buildroot>
Line 426: Line 445:
 </tabbox> </tabbox>
  
-## WIFI+===== WIFI ===== 
  
 <tabbox Buildroot && Yocto> <tabbox Buildroot && Yocto>
Line 461: Line 481:
  
  
-## Bluetooth+===== Bluetooth ===== 
  
 <tabbox Buildroot && Yocto> <tabbox Buildroot && Yocto>
Line 473: Line 494:
 </tabbox> </tabbox>
  
-## Camera+===== Camera ===== 
 Please refer to [[products:sbc:edge2:add-ons:edge2-mipi-camera|]] Please refer to [[products:sbc:edge2:add-ons:edge2-mipi-camera|]]
  
  
Last modified: 2024/12/31 01:19 by gray