Boot Image build Fail


Hello All,

I followed the recently updated procedure to build the AOSP and Kernel from source.

Step 1: Download the AOSP source:

$ repo init -u -b master
$ git clone -b hikey970_v1.0 .repo/local_manifests
$ repo sync -j$(nproc) -c
$ source build/
$ lunch hikey970-userdebug

Step 2: Build Kernel

  1. Build ramdisk
  2. copy ramdisk to tools folder
  3. Modify the compilation script.
  4. build kernel

While building the kernel, I get the following error:

  LD [M]  net/netfilter/xt_LOG.ko
  LD [M]  net/netfilter/xt_addrtype.ko
 Kernel Image build success! 
  CHK     scripts/mod/devicetable-offsets.h
  DTC     arch/arm64/boot/dts/hisilicon/kirin970-hikey970.dtb
 Hikey970 dtb build success! 
 Image-dtb build success! 
./ line 62: mkbootimg: command not found
 Boot Image build fail!

It seems that neither the Image.gz-dtb is being created nor the boot.img.

Can anyone please let me know where the problem might lie?

Thanks and regards,

Possible bug in AOSP source built system.img for Hikey970
Why is there a difference between contents of source built and pre-built system images?

I found working one in system/core/mkbootimg of aosp repository



I used the same to build the images.
I found this post here as well to build the Image.gz-dtb.