Skip to content

Compilation

Q1: WiFi functionality is abnormal after modifying kernel configuration and compiling?

  • Rootfs uses lazy compilation; WiFi‑related drivers are not updated. You need to run ./build.sh clean to clear the build and then recompile.
  • The SDK build system checks file timestamps and only recompiles changed parts. However, if the WiFi firmware and kernel modules in the rootfs are packaged as pre‑compiled binaries, changes to the kernel .config will not trigger a rootfs repackaging.

Q2: RK SDK compilation fails with "xxx.dtsi file not found"?

  • Multi‑screen mirroring compilation may leave incomplete intermediate files. You can restore them with git checkout and then recompile.

  • Detailed steps:

git status                    # Check the workspace status to see which files were modified or deleted
git checkout -- <file_path>   # Restore a specific file
# Or restore everything:
git checkout .                # Discard all modifications (use with caution — this will lose all local changes)
  • Device tree files use a hierarchical include structure (e.g., rk3576.dtsi includes rk3576-pinctrl.dtsi). During compilation, intermediate files are generated based on dependencies. Interrupting the build may leave incomplete intermediate files like *.dtsi.dtb.o.

  • Ensure sufficient power/battery before compiling, and do not forcefully interrupt the build process. Use screen or tmux to run the compilation in the background to avoid interruption due to SSH disconnection.

Q3: Does the RK Linux SDK not support building the filesystem with build.sh?

  • The RK356x/RK3588 Linux SDK does not recommend using build.sh to build the filesystem. It is currently maintained as a rootfs.img. We recommend using the pre‑built rootfs.img provided in our cloud storage for development.
  • The filesystem configuration in the RK Linux SDK is complex and depends on many external packages and cross‑compilation toolchains. The build.sh script in some SDK versions does not fully integrate the complete rootfs compilation flow.
  • Download the pre‑compiled rootfs.img from the cloud storage. If you need to customise the rootfs, mount the rootfs.img using QEMU + chroot and modify it.

Q4: How do I clean and recompile the AW SDK?

  • Android: build.sh clean cleans the compilation output. For Buildroot: delete the out/ directory and then re‑run ./build.sh lunch./build.sh. If compilation errors occur, delete the build/rootfs-base/ path and recompile.

  • build.sh clean cleans the build artefacts under out/target/product/ but does not clean the cross‑toolchain. build.sh distclean is more thorough (cleans all compilation configurations). For a full clean rebuild, run build.sh update-api && build.sh clean && build.sh.

  • AW Buildroot layered cleanup:

rm -rf out/                                    # Most thorough; rebuilds everything
rm -rf build/rootfs-base/                      # Cleans only filesystem‑related builds
rm -rf build/linux-*/                          # Cleans only kernel build artefacts

Choosing the appropriate cleanup scope based on the error location can save time.

  • Build cache: ccache can speed up recompilation: export USE_CCACHE=1 && export CCACHE_DIR=~/.ccache && prebuilts/misc/linux-x86/ccache/ccache -M 50G.

Q5: How do I check the current SDK version and Git commit history?

  • git log — View the complete commit history.
  • git status — Check the workspace status.
  • git diff — View file changes.
  • git checkout -- <file> — Discard changes to a specific file in the workspace, restoring it to the state of the most recent commit.