AOSP cannot find libmincrypt when building recovery binary - Android Q&A, Help & Troubleshooting

I am compiling Marshmallow 6.0.1 release. I run:
Code:
$ . build/envsetup.sh
$ lunch # select arm_64 eng
$ make dist
Everything works fine until it tries to build the recovery binary:
Code:
target StaticExecutable: recovery (out/target/product/generic_arm64/obj/EXECUTABLES/recovery_intermediates/LINKED/recovery)
out/target/product/generic_arm64/obj/STATIC_LIBRARIES/libminadbd_intermediates/libminadbd.a(adb_auth_client.o): In function `adb_auth_verify(unsigned char*, unsigned char*, int)':
/home/tyler/AOSP/system/core/adb/adb_auth_client.cpp:154: undefined reference to `RSA_verify'
out/target/product/generic_arm64/obj/STATIC_LIBRARIES/libfusesideload_intermediates/libfusesideload.a(fuse_sideload.o): In function `fetch_block':
/home/tyler/AOSP/bootable/recovery/fuse_sideload.c:276: undefined reference to `SHA256_hash'
collect2: error: ld returned 1 exit status
build/core/executable_internal.mk:75: recipe for target 'out/target/product/generic_arm64/obj/EXECUTABLES/recovery_intermediates/LINKED/recovery' failed
make: *** [out/target/product/generic_arm64/obj/EXECUTABLES/recovery_intermediates/LINKED/recovery] Error 1
I tried searching for it using
Code:
$ find . | grep libmincrypt
and I found that I only have the static library built (libmincrypt.a). Do I need the shared lib version of libmincrypt for the Android.mk in $AOSP/bootable/recovery to work? If so, how can I rebuild and get the shared lib?

Related

[Q] Building CM from source problem (lunch not found)

