Faild to build Android 11 AOSP for Rock PI 4AB

Trying to build the Android 11 image for Rock PI 4AB. The build environment is Linux Kubuntu with AMD CPU.

I am following the steps in
https://wiki.radxa.com/Rockpi4/rockpi-android11

I could build u-boot and kernel. At the step to build AOSP, it fails. The failing command is

“lunch rk3399_ROCKPI4B_Android11-userdebug; make -j1”

W][2023-04-20T16:22:32-0700][122336] void cmdline::logParams(nsjconf_t *)():260 Process will be GID/EGID=0 in the global user name
space, and will have group root-level access to files
[100% 40/40] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b out/soong -n out -d out/soong/build.ninja.d -globFi
le out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja Android.bp
libRkTeeWeaver want to conditional Compile
libcameradevice want to conditional Compile
libgralloc_priv want to conditional Compile
librga want to conditional Compile
librockit want to conditional Compile
Rockchip conditional compile
Optee Version: v1

[hardware/rockchip/libgralloc/midgard frameworks/native/include system/core/libsync system/core/libsync/include external/libdrm/inc
lude/drm] 30
libcameradevice curr board is rk356x
Killed
16:23:18 soong bootstrap failed with: exit status 1
ninja: build stopped: subcommand failed.

failed to build some targets (48 seconds)

Could anyone help? Thanks!

You can try pointing the out directory to an ext4 hard drive

How is that related?