Has anyone successfully compiled Android 12?

I used rock5c and referred to the Low-Level development documents of 5B and 5C

My system is Ubuntu 22.04.4, and I created a docker environment to compile Android 12.

Current problem is that the kernel cannot be compiled, and the error is as follows:

make: *** [arch/arm64/Makefile:214: rk3588s-rock-5c.img] Error 2

failed to build some targets (04:19 (mm:ss))

I thought it was a problem with the lz4 version, so I updated to the latest lz4. But I still couldn’t compile the kernel.

Can anyone give me some hints?Thanks

Resolved,Radxa’s 5C documentation gives severely incomplete dependencies. There is no need for docker, direct compilation is more efficient

2 Likes

hello, could you please give some missing dependencies for buiding Android?

well i finally find the reason. when generating kernel/kheaders_data.tar.xz, cpio is needed.

  SYNC    include/config/auto.conf
  CALL    scripts/atomic/check-atomics.sh
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  GZIP    kernel/config_data.gz
  CHK     kernel/kheaders_data.tar.xz
  GEN     kernel/kheaders_data.tar.xz
make[2]: *** [kernel/Makefile:155: kernel/kheaders_data.tar.xz] Error 127
make[1]: *** [Makefile:1936: kernel] Error 2
make[1]: *** Waiting for unfinished jobs....
grep: warning: stray \ before #
make[5]: warning: -j12 forced in makefile: resetting jobserver mode.
  CC      drivers/leds/leds-gpio.o
  AR      drivers/leds/built-in.a
  AR      drivers/built-in.a
make: *** [arch/arm64/Makefile:214: rk3588s-rock-5c.img] Error 2