The output you posted indicates a failure while running make to build your kernel, specifically at the step where it tries to build the drivers or generate the image rv1106g-luckfox-pico-pi-w.img. Unfortunately, the root cause error message above those lines is not included, and the errors shown are mostly the cascade of errors (Error 2) from sub-make calls and the build script (build.sh) exiting with failure.
What these errors generally mean:
make[3]: *** [...] Error 2 and then make[2]: *** [...] Error 2 means a sub-make process failed, which propagates upwards.
make: *** [Makefile:489: kernel] Error 1 is the top-level make failure.
The build script build.sh calls make kernel, which also fails due to these errors.
How to proceed:
Look for the actual error messages above these lines:
Usually, make outputs the cause of the failure before these summary error lines.
Scroll up in your terminal or build logs to find the first error message or failure.
Common errors could be missing headers, compilation errors, missing files, or configuration issues.
Check your environment:
Confirm that you have the necessary toolchain installed (e.g., gcc-arm, kernel headers, SDK dependencies).
Verify environment variables (e.g., SDK_SYSDRV_DIR, configuration variables passed to make).
Clean and retry:
Run make clean or make mrproper if supported to clean previous build artifacts.
Try building again to see if the error persists.
Verbose build:
You can add V=1 to your make command to get verbose output (e.g., make V=1 kernel ...) to see exactly what command failed.
Check patches or configuration fragments:
The command references KERNEL_CFG, KERNEL_CFG_FRAGMENT. These may be specifying defconfig files or patch overlays. Make sure they are correct and exist.
Check for missing or misconfigured DTS (Device Tree Source):
KERNEL_DTS=${RK_KERNEL_DTS} is passed: verify that ${RK_KERNEL_DTS} points to a valid device tree file.
Example next steps to identify the issue:
Run the build again and redirect output to a file for easier inspection:
bash
make kernel -C ${SDK_SYSDRV_DIR} ... 2>&1 | tee build_log.txt
Search build_log.txt for error, failed, or fatal.
Inspect the first error message which caused the failure.
Summary
The lines you posted show where it failed in the recursive make chain but not why. You need the actual error output above those lines. Look for compilation errors or missing file errors earlier in your build log.
If you want, you can paste the first error message or a larger portion of the build output here and I can help diagnose further.