I'm trying to port CM10 to my Pipo M8 RK3066 tablet.
I have followed alot of guides but I need some help: (I will edit the thread with all the problem I encounter).
Kubuntu 12.10 x64 running on VM
Here is what I did so far:
Android-SDK is installed in /opt/...
Code:
$ mkdir -p ~/bin
$ mkdir -p ~/android/system
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
export PATH=${PATH}:~/bin
$ cd ~/android/system/
$ repo init -u git://github.com/CyanogenMod/android.git -b jellybean
$ repo sync -j4
$ cd ~/android/system/vendor/cm
$ ./get-prebuilts
$ make -j4 otatools
+Extract boot.img from running device with dump_image
$ build/tools/device/mkvendor.sh pipo m8 /your/path/to/my/boot.img
lunch was not found, fixed with:
Code:
$ . build/envsetup.sh
New problem:
Code:
Construct recovery from boot
mkdir -p /home/mexus/android/system/out/target/product/m8/obj/PACKAGING/recovery_patch_intermediates/
target Jar: bouncycastle (/home/mexus/android/system/out/target/common/obj/JAVA_LIBRARIES/bouncycastle_intermediates/javalib.jar)
PATH=/home/mexus/android/system/out/host/linux-x86/bin:$PATH /home/mexus/android/system/out/host/linux-x86/bin/imgdiff /home/mexus/android/system/out/target/product/m8/boot.img /home/mexus/android/system/out/target/product/m8/recovery.img /home/mexus/android/system/out/target/product/m8/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p
target SharedLib: libutils (/home/mexus/android/system/out/target/product/m8/obj/SHARED_LIBRARIES/libutils_intermediates/LINKED/libutils.so)
[COLOR="Red"]Error: footer size 2130427508 != decompressed size 71179
failed to break apart source image[/COLOR]
make: *** [/home/mexus/android/system/out/target/product/m8/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p] Error 1
make: *** Waiting for unfinished jobs....
'/home/mexus/android/system/out/target/common/obj/JAVA_LIBRARIES/bouncycastle_intermediates/classes.dex' as 'classes.dex'...
[email protected]:~/android/system$
If it is asking you to install python then I would do so because python is one of the required packages for building Android. Make sure you use python version 2.6.x-2.7.x not python version 3 because it is not compatible with the current build system. Also can you post a log of the error message your getting?
Sent from my SCH-I535 using xda premium
shimp208 said:
If it is asking you to install python then I would do so because python is one of the required packages for building Android. Make sure you use python version 2.6.x-2.7.x not python version 3 because it is not compatible with the current build system. Also can you post a log of the error message your getting?
Sent from my SCH-I535 using xda premium
Click to expand...
Click to collapse
python is installed. I'm talking about python-lunch (it's nowhere mentioned in the guides)
mexusbg said:
python is installed. I'm talking about python-lunch (it's nowhere mentioned in the guides)
Click to expand...
Click to collapse
You should install it anyway.
Sent with my Sonic Screwdriver
Wolf Pup said:
You should install it anyway.
Sent with my Sonic Screwdriver
Click to expand...
Click to collapse
After python-lunch is installed:
Code:
mexu[email protected]:~/android/system$ build/tools/device/mkvendor.sh pipo m8 /home/mexus/boot.img
Arguments: pipo m8 /home/mexus/boot.img
Output will be in /home/mexus/android/system/device/pipo/m8
7908 blocks
Done!
Use the following command to set up your build environment:
lunch full_m8-eng
And use the follwowing command to build a recovery:
. build/tools/device/makerecoveries.sh full_m8-eng
[U][COLOR="Red"][email protected]:~/android/system$ lunch full_m8-eng
No such file: full_m8-eng[/COLOR][/U]
[email protected]:~/android/system$
lunch was not found, fixed with:
Code:
$ . build/envsetup.sh
New problem:
Code:
Construct recovery from boot
mkdir -p /home/mexus/android/system/out/target/product/m8/obj/PACKAGING/recovery_patch_intermediates/
target Jar: bouncycastle (/home/mexus/android/system/out/target/common/obj/JAVA_LIBRARIES/bouncycastle_intermediates/javalib.jar)
PATH=/home/mexus/android/system/out/host/linux-x86/bin:$PATH /home/mexus/android/system/out/host/linux-x86/bin/imgdiff /home/mexus/android/system/out/target/product/m8/boot.img /home/mexus/android/system/out/target/product/m8/recovery.img /home/mexus/android/system/out/target/product/m8/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p
target SharedLib: libutils (/home/mexus/android/system/out/target/product/m8/obj/SHARED_LIBRARIES/libutils_intermediates/LINKED/libutils.so)
[COLOR="Red"]Error: footer size 2130427508 != decompressed size 71179
failed to break apart source image[/COLOR]
make: *** [/home/mexus/android/system/out/target/product/m8/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p] Error 1
make: *** Waiting for unfinished jobs....
'/home/mexus/android/system/out/target/common/obj/JAVA_LIBRARIES/bouncycastle_intermediates/classes.dex' as 'classes.dex'...
[email protected]:~/android/system$
mexusbg said:
lunch was not found, fixed with:
Code:
$ . build/envsetup.sh
New problem:
Code:
Construct recovery from boot
mkdir -p /home/mexus/android/system/out/target/product/m8/obj/PACKAGING/recovery_patch_intermediates/
target Jar: bouncycastle (/home/mexus/android/system/out/target/common/obj/JAVA_LIBRARIES/bouncycastle_intermediates/javalib.jar)
PATH=/home/mexus/android/system/out/host/linux-x86/bin:$PATH /home/mexus/android/system/out/host/linux-x86/bin/imgdiff /home/mexus/android/system/out/target/product/m8/boot.img /home/mexus/android/system/out/target/product/m8/recovery.img /home/mexus/android/system/out/target/product/m8/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p
target SharedLib: libutils (/home/mexus/android/system/out/target/product/m8/obj/SHARED_LIBRARIES/libutils_intermediates/LINKED/libutils.so)
[COLOR="Red"]Error: footer size 2130427508 != decompressed size 71179
failed to break apart source image[/COLOR]
make: *** [/home/mexus/android/system/out/target/product/m8/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p] Error 1
make: *** Waiting for unfinished jobs....
'/home/mexus/android/system/out/target/common/obj/JAVA_LIBRARIES/bouncycastle_intermediates/classes.dex' as 'classes.dex'...
[email protected]:~/android/system$
Click to expand...
Click to collapse
hi
could you resolve above error
if yes then how

Ubuntu touch for xt1064?

