[REFERENCE] How to compile an Android kernel

Search This thread

nathanchance

Senior Recognized Developer / Contributor
Jul 22, 2015
13,760
50,106
29
Mesa, AZ
nathanchance.dev
Fixed vdso32 :eek:

Now i´m at 31% with these error.
Remember that i reverted this commit because i don't have drivers/soc/qcom/smp2p_test.c in NitrogenOS project...

Code:
FAILED: TARGET_KERNEL_BINARIES 
/bin/bash -c "(PATH=/home/fsadino/Android_Build/NitrogenOS_pie/prebuilts/clang/host/linux-x86/clang-4691093/bin:\$PATH LD_LIBRARY_PATH=/home/fsadino/Android_Build/NitrogenOS_pie/prebuilts/clang/host/linux-x86/clang-4691093/lib64:\$LD_LIBRARY_PATH make -j8  CFLAGS_MODULE=\"-fno-pic\" -C kernel/oneplus/msm8996 O=/home/fsadino/Android_Build/NitrogenOS_pie/out/target/product/oneplus3/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\"aarch64-linux-android-\" CROSS_COMPILE_ARM32=\"arm-linux-androideabi-\" CLANG_TRIPLE=aarch64-linux-gnu- CC=\" clang\" Image.gz-dtb ) && (if grep -q '^CONFIG_OF=y' /home/fsadino/Android_Build/NitrogenOS_pie/out/target/product/oneplus3/obj/KERNEL_OBJ/.config; then 			echo -e \"Building DTBs\" ; 			PATH=/home/fsadino/Android_Build/NitrogenOS_pie/prebuilts/clang/host/linux-x86/clang-4691093/bin:\$PATH LD_LIBRARY_PATH=/home/fsadino/Android_Build/NitrogenOS_pie/prebuilts/clang/host/linux-x86/clang-4691093/lib64:\$LD_LIBRARY_PATH make -j8  CFLAGS_MODULE=\"-fno-pic\" -C kernel/oneplus/msm8996 O=/home/fsadino/Android_Build/NitrogenOS_pie/out/target/product/oneplus3/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\"aarch64-linux-android-\" CROSS_COMPILE_ARM32=\"arm-linux-androideabi-\" CLANG_TRIPLE=aarch64-linux-gnu- CC=\" clang\" dtbs; 		fi ) && (if grep -q '^CONFIG_MODULES=y' /home/fsadino/Android_Build/NitrogenOS_pie/out/target/product/oneplus3/obj/KERNEL_OBJ/.config; then 			echo -e \"Building Kernel Modules\" ; 			PATH=/home/fsadino/Android_Build/NitrogenOS_pie/prebuilts/clang/host/linux-x86/clang-4691093/bin:\$PATH LD_LIBRARY_PATH=/home/fsadino/Android_Build/NitrogenOS_pie/prebuilts/clang/host/linux-x86/clang-4691093/lib64:\$LD_LIBRARY_PATH make -j8  CFLAGS_MODULE=\"-fno-pic\" -C kernel/oneplus/msm8996 O=/home/fsadino/Android_Build/NitrogenOS_pie/out/target/product/oneplus3/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\"aarch64-linux-android-\" CROSS_COMPILE_ARM32=\"arm-linux-androideabi-\" CLANG_TRIPLE=aarch64-linux-gnu- CC=\" clang\" modules; 		fi )"
make: Entering directory '/home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996'
make[1]: Entering directory '/home/fsadino/Android_Build/NitrogenOS_pie/out/target/product/oneplus3/obj/KERNEL_OBJ'
  GEN     ./Makefile
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config/kernel.release
/home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996/scripts/setlocalversion: linha 185: scm: comando não reconhecido
  UPD     include/config/kernel.release
  GEN     ./Makefile
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  Using /home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996 as source for kernel
/home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996/sound/soc/codecs/tfa9890/tfa_container.c:291:7: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
                if (!prof->list[i].type == dscRegister) {
                    ^                   ~~
/home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996/sound/soc/codecs/tfa9890/tfa_container.c:291:7: note: add parentheses after the '!' to evaluate the comparison first
                if (!prof->list[i].type == dscRegister) {
                    ^
                     (                                )
/home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996/sound/soc/codecs/tfa9890/tfa_container.c:291:7: note: add parentheses around left hand side expression to silence this warning
                if (!prof->list[i].type == dscRegister) {
                    ^
                    (                  )
1 error generated.
/home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996/scripts/Makefile.build:265: recipe for target 'sound/soc/codecs/tfa9890/tfa_container.o' failed
make[4]: *** [sound/soc/codecs/tfa9890/tfa_container.o] Error 1
make[4]: ** Esperando que outros processos terminem.
  CC      kernel/trace/trace_stat.o
  LD      drivers/clocksource/built-in.o
  CC      kernel/trace/trace_printk.o
  CC      kernel/trace/trace_sched_switch.o
  LD      fs/kernfs/built-in.o
  CC      fs/nls/nls_base.o
  CC      fs/notify/fsnotify.o
  LD      drivers/clk/msm/mdss/built-in.o
  LD      drivers/clk/msm/built-in.o
  LD      drivers/clk/built-in.o
/home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996/scripts/Makefile.build:410: recipe for target 'sound/soc/codecs' failed
make[3]: *** [sound/soc/codecs] Error 2
/home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996/scripts/Makefile.build:410: recipe for target 'sound/soc' failed
make[2]: *** [sound/soc] Error 2
/home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996/Makefile:974: recipe for target 'sound' failed
make[1]: *** [sound] Error 2
make[1]: ** Esperando que outros processos terminem.
  CC      drivers/media/platform/msm/camera_v2/common/cam_soc_api.o
In file included from /home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996/drivers/input/touchscreen/synaptics_driver_s3320.c:2562:
/home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996/drivers/input/touchscreen/fw_update_v7.if:1692:20: error: use of logical '&&' with constant operand [-Werror,-Wconstant-logical-operand]
        if (add_buf[4]>>5 && 0x2)
                          ^  ~~~
/home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996/drivers/input/touchscreen/fw_update_v7.if:1692:20: note: use '&' for a bitwise operation
        if (add_buf[4]>>5 && 0x2)
                          ^~
                          &
/home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996/drivers/input/touchscreen/fw_update_v7.if:1692:20: note: remove constant to silence this warning
        if (add_buf[4]>>5 && 0x2)
                         ~^~~~~~
1 error generated.
/home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996/scripts/Makefile.build:265: recipe for target 'drivers/input/touchscreen/synaptics_driver_s3320.o' failed
make[4]: *** [drivers/input/touchscreen/synaptics_driver_s3320.o] Error 1
/home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996/scripts/Makefile.build:410: recipe for target 'drivers/input/touchscreen' failed
make[3]: *** [drivers/input/touchscreen] Error 2
/home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996/scripts/Makefile.build:410: recipe for target 'drivers/input' failed
make[2]: *** [drivers/input] Error 2
make[2]: ** Esperando que outros processos terminem.
/home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996/Makefile:974: recipe for target 'drivers' failed
make[1]: *** [drivers] Error 2
make[1]: Leaving directory '/home/fsadino/Android_Build/NitrogenOS_pie/out/target/product/oneplus3/obj/KERNEL_OBJ'
Makefile:145: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
make: Leaving directory '/home/fsadino/Android_Build/NitrogenOS_pie/kernel/oneplus/msm8996'
[ 31% 29491/92497] build /home/fsadino/Android_Bu...cy_neverallows_intermediates/sepolicy_neverallows
/home/fsadino/Android_Build/NitrogenOS_pie/out/host/linux-x86/bin/checkpolicy:  loading policy configuration from /home/fsadino/Android_Build/NitrogenOS_pie/out/target/product/oneplus3/obj/ETC/sepolicy_neverallows_intermediates/policy.conf
/home/fsadino/Android_Build/NitrogenOS_pie/out/host/linux-x86/bin/checkpolicy:  policy configuration loaded
/home/fsadino/Android_Build/NitrogenOS_pie/out/host/linux-x86/bin/checkpolicy:  writing binary representation (version 30) to /home/fsadino/Android_Build/NitrogenOS_pie/out/target/product/oneplus3/obj/ETC/sepolicy_neverallows_intermediates/sepolicy_neverallows
[ 31% 29492/92497] build /home/fsadino/Android_Bu.../obj/ETC/sepolicy.recovery_intermediates/sepolicy
/home/fsadino/Android_Build/NitrogenOS_pie/out/host/linux-x86/bin/checkpolicy:  loading policy configuration from /home/fsadino/Android_Build/NitrogenOS_pie/out/target/product/oneplus3/obj/ETC/sepolicy.recovery_intermediates/sepolicy.recovery.conf
/home/fsadino/Android_Build/NitrogenOS_pie/out/host/linux-x86/bin/checkpolicy:  policy configuration loaded
/home/fsadino/Android_Build/NitrogenOS_pie/out/host/linux-x86/bin/checkpolicy:  writing binary representation (version 30) to /home/fsadino/Android_Build/NitrogenOS_pie/out/target/product/oneplus3/obj/ETC/sepolicy.recovery_intermediates/sepolicy.tmp
ninja: build stopped: subcommand failed.
20:49:34 ninja failed with: exit status 1

#### failed to build some targets (03:18 (mm:ss)) ####

fsadino@xda-developers:~/Android_Build/NitrogenOS_pie$

Revert this commit: https://github.com/FSadino/android_...mmit/9af64df256276978ad8d8539b4109effa422bee6

You have the toggable one: https://github.com/FSadino/android_...mmit/b1f51dc25045f13ed049ecf04ea66ef74c3d8112

I would recommend fixing those warnings when you can so that you can turn -Werror back on but it's not critical to do so.

I just realized that you have a OnePlus 3. For whatever reason, I don't know anyone who has been able to get the OnePlus 3 kernel to boot with clang. Don't know why, it must be some OnePlus specific driver because other msm8998 devices can do it just fine. Not sure if anyone has tried it recently or succeeded, I haven't paid much attention to the Android kernel scene in a bit.
 
  • Like
Reactions: FSadino

saurabhs935

New member
Aug 9, 2019
1
0
Drivers in Wahoo kernel

You need to change all of the '=m' entries in the defconfig to '=y'.

Yeah I understood we are converting modules to object but after replacing "=m" with "=y" it stucked in google logo.

Sent from my OnePlus6 using XDA Labs



Yeah I understood that we've converted modules to kernel object. But the
device stucked in google LOGO.
 

FSadino

Retired Forum Moderator
Oct 27, 2011
3,802
5,228
Blue River City
OnePlus One
OnePlus 3
Revert this commit: https://github.com/FSadino/android_...mmit/9af64df256276978ad8d8539b4109effa422bee6

You have the toggable one: https://github.com/FSadino/android_...mmit/b1f51dc25045f13ed049ecf04ea66ef74c3d8112

I would recommend fixing those warnings when you can so that you can turn -Werror back on but it's not critical to do so.

I just realized that you have a OnePlus 3. For whatever reason, I don't know anyone who has been able to get the OnePlus 3 kernel to boot with clang. Don't know why, it must be some OnePlus specific driver because other msm8998 devices can do it just fine. Not sure if anyone has tried it recently or succeeded, I haven't paid much attention to the Android kernel scene in a bit.

I had to fix qcacld-2.0 errors with other @kenny3fcb commits and build finished, but as you said, it doesn't boot :(
Tried to adb -d logcat &> log.txt but without sucess, log.txt is empty! Is there any other way to take log from boot?

EDIT: Forget this Nathan, this is to much for me... Thank you very much for your support! :good:
 
Last edited:
  • Like
Reactions: nathanchance

mastakillah576

New member
Oct 1, 2016
3
0
??

i have both a image and image.gz in the boot folder. Both same size, well the image in the zip in the same size as the image file. Did i do something wrong or can i use either? thx for this guide

---------- Post added at 02:59 AM ---------- Previous post was at 02:31 AM ----------

Revert this commit: https://github.com/FSadino/android_...mmit/9af64df256276978ad8d8539b4109effa422bee6

You have the toggable one: https://github.com/FSadino/android_...mmit/b1f51dc25045f13ed049ecf04ea66ef74c3d8112

I would recommend fixing those warnings when you can so that you can turn -Werror back on but it's not critical to do so.

I just realized that you have a OnePlus 3. For whatever reason, I don't know anyone who has been able to get the OnePlus 3 kernel to boot with clang. Don't know why, it must be some OnePlus specific driver because other msm8998 devices can do it just fine. Not sure if anyone has tried it recently or succeeded, I haven't paid much attention to the Android kernel scene in a bit.

im sry i just saw the quote you statement. i have both a image and image.gz in the boot folder. Both same size, well the image in the zip in the same size as the image file. Did i do something wrong or can i use either? thx for this guide
 

v1da

Senior Member
Jun 26, 2017
112
34
OnePlus 9 Pro
I compiled my first kernel successfully. AFter that,
I want to modify 'make menuconfig' step.
From what step do I have to go? to modify menuconfig? in the kernel source
I just want to add wlan support/configuration in menuconfig, and then recompile new kernel again

I used this command when I compiled the kernel
Code:
make clean && make mrproper
mkdir ../out
make O=../out mido_defconfig
make O=../out -j4
 

nathanchance

Senior Recognized Developer / Contributor
Jul 22, 2015
13,760
50,106
29
Mesa, AZ
nathanchance.dev
i have both a image and image.gz in the boot folder. Both same size, well the image in the zip in the same size as the image file. Did i do something wrong or can i use either? thx for this guide

No, the Image.gz is most likely the one you want to use (gzip compressed Image). I don't know of a device off the top of my head that uses a decompressed kernel image.

I compiled my first kernel successfully. AFter that,
I want to modify 'make menuconfig' step.
From what step do I have to go? to modify menuconfig? in the kernel source
I just want to add wlan support/configuration in menuconfig, and then recompile new kernel again

I used this command when I compiled the kernel
Code:
make clean && make mrproper
mkdir ../out
make O=../out mido_defconfig
make O=../out -j4

You'll want to run:

make O=../out menuconfig

after make O=../out mido_defconfig.
 

v1da

Senior Member
Jun 26, 2017
112
34
OnePlus 9 Pro
No, the Image.gz is most likely the one you want to use (gzip compressed Image). I don't know of a device off the top of my head that uses a decompressed kernel image.



You'll want to run:

make O=../out menuconfig

after make O=../out mido_defconfig.

thanks sir,
Another problem I found is like I said before, I build successfully and it boot successfully on my android device
When I look at in the build messages, I found out this:
Code:
Building modules, stage 2.
[B]MODPOST 0 modules[/B] 
GZIP arch/arm64/boot/Image.gz
CAT arch/arm64/boot/Image.gz-dtb

The modules are not build with MODPOST 0 modules
How can I solve this, I compiled many times, but still doesn't built modules
I search on Google, I cannot find the solutions related with android kernel

toolchain: https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 -b pie-release toolchain64
 
Last edited:

darkidz555

Senior Member
Oct 13, 2011
514
236
Hey guys anyone here success OC msm8998 big core more than 2592mhz ?? If anyone have any idea I would love to learn.

For now currently I only able to OC GPU to max 850mhz but for CPU is kinda tricky I don't know how what is the 0x0004044c and 0x0660006c

Would appreciate if anyone will help gracias
 

nathanchance

Senior Recognized Developer / Contributor
Jul 22, 2015
13,760
50,106
29
Mesa, AZ
nathanchance.dev
thanks sir,
Another problem I found is like I said before, I build successfully and it boot successfully on my android device
When I look at in the build messages, I found out this:
Code:
Building modules, stage 2.
[B]MODPOST 0 modules[/B] 
GZIP arch/arm64/boot/Image.gz
CAT arch/arm64/boot/Image.gz-dtb

The modules are not build with MODPOST 0 modules
How can I solve this, I compiled many times, but still doesn't built modules
I search on Google, I cannot find the solutions related with android kernel

toolchain: https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 -b pie-release toolchain64

Do you have any modules enabled in your config?
 
  • Like
Reactions: v1da

v1da

Senior Member
Jun 26, 2017
112
34
OnePlus 9 Pro
Do you have any modules enabled in your config?

I did:
Code:
--- [*] Enable loadablemodule support --->

[*] Forced module loading

[*] Module unloading

[*] Forced Module unloading

<*> Generic IEEE 802.11 Networking Stack (mac80211)

<*> Ralink rt27xx/rt28xx/rt30xx (USB) support

[*] rt2800usb – include support for rt35xx devices

[*] Realtek RTL8192CU/RTL8188CU USB Wireless Network Adapter

With those options, after compiling the kernel, there is no modules built

When giving M without *, the modules are built outside
The device is mido (PIE)
Sources I tried: https://github.com/andersonmendess/android_kernel_xiaomi_mido
https://github.com/penglezos/android_kernel_xiaomi_msm8953

My friend also tried to compile including modules, he still got MODPOST 0 MODULES
 
Last edited:

nathanchance

Senior Recognized Developer / Contributor
Jul 22, 2015
13,760
50,106
29
Mesa, AZ
nathanchance.dev
I did:
Code:
--- [*] Enable loadablemodule support --->

[*] Forced module loading

[*] Module unloading

[*] Forced Module unloading

<*> Generic IEEE 802.11 Networking Stack (mac80211)

<*> Ralink rt27xx/rt28xx/rt30xx (USB) support

[*] rt2800usb – include support for rt35xx devices

[*] Realtek RTL8192CU/RTL8188CU USB Wireless Network Adapter

With those options, after compiling the kernel, there is no modules built

When giving M without *, the modules are built outside
The device is mido (PIE)
Sources I tried: https://github.com/andersonmendess/android_kernel_xiaomi_mido
https://github.com/penglezos/android_kernel_xiaomi_msm8953

My friend also tried to compile including modules, he still got MODPOST 0 MODULES

You don't seem to be describing a problem... the regular * means that the drivers are built in, M means they are built as modules.
 
  • Like
Reactions: v1da
No, the Image.gz is most likely the one you want to use (gzip compressed Image). I don't know of a device off the top of my head that uses a decompressed kernel image.

I compiled my first kernel successfully. AFter that,
I want to modify 'make menuconfig' step.
From what step do I have to go? to modify menuconfig? in the kernel source
I just want to add wlan support/configuration in menuconfig, and then recompile new kernel again

I used this command when I compiled the kernel


You'll want to run:

make O=../out menuconfig

after make O=../out mido_defconfig.


General Android question
What does make O= mean
And is the above command making and Android menuconfg rather than a x86 menuconfg ?

In general my question is
Is if I have an xyz chipset in Arch arm.
And there is a specific deconfig

Is there a way to make menuconfg for that chipset ? Thanks
 

v1da

Senior Member
Jun 26, 2017
112
34
OnePlus 9 Pro
You don't seem to be describing a problem... the regular * means that the drivers are built in, M means they are built as modules.

I meant, giving * means that the drivers are built in, but I thought MODPOST 0 MODULES means the modules are not built in.
and the building message should show MODPOST 5 MODULES even if the modules are built in, not MODPOST 0 MODULES?
sorry for NOOB
 

nathanchance

Senior Recognized Developer / Contributor
Jul 22, 2015
13,760
50,106
29
Mesa, AZ
nathanchance.dev
I meant, giving * means that the drivers are built in, but I thought MODPOST 0 MODULES means the modules are not built in.
and the building message should show MODPOST 5 MODULES even if the modules are built in, not MODPOST 0 MODULES?
sorry for NOOB

No, you have it backwards; MODPOST 0 MODULES means that all drivers are built in. MODPOST # MODULES means that there are .ko (kernel module) files that needs to be gathered up and flashed to have access to the drivers.

What does make O= mean

It means build the object files in a separate directory rather than

And is the above command making and Android menuconfg rather than a x86 menuconfg ?

It depends on what the value of ARCH is and the config being specified to make.

In general my question is
Is if I have an xyz chipset in Arch arm.
And there is a specific deconfig

Is there a way to make menuconfg for that chipset ? Thanks

Code:
$ make ARCH=<arch> O=out <config> menuconfig

is the command that you are looking for, with <arch> replaced with your actual architecture (like arm or arm64) and <config> replaced with the actual name of the config file in arch/<arch>/configs. Hope that helps!
 
  • Like
Reactions: v1da

harrison_hx

New member
Sep 6, 2019
2
0
Saint-Petersburg
Hello. Please help me. Did everything according to instructions. I added the module " TTL " target support (I will need to use the command make modules, but the error came out earlier). Device: Asus ZenFone 3 4/64 (ZE552KL). Source code downloaded from the official website Asus. Cross-compiler downloaded from your link for arm64 (64-bit). I also removed the GCC wrapper according to your instructions (without this removal, errors have appeared before).
P.S. Since I do not know the language well, I used an online translator, sorry. :cowboy:

Additional information.
Code:
[B]harry@harry-w:~$[/B] adb shell
[B]ASUS_Z012D:/ $[/B] uname -a
Linux localhost 3.18.66-perf-gc8c6e85-00001-g20a3234 #1 SMP PREEMPT Fri Aug 3 13:22:06 CST 2018 aarch64
[B]ASUS_Z012D:/ $[/B] cat /proc/version
Linux version 3.18.66-perf-gc8c6e85-00001-g20a3234 (android@mcrd1-19) (gcc version 4.9.x 20150123 (prerelease) (GCC) ) #1 SMP PREEMPT Fri Aug 3 13:22:06 CST 2018

The entire output does not fit, you have a limit of 30,000 characters. I added only the beginning and end of the output. Since I'm a new user, I can't post external links, so I can't give a link to a file with full output.
Although here the reference resolves.
Code:
Here is a link to the full output file - https://yadi.sk/d/2kEi1UPkydiKXw
or here - https://del.dog/ovufituzaq.coffeescript
Part of the output.
Code:
[B]harry@harry-w:~$[/B] cd ~/cross_compiler/
[B]harry@harry-w:~/cross_compiler$[/B] export ARCH=arm64 && export SUBARCH=arm64
[B]harry@harry-w:~/cross_compiler$[/B] export CROSS_COMPILE=/home/harry/cross_compiler/bin/aarch64-linux-android-
[B]harry@harry-w:~/cross_compiler$[/B] cd /home/harry/asus_sc/
[B]harry@harry-w:~/asus_sc$[/B] make clean
arch/arm64/Makefile:130: warning: overriding recipe for target 'vdso_prepare'
arch/arm64/Makefile:120: warning: ignoring old recipe for target 'vdso_prepare'
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CLEAN   .
  CLEAN   arch/arm64/kernel/vdso
  CLEAN   arch/arm64/kernel
  CLEAN   crypto/asymmetric_keys
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CLEAN   kernel/time
  CLEAN   kernel
  CLEAN   lib
  CLEAN   net/wireless
  CLEAN   security/selinux
  CLEAN   usr
arch/arm64/boot/Makefile:46: warning: overriding recipe for target 'arch/arm64/boot/Image-dtb'
arch/arm64/boot/Makefile:33: warning: ignoring old recipe for target 'arch/arm64/boot/Image-dtb'
  CLEAN   arch/arm64/boot/dts/qcom
  CLEAN   .tmp_versions
[B]harry@harry-w:~/asus_sc$[/B] make mrproper
arch/arm64/Makefile:130: warning: overriding recipe for target 'vdso_prepare'
arch/arm64/Makefile:120: warning: ignoring old recipe for target 'vdso_prepare'
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


arch/arm64/boot/Makefile:46: warning: overriding recipe for target 'arch/arm64/boot/Image-dtb'
arch/arm64/boot/Makefile:33: warning: ignoring old recipe for target 'arch/arm64/boot/Image-dtb'
  CLEAN   scripts/basic
  CLEAN   scripts/dtc
  CLEAN   scripts/genksyms
  CLEAN   scripts/kconfig
  CLEAN   scripts/mod
  CLEAN   scripts/selinux/genheaders
  CLEAN   scripts/selinux/mdp
  CLEAN   scripts
  CLEAN   include/config include/generated arch/arm64/include/generated
  CLEAN   .config .config.old .version include/generated/uapi/linux/version.h Module.symvers signing_key.priv signing_key.x509 x509.genkey
[B]harry@harry-w:~/asus_sc$[/B] make ze552kl-perf_defconfig
arch/arm64/Makefile:130: warning: overriding recipe for target 'vdso_prepare'
arch/arm64/Makefile:120: warning: ignoring old recipe for target 'vdso_prepare'
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
[B]harry@harry-w:~/asus_sc$[/B] make menuconfig
arch/arm64/Makefile:130: warning: overriding recipe for target 'vdso_prepare'
arch/arm64/Makefile:120: warning: ignoring old recipe for target 'vdso_prepare'
  HOSTCC  scripts/kconfig/mconf.o
  HOSTCC  scripts/kconfig/lxdialog/checklist.o
  HOSTCC  scripts/kconfig/lxdialog/util.o
  HOSTCC  scripts/kconfig/lxdialog/inputbox.o
  HOSTCC  scripts/kconfig/lxdialog/textbox.o
  HOSTCC  scripts/kconfig/lxdialog/yesno.o
  HOSTCC  scripts/kconfig/lxdialog/menubox.o
  HOSTLD  scripts/kconfig/mconf
scripts/kconfig/mconf  Kconfig


*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.





# [B]THIS MODULE HAS BEEN ADDED[/B]
#  │ Symbol: IP_NF_TARGET_TTL [=n]                                             
#  │ Type  : tristate                                                          
#  │ Prompt: "TTL" target support                                              
#  │   Location:                                                               
#  │     -> Networking support (NET [=y])                                      
#  │       -> Networking options                                               
#  │         -> Network packet filtering framework (Netfilter) (NETFILTER [=   
#  │           -> IP: Netfilter Configuration                                  
#  │             -> IP tables support (required for filtering/masq/NAT) (IP_   
#  │ (1)           -> Packet mangling (IP_NF_MANGLE [=y])                      
#  │   Defined at net/ipv4/netfilter/Kconfig:339                               
#  │   Depends on: NET [=y] && INET [=y] && NETFILTER [=y] && IP_NF_IPTABLES   
#  │   Selects: NETFILTER_XT_TARGET_HL [=n]                                 






[B]harry@harry-w:~/asus_sc$[/B] make -j$(nproc --all)
arch/arm64/Makefile:130: warning: overriding recipe for target 'vdso_prepare'
arch/arm64/Makefile:120: warning: ignoring old recipe for target 'vdso_prepare'
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


arch/arm64/Makefile:130: warning: overriding recipe for target 'vdso_prepare'
arch/arm64/Makefile:120: warning: ignoring old recipe for target 'vdso_prepare'
scripts/kconfig/conf  --silentoldconfig Kconfig
arch/arm64/Makefile:130: warning: overriding recipe for target 'vdso_prepare'
arch/arm64/Makefile:120: warning: ignoring old recipe for target 'vdso_prepare'
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md

             [B]HERE THE FILE IS SPLIT[/B]

  CC      drivers/misc/qcom/qdsp6v2/audio_mp3.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  LD      drivers/media/tuners/tda18271.o
  LD      drivers/media/tuners/built-in.o
scripts/Makefile.build:402: recipe for target 'drivers/media' failed
make[1]: *** [drivers/media] Error 2
make[1]: *** Waiting for unfinished jobs....
  CC      drivers/misc/qseecom.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/mmc/host/sdhci-pltfm.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/net/ppp/pppoe.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/mmc/core/sdio.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/misc/hdcp.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/misc/compat_qseecom.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/mmc/core/sdio_ops.o
  CC      drivers/misc/qcom/qdsp6v2/audio_amrnb.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/net/ppp/pppolac.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/net/ppp/pppopns.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/misc/qcom/qdsp6v2/audio_amrwb.o
  CC      drivers/mmc/core/sdio_bus.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/misc/type-c-pericom.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/mmc/host/sdhci-msm.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/mmc/core/sdio_cis.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/mmc/core/sdio_io.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/mmc/core/sdio_irq.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/misc/qcom/qdsp6v2/audio_amrwbplus.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  LD      drivers/net/ppp/built-in.o
scripts/Makefile.build:402: recipe for target 'drivers/net' failed
make[1]: *** [drivers/net] Error 2
  CC      drivers/mmc/host/sdhci-msm-ice.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/mmc/core/quirks.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/misc/qcom/qdsp6v2/audio_evrc.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/mmc/core/slot-gpio.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/mmc/core/debugfs.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/mmc/host/cmdq_hci.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/misc/qcom/qdsp6v2/audio_qcelp.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/misc/qcom/qdsp6v2/amrwb_in.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/misc/qcom/qdsp6v2/audio_hwacc_effects.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/misc/qcom/qdsp6v2/ultrasound/usf.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  CC      drivers/misc/qcom/qdsp6v2/ultrasound/usfcdev.o
  CC      drivers/misc/qcom/qdsp6v2/ultrasound/q6usm.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md


  LD      drivers/mmc/core/mmc_core.o
  LD      drivers/mmc/core/built-in.o
  LD      drivers/mmc/host/built-in.o
  LD      drivers/mmc/built-in.o
  LD      drivers/misc/qcom/qdsp6v2/ultrasound/built-in.o
  LD      drivers/misc/qcom/qdsp6v2/built-in.o
  LD      drivers/misc/qcom/built-in.o
  LD      drivers/misc/built-in.o
Makefile:969: recipe for target 'drivers' failed
make: *** [drivers] Error 2
 
Last edited:

palmbeach05

Senior Member
Oct 12, 2012
4,333
1,853
Motorola Atrix HD
AT&T Samsung Galaxy S III
Hello. Please help me. Did everything according to instructions. I added the module " TTL " target support (I will need to use the command make modules, but the error came out earlier). Device: Asus ZenFone 3 4/64 (ZE552KL). Source code downloaded from the official website Asus. Cross-compiler downloaded from your link for arm64 (64-bit). I also removed the GCC wrapper according to your instructions (without this removal, errors have appeared before).
P.S. Since I do not know the language well, I used an online translator, sorry. :cowboy:

Additional information.


The entire output does not fit, you have a limit of 30,000 characters. I added only the beginning and end of the output. Since I'm a new user, I can't post external links, so I can't give a link to a file with full output.
Although here the reference resolves.

Part of the output.

Use dog.del or pastebin to attach all that next tine
 

harrison_hx

New member
Sep 6, 2019
2
0
Saint-Petersburg
Use dog.del or pastebin to attach all that next tine

I added to del.dog, but the page took a very long time to load. On pastebin it says that my file is too large :(

I tried using gcc version 8.x, the process accelerated, but other errors appeared.

Code:
[B]harry@harry-w:~$[/B] cd ~/cross_compiler/
[B]harry@harry-w:~/cross_compiler$[/B] export ARCH=arm64 && export SUBARCH=arm64
[B]harry@harry-w:~/cross_compiler$[/B] export CROSS_COMPILE=/home/harry/cross_compiler/bin/aarch64-linux-android-
[B]harry@harry-w:~/cross_compiler$[/B] cd /home/harry/asus_sc/
[B]harry@harry-w:~/asus_sc$[/B] make clean
arch/arm64/Makefile:130: warning: overriding recipe for target 'vdso_prepare'
arch/arm64/Makefile:120: warning: ignoring old recipe for target 'vdso_prepare'
  CLEAN   .
  CLEAN   arch/arm64/kernel/vdso
  CLEAN   arch/arm64/kernel
  CLEAN   usr
arch/arm64/boot/Makefile:46: warning: overriding recipe for target 'arch/arm64/boot/Image-dtb'
arch/arm64/boot/Makefile:33: warning: ignoring old recipe for target 'arch/arm64/boot/Image-dtb'
  CLEAN   .tmp_versions
[B]harry@harry-w:~/asus_sc$[/B] 
[B]harry@harry-w:~/asus_sc$[/B] make mrproper
arch/arm64/Makefile:130: warning: overriding recipe for target 'vdso_prepare'
arch/arm64/Makefile:120: warning: ignoring old recipe for target 'vdso_prepare'
arch/arm64/boot/Makefile:46: warning: overriding recipe for target 'arch/arm64/boot/Image-dtb'
arch/arm64/boot/Makefile:33: warning: ignoring old recipe for target 'arch/arm64/boot/Image-dtb'
  CLEAN   scripts/basic
  CLEAN   scripts/dtc
  CLEAN   scripts/genksyms
  CLEAN   scripts/kconfig
  CLEAN   scripts/mod
  CLEAN   scripts/selinux/genheaders
  CLEAN   scripts/selinux/mdp
  CLEAN   scripts
  CLEAN   include/config include/generated arch/arm64/include/generated
  CLEAN   .config .config.old .version include/generated/uapi/linux/version.h
[B]harry@harry-w:~/asus_sc$[/B] 
[B]harry@harry-w:~/asus_sc$[/B] make ze552kl-perf_defconfig
arch/arm64/Makefile:130: warning: overriding recipe for target 'vdso_prepare'
arch/arm64/Makefile:120: warning: ignoring old recipe for target 'vdso_prepare'
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
[B]harry@harry-w:~/asus_sc$ [/B]
[B]harry@harry-w:~/asus_sc$[/B] make menuconfig
arch/arm64/Makefile:130: warning: overriding recipe for target 'vdso_prepare'
arch/arm64/Makefile:120: warning: ignoring old recipe for target 'vdso_prepare'
  HOSTCC  scripts/kconfig/mconf.o
  HOSTCC  scripts/kconfig/lxdialog/checklist.o
  HOSTCC  scripts/kconfig/lxdialog/util.o
  HOSTCC  scripts/kconfig/lxdialog/inputbox.o
  HOSTCC  scripts/kconfig/lxdialog/textbox.o
  HOSTCC  scripts/kconfig/lxdialog/yesno.o
  HOSTCC  scripts/kconfig/lxdialog/menubox.o
  HOSTLD  scripts/kconfig/mconf
scripts/kconfig/mconf  Kconfig


*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

[B]harry@harry-w:~/asus_sc$[/B] make -j$(nproc --all)
arch/arm64/Makefile:130: warning: overriding recipe for target 'vdso_prepare'
arch/arm64/Makefile:120: warning: ignoring old recipe for target 'vdso_prepare'
arch/arm64/Makefile:130: warning: overriding recipe for target 'vdso_prepare'
arch/arm64/Makefile:120: warning: ignoring old recipe for target 'vdso_prepare'
scripts/kconfig/conf  --silentoldconfig Kconfig
arch/arm64/Makefile:130: warning: overriding recipe for target 'vdso_prepare'
arch/arm64/Makefile:120: warning: ignoring old recipe for target 'vdso_prepare'
  CHK     include/config/kernel.release
  UPD     include/config/kernel.release
  WRAP    arch/arm64/include/generated/asm/bugs.h
  WRAP    arch/arm64/include/generated/asm/checksum.h
  WRAP    arch/arm64/include/generated/asm/clkdev.h
  WRAP    arch/arm64/include/generated/asm/cputime.h
  WRAP    arch/arm64/include/generated/asm/current.h
  WRAP    arch/arm64/include/generated/asm/delay.h
  WRAP    arch/arm64/include/generated/asm/div64.h
  WRAP    arch/arm64/include/generated/asm/dma.h
  WRAP    arch/arm64/include/generated/asm/dma-contiguous.h
  WRAP    arch/arm64/include/generated/asm/early_ioremap.h
  WRAP    arch/arm64/include/generated/asm/emergency-restart.h
  WRAP    arch/arm64/include/generated/asm/errno.h
  WRAP    arch/arm64/include/generated/asm/ftrace.h
  WRAP    arch/arm64/include/generated/asm/hash.h
  WRAP    arch/arm64/include/generated/asm/ioctl.h
  WRAP    arch/arm64/include/generated/asm/ioctls.h
  WRAP    arch/arm64/include/generated/asm/hw_irq.h
  WRAP    arch/arm64/include/generated/asm/ipcbuf.h
  WRAP    arch/arm64/include/generated/asm/kdebug.h
  WRAP    arch/arm64/include/generated/asm/irq_regs.h
  WRAP    arch/arm64/include/generated/asm/kvm_para.h
  WRAP    arch/arm64/include/generated/asm/local.h
  WRAP    arch/arm64/include/generated/asm/kmap_types.h
  WRAP    arch/arm64/include/generated/asm/mcs_spinlock.h
  WRAP    arch/arm64/include/generated/asm/local64.h
  WRAP    arch/arm64/include/generated/asm/mman.h
  WRAP    arch/arm64/include/generated/asm/msgbuf.h
  WRAP    arch/arm64/include/generated/asm/msi.h
  WRAP    arch/arm64/include/generated/asm/mutex.h
  WRAP    arch/arm64/include/generated/asm/pci.h
  WRAP    arch/arm64/include/generated/asm/pci-bridge.h
  WRAP    arch/arm64/include/generated/asm/poll.h
  WRAP    arch/arm64/include/generated/asm/preempt.h
  WRAP    arch/arm64/include/generated/asm/resource.h
  WRAP    arch/arm64/include/generated/asm/rwsem.h
  WRAP    arch/arm64/include/generated/asm/sections.h
  WRAP    arch/arm64/include/generated/asm/segment.h
  WRAP    arch/arm64/include/generated/asm/scatterlist.h
  WRAP    arch/arm64/include/generated/asm/sembuf.h
  WRAP    arch/arm64/include/generated/asm/serial.h
  WRAP    arch/arm64/include/generated/asm/shmbuf.h
  WRAP    arch/arm64/include/generated/asm/simd.h
  WRAP    arch/arm64/include/generated/asm/sizes.h
  WRAP    arch/arm64/include/generated/asm/socket.h
  WRAP    arch/arm64/include/generated/asm/sockios.h
  WRAP    arch/arm64/include/generated/asm/swab.h
  WRAP    arch/arm64/include/generated/asm/switch_to.h
  WRAP    arch/arm64/include/generated/asm/termbits.h
  WRAP    arch/arm64/include/generated/asm/termios.h
  WRAP    arch/arm64/include/generated/asm/topology.h
  WRAP    arch/arm64/include/generated/asm/trace_clock.h
  WRAP    arch/arm64/include/generated/asm/types.h
  WRAP    arch/arm64/include/generated/asm/unaligned.h
  WRAP    arch/arm64/include/generated/asm/user.h
  WRAP    arch/arm64/include/generated/asm/vga.h
  WRAP    arch/arm64/include/generated/asm/xor.h
  WRAP    arch/arm64/include/generated/uapi/asm/kvm_para.h
  CHK     include/generated/uapi/linux/version.h
  UPD     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  HOSTCC  scripts/basic/bin2c
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/genksyms/genksyms.o
  HOSTCC  scripts/dtc/flattree.o
  SHIPPED scripts/genksyms/parse.tab.c
  SHIPPED scripts/genksyms/lex.lex.c
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/dtc/data.o
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
  HOSTCC  scripts/selinux/genheaders/genheaders
  HOSTCC  scripts/selinux/mdp/mdp
  SHIPPED scripts/genksyms/keywords.hash.c
  HOSTCC  scripts/dtc/livetree.o
  CC      scripts/mod/devicetable-offsets.s
  HOSTCC  scripts/dtc/treesource.o
  MKELF   scripts/mod/elfconfig.h
  GEN     scripts/mod/devicetable-offsets.h
  HOSTCC  scripts/mod/sumversion.o
  CC      kernel/bounds.s
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/sortextable
  SHIPPED scripts/genksyms/parse.tab.h
  GEN     include/generated/bounds.h
  HOSTCC  scripts/genksyms/parse.tab.o
  CC      arch/arm64/kernel/asm-offsets.s
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/dtc/util.o
  HOSTCC  scripts/mod/modpost.o
  SHIPPED scripts/dtc/dtc-lexer.lex.c
  SHIPPED scripts/dtc/dtc-parser.tab.h
  SHIPPED scripts/dtc/dtc-parser.tab.c
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  GEN     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  HOSTCC  scripts/asn1_compiler
  HOSTCC  scripts/genksyms/lex.lex.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTCC  scripts/mod/file2alias.o
  HOSTLD  scripts/dtc/dtc
  LDS     arch/arm64/kernel/vdso/vdso.lds
  VDSOA   arch/arm64/kernel/vdso/gettimeofday.o
  VDSOA   arch/arm64/kernel/vdso/note.o
  VDSOA   arch/arm64/kernel/vdso/sigreturn.o
  VDSOL   arch/arm64/kernel/vdso/vdso.so.dbg
  VDSOSYM include/generated/vdso-offsets.h
  HOSTLD  scripts/genksyms/genksyms
  HOSTLD  scripts/mod/modpost
  CC      init/main.o
  CHK     include/generated/compile.h
  CC      init/do_mounts.o
  CC      init/do_mounts_rd.o
  CC      init/do_mounts_initrd.o
  CC      init/do_mounts_dm.o
  CC      init/noinitramfs.o
  HOSTCC  usr/gen_init_cpio
  UPD     include/generated/compile.h
  CC      init/initramfs.o
  CC      init/calibrate.o
  GEN     usr/initramfs_data.cpio.gz
  AS      usr/initramfs_data.o
  LD      usr/built-in.o
  CC      init/init_task.o
  CC      arch/arm64/kernel/debug-monitors.o
  AS      arch/arm64/kernel/entry.o
  CC      init/version.o
  CC      arch/arm64/kernel/irq.o
  CC      arch/arm64/kernel/fpsimd.o
  AS      arch/arm64/kernel/entry-fpsimd.o
  CC      arch/arm64/mm/dma-mapping.o
  CC      arch/arm64/kernel/process.o
  LD      arch/arm64/net/built-in.o
  CC      arch/arm64/mm/extable.o
/home/harry/cross_compiler/bin/aarch64-linux-android-ar: error while loading shared libraries: libfl.so.2: cannot open shared object file: No such file or directory
scripts/Makefile.build:336: recipe for target 'arch/arm64/net/built-in.o' failed
make[1]: *** [arch/arm64/net/built-in.o] Error 127
Makefile:969: recipe for target 'arch/arm64/net' failed
make: *** [arch/arm64/net] Error 2
make: *** Waiting for unfinished jobs....
  CC      arch/arm64/kernel/ptrace.o
  CC      arch/arm64/kernel/setup.o
  LD      init/mounts.o
  LD      init/built-in.o
  CC      arch/arm64/kernel/signal.o
  CC      arch/arm64/mm/fault.o
  CC      arch/arm64/mm/init.o
  CC      arch/arm64/kernel/sys.o
  CC      arch/arm64/kernel/stacktrace.o
  AS      arch/arm64/mm/cache.o
  CC      arch/arm64/kernel/time.o
  CC      arch/arm64/mm/copypage.o
  CC      arch/arm64/kernel/traps.o
  CC      arch/arm64/kernel/io.o
  CC      arch/arm64/mm/flush.o
  CC      arch/arm64/mm/ioremap.o
  CC      arch/arm64/mm/mmap.o
  CC      arch/arm64/kernel/vdso.o
  CC      arch/arm64/mm/pgd.o
  CC      arch/arm64/mm/mmu.o
  CC      arch/arm64/mm/context.o
  AS      arch/arm64/mm/proc.o
  AS      arch/arm64/kernel/hyp-stub.o
  CC      arch/arm64/mm/pageattr.o
  CC      arch/arm64/kernel/psci.o
  CC      arch/arm64/kernel/cpu_ops.o
  CC      arch/arm64/kernel/insn.o
  CC      arch/arm64/kernel/return_address.o
  CC      arch/arm64/kernel/cpuinfo.o
  CC      arch/arm64/kernel/cpu_errata.o
  CC      arch/arm64/kernel/cpufeature.o
  CC      arch/arm64/kernel/alternative.o
  AS      arch/arm64/kernel/psci-call.o
  CC      arch/arm64/kernel/smp.o
  CC      arch/arm64/kernel/smp_spin_table.o
  CC      arch/arm64/kernel/topology.o
  AS      arch/arm64/kernel/sys32.o
  LD      arch/arm64/mm/built-in.o
  AS      arch/arm64/kernel/kuser32.o
  CC      arch/arm64/kernel/signal32.o
  CC      arch/arm64/kernel/sys_compat.o
  CC      arch/arm64/kernel/../../arm/kernel/opcodes.o
  CC      arch/arm64/kernel/arm64ksyms.o
  CC      arch/arm64/kernel/module.o
  CC      arch/arm64/kernel/perf_regs.o
  CC      arch/arm64/kernel/perf_event.o
  CC      arch/arm64/kernel/perf_debug.o
  CC      arch/arm64/kernel/perf_trace_counters.o
  CC      arch/arm64/kernel/perf_trace_user.o
  AS      arch/arm64/kernel/sleep.o
  CC      arch/arm64/kernel/suspend.o
  CC      arch/arm64/kernel/cpuidle.o
  CC      arch/arm64/kernel/efi.o
  CC      arch/arm64/kernel/efi-stub.o
  AS      arch/arm64/kernel/efi-entry.o
  CC      arch/arm64/kernel/pci.o
  CC      arch/arm64/kernel/armv8_deprecated.o
  AS      arch/arm64/kernel/head.o
  LDS     arch/arm64/kernel/vmlinux.lds
  OBJCOPY arch/arm64/kernel/vdso/vdso.so
  AS      arch/arm64/kernel/vdso/vdso.o
  LD      arch/arm64/kernel/vdso/built-in.o
  LD      arch/arm64/kernel/built-in.o
make: *** wait: No child processes.  Stop.
[B]harry@harry-w:~/asus_sc$[/B] 
[B]harry@harry-w:~/asus_sc$[/B] make modules
arch/arm64/Makefile:130: warning: overriding recipe for target 'vdso_prepare'
arch/arm64/Makefile:120: warning: ignoring old recipe for target 'vdso_prepare'
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
make[1]: 'include/generated/vdso-offsets.h' is up to date.
  CC [M]  crypto/ansi_cprng.o
  CC [M]  block/test-iosched.o
  CC [M]  drivers/char/rdbg.o
  SHIPPED drivers/exfat/user/64/objects/aops.o
  SHIPPED drivers/exfat/user/64/objects/bitmap.o
  SHIPPED drivers/exfat/user/64/objects/chain.o
  SHIPPED drivers/exfat/user/64/objects/compat.o
  SHIPPED drivers/exfat/user/64/objects/debug.o
  SHIPPED drivers/exfat/user/64/objects/dir.o
  SHIPPED drivers/exfat/user/64/objects/fat.o
  SHIPPED drivers/exfat/user/64/objects/file.o
  SHIPPED drivers/exfat/user/64/objects/fsck.o
  SHIPPED drivers/exfat/user/64/objects/inode.o
  SHIPPED drivers/exfat/user/64/objects/journal.o
  SHIPPED drivers/exfat/user/64/objects/lcnalloc.o
  SHIPPED drivers/exfat/user/64/objects/namei.o
  SHIPPED drivers/exfat/user/64/objects/super.o
  SHIPPED drivers/exfat/user/64/objects/sysctl.o
  SHIPPED drivers/exfat/user/64/objects/time.o
  SHIPPED drivers/exfat/user/64/objects/tuts.o
  SHIPPED drivers/exfat/user/64/objects/unistr.o
  LD [M]  drivers/exfat/user/64/objects/texfat.o
  CC [M]  drivers/input/evbug.o
  CC [M]  drivers/mmc/card/mmc_test.o
  CC [M]  drivers/mmc/card/mmc_block_test.o
  CC [M]  drivers/net/wireless/ath/wil6210/main.o
  CC [M]  drivers/net/wireless/ath/wil6210/netdev.o
  CC [M]  drivers/net/wireless/ath/wil6210/cfg80211.o
  CC [M]  drivers/net/wireless/ath/wil6210/pcie_bus.o
  CC [M]  drivers/net/wireless/ath/wil6210/debugfs.o
  CC [M]  drivers/net/wireless/ath/wil6210/wmi.o
  CC [M]  drivers/net/wireless/ath/wil6210/interrupt.o
  CC [M]  drivers/net/wireless/ath/wil6210/txrx.o
  CC [M]  drivers/net/wireless/ath/wil6210/debug.o
  CC [M]  drivers/net/wireless/ath/wil6210/rx_reorder.o
  CC [M]  drivers/net/wireless/ath/wil6210/ioctl.o
  CC [M]  drivers/net/wireless/ath/wil6210/fw.o
  CC [M]  drivers/net/wireless/ath/wil6210/pm.o
  CC [M]  drivers/net/wireless/ath/wil6210/pmc.o
  CC [M]  drivers/net/wireless/ath/wil6210/trace.o
  CC [M]  drivers/net/wireless/ath/wil6210/wil_platform.o
  CC [M]  drivers/net/wireless/ath/wil6210/ethtool.o
  CC [M]  drivers/net/wireless/ath/wil6210/wil_crash_dump.o
  CC [M]  drivers/net/wireless/ath/wil6210/p2p.o
  CC [M]  drivers/net/wireless/ath/wil6210/ftm.o
  LD [M]  drivers/net/wireless/ath/wil6210/wil6210.o
  CC [M]  drivers/scsi/ufs/ufs_test.o
  CC [M]  drivers/spi/spidev.o
  CC [M]  drivers/video/backlight/lcd.o
  CC [M]  drivers/video/backlight/backlight.o
  CC [M]  drivers/video/backlight/generic_bl.o
  CC [M]  net/bridge/br_netfilter.o
  CC [M]  net/netfilter/xt_HL.o
  Building modules, stage 2.
  MODPOST 15 modules
WARNING: could not find drivers/exfat/user/64/objects/.aops.o.cmd for drivers/exfat/user/64/objects/aops.o
  CC      block/test-iosched.mod.o
  LD [M]  block/test-iosched.ko
  CC      crypto/ansi_cprng.mod.o
  LD [M]  crypto/ansi_cprng.ko
  CC      drivers/char/rdbg.mod.o
  LD [M]  drivers/char/rdbg.ko
  CC      drivers/exfat/user/64/objects/texfat.mod.o
  LD [M]  drivers/exfat/user/64/objects/texfat.ko
  CC      drivers/input/evbug.mod.o
  LD [M]  drivers/input/evbug.ko
  CC      drivers/mmc/card/mmc_block_test.mod.o
  LD [M]  drivers/mmc/card/mmc_block_test.ko
  CC      drivers/mmc/card/mmc_test.mod.o
  LD [M]  drivers/mmc/card/mmc_test.ko
  CC      drivers/net/wireless/ath/wil6210/wil6210.mod.o
  LD [M]  drivers/net/wireless/ath/wil6210/wil6210.ko
  CC      drivers/scsi/ufs/ufs_test.mod.o
  LD [M]  drivers/scsi/ufs/ufs_test.ko
  CC      drivers/spi/spidev.mod.o
  LD [M]  drivers/spi/spidev.ko
  CC      drivers/video/backlight/backlight.mod.o
  LD [M]  drivers/video/backlight/backlight.ko
  CC      drivers/video/backlight/generic_bl.mod.o
  LD [M]  drivers/video/backlight/generic_bl.ko
  CC      drivers/video/backlight/lcd.mod.o
  LD [M]  drivers/video/backlight/lcd.ko
  CC      net/bridge/br_netfilter.mod.o
  LD [M]  net/bridge/br_netfilter.ko
  CC      net/netfilter/xt_HL.mod.o
  LD [M]  net/netfilter/xt_HL.ko
[B]# I transferred the xt_HL.ko file to the internal memory of the phone.[/B]
[B]harry@harry-w:~/asus_sc$[/B] adb shell
[B]ASUS_Z012D:/ $[/B] su
[B]ASUS_Z012D:/ #[/B] insmod /storage/emulated/0/xt_HL.ko
insmod: failed to load /storage/emulated/0/xt_HL.ko: Required key not available

This file is simply not in the source folder.
Code:
make[1]: *** [arch/arm64/net/built-in.o] Error 127
 
Last edited:

spezi77

Recognized Developer / Contributor
Jan 27, 2013
3,519
7,852
/home/less
Hey there,
I am compiling my rom for marlin. Clang kernel is compiled inline. After I have reinstalled my build machine with Debian I get a segmentation fault and the build fails.. On my old distro (Deepin) the segmentation fault was also occurring but the build never failed, and the rom worked like a charm.

Here's my log: https://del.dog/irebegutaf.coffeescript

Edit: please do not pay attention to my issue. I have solved it. After upgrading gnu make on my machine the issue was gone.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    How can I compile a 5.x kernel using the 3.18 source? My device doesn’t have newer source.
    sorry I haven't tried, I'm also newbie. I will try first and may tell you if success
  • 240
    Introduction

    Hello everyone, I will be going over how to compile a kernel from beginning to end!

    Prerequisites:
    • A Linux environment (preferably 64-bit)
    • Knowledge of how to navigate the command line
    • Common sense
    • A learning spirit, there will be no spoonfeeding here

    What this guide will cover:
    1. Downloading the source
    2. Downloading a cross compiler
    3. Building the kernel
    4. Flashing the kernel

    What this guide will NOT cover:
    • Setting up a build environment (plenty of existing Linux installation guides)
    • Adding features to the kernel (plenty of git cherry-picking guides)

    I know this has been done before but on a cursory search, I have not seen a guide that was recently updated at all.


    1. Downloading the source


    If you have a custom kernel you want to build, move along after cloning the kernel using the git clone command below.

    If you are compiling your stock kernel, it is ultimately up to you to know where to get your kernel source from but here are some common places:

    Google: https://android.googlesource.com/kernel/msm/ (pick your architecture and look at the branches)
    LG: http://opensource.lge.com/index
    Samsung: http://opensource.samsung.com/reception.do
    HTC: https://www.htcdev.com/devcenter/downloads
    OnePlus: https://github.com/OnePlusOSS
    Motorola: https://github.com/MotorolaMobilityLLC
    Sony: https://github.com/sonyxperiadev/kernel

    To download the kernel, you can either use git clone or download the tarball and extract it:
    Code:
    git clone -b <branch_to_checkout> <url> <desired_folder_name>
    
    OR
    
    tar -xvf <filename>

    For example, if I wanted to grab the latest Nexus 6P from Google above:
    Code:
    git clone -b android-msm-angler-3.10-nougat-mr2 https://android.googlesource.com/kernel/msm/ angler
    This will clone the kernel/msm repo into an angler folder and checkout the android-msm-angler-3.10-nougat-mr2 automatically.

    I can try and help you locate your source if necessary.



    2. Downloading a cross compiler


    Since most Android devices are ARM based, we need a compiler that is targeting ARM devices. A host (or native) compiler will not work unless you are compiling on another ARM device.

    You can either compile one yourself if you know how (crosstool-NG is a great tool for this) or download a prebuilt one. Luckily Google provides a high quality toolchain for this, in both an arm (32-bit) and arm64 (64-bit). It's up to you to know the architecture of your device. Typically speaking, most devices in the past two-three years are 64-bit.

    Another popular toolchain is UberTC, which can be found here: https://bitbucket.org/matthewdalex/. Most kernels will need patches for anything higher than 4.9 and while I don't mind assisting with finding them, you should compile with Google's toolchain first.

    Once you have decided, clone the toolchain:
    Code:
    git clone <url>


    3. Compile the kernel


    1. Point the Makefile to your compiler (run this from within the toolchain folder!!)
    Code:
    export CROSS_COMPILE=$(pwd)/bin/<toolchain_prefix>-
    Example:
    Code:
    export CROSS_COMPILE=$(pwd)/bin/aarch64-linux-android-

    NOTE #1: For kernels that can be compiled with Clang (like the Pixel 2), see this guide. I will support it here if there are any questions.

    NOTE #2: Pixel and Pixel 2 users, you will need to follow these steps as well if compiling for Android Pie.

    2. Tell the Makefile the architecture of the device
    Code:
    export ARCH=<arch> && export SUBARCH=<arch>
    Example:
    Code:
    export ARCH=arm64 && export SUBARCH=arm64

    3. Locate your proper defconfig
    Navigate to the arch/<arch>/configs folder within the kernel source (e.g. arch/arm64/configs) and locate your device's or custom kernel developer's proper config file. For example, it will often be in the form of <codename>_defconfig or <kernel_name>_defconfig. Generic Qualcomm configs may be used as well (msm-perf_defconfig, msmcortex-perf_defconfig). When in doubt, ask here if you are confused. A defconfig tells the compiler what options to add to the kernel.

    4. Build the kernel

    Code:
    make clean
    make mrproper
    make <defconfig_name>
    make -j$(nproc --all)

    If those commands succeed, you will have an Image, Image-dtb, Image.gz, or Image.gz-dtb file at the end.

    If it failed, as was pointed out to me by @flar2 while making a complete idiot of myself, you may need to specify an output directory while making new CAF based kernels, like so:
    Code:
    mkdir -p out
    make O=out clean
    make O=out mrproper
    make O=out <defconfig_name>
    make O=out -j$(nproc --all)

    If after that something is still broken, you may need to fix some headers or other issues. If it is a custom kernel, bring it up with your developer.
    If it's an OEM, it's up to you to try and fix it, which we can assist with.



    4. Flash the kernel


    Assuming you were able to compile the kernel successfully, you now need to flash it! I will be covering two different ways to flash a compiled kernel: unpacking and repacking the boot image by hand using Android Image Kitchen or AnyKernel2, both by the brilliant @osm0sis. If there are any per-device nuances, please let me know and I'll add them here! Additionally, this section can vary drastically by device, you may need to consult developers of your device for assistance if necessary.

    Android Image Kitchen

    1. Pull your device's boot image from the latest image available for your device (whether it be a ROM or stock)
    2. Download the latest Android Image Kitchen from this thread.
    3. Run the following with the boot image:
      Code:
      unpackimg.sh <image_name>.img
    4. Locate the zImage file and replace it with your kernel image (rename it to what came out of the boot image)
    5. Run the following to repack:
      Code:
      repackimg.sh
    6. Flash the new boot image with fastboot or TWRP!

    AnyKernel2

    1. Download the latest AnyKernel2 zip: https://github.com/osm0sis/AnyKernel2/archive/master.zip
    2. Apply this patch to clean out all of the demo files:
      Code:
      wget https://github.com/nathanchance/AnyKernel2/commit/addb6ea860aab14f0ef684f6956d17418f95f29a.diff
      patch -p1 < addb6ea860aab14f0ef684f6956d17418f95f29a.diff
      rm addb6ea860aab14f0ef684f6956d17418f95f29a.diff
    3. Place your kernel image in the root of the file.
    4. Open the anykernel.sh file and modify the following values:
      • kernel.string: your kernel name
      • device.name#: List all of your device's codenames (from the /system/build.prop: ro.product.device, ro.build.product)
      • block: Your boot image's path in your fstab. The fstab can be opened from the root of your device and it will look something like this:
        https://android.googlesource.com/device/huawei/angler/+/master/fstab.angler
        The first column is the value you want to set block to.
    5. After that, zip up the kernel and flash it!
      Code:
      zip -r9 kernel.zip * -x README.md kernel.zip


    Tips and tricks


    1. Remove GCC wrapper

    A lot of kernels from CAF include a Python script that will essentially turn on -Werror, causing your build to error at the most benign stuff. This is necessary with higher GCC versions as there are a lot more warnings.

    Here is the diff of what you need to change in the Makefile:
    Code:
    diff --git a/Makefile b/Makefile
    index 1aaa760f255f..bfccd5594630 100644
    --- a/Makefile
    +++ b/Makefile
    @@ -326,7 +326,7 @@ include $(srctree)/scripts/Kbuild.include
    
     AS		= $(CROSS_COMPILE)as
     LD		= $(CROSS_COMPILE)ld
    -REAL_CC		= $(CROSS_COMPILE)gcc
    +CC		= $(CROSS_COMPILE)gcc
     CPP		= $(CC) -E
     AR		= $(CROSS_COMPILE)ar
     NM		= $(CROSS_COMPILE)nm
    @@ -340,10 +340,6 @@ DEPMOD		= /sbin/depmod
     PERL		= perl
     CHECK		= sparse
    
    -# Use the wrapper for the compiler.  This wrapper scans for new
    -# warnings and causes the build to stop upon encountering them.
    -CC		= $(srctree)/scripts/gcc-wrapper.py $(REAL_CC)
    -
     CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
     		  -Wbitwise -Wno-return-void $(CF)
     CFLAGS_MODULE   =

    2. Using a higher level GCC toolchain

    Using a higher GCC toolchain (5.x, 6.x, 7.x or even 8.x) will require you to nuke the GCC wrapper script as above and use a unified GCC header file (pick the following if you have an include/linux/compiler-gcc#.h file):

    3.4/3.10: https://git.kernel.org/pub/scm/linu...h?id=a4a4f1cd733fe5b345db4e8cc19bb8868d562a8a
    3.18: https://git.kernel.org/pub/scm/linu...h?id=677fa15cd6d5b0843e7b9c58409f67d656b1ec2f

    You may get a lot of warnings but they are not entirely necessary to fix.


    3. Adding upstream Linux to kernel source

    Once you have gotten familiar with git and the compilation process, you should consider upstreaming your kernel. This will allow you to stay on top of CVE and bug fixes by staying up to date with the latest work of the Linux kernel developers.



    Receiving help

    I am happy to answer anything that I touched on in this guide. I may point you to another thread if it's better suited but I don't mind off topic (within reason) within the thread. I also want this to be a collaborative effort; other developers, if you have something to add, correct, or improve upon, please let me know!

    I am particular in how people ask for help. I do NOT respond to posts asking for a hand out ("How do I fix this?", "Please fix this!", etc.). I only respond to posts with clear logs and steps that you have tried. Basically, show me that you have read this guide and have a specific issue. I am not here to hold your hand through this, this is a developers' forum.
    20
    Compile Android Pie kernels for the Pixel (XL) and Pixel 2 (XL)

    Google added a new compat vDSO on Android Pie for 32-bit userspace, which requires a 32-bit toolchain (commit). As a result, if CROSS_COMPILE_ARM32 is not set, your build will error.

    After setting your main CROSS_COMPILE in step 1, clone this toolchain (or another compatible arm toolchain) next to the aarch64 one (if in the toolchain folder after running 'export CROSS_COMPILE', type 'cd ..'). Move into the 32-bit toolchain folder using cd then run
    Code:
    export CROSS_COMPILE_ARM32=$(pwd)/bin/<toolchain_prefix>
    Example:
    Code:
    export CROSS_COMPILE_ARM32=$(pwd)/bin/arm-linux-androideabi-

    Then continue on with the rest of the steps.
    9
    Introduction

    I am happy to answer anything that I touched on in this guide. I may point you to another thread if it's better suited but I don't mind off topic (within reason) within the thread. I also want this to be a collaborative effort; other developers, if you have something to add, correct, or improve upon, please let me know!

    I am particular in how people ask for help. I do NOT respond to posts asking for a hand out ("How do I fix this?", "Please fix this!", etc.). I only respond to posts with clear logs and steps that you have tried. Basically, show me that you have read this guide and have a specific issue. I am not here to hold your hand through this, this is a developers' forum.

    On a scale of 1-10 how much Off-Topic is allowed ? :highfive::laugh::silly::eek:





    Nice guide :good: :highfive: ..



    8
    @nathanchance thx for great work
    But how to build kernel with gcc 9.2.0
    could you please add manual for that

    Unfortunately, my time nowadays is limited between my job, school, and more important open source projects.

    However, compiling with GCC 9.2.0 is the same as compiling with GCC 4.9.4, you point the CROSS_COMPILE variable at the GCC 9.2.0 toolchain (or use PATH and update the CROSS_COMPILE prefix to match) and go from there. There are probably going to be new warnings that you will need to solve and there are potentially some other commits that you will need to pick to get a boot off.

    If anyone else wants to pitch in and write something up, I'd be happy to add it to the OP.
    7
    You're on fire with this kernel stuff:D

    Sent from my LEX727 using XDA Labs