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 cleanto 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
.configwill 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 checkoutand 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.dtsiincludesrk3576-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
screenortmuxto 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.shto build the filesystem. It is currently maintained as arootfs.img. We recommend using the pre‑builtrootfs.imgprovided 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.shscript in some SDK versions does not fully integrate the complete rootfs compilation flow. - Download the pre‑compiled
rootfs.imgfrom the cloud storage. If you need to customise the rootfs, mount therootfs.imgusing QEMU + chroot and modify it.
Q4: How do I clean and recompile the AW SDK?¶
-
Android:
build.sh cleancleans the compilation output. For Buildroot: delete theout/directory and then re‑run./build.sh lunch→./build.sh. If compilation errors occur, delete thebuild/rootfs-base/path and recompile. -
build.sh cleancleans the build artefacts underout/target/product/but does not clean the cross‑toolchain.build.sh distcleanis more thorough (cleans all compilation configurations). For a full clean rebuild, runbuild.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:
ccachecan 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.