sonyxperiadev / device-sony-loire

17 stars 40 forks source link

No precompiled kernel for kugo #261

Closed eogut closed 4 years ago

eogut commented 4 years ago

When I try to build Android 10 for kugo, ninja runs into the following error:

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
TARGET_PRODUCT=aosp_f5321
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=cortex-a53.a57
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-72-generic-x86_64-elementary-OS-5.1-Hera
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QQ1A.191205.008
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=device/sony/loire
============================================
FAILED: ninja: 'kernel/sony/msm-4.14/common-kernel/kernel-dtb-kugo', needed by 'out/target/product/kugo/kernel', missing and no known rule to make it
09:54:37 ninja failed with: exit status 1

So, apparently there is no precompiled kernel for kugo, although the build guide writes that there should be a precompiled kernel. Then, when I try to build the kernel manually, I get this:

mkdtimg: File not found!
Building mkdtimg
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
TARGET_PRODUCT=aosp_f5321
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=cortex-a53.a57
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-72-generic-x86_64-elementary-OS-5.1-Hera
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QQ1A.191205.008
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=device/sony/loire
============================================
Environment variable ALLOW_MISSING_DEPENDENCIES was set, regenerating...
Environment variable ALLOW_MISSING_DEPENDENCIES was set, regenerating...
[ 23% 105/442] including device/sony/common/Android.mk ...
IDisplayConfig version: DISPLAY_CONFIG_1_10
[ 92% 449/487] //external/dtc:dtc yacc dtc-parser.y [linux_glibc]
external/dtc/dtc-parser.y: Conflicts: 3 Moving/Reducing
[100% 487/487] Install: out/host/linux-x86/bin/mkdtimg
=================================================
Your Environment:
ANDROID_ROOT: /home/user/android
KERNEL_TOP  : /home/user/android/kernel/sony/msm-4.14
KERNEL_TMP  : /home/user/android/out/kernel-tmp
=================================================
Platform -> loire :: Device -> kugo
The build may take up to 10 minutes. Please be patient ...
Building new kernel image ...
Loggin to /home/user/android/out/kernel-tmp/build_log_kugo
Copying new kernel image ...
=================================================
Clean up environment
Done!

The log reads this (translated from German):

make[1]: Entering directory „/home/user/android/out/kernel-tmp“
  GEN     ./Makefile
scripts/kconfig/conf  --silentoldconfig Kconfig
techpack/Kconfig:2: can't open file "techpack/data-kernel/drivers/rmnet/perf/Kconfig"
/home/user/android/kernel/sony/msm-4.14/kernel/scripts/kconfig/Makefile:38: recipe for target 'silentoldconfig' failed
make[3]: *** [silentoldconfig] Error 1
/home/user/android/kernel/sony/msm-4.14/kernel/Makefile:533: recipe for target 'silentoldconfig' failed
make[2]: *** [silentoldconfig] Error 2
make[1]: *** No rule exists to create target „include/config/auto.conf“, 
  required by „include/config/kernel.release“.  Quit.
make[1]: Leaving directory „/home/user/android/out/kernel-tmp“
Makefile:146: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2

What to do? I cannot build AOSP this way.

jaylinski commented 4 years ago

Kugo (Loire) won't receive support for kernel 4.14 according to https://github.com/sonyxperiadev/kernel-sony-msm-4.14-common/issues/8. But this user told me that he will add support: https://github.com/sonyxperiadev/device-sony-loire/pull/262#issuecomment-581885598

I'm currently trying to compile Suzu (Loire) with kernel 4.9, you can check out my progress here: https://github.com/sonyxperiadev/device-sony-loire/issues/263

eogut commented 4 years ago

Kugo (Loire) won't receive support for kernel 4.14 according to sonyxperiadev/kernel-sony-msm-4.14-common#8. But this user told me that he will add support: #262 (comment)

I'm currently trying to compile Suzu (Loire) with kernel 4.9, you can check out my progress here: #263

It would be great to have some sort of guide if you're successful. @MarijnS95 had informed me that I would need to port an older kernel but I'm very inexperienced with coding and can't bring up the time to manage to get Android 10 on my X Compact...

MarijnS95 commented 4 years ago

@eogut The goal is to have Android 10 and kernel 4.9 compile out of the box, how it worked before 4.14 came into existence. Other community members have put effort in to make this a valid compilation target again, and I'll try my best to assist where necessary. As long as @jaylinski reports and/or fixes issues in the build it should become available soon again.

It remains to be seen whether 4.14 will work out on Loire and Tone. While @bartcubbins is definitely working on the kernel side one of the major setbacks is hardware keymaster support. As far as I've been told there is no k4.14 compatible binary available meaning you'll loose out on hardware-backed encryption (afaik only key management) and the fingerprint sensor. But with some time I'm sure a wrapper of some sorts can be created.

All that aside I must have repeated this a couple times: We are working on running these devices on the latest Linux kernel. The less time we spend doing kernel conversions here (4.9 still receives maintenance) the more time we (hopefully) have left over to turn that "mainline Linux" project from a sluggish, half-working device into an appropriate daily driver.