Android Oreo Preview compile failed

The source and guide is : http://forum.khadas.com/t/vim-android-oreo-v171229-preview-rom-release/1752

After I run the command: make showcommands -j8 , error log:

make: Entering directory '/ExtDisk2/android/aosp_8_Preview_KhasasVIM/common’
make[1]: Entering directory '/ExtDisk2/android/aosp_8_Preview_KhasasVIM/out/target/product/kvim/obj/KERNEL_OBJ’
ln: cannot remove ‘source’: No such file or directory
/ExtDisk2/android/aosp_8_Preview_KhasasVIM/common/Makefile:463: recipe for target ‘outputmakefile’ failed
make[2]: *** [outputmakefile] Error 1
make[1]: *** No rule to make target ‘include/config/auto.conf’, needed by ‘include/config/kernel.release’. Stop.
make[1]: Leaving directory '/ExtDisk2/android/aosp_8_Preview_KhasasVIM/out/target/product/kvim/obj/KERNEL_OBJ’
Makefile:150: recipe for target ‘sub-make’ failed
make: *** [sub-make] Error 2
make: Leaving directory ‘/ExtDisk2/android/aosp_8_Preview_KhasasVIM/common’
[ 25% 58/231] /bin/bash -c "(sed -i ‘s/^#include \"partition_.*/#include \“partition_mbox_normal.dtsi\”/’ common/arch/arm64/boot/dts/amlogic//kvim.dts; if [ -f “common/arch/arm64/boot/dts/amlogic//kvim.dtd” ]; then make -j4 -C common O=…/out/target/product/kvim/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=/opt/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- kvim.dtd; fi; make -j4 -C common O=…/out/target/product/kvim/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=/opt/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- kvim.dtb ) && (cp -f out/target/product/kvim/obj/KERNEL_OBJ/arch/arm64/boot/dts/amlogic/kvim.dtb out/target/product/kvim/dtb.img )"
make: Entering directory '/ExtDisk2/android/aosp_8_Preview_KhasasVIM/common’
make[1]: Entering directory '/ExtDisk2/android/aosp_8_Preview_KhasasVIM/out/target/product/kvim/obj/KERNEL_OBJ’
GEN ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
CHK scripts/mod/devicetable-offsets.h
DTC arch/arm64/boot/dts/amlogic/kvim.dtb
make[1]: Leaving directory '/ExtDisk2/android/aosp_8_Preview_KhasasVIM/out/target/product/kvim/obj/KERNEL_OBJ’
make: Leaving directory '/ExtDisk2/android/aosp_8_Preview_KhasasVIM/common’
ninja: build stopped: subcommand failed.
11:51:43 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target ‘run_soong_ui’ failed
make: *** [run_soong_ui] Error 1

make failed to build some targets (03:07 (mm:ss))

Can you provide the all build log for me? Thanks.

Hi, Terry!

How to build Oreo?

Build U-Boot:

$ cd ~/project/khadas/mmallow/uboot
$ make CROSS_COMPILE=aarch64-linux-gnu- kvim_defconfig
$ make CROSS_COMPILE=aarch64-linux-gnu-

Build Android:

$ cd ~/project/khadas/mmallow
$ source build/envsetup.sh
$ lunch “target”
$ make -jN otapackage

What is “target” for Oreo?

About how to build Oreo for VIM, you can following below steps.

1) Download many tools on your Ubuntu PC Host and extract these tools on the path ‘/opt’

  • gcc-linaro-aarch64-none-elf-4.8-2013.11_linux
  • gcc-arm-none-eabi-6-2017-q2-update
  • gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu

2) Build U-boot

# cd ~/project/khadas/oreo/uboot
# make -jN

3) Build Android

# cd  ~/project/khadas/oreo
# source build/envsetup.sh
# lunch target
# make -jN otapackage

The target is kvim-userdebug

2 Likes

Hi terry:
I clone and build the source success, and to decrease the size of the whole source code size, I copy the source code an anther computer, and the .repo and the all .git directories have been deleted, when I try to compile it, it has the following error:

[ 26% 63/239] /bin/bash -c “(mkdir -p out/host/linux-x86/obj/EXECUTABLES/validatekeymaps_intermediates/ && rm -f out/host/linux-x86/obj/EXECUTABLES/validatekeymaps_intermediates/link_type ) && (build/tools/check_link_type.py --makefile frameworks/base/tools/validatekeymaps/Android.mk --module validatekeymaps --type "native:platform" --allowed native:ndk --allowed native:platform out/host/linux-x86/obj/STATIC_LIBRARIES/libinput_intermediates/link_type out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/link_type out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/link_type out/host/linux-x86/obj/STATIC_LIBRARIES/liblog_intermediates/link_type out/host/linux-x86/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/link_type out/host/linux-x86/obj/SHARED_LIBRARIES/libc++_intermediates/link_type ) && (echo "native:platform" >out/host/linux-x86/obj/EXECUTABLES/validatekeymaps_intermediates/link_type )”
[ 26% 64/239] /bin/bash -c “(mkdir -p out/target/product/kvim/upgrade ) && (repo manifest -r -o out/target/product/kvim/manifests/manifest-2018-02-10–15-23.xml ) && (cp out/target/product/kvim/manifests/manifest-2018-02-10–15-23.xml out/target/product/kvim/upgrade/manifest.xml )”
FAILED: out/target/product/kvim/manifests/manifest-2018-02-10–15-23.xml
/bin/bash -c “(mkdir -p out/target/product/kvim/upgrade ) && (repo manifest -r -o out/target/product/kvim/manifests/manifest-2018-02-10–15-23.xml ) && (cp out/target/product/kvim/manifests/manifest-2018-02-10–15-23.xml out/target/product/kvim/upgrade/manifest.xml )”
error: command ‘manifest’ requires repo to be installed first.
Use “repo init” to install it here.
ninja: build stopped: subcommand failed.
15:25:40 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target ‘run_soong_ui’ failed
make: *** [run_soong_ui] Error 1

make failed to build some targets (05:10 (mm:ss))

It seems the repo command is not found, but I am sure that the repo is at PATH env:
$ which repo
/home/hexiongjun/bin/repo

So how can I build it without the .repo and .git at the another computer ?
Can you tell me where is the target ‘out/target/product/kvim/manifests/manifest-2018-02-10–15-23.xml’ defined?
So I can try to solve this problem manually.

Thanks.