Hey guys! I have a Motorola xt1064 and I would love to try Ubuntu touch, is there a port for it or could someone port for me? xD thanks in advance!
Sent from my XT1064 using XDA Free mobile app
EDIT: WRONG DEVICE!
Me too! Right now I'm actually trying to port it now using the official porting guide, However I am having some trouble When I run
Code:
make -j4
I get the error:
Code:
make: *** No rule to make target '/home/peter/phablet2/out/target/product/surnia/obj/STATIC_LIBRARIES/libmake_f2fs_intermediates/export_includes', needed by '/home/peter/phablet2/out/target/product/surnia/obj/EXECUTABLES/recovery_intermediates/import_includes'. Stop.
make: *** Waiting for unfinished jobs....
hello_there_everyone said:
EDIT: WRONG DEVICE! WHERE'S THE DELETE BUTTON!
Me too! Right now I'm actually trying to port it now using the official porting guide, However I am having some trouble When I run
Code:
make -j4
I get the error:
Code:
make: *** No rule to make target '/home/peter/phablet2/out/target/product/surnia/obj/STATIC_LIBRARIES/libmake_f2fs_intermediates/export_includes', needed by '/home/peter/phablet2/out/target/product/surnia/obj/EXECUTABLES/recovery_intermediates/import_includes'. Stop.
make: *** Waiting for unfinished jobs....
Click to expand...
Click to collapse
I have got this problem while trying to build Cm13, and I know how to solve it.
I will help you to solve this problem, but can you build for xt1521?
nguyenquangduc2000 said:
I have got this problem while trying to build Cm13, and I know how to solve it.
I will help you to solve this problem, but can you build for xt1521?
Click to expand...
Click to collapse
Yes I can help with building the xt1521, the builds are basically the same as the normal Moto e 2nd gen! Anyway, if you can help me with this problem I will be most pleased and then I can share my build on Github.
First you need download cyanogenmod tree, device specific code and extract proprietary blobs from your device . (You can follow this instruction https://wiki.cyanogenmod.org/w/Build_for_surnia ). After that, copy device, hardware and vendor folder from ~/android/system to ~/phablet
Then the most important thing is downloading vendor of motorola:
Code:
cd
sudo apt-get install svn
svn export [url]https://github.com/TheMuppets/proprietary_vendor_motorola/trunk/msm8916-common[/url]
svn export [url]https://github.com/TheMuppets/proprietary_vendor_motorola/trunk/surnia[/url]
You will see 2 folder named msm8916 and surnia in Home folder. Copy both 2 folder to phablet/vendor. It is enough for building. Goodluck
nguyenquangduc2000 said:
First you need download cyanogenmod tree, device specific code and extract proprietary blobs from your device . (You can follow this instruction
Code:
https://wiki.cyanogenmod.org/w/Build_for_surnia
). After that, copy device, hardware and vendor folder from ~/android/system to ~/phablet
Then the most important thing is downloading vendor of motorola:
Code:
cd
sudo apt-get install svn
svn export [https://github.com/TheMuppets/proprietary_vendor_motorola/trunk/msm8916-common
svn export https://github.com/TheMuppets/proprietary_vendor_motorola/trunk/surnia
You will see 2 folder named msm8916 and surnia in Home folder. Copy both 2 folder to phablet/vendor. It is enough for building. Goodluck
Click to expand...
Click to collapse
Hmm... After following your steps I now get a error when running
Code:
make recoveryimage
(As I forgot to do that before):
Code:
/home/peter/phablet2/kernel/motorola/msm8916/kernel/sched/core.c: In function 'cpu_cgroup_allow_attach':
/home/peter/phablet2/kernel/motorola/msm8916/kernel/sched/core.c:9713:18: error: invalid operands to binary != (have 'kuid_t' and 'kuid_t')
/home/peter/phablet2/kernel/motorola/msm8916/kernel/sched/core.c:9713:46: error: invalid operands to binary != (have 'kuid_t' and 'kuid_t')
/home/peter/phablet2/kernel/motorola/msm8916/scripts/Makefile.build:308: recipe for target 'kernel/sched/core.o' failed
Here is some info that may help:
Code:
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.2
TARGET_PRODUCT=full_surnia
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-21-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_BUILD_TYPE=release
BUILD_ID=KOT49H
OUT_DIR=/home/peter/phablet2/out
============================================
Thanks in advance for your help!
Make sure you have do
Code:
./extract-files.sh
And recheck your kernel folder. Go to ~/Android/system rerun
Code:
repo sync
source build/envsetup.sh
breakfast surnia
And copy kernel folder again
Have you done building system.img ?
nguyenquangduc2000 said:
Have you done building system.img ?
Click to expand...
Click to collapse
nguyenquangduc2000 said:
Make sure you have do
Code:
./extract-files.sh
And recheck your kernel folder. Go to ~/Android/system rerun
Code:
repo sync
source build/envsetup.sh
breakfast surnia
And copy kernel folder again
Click to expand...
Click to collapse
Unfortunately, after following your steps I still get the same error, however it could be because it was saying when extracting files
Code:
Remote object /system/[file name here] Doesn't exist
I will try again...
hello_there_everyone said:
Unfortunately, after following your steps I still get the same error, however it could be because it was saying when extracting files
Code:
Remote object /system/[file name here] Doesn't exist
I will try again...
Click to expand...
Click to collapse
I think @squid2 can help you !
Hmm... After downloading the kernel again it took 2 hours then produced this error
Code:
ake[1]: Leaving directory '/home/peter/phablet2/kernel/motorola/msm8916'
make -C kernel/motorola/msm8916 O=/home/peter/phablet2/out/target/product/surnia/obj/KERNEL_OBJ INSTALL_MOD_PATH=../../system ARCH=arm CROSS_COMPILE="/home/peter/phablet2/prebuilts/misc/linux-x86/ccache/ccache /home/peter/phablet2/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi-" modules_install
make[1]: Entering directory '/home/peter/phablet2/kernel/motorola/msm8916'
INSTALL drivers/staging/prima/wlan.ko
DEPMOD 3.10.49
make[1]: Leaving directory '/home/peter/phablet2/kernel/motorola/msm8916'
mdpath=`find /home/peter/phablet2/out/target/product/surnia/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; ko=`find $mpath/kernel -type f -name *.ko`; for i in $ko; do /home/peter/phablet2/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi-strip --strip-unneeded $i; mv $i /home/peter/phablet2/out/target/product/surnia/system/lib/modules/; done; fi
mdpath=`find /home/peter/phablet2/out/target/product/surnia/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; rm -rf $mpath; fi
mdpath=`find /home/peter/phablet2/out/target/product/surnia/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; ko=`find $mpath/kernel -type f -name *.ko`; for i in $ko; do /home/peter/phablet2/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi-strip --strip-unneeded $i; mv $i /home/peter/phablet2/out/target/product/surnia/system/lib/modules/; done; fi
mdpath=`find /home/peter/phablet2/out/target/product/surnia/system/lib/modules -type f -name modules.order`; if [ "$mdpath" != "" ];then mpath=`dirname $mdpath`; rm -rf $mpath; fi
target Prebuilt: (/home/peter/phablet2/out/target/product/surnia/kernel)
Target dt image: /home/peter/phablet2/out/target/product/surnia/dt.img
DTB combiner:
/home/peter/phablet2/out/host/linux-x86/bin/dtbTool: invalid option -- '2'
dtbTool [options] -o <output file> <input DTB path>
options:
--output-file/-o output file
--dtc-path/-p path to dtc
--page-size/-s page size in bytes
--verbose/-v verbose
--help/-h this help screen
device/motorola/surnia/mkbootimg.mk:9: recipe for target '/home/peter/phablet2/out/target/product/surnia/dt.img' failed
make: *** [/home/peter/phablet2/out/target/product/surnia/dt.img] Error 255
I feel like I'm close!
I think you can create dt.img independent with building Ubuntu. You can use
Code:
make dt.img
to build dt.img and then copy it to /home/peter/phablet2/out/target/product/surnia/
nguyenquangduc2000 said:
I think you can create dt.img independent with building Ubuntu. You can use
Code:
make dt.img
to build dt.img and then copy it to /home/peter/phablet2/out/target/product/surnia/
Click to expand...
Click to collapse
After running that code I now get this error:
Code:
build/core/base_rules.mk:529: warning: overriding recipe for target '/home/peter/phablet2/out/target/product/surnia/system/xbin/wget'
external/busybox/Android.mk:184: warning: ignoring old recipe for target '/home/peter/phablet2/out/target/product/surnia/system/xbin/wget'
build/core/Makefile:32: warning: overriding recipe for target '/home/peter/phablet2/out/target/product/surnia/system/etc/wifi/wpa_supplicant.conf'
build/core/base_rules.mk:529: warning: ignoring old recipe for target '/home/peter/phablet2/out/target/product/surnia/system/etc/wifi/wpa_supplicant.conf'
build/core/Makefile:32: warning: overriding recipe for target '/home/peter/phablet2/out/target/product/surnia/system/etc/apns-conf.xml'
build/core/base_rules.mk:529: warning: ignoring old recipe for target '/home/peter/phablet2/out/target/product/surnia/system/etc/apns-conf.xml'
PRODUCT_COPY_FILES device/motorola/surnia/audio/audio_effects.conf:system/etc/audio_effects.conf ignored.
build/core/Makefile:32: warning: overriding recipe for target '/home/peter/phablet2/out/target/product/surnia/system/bin/rild'
build/core/base_rules.mk:529: warning: ignoring old recipe for target '/home/peter/phablet2/out/target/product/surnia/system/bin/rild'
build/core/Makefile:32: warning: overriding recipe for target '/home/peter/phablet2/out/target/product/surnia/system/lib/libril.so'
build/core/base_rules.mk:529: warning: ignoring old recipe for target '/home/peter/phablet2/out/target/product/surnia/system/lib/libril.so'
No private recovery resources for TARGET_DEVICE surnia
device/motorola/surnia/mkbootimg.mk:16: warning: overriding recipe for target '/home/peter/phablet2/out/target/product/surnia/boot.img'
build/core/Makefile:489: warning: ignoring old recipe for target '/home/peter/phablet2/out/target/product/surnia/boot.img'
make: *** No rule to make target 'dt.img'. Stop.
I can feel we're nearly there...
hello_there_everyone said:
After running that code I now get this error:
Code:
build/core/base_rules.mk:529: warning: overriding recipe for target '/home/peter/phablet2/out/target/product/surnia/system/xbin/wget'
external/busybox/Android.mk:184: warning: ignoring old recipe for target '/home/peter/phablet2/out/target/product/surnia/system/xbin/wget'
build/core/Makefile:32: warning: overriding recipe for target '/home/peter/phablet2/out/target/product/surnia/system/etc/wifi/wpa_supplicant.conf'
build/core/base_rules.mk:529: warning: ignoring old recipe for target '/home/peter/phablet2/out/target/product/surnia/system/etc/wifi/wpa_supplicant.conf'
build/core/Makefile:32: warning: overriding recipe for target '/home/peter/phablet2/out/target/product/surnia/system/etc/apns-conf.xml'
build/core/base_rules.mk:529: warning: ignoring old recipe for target '/home/peter/phablet2/out/target/product/surnia/system/etc/apns-conf.xml'
PRODUCT_COPY_FILES device/motorola/surnia/audio/audio_effects.conf:system/etc/audio_effects.conf ignored.
build/core/Makefile:32: warning: overriding recipe for target '/home/peter/phablet2/out/target/product/surnia/system/bin/rild'
build/core/base_rules.mk:529: warning: ignoring old recipe for target '/home/peter/phablet2/out/target/product/surnia/system/bin/rild'
build/core/Makefile:32: warning: overriding recipe for target '/home/peter/phablet2/out/target/product/surnia/system/lib/libril.so'
build/core/base_rules.mk:529: warning: ignoring old recipe for target '/home/peter/phablet2/out/target/product/surnia/system/lib/libril.so'
No private recovery resources for TARGET_DEVICE surnia
device/motorola/surnia/mkbootimg.mk:16: warning: overriding recipe for target '/home/peter/phablet2/out/target/product/surnia/boot.img'
build/core/Makefile:489: warning: ignoring old recipe for target '/home/peter/phablet2/out/target/product/surnia/boot.img'
make: *** No rule to make target 'dt.img'. Stop.
I can feel we're nearly there...
Click to expand...
Click to collapse
Yes, we are near! https://drive.google.com/open?id=0B4uHuS2eIEMBZWRQRHljcXN5SGM
I do not know if dt.img of cm13 can work or not. But you can try it.
nguyenquangduc2000 said:
Yes, we are near! https://drive.google.com/open?id=0B4uHuS2eIEMBZWRQRHljcXN5SGM
I do not know if dt.img of cm13 can work or not. But you can try it.
Click to expand...
Click to collapse
Unfortunately it didn't work and I still get the same error...
hello_there_everyone said:
Unfortunately it didn't work and I still get the same error...
Click to expand...
Click to collapse
Uhm... Maybe you miss some thing in device and kernel folder. Rerun
Code:
repo sync
and try again.
Can you upload your source to Github? I will try to fix that problem
@hello_there_everyone
Have you finished building?

Kernel build error

Hi guys, I was following the kernel build guide when I hit an error:
Code:
CC init/version.o
LD init/built-in.o
drivers/built-in.o: In function `diag_process_apps_pkt':
/home/chris/android/kernel/android_kernel_sony_wukong/drivers/char/diag/diagfwd.c:1163: undefined reference to `msm_set_restart_mode'
drivers/built-in.o: In function `diag_dci_process_apps_pkt':
/home/chris/android/kernel/android_kernel_sony_wukong/drivers/char/diag/diag_dci.c:1719: undefined reference to `msm_set_restart_mode'
drivers/built-in.o: In function `set_battery_data':
/home/chris/android/kernel/android_kernel_sony_wukong/drivers/power/qpnp-bms.c:3980: undefined reference to `bms_batt_data'
/home/chris/android/kernel/android_kernel_sony_wukong/drivers/power/qpnp-bms.c:3980: undefined reference to `bms_batt_data_num'
drivers/built-in.o: In function `rm_high_pwr_cost_cpus':
/home/chris/android/kernel/android_kernel_sony_wukong/drivers/soc/qcom/msm_performance.c:1256: undefined reference to `get_cpu_pwr_stats'
Makefile:797: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1
Does anyone know what to make of it? I was building the Xperia C3 stock kernel using Linaro GCC toolchain.
Have you built it with the regular toolchain? The error suggests your sources are incomplete.
Slight thread necro, but since it came up first when googling for this missing reference...
The undefined reference is a linker error.
The linker can't find the symbol anywhere in the objects it has built. In my case, it was caused by a missing kernel option. To solve it, I grep'ed through my C and C++ sources for the function, found a likely candidate for it, checked the Makefile in the folder, then the option that was missing from my kernel config.
The Android build environment provides a convenience "cgrep" alias/script; I also made myself an "mkgrep" one-liner script:
Code:
#!/bin/bash
( find . -type f -name "?akefile" ; find . -type f -name "*.mk" ; find . -type f -name Kbuild ; find . -type f -name "*config") | xargs grep -i -Hn -E -e "$1"

[HELP] Kernel issues when trying to compile LineageOS

So, I am trying to port LineageOS 15.1 to the Galaxy S8, but I keep getting stuck here, receiving some weird errors. I am quite new to this whole world so I have no understanding of the errors. Can someone help me or point me into the direction of fixing this?
Code:
[ 0% 34/88264] Building Kernel Config
FAILED: /home/george_gica14/lineage/out/target/product/dreamlte/obj/KERNEL_OBJ/.config
/bin/bash -c "(make -j8 CFLAGS_MODULE=\"-fno-pic\" -C kernel/samsung/universal8895 O=/home/george_gica14/lineage/out/target/product/dreamlte/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\" aarch64-linux-a
ndroid-\" VARIANT_DEFCONFIG= SELINUX_DEFCONFIG= exynos8895-dreamlte_defconfig ) && (if [ ! -z \"\" ]; then echo \"Overriding kernel config with ''\"; echo >>
/home/george_gica14/lineage/out/target/product/dreamlte/obj/KERNEL_OBJ/.config; make -j8 -C kernel/samsung/universal8895 O=/home/george_gica14/lineage/out/target/product/dreaml
te/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\" aarch64-linux-android-\" oldconfig; fi ) && (make -j8 -C kernel/samsung/universal8895 O=/home/george_gica14/lineage/out/target/product/dreamlte/obj/KERN
EL_OBJ ARCH=arm64 CROSS_COMPILE=\" aarch64-linux-android-\" savedefconfig ) && (if [ ! -z \"\" ]; then echo \"Using additional config ''\"; kernel/samsung/u
niversal8895/scripts/kconfig/merge_config.sh -m -O /home/george_gica14/lineage/out/target/product/dreamlte/obj/KERNEL_OBJ /home/george_gica14/lineage/out/target/product/dreamlte/obj/KERNEL_OBJ/.config
kernel/samsung/universal8895/arch/arm64/configs/; make -j8 -C kernel/samsung/universal8895 O=/home/george_gica14/lineage/out/target/product/dreamlte/obj/KERNEL_OBJ ARCH=arm64 CRO
SS_COMPILE=\" aarch64-linux-android-\" KCONFIG_ALLCONFIG=/home/george_gica14/lineage/out/target/product/dreamlte/obj/KERNEL_OBJ/.config alldefconfig; fi )"
make: Entering directory '/home/george_gica14/lineage/kernel/samsung/universal8895'
make[1]: Entering directory '/home/george_gica14/lineage/out/target/product/dreamlte/obj/KERNEL_OBJ'
./scripts/fetch-latest-wireguard.sh: line 5: .wireguard-fetch-lock: Permission denied
./scripts/fetch-latest-wireguard.sh: line 5: .wireguard-fetch-lock: Permission denied
GEN ./Makefile
./scripts/fetch-latest-wireguard.sh: line 5: .wireguard-fetch-lock: Permission denied
Kconfig:15:warning: environment variable ANDROID_MAJOR_VERSION undefined
net/Kconfig:83: can't open file "net/wireguard/Kconfig"
/home/george_gica14/lineage/kernel/samsung/universal8895/scripts/kconfig/Makefile:110: recipe for target 'exynos8895-dreamlte_defconfig' failed
make[2]: *** [exynos8895-dreamlte_defconfig] Error 1
/home/george_gica14/lineage/kernel/samsung/universal8895/Makefile:592: recipe for target 'exynos8895-dreamlte_defconfig' failed
make[1]: *** [exynos8895-dreamlte_defconfig] Error 2
make[1]: Leaving directory '/home/george_gica14/lineage/out/target/product/dreamlte/obj/KERNEL_OBJ'
Makefile:152: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
make: Leaving directory '/home/george_gica14/lineage/kernel/samsung/universal8895'
[ 0% 43/88264] target thumb C++: libv8src_32 <= external/v8/src/asmjs/asm-typer.cc
ninja: build stopped: subcommand failed.
23:09:51 ninja failed with: exit status 1
#### failed to build some targets (01:20 (mm:ss)) ####
[email protected]:~/lineage$

Kernel compile failes

I have installed Linux Mint 19.3 Cinnamon (Kernel 5.3.0-40-generic) with 8 GB ram and an i5-8265U. But i also got the same error on my PC at home that's running on Ubuntu 19.10 with an Ryzen 5 3600 and 16 GB ram.
As toolchain have i installed on both machines the android nougat-aarch64 toolchain version 4.9 (android googlesource com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/+archive/nougat-release.tar.gz)
I want to compile the kernel for the Wiko View. So i downloaded the source code, of the Wiko View 32GB, from wiko's site (wikogeek com) and i followed the instructions of the BUILD-INSTRUCTIONS-WORKINGPROGRESS.txt, which is located inside the archive.
The BUILD-INSTRUCTIONS-WORKINGPROGRESS.txt content
Code:
These are the instructions to rebuilding the source code for the Lenny 3 device.
In the archive you will find sources for:
* Linux kernel
* platform
* toolchain
First of all, install Ubuntu 12.04 (64 bit)
It is recommended to use the prebuilt toolchain from Google, which can be downloaded from:
https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/+archive/master.tar.gz
Create a directory (for example: /tmp/toolchain ) and unpack the prebuilt toolchain:
1. Rebuilding kernel:
Create a directory (for example: /tmp/toolchain ) and unpack the prebuilt toolchain:
$ mkdir -p /tmp/toolchain
$ wget 'https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/+archive/master.tar.gz'
$ tar -zxvf aarch64-linux-android-4.9-master.tar.gz -C /tmp/toolchain
unpack kernel for rebuild
Must keep the kernel-3.18 and vendor in the same dir
$ tar -zxvf kernel-3.18.tar.gz
$ cd kernel/msm-3.18
$ gedit Makefile
Then modify the top level Makefile to set the right prefix for the cross compiler. Specifically, change
CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
to
CROSS_COMPILE ?= /tmp/toolchain/aarch64-linux-android-4.9-master/bin/aarch64-linux-android-
(or wherever your toolchain is located)
$ export TARGET_BUILD_VARIANT=user
$ export ARCH=arm64
$ mkdir out
$ make O=out TARGET_ARCH=arm64 v12bnlite-perf_defconfig
$ make O=out TARGET_ARCH=arm64
Output files:
Kernel: out/arch/arm64/boot/Image.gz or Image.gz-dtb
module: out/drivers/*/*.ko
How to clean
$ make clean
2. Rebuilding Mobule for Platform
It is only for modules are needed to using Android build system.
Please check its own install information under its folder for other module.
First install build envirment
$ sudo apt-get install git gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
install JDK 1.8
$ sudo apt-get update
$ sudo apt-get install openjdk-8-jdk
install repo
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Get android open source: version info - Android 7.1.0
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
$ git config --global user.name "Your Name"
$ git config --global user.email "[email protected]"
$ repo init -u https://android.googlesource.com/platform/manifest -b android-7.1.0_r1
$ repo sync
Copy module that you want to build - to original android open source
If same module exist in android open source, you should replace it. (no overwrite)
Use the android build method to rebuild every module
$ cd WORKING_DIRECTORY
$ source build/envsetup.sh
$ lunch aosp_arm-user
$ make -j4
3.Rebuilding the toolchain
To rebuild the toolchain please follow the instructions as provided by Google.
Everything worked, but when i execute the last command (make O=out TARGET_ARCH=arm64) it failes with missing separator in the Makefile
Log:
Code:
mika ~ mika-HP-Laptop-15-da1xxx ~ Documents > code > view-source > kernel > msm-3.18 > $ make O=out TARGET_ARCH=arm64
. . .
LD drivers/idle/built-in.o
../drivers/input/Makefile:34: --singyue-user----CONFIG_TINNO_FINGERPRINT2_N--------------y--
../drivers/input/Makefile:36: --singyue-user------------------Fingerprint2-N---
/home/mika/Documents/code/view-source/kernel/msm-3.18/vendor/tinno/Fingerprint2-N/kernel_macro_cfg:14: -- v12bnlite -- wik_fr -- msm8937 -- elan_96sa silead_6163 --
CC drivers/input/input.o
CC drivers/input/input-compat.o
CC drivers/input/input-mt.o
CC drivers/input/ff-core.o
LD drivers/input/input-core.o
CC drivers/input/mousedev.o
CC drivers/input/evdev.o
../drivers/input/../../../../vendor/tinno/Fingerprint2-N/KERNEL/qcom/kernel-3.18/drivers/input/fingerprint/Makefile:11: ---------------fingerprint_supprot--elan_96sa silead_6163--------------
CC drivers/input/../../../../vendor/tinno/Fingerprint2-N/KERNEL/qcom/kernel-3.18/drivers/input/fingerprint/elan_96sa/elan_fp_qsee.o
LD drivers/input/../../../../vendor/tinno/Fingerprint2-N/KERNEL/qcom/kernel-3.18/drivers/input/fingerprint/elan_96sa/built-in.o
CC drivers/input/../../../../vendor/tinno/Fingerprint2-N/KERNEL/qcom/kernel-3.18/drivers/input/fingerprint/fp_drv/fp_drv.o
LD drivers/input/../../../../vendor/tinno/Fingerprint2-N/KERNEL/qcom/kernel-3.18/drivers/input/fingerprint/fp_drv/built-in.o
CC drivers/input/../../../../vendor/tinno/Fingerprint2-N/KERNEL/qcom/kernel-3.18/drivers/input/fingerprint/silead_6163/slspi_qsee.o
LD drivers/input/../../../../vendor/tinno/Fingerprint2-N/KERNEL/qcom/kernel-3.18/drivers/input/fingerprint/silead_6163/built-in.o
LD drivers/input/../../../../vendor/tinno/Fingerprint2-N/KERNEL/qcom/kernel-3.18/drivers/input/fingerprint/built-in.o
CC drivers/input/joystick/xpad.o
LD drivers/input/joystick/built-in.o
CC drivers/input/keyboard/atkbd.o
CC drivers/input/keyboard/gpio_keys.o
LD drivers/input/keyboard/built-in.o
CC drivers/input/misc/gpio_event.o
CC drivers/input/misc/gpio_matrix.o
CC drivers/input/misc/gpio_input.o
CC drivers/input/misc/gpio_output.o
CC drivers/input/misc/gpio_axis.o
CC drivers/input/misc/keychord.o
CC drivers/input/misc/uinput.o
CC drivers/input/misc/hall_sensor.o
LD drivers/input/misc/built-in.o
LD drivers/input/tablet/built-in.o
CC drivers/input/touchscreen/of_touchscreen.o
CC drivers/input/touchscreen/gen_vkeys.o
../drivers/input/touchscreen/ft5364i/Makefile:11: *** missing separator. Stop.
../scripts/Makefile.build:402: recipe for target 'drivers/input/touchscreen/ft5364i' failed
make[4]: *** [drivers/input/touchscreen/ft5364i] Error 2
../scripts/Makefile.build:402: recipe for target 'drivers/input/touchscreen' failed
make[3]: *** [drivers/input/touchscreen] Error 2
../scripts/Makefile.build:402: recipe for target 'drivers/input' failed
make[2]: *** [drivers/input] Error 2
/home/mika/Documents/code/view-source/kernel/msm-3.18/Makefile:946: recipe for target 'drivers' failed
make[1]: *** [drivers] Error 2
make[1]: Leaving directory '/home/mika/Documents/code/view-source/kernel/msm-3.18/out'
Makefile:145: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
So i changed the "drivers/input/touchscreen/ft5364i/Makefile" from:
Code:
#
# Makefile for the input core drivers.
#
# Each configuration option enables a list of files.
obj-$(CONFIG_TOUCHSCREEN_FT5364I) += fts_ts.o
#obj-y += fts_ts.o
fts_ts-y += focaltech_core.o focaltech_ctl.o focaltech_ex_fun.o focaltech_gesture.o focaltech_flash.o
extlibs :=$(PWD)/drivers/input/touchscreen/ft5364i/ft_gesture_64bit_lib_v1.0_20140820.a
ldflagobj-y += fts_ts.o
obj-y s-y +=--whole-archive $(extlibs) --no-whole-archive
to:
Code:
#
# Makefile for the input core drivers.
#
# Each configuration option enables a list of files.
all:
[TAB]obj-$(CONFIG_TOUCHSCREEN_FT5364I) += fts_ts.o
[TAB]#obj-y += fts_ts.o
[TAB]fts_ts-y += focaltech_core.o focaltech_ctl.o focaltech_ex_fun.o focaltech_gesture.o focaltech_flash.o
[TAB]extlibs :=$(PWD)/drivers/input/touchscreen/ft5364i/ft_gesture_64bit_lib_v1.0_20140820.a
[TAB]ldflagobj-y += fts_ts.o
[TAB]obj-y s-y +=--whole-archive $(extlibs) --no-whole-archive
But now i get an error, that he can't find an file, but i don't know why the file will not be compiled.
Log:
Code:
mika ~ mika-HP-Laptop-15-da1xxx ~ Documents > code > view-source > kernel > msm-3.18 > $ make O=out TARGET_ARCH=arm64
make[1]: Entering directory '/home/mika/Documents/code/view-source/kernel/msm-3.18/out'
CHK include/config/kernel.release
Using .. as source for kernel
GEN ./Makefile
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CALL ../scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/config_data.h
../drivers/input/Makefile:34: --singyue-user----CONFIG_TINNO_FINGERPRINT2_N--------------y--
../drivers/input/Makefile:36: --singyue-user------------------Fingerprint2-N---
/home/mika/Documents/code/view-source/kernel/msm-3.18/vendor/tinno/Fingerprint2-N/kernel_macro_cfg:14: -- v12bnlite -- wik_fr -- msm8937 -- elan_96sa silead_6163 --
../drivers/input/../../../../vendor/tinno/Fingerprint2-N/KERNEL/qcom/kernel-3.18/drivers/input/fingerprint/Makefile:11: ---------------fingerprint_supprot--elan_96sa silead_6163--------------
CC drivers/input/touchscreen/tgesture/tgesture.o
LD drivers/input/touchscreen/tgesture/built-in.o
CC drivers/input/touchscreen/high_sensitive.o
LD drivers/input/touchscreen/built-in.o
/home/mika/aarch64-nougat-build-tools/bin/aarch64-linux-android-ld: cannot find drivers/input/touchscreen/ft5364i/built-in.o: No such file or directory
../scripts/Makefile.build:336: recipe for target 'drivers/input/touchscreen/built-in.o' failed
make[4]: *** [drivers/input/touchscreen/built-in.o] Error 1
../scripts/Makefile.build:402: recipe for target 'drivers/input/touchscreen' failed
make[3]: *** [drivers/input/touchscreen] Error 2
../scripts/Makefile.build:402: recipe for target 'drivers/input' failed
make[2]: *** [drivers/input] Error 2
/home/mika/Documents/code/view-source/kernel/msm-3.18/Makefile:946: recipe for target 'drivers' failed
make[1]: *** [drivers] Error 2
make[1]: Leaving directory '/home/mika/Documents/code/view-source/kernel/msm-3.18/out'
Makefile:145: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
Dose someone know why the error occurs.

Categories

Resources