Help building AOSP

Hello. I’ve recently acquired a Rock960 (AB) board and want to flash a newly built AOSP image. I have been following this guide and everything went well up until the ./mkimage step.
First, the directory rkst/ was empty, and I had an error saying mkkrnlimg was missing. So I dig a little further and found it on kernel/scripts/mkkrnlimg, moved it there and no longer got an error. However, now the script gives the me following error:

TARGET_BOARD_PLATFORM=rk3399
TARGET_PRODUCT=rk3399_box
TARGET_HARDWARE=rk30board
TARGET_BUILD_VARIANT=userdebug
BOARD_SYSTEMIMAGE_PARTITION_SIZE=2147483648
BOARD_USE_SPARSE_SYSTEM_IMAGE=true
system filesysystem is ext4
create boot.img without kernel… done.
create recovery.img without kernel and resource…
mkkrnlimg V20120220
cmd:/home/lin/rock960-android/out/target/product/rk3399_box/ramdisk-recovery.img /home/lin/rock960-android/out/target/product/rk3399_box/recovery.img [(null)]
kernel Image:/home/lin/rock960-android/out/target/product/rk3399_box/recovery.img for mid is ready.
done.
create misc.img… cp: cannot stat ‘rkst/Image/misc.img’: No such file or directory

I looked at ./mkimage a little more and it seems that misc.img and some other 2 .imgs are being fetched from the rkst directory, but never in the guide was this mentioned, and it was always empty.
Help would be much appreciated.

I wouldn’t recommend these boards for running Android. Their build trees are massively over complicated, messy, and broken – all needlessly, and their instructions don’t work.

As I recall, after you create the rockdev link, go into it (its a link to a directory), and you will find a directory named “Image-rk3399_box” – yet the path is supposed to be just “Image”. So in there, create another link from Image --> Image-rk3399_box, then try again.

Thanks, I tried it but I don’t think that is the problem. mkimage.sh looks for a misc.img, pcba_small_misc.img and pcba_whole_misc.img but they are nowhere to be found (I ran find . -name “*.img”). Aren’t these images supposed to be generated before mkimage.sh is run?

No idea. Their build tree is terrible. Worst I’ve ever seen.

It might be worth looking into starting the android tree over against AOSP. Begin using a dragonboard tree. Use AOSP common kernel and panfrost, which should work with this board.

Thanks, I ended up using the Android 9 tree, which had working instructions in the github repo. The outdated info and tree should be updated in that guide.