how to compile custom kernel? - Moto G Power Questions & Answers

How to compile custom kernel? i checked on motorola github but the source code there is for 3.x kernel. mine is 4.14.117.
Model: Moto G Power
Hardware Version: pvt
Model Number: XT2041-4
Android Version: 10
Android path level: September 1, 2020
Kernel Version: 4.14.117-perf+ #1 Wed Sep 2 13:22:48 CDT 2020
Build number: QPMS30.80-51-8

i think i found the correct source for my phone:
QPMS30.80-51-5 kernel source
but it wont compile. i get python errors. i'm using Ubuntu 20.04.
Bash:
./scripts/gcc-version.sh: line 26: python: command not found
./scripts/gcc-version.sh: line 27: python: command not found
make: python: Command not found
make: python: Command not found
make: python: Command not found
make: python: Command not found
make: python: Command not found
I have both versions of python installed so i'm not sure what the problem is.

skilo83 said:
i think i found the correct source for my phone:
QPMS30.80-51-5 kernel source
but it wont compile. i get python errors. i'm using Ubuntu 20.04.
Bash:
./scripts/gcc-version.sh: line 26: python: command not found
./scripts/gcc-version.sh: line 27: python: command not found
make: python: Command not found
make: python: Command not found
make: python: Command not found
make: python: Command not found
make: python: Command not found
I have both versions of python installed so i'm not sure what the problem is.
Click to expand...
Click to collapse
I had this problem in another case. But this solved my problem. Check if pyhon 3 is installed. If not then...
Code:
sudo apt install python3
sudo apt install python-is-python3

Koken2003 said:
I had this problem in another case. But this solved my problem. Check if pyhon 3 is installed. If not then...
Code:
sudo apt install python3
sudo apt install python-is-python3
Click to expand...
Click to collapse
yes i actually install python-is-python2 and it solved my problem. the source for my device seems to be made with an older android NDK. i would appreciate any help i can get. i'm just not sure what compiler to use to compile the source. the NDK i downloaded doesn't have any compilers in it.

Related

AOSP compiling error help

Hi All,
Hope someone can help me with a specific error I am receiving please. I have overcome some errors already but this one, I just cannot see the wood for the trees.
I am new to compiling AOSP. Other than copying a bit from the CM7 repository, everything else is pure AOSP source. I haven't altered anything myself.
Some of the error:
Code:
make: *** [out/target/common/obj/APPS/ApplicationsProvider_intermediates/proguard.classes.jar] Error 137
make: *** Waiting for unfinished jobs....
make: *** [out/target/common/docs/doc-comment-check-timestamp] Error 45
make: *** [out/target/common/docs/api-stubs-timestamp] Error 45
Preparing output jar [/home/dan/mydroid/out/target/common/obj/APPS/AccountAndSyncSettings_intermediates/proguard.classes.jar]
Copying resources from program jar [/home/dan/mydroid/out/target/common/obj/APPS/AccountAndSyncSettings_intermediates/classes.jar]
Full Error and some lines above that here:
http://pastebin.com/5QL0bpxC
Any advice and help greatly appreciated.
Thanks in advance, Dan
Edit, if it helps, I'm trying to compile AOSP for the HTC desire (Bravo)
What projects did you fork into from CM? You may have to fork some more in since alot of the packages are codependent.
Thanks for the reply.
I used the cm script to obtain the proprietory files from cm7.0.3
I used hardware/qcom/gps/libbloc-api/android.mk and also a camera folder (off the top of my head can't remember the exact path. It had 2 folders in it, one of which was called test.
That's all though. Both in response to errors received on those modules.
The gps was a LOCATION_MODULE error, which I read up on but by the time I'd finished I'd forgotten what changes I'd made. I knew cm compiled fine so just swapped it out.
Sent from my HTC Desire using XDA App
rootSU said:
I used hardware/qcom/gps/libbloc-api/android.mk
Click to expand...
Click to collapse
did you use the entire package?
if not the entire package I would fork https://github.com/CyanogenMod/android_hardware_qcom_gps into the build from hardare/qcom/gps down
Thanks. I shall try that and feed back
Sent from my HTC Desire using XDA App
No dice I am afraid.
The compile runs for 20 minutes or so before its killed. I'm pretty sure its quite far along.
I've pasted more here:
http://pastebin.com/SDqvuNtc
Last 1500 lines (or just over) if it helps identify where in the process this occurs?
Any further guidance greatly appreciated (as always )
You can try forking in cyanogenmod/framework_base_core
But then you start moving pretty far from aosp
Humm... not sure
Sent from my DROID2 using Tapatalk
Thanks ill look at that and maybe revisit the location module tag too.
It would be nice if the source would just compile "out of the box"
Sent from my HTC Desire using XDA App
Well back to the original gps module and android.mk with LOCAL_MODULE_TAGS =:Optional, I still get errors which are similar:
Code:
Install: out/target/product/bravo/system/lib/libaudio.so
Install: out/target/product/bravo/system/lib/libaudiopolicy.so
Install: out/target/product/bravo/system/lib/libcameraservice.so
target SharedLib: libFFTEm (out/target/product/bravo/obj/SHARED_LIBRARIES/libFFTEm_intermediates/LINKED/libFFTEm.so)
Install: out/target/product/bravo/system/lib/libSR_AudioIn.so
target SharedLib: libandroid (out/target/product/bravo/obj/SHARED_LIBRARIES/libandroid_intermediates/LINKED/libandroid.so)
target SharedLib: libaudioeffect_jni (out/target/product/bravo/obj/SHARED_LIBRARIES/libaudioeffect_jni_intermediates/LINKED/libaudioeffect_jni.so)
target SharedLib: libjnigraphics (out/target/product/bravo/obj/SHARED_LIBRARIES/libjnigraphics_intermediates/LINKED/libjnigraphics.so)
target SharedLib: librs_jni (out/target/product/bravo/obj/SHARED_LIBRARIES/librs_jni_intermediates/LINKED/librs_jni.so)
target SharedLib: libsoundpool (out/target/product/bravo/obj/SHARED_LIBRARIES/libsoundpool_intermediates/LINKED/libsoundpool.so)
Install: out/target/product/bravo/system/lib/libsrec_jni.so
target SharedLib: libttssynthproxy (out/target/product/bravo/obj/SHARED_LIBRARIES/libttssynthproxy_intermediates/LINKED/libttssynthproxy.so)
target SharedLib: libwebcore (out/target/product/bravo/obj/SHARED_LIBRARIES/libwebcore_intermediates/LINKED/libwebcore.so)
target Jar: core-tests-dalvik (out/target/common/obj/JAVA_LIBRARIES/core-tests-dalvik_intermediates/javalib.jar)
'out/target/common/obj/JAVA_LIBRARIES/core-tests-dalvik_intermediates//classes.dex' as 'classes.dex'...
Copying: out/target/common/obj/JAVA_LIBRARIES/core-tests-dom_intermediates/emma_out/lib/classes-jarjar.jar
target Jar: core-tests-json (out/target/common/obj/JAVA_LIBRARIES/core-tests-json_intermediates/javalib.jar)
'out/target/common/obj/JAVA_LIBRARIES/core-tests-json_intermediates//classes.dex' as 'classes.dex'...
Copying: out/target/common/obj/JAVA_LIBRARIES/core-tests-xml_intermediates/noproguard.classes.dex
target Executable: AudioHardwareRecordLoop (out/target/product/bravo/obj/EXECUTABLES/AudioHardwareRecordLoop_intermediates/LINKED/AudioHardwareRecordLoop)
target Executable: AudioHardwareRecord (out/target/product/bravo/obj/EXECUTABLES/AudioHardwareRecord_intermediates/LINKED/AudioHardwareRecord)
target Executable: AudioInRecord (out/target/product/bravo/obj/EXECUTABLES/AudioInRecord_intermediates/LINKED/AudioInRecord)
target Executable: SRecTestAudio (out/target/product/bravo/obj/EXECUTABLES/SRecTestAudio_intermediates/LINKED/SRecTestAudio)
target Executable: SRecTest (out/target/product/bravo/obj/EXECUTABLES/SRecTest_intermediates/LINKED/SRecTest)
target Executable: quake (out/target/product/bravo/obj/EXECUTABLES/quake_intermediates/LINKED/quake)
target SharedLib: libplatform_library_jni (out/target/product/bravo/obj/SHARED_LIBRARIES/libplatform_library_jni_intermediates/LINKED/libplatform_library_jni.so)
target Executable: app_process (out/target/product/bravo/obj/EXECUTABLES/app_process_intermediates/LINKED/app_process)
Install: out/target/product/bravo/system/lib/libandroid_runtime.so
target SharedLib: libstagefright (out/target/product/bravo/obj/SHARED_LIBRARIES/libstagefright_intermediates/LINKED/libstagefright.so)
make: *** [out/host/linux-x86/obj/EXECUTABLES/dx-tests_intermediates/dx-tests] Killed
make: *** Deleting file `out/host/linux-x86/obj/EXECUTABLES/dx-tests_intermediates/dx-tests'
make: *** Waiting for unfinished jobs....
make: *** [out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/noproguard.classes-with-local.dex] Killed
Looks like libstagefright is the cause?
Found in first log- line 160:
Code:
/bin/bash: line 26: 23801 Killed LD_LIBRARY_PATH=out/host/linux-x86/lib javadoc \@out/target/product/bravo/obj/JAVA_LIBRARIES/doc-comment-check_intermediates/droiddoc-src-list -J-Xmx768m -J-Djava.library.path=out/host/linux-x86/lib -quiet -doclet DroidDoc -docletpath out/host/linux-x86/framework/clearsilver.jar:out/host/linux-x86/framework/droiddoc.jar:out/host/linux-x86/framework/apicheck.jar......
IMO there are 2 possibilities:
1.build environment is not set properly
-did you install compatibility libs that are mentioned for Froyo? These can also be needed
-is sun java set as default JVM? Check update-alternatives for java and javac
2. some files can be from a different branch (line 58)
Code:
Note: Some input files use or override a deprecated API.
(this happened to me when I accidetaly merged fixes for Arabic support into standard framework)
Brilliant. Thanks for your response. I will double check all these things.
I did not:
Code:
Java 5: for Froyo and older
$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu dapper main multiverse"
$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu dapper-updates main multiverse"
$ sudo apt-get update
$ sudo apt-get install sun-java5-jdk
Or...
Code:
For building Froyo or an older release on a 64-bit system, several other packages are necessary to establish a 32-bit build environment:
$ sudo apt-get install gcc-multilib g++-multilib libc6-i386 libc6-dev-i386
rootSU said:
Brilliant. Thanks for your response. I will double check all these things.
I did not:
Code:
Java 5: for Froyo and older
$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu dapper main multiverse"
$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu dapper-updates main multiverse"
$ sudo apt-get update
$ sudo apt-get install sun-java5-jdk
Or...
Code:
For building Froyo or an older release on a 64-bit system, several other packages are necessary to establish a 32-bit build environment:
$ sudo apt-get install gcc-multilib g++-multilib libc6-i386 libc6-dev-i386
Click to expand...
Click to collapse
You don't need java5 (since you have java6 which is OK for Froyo also), but I'd recommend to install "several other packages are necessary to establish a 32-bit build environment"- this won't hurt but can help.
I don't remember which packages I had to install to build Redux 1.2
Well checking the environment, I did install the froyo stuff and there is only Java so nothing to configure there with sudo update-alternatives --config java
Guess its option 2 then....
Other than the camera folder I imported (forget which it is now - Bad Dan), I imported vendor/htc/bravo for proprietary files and device/htc/bravo (so I can build) both from the CM repository
Would it be better to lunch for passion? It was that bit I was never certain of (and couldnt find the answer) so I just guessed it.
EDIT> The camera was frameworks/base/services/camera/
Sounds possible cause
Well put the original camera folder back and now back to my original camera error
Code:
target SharedLib: libcameraservice (out/target/product/bravo/obj/SHARED_LIBRARIES/libcameraservice_intermediates/LINKED/libcameraservice.so)
prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/ld: out/target/product/bravo/obj/SHARED_LIBRARIES/libcameraservice_intermediates/CameraService.o: in function android::CameraService::getCameraInfo(int, android::CameraInfo*):frameworks/base/services/camera/libcameraservice/CameraService.cpp:109: error: undefined reference to 'HAL_getCameraInfo'
prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/ld: out/target/product/bravo/obj/SHARED_LIBRARIES/libcameraservice_intermediates/CameraService.o: in function android::CameraService::CameraService():frameworks/base/services/camera/libcameraservice/CameraService.cpp:75: error: undefined reference to 'HAL_getNumberOfCameras'
prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/ld: out/target/product/bravo/obj/SHARED_LIBRARIES/libcameraservice_intermediates/CameraService.o: in function android::CameraService::CameraService():frameworks/base/services/camera/libcameraservice/CameraService.cpp:75: error: undefined reference to 'HAL_getNumberOfCameras'
prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/ld: out/target/product/bravo/obj/SHARED_LIBRARIES/libcameraservice_intermediates/CameraService.o: in function android::CameraService::connect(android::sp<android::ICameraClient> const&, int):frameworks/base/services/camera/libcameraservice/CameraService.cpp:148: error: undefined reference to 'HAL_openCameraHardware'
prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/ld: out/target/product/bravo/obj/SHARED_LIBRARIES/libcameraservice_intermediates/CameraService.o: in function android::CameraService::connect(android::sp<android::ICameraClient> const&, int):frameworks/base/services/camera/libcameraservice/CameraService.cpp:154: error: undefined reference to 'HAL_getCameraInfo'
Not getting on very well am I?
This shouldn't happend, where did you get Camera Service sources? Or- where did you get android_device_bravo (some files required by CameraService are most probably device specific)?
The android/device/bravo is from the cm7 bravo repository. I got this so I could lunch bravo_full-userdebug.
The camera stuff is back to Google source.
I wasn't sure where else to get android/device/bravo from to lunch it.
Also I have vendor/HTC/bravo which has proprietory files in. I extracted from cm7 nightlies and copied entire directory
Sent from my HTC Desire using XDA App
rootSU said:
The android/device/bravo is from the cm7 bravo repository.
Click to expand...
Click to collapse
Did you try to use android_device_bravo from AOSP sources (Redux, Oxygen etc) ? There are major differences between AOSP and CM framework and services. It seems that there are also differences between AOSP and CM android_device since you get compilation errors (I'm not that deep in Desire sources yet so sorry if I'm mistaken)
That sounds a sensible suggestion. Where is the redux source please? EDIT> Nevermind, I didn't realise it was there.
Sent from my HTC Desire using XDA App
gen_scheisskopf said:
Did you try to use android_device_bravo from AOSP sources (Redux, Oxygen etc) ? There are major differences between AOSP and CM framework and services. It seems that there are also differences between AOSP and CM android_device since you get compilation errors (I'm not that deep in Desire sources yet so sorry if I'm mistaken)
Click to expand...
Click to collapse
Thank you, this worked! Now to phase 2. Make update.zips
Many thanks for all your help and support.
Does anyone know how to.overcome "no rule to make xxxx. Needed by xxxxx" errors?
Compilation works with just vendor and device directories, but boot loops stating no audio policy published, so forking in what I can from redux source, I have been getting a lot of these errors which I need to over come. Where are these rules and what is needed to create the targets?
Id rather add than remove at this point.
Sent from my HTC Desire using XDA App

(Q) First time Compiling

Ok, I setup my 2 build boxes. One Ubuntu 11.10x64 and one Mint 11x86. Installed required packages and downloaded multiple toolchains. I have tried compiling on both machines and on both I get the same errors.
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
make: *** Waiting for unfinished jobs....
CHK include/linux/version.h
I have tried make thunderc_perf_defconfig and get the same error. Copied .config from device dropped into source, same error.
Any ideas on what is going on? I'm new to this so any help would be great.
I don't known, maybe gcc
try checking your mount options?
Nope its not gcc; as I said I have installed all required packages including gcc + bison etc. My mount options? Is that the "export ARCH=arm" ? Where I have to set the default compiler? I'm new to the newer flavors of linux. The last distro I used was Mandrake 7.1 ;-) Now I am testing this on 2 builds; an x64 Ubuntu and a x86 Mint(Which is Ubuntu). I have to be missing something on both, but I have followed tutorials guides to the T and still get this error. I get more errors than this by the way. The compiler kicks back Kconfig saying unexpected line of code.
SgtPropain said:
Ok, I setup my 2 build boxes. One Ubuntu 11.10x64 and one Mint 11x86. Installed required packages and downloaded multiple toolchains. I have tried compiling on both machines and on both I get the same errors.
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
make: *** Waiting for unfinished jobs....
CHK include/linux/version.h
I have tried make thunderc_perf_defconfig and get the same error. Copied .config from device dropped into source, same error.
Any ideas on what is going on? I'm new to this so any help would be great.
Click to expand...
Click to collapse
I ran a search on your error message about the missing rule to make auto.conf and found this:
https://bbs.archlinux.org/viewtopic.php?id=99089
It relates to the other poster's comment about checking your mount options. It's a short process to fix it.
And if it doesn't work maybe it will at least give you a new error message to research.
glarepate said:
I ran a search on your error message about the missing rule to make auto.conf and found this:
https://bbs.archlinux.org/viewtopic.php?id=99089
It relates to the other poster's comment about checking your mount options. It's a short process to fix it.
And if it doesn't work maybe it will at least give you a new error message to research.
Click to expand...
Click to collapse
just as i thought. that might have happened. its worth a try though.
SgtPropain said:
Nope its not gcc; as I said I have installed all required packages including gcc + bison etc. My mount options? Is that the "export ARCH=arm" ? Where I have to set the default compiler? I'm new to the newer flavors of linux. The last distro I used was Mandrake 7.1 ;-) Now I am testing this on 2 builds; an x64 Ubuntu and a x86 Mint(Which is Ubuntu). I have to be missing something on both, but I have followed tutorials guides to the T and still get this error. I get more errors than this by the way. The compiler kicks back Kconfig saying unexpected line of code.
Click to expand...
Click to collapse
Wrong...
Because you don't have .config file in the source. If you are building kernel from source, you must have the kernel config. That kernel config can be shared in the source code, it depends on that kernel developer, he can shared it in arch/arm/config, access to there then find that kernel defconfig. Or you can get the kernel config of that kernel with another method, but this method just can be applied if the kernel you want to build is for our device: flash that kernel then go to terminal then type:
Code:
su
(Accept the super user)
Code:
cp /proc/config.gz /sdcard
If it show "No such file or directory found" so you should ask that kernel developer for their .config.
If it doesn't show anything, go to sdcard and find if there is a file that named config.gz, it's the kernel config. Get back to terminal then type:
cd /sdcard
gunzip config.gz
Voila!
I actually tried that already.... I have been at this for about three days. XDA was my last resort as I like to figure things out on my own. However I'm stuck @ a brick wall. I have edited /etc/fstab and removed the bs mount options..remounted same error. Mind you I'm doing most of this from a Virtual Environment. Starting to think this is my issue, but it doesn't explain the same error on machine #2. Maybe I'm doing it right, possibly a bad git clone?
thachtunganh said:
Wrong...
Because you don't have .config file in the source. If you are building kernel from source, you must have the kernel config. That kernel config can be shared in the source code, it depends on that kernel developer, he can shared it in arch/arm/config, access to there then find that kernel defconfig. Or you can get the kernel config of that kernel with another method, but this method just can be applied if the kernel you want to build is for our device: flash that kernel then go to terminal then type:
Code:
su
(Accept the super user)
Code:
cp /proc/config.gz /sdcard
If it show "No such file or directory found" so you should ask that kernel developer for their .config.
If it doesn't show anything, go to sdcard and find if there is a file that named config.gz, it's the kernel config. Get back to terminal then type:
cd /sdcard
gunzip config.gz
Voila!
Click to expand...
Click to collapse
Yeah that would be great if I hadn't done that already. In my post I stated I had replaced the .config from my device. I have literately tried everything but doing this from base. IE not from a VM. I appreciate the help but its a "no go".
Beginning of my .config for proof
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.32.9-ck2
# Wed Apr 11 20:41:44 2012
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
CONFIG_GENERIC_GPIO=y
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_KTIME_SCALAR=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_HARDIRQS_SW_RESEND=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_ARCH_HAS_CPUFREQ=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
CONFIG_VECTORS_BASE=0xffff0000
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_CONSTRUCTORS=y
Setting up a third independent machine Ubuntu x86 testing..
where do you get that .config from?
pull /proc/config.gz
SgtPropain said:
pull /proc/config.gz
Click to expand...
Click to collapse
What device are you using, and what kernel are you using.
for the time being you can use prebuilt kernel...no need to build kernel from source....
williamcharles said:
for the time being you can use prebuilt kernel...no need to build kernel from source....
Click to expand...
Click to collapse
He isn't building ROM from source. He is learning how to build a kernel from source.
Sorry for the delay; had 2 deaths in the family.
I setup my third box and again I get the same results. I really don't know where I'm going wrong. This kinda makes me lean to, I have bad source code. I'm no pro C programmer; however when building I get Kconfig errors. I opened said file and the comments look all messed up. The compiler I think is reading the comments as code and kicking it back giving me this error.
by the way what are you compiling and please teach me compiling i want to learn it .
I'm compiling a modified kernel for the Optimus V. I can't teach you how to compile because I don't even know if I'm doing it right.

(Solved) Need help to compile stock kernel

Hi All,
I need some help to compile Sony stock kernel for my Xperia ZU on Ubuntu 15.04. I downloaded the latest source from sony developer site:
14.5.A.0.270.tar.bz2
and downloaded Doomlord's pre-built tool chain from:
https://github.com/DooMLoRD/android_prebuilt_toolchains.git
and exported the path with arm-linux-androideabi-4.7:
export CROSS_COMPILE=/home/vishwas/android/android_prebuilt_toolchains/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-
Compilation started with:
make clean && make mrproper
Then, defconfig for Togari:
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE rhine_togari_row_defconfig
and then compiled kernel using:
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE -j4
I get error as:
Code:
MODPOST vmlinux.o
ERROR: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
To build the kernel despite the mismatches, build with:
'make CONFIG_NO_ERROR_ON_MISMATCH=y'
(NOTE: This is not recommended)
/home/vishwas/android/14.5.A.0.270/kernel/scripts/Makefile.modpost:98: recipe for target 'vmlinux.o' failed
make[1]: *** [vmlinux.o] Error 1
Makefile:936: recipe for target 'vmlinux.o' failed
make: *** [vmlinux.o] Error 2
If I compile with "CONFIG_NO_ERROR_ON_MISMATCH=y", then there is no error in compilation:
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE CONFIG_NO_ERROR_ON_MISMATCH=y -j4
But, I am not sure this is correct or not.
Can anyone please help me on solving issue related to 'vmlinux.o' ?
Edit: The issue was with toolchain. After pulling the arm-eabi-4.7 tool chain from git and using it resolved the issue:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7
Thanks
Can anyone please help me with the equivalent command to compile kernel for Sony Xperia Z ultra (C6802) 5.0.2 stock kernel, below command I got for Sony Xperia S for JB:
python mkelf.py -o kernel.elf [email protected] [email protected],ramdisk [email protected],rpm
Or, will above command work with Sony Xperia ZU 5.0.2 as well ?
Edit: Never mind, got the DoomLord's link to compile kernel.
Thanks

Ask question about kernel compiling

i am ready to give answers for your question and douts about kernel compiling and rom compiling
i know its sometimes feel hard to find solution i know how its like so feel free to ask
This guy need help
http://forum.xda-developers.com/showthread.php?t=3397932
Sent from my SM-G361F
I'm getting this kernel error and in not sure why http://pastebin.com/3tHLAJGP. So I deleted the error in line 181 and ran into this error http://pastebin.com/bKnX70tQ. I'm on Ubuntu 16.04. I'm coming from 15.10 I've never ran into these errors. Not even on 14.04.
Sent from my SM-G900P using XDA-Developers mobile app
Problem when building mediatek kernel
Hello guys,
I'm facing a small problem when compiling the stock rom for my device from source, but the main problem is when compiling the kernel.
Well, the settings are the following:
Device: LG G Pro Lite (D683)
Android version: 4.4.2 (AOSP + LG official files)
Build environment: Fedora 23 (make 3.81), kernel 4.7.X.
//------------------------- (TRYING) BUILDING THE KERNEL -----------------
Steps:
Code:
-> $ cd /home/mauro.mascarenhas/Documents/Android_ROM
-> $ mkdir KERNEL
-> $ cd KERNEL
-> $ tar xvzf LGD683_GProLite_Kitkat_V20c_Kernel.tar.gz
-> $ PATH
-> $ PATH=$PATH:/home/mauro.mascarenhas/Documentos/Android_ROM/AOSP/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/
-> $ export PATH
-> $ ./mk muse77_phone_kk n k
After that I was supposed to have an output but I get lots of error messages in the beginning like this:
Code:
/bin/bash: scl: line 1: syntax error: premature end of file
/bin/bash: error when importing the definition to `BASH_FUNC_scl'
More details (logs) are on this post: http://forum.xda-developers.com/optimus-g-pro/d680-development/rom-genesisg3-1-0-t3183601/post67512342#post67512342
Since now,
thank you A LOT.

v8_mksnapshot.arm: No such file or directory?

Hi folks,
(New to the forums, tho I've been reading a bit...)
I'm trying to build the Copperhead OS version of Android (marshmallow, for a 2014 Nexus 5) and have run into an issue that I can't seem to get around. Everything seems fine until I get to this:
Code:
target Generated: libv8 <= out/host/linux-x86/bin/v8_mksnapshot.arm
/bin/bash: out/host/linux-x86/bin/v8_mksnapshot.arm: No such file or directory
make: *** [out/target/product/generic/gen/STATIC_LIBRARIES/libv8_intermediates/snapshot_arm.cc] Error 127
...which kills the build. I've been through the makefile in 'external/v8/Android.mksnapshot.mk', which seems to be controlling this part of the build, but as far as I can tell the name of the right src to compile is generated on the fly -- and I don't know enough about this to work past it in a reasonable amount of time. Any hints?
Thanks!
-j
Actually, it looks like the thing that's missing (v8_mksnapshot.arm) is what's used to compile generated source -- the compiler isn't complaining about the generated source itself:
Code:
# Generate snapshot.cc
ifeq ($(ENABLE_V8_SNAPSHOT),true)
SNAP_GEN := $(generated_sources)/snapshot_$(TARGET_ARCH).cc
MKSNAPSHOT := $(HOST_OUT_EXECUTABLES)/v8_mksnapshot.$(TARGET_ARCH)
$(SNAP_GEN): PRIVATE_CUSTOM_TOOL = $(HOST_OUT_EXECUTABLES)/v8_mksnapshot.$(TARGET_ARCH) --log-snapshot-positions --logfile $(dir [email protected])/v8-snapshot_$(TARGET_ARCH).log [email protected]
$(SNAP_GEN): $(MKSNAPSHOT)
$(transform-generated-source)
LOCAL_GENERATED_SOURCES_$(TARGET_ARCH) += $(SNAP_GEN)
...except that 'v8_mksnapshot.arm' is definitely in 'out/host/linux-x86/bin/'. When I try to run that executable:
Code:
[email protected]:/deploy/copperheados-marshmallow-release$ ./out/host/linux-x86/bin/v8_mksnapshot.arm
-bash: ./out/host/linux-x86/bin/v8_mksnapshot.arm: No such file or directory
[email protected]:/deploy/copperheados-marshmallow-release$ ls -l ./out/host/linux-x86/bin/v8_mksnapshot.arm
-rwxr-xr-x 1 admin admin 181048624 Sep 17 15:34 ./out/host/linux-x86/bin/v8_mksnapshot.arm
That usually means some library on which the executable depends is missing.

Categories

Resources