[Q] [KERNEL]Help for building please :) - Android Q&A, Help & Troubleshooting

Hey guys,
I need some help for building kernel, i want to get start with some devlopment
I try to build the XPERIA Play kernel, I follow this sony's thread for builing kernel http://developer.sonymobile.com/wp/2011/05/06/how-to-build-a-linux-kernel/comment-page-7/#comments
I've downloaded the this for the toolchain https://sourcery.mentor.com/sgpp/lite/arm/portal/release2032 (gnu/linux TAR)
And when i type the following commands i don't get the zImage in arch/arm/boot folder
>export CCOMPILER=[myfolder]/bin/arm-none-eabi-
>ARCH=arm CROSS_COMPILE=$CCOMPILER make semc_zeus_defconfig
drivers/usb/gadget/Kconfig:826:warning: defaults for choice values not supported
#
# configuration written to .config
#
I get this but i don't get the zImage file
What wrong ?
EDIT/UPDATE:
I get the command for builing the kernel but i get a command not found error
~/xs/3.0.A.2.181_182/kernel$> ARCH=arm CROSS_COMPILE=$CCOMPILER make
make: /home/chich/xs/arm-2011.09/bin/arm-none-eabi-gcc : commande introuvable
scripts/kconfig/conf -s arch/arm/Kconfig
drivers/usb/gadget/Kconfig:826:warning: defaults for choice values not supported
make: /home/chich/xs/arm-2011.09/bin/arm-none-eabi-gcc : commande introuvable
CHK include/linux/version.h
make[1]: « include/asm-arm/mach-types.h » est à jour.
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
CC kernel/bounds.s
/bin/sh: 1: /home/chich/xs/arm-2011.09/bin/arm-none-eabi-gcc: not found
make[1]: *** [kernel/bounds.s] Erreur 127
make: *** [prepare0] Erreur 2
I check the arm-2011.09/bin/ folder and the file is here

Related

[Q] Compile L9 kernel

I have difficulty to compile the L9 kernel. The terminal output "include/lge/lge_blocking_monitor.h: No such file or directory".
Here is the whole compile log:
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
SKIPPED include/generated/compile.h
CC arch/arm/mach-omap2/lge/lge_blocking_monitor.o
arch/arm/mach-omap2/lge/lge_blocking_monitor.c:21:46: error: include/lge/lge_blocking_monitor.h: No such file or directory
make[2]: *** [arch/arm/mach-omap2/lge/lge_blocking_monitor.o] Error 1
make[1]: *** [arch/arm/mach-omap2/lge] Error 2
make: *** [arch/arm/mach-omap2] Error 2
Anyone can give me some help?
amnik said:
I have difficulty to compile the L9 kernel. The terminal output "include/lge/lge_blocking_monitor.h: No such file or directory".
Here is the whole compile log:
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
SKIPPED include/generated/compile.h
CC arch/arm/mach-omap2/lge/lge_blocking_monitor.o
arch/arm/mach-omap2/lge/lge_blocking_monitor.c:21:46: error: include/lge/lge_blocking_monitor.h: No such file or directory
make[2]: *** [arch/arm/mach-omap2/lge/lge_blocking_monitor.o] Error 1
make[1]: *** [arch/arm/mach-omap2/lge] Error 2
make: *** [arch/arm/mach-omap2] Error 2
Anyone can give me some help?
Click to expand...
Click to collapse
Does the file exist? Look into the path mentioned. Which toolchain are you using?
Sent from my LG-P760 using xda app-developers app
N00BY0815 said:
Does the file exist? Look into the path mentioned. Which toolchain are you using?
Sent from my LG-P760 using xda app-developers app
Click to expand...
Click to collapse
Should the path " include/lge/lge_blocking_monitor.h" under kernel or somewhere?
I am following the instruction inside the P760 V20B source.
2. Kernel Build
- Untar using following command at the android folder:
tar xvzf LGP760_JB_Kernel.tar.gz
- change directory to kernel root
cd kernel
- make configuration:
make u2_p760_defconfig ARCH=arm
- make kernel zImage:
make ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- zImage
amnik said:
I have difficulty to compile the L9 kernel. The terminal output "include/lge/lge_blocking_monitor.h: No such file or directory".
Here is the whole compile log:
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
SKIPPED include/generated/compile.h
CC arch/arm/mach-omap2/lge/lge_blocking_monitor.o
arch/arm/mach-omap2/lge/lge_blocking_monitor.c:21:46: error: include/lge/lge_blocking_monitor.h: No such file or directory
make[2]: *** [arch/arm/mach-omap2/lge/lge_blocking_monitor.o] Error 1
make[1]: *** [arch/arm/mach-omap2/lge] Error 2
make: *** [arch/arm/mach-omap2] Error 2
Anyone can give me some help?
Click to expand...
Click to collapse
Edit files that give you errors like leg_blocking_monitor.c
Lookup "include/lge/lge_blocking_monitor.h"
and change that to "../include/lge/lge_blocking_monitor.h" or it may be ../../
Several files will have to be modified
edit : #include <../include/lge/lge_blocking_monitor.h>

[HELP] How to compile android kernel

Hi guys,
I tried to compile an android kernel following the tutorials that are on this forum, but there is something that doesn't works...
I installed the libraries indicated, and downloaded both NDK and Kernel sources, and I extracted it in my home folder.
Then I changed directory in the directory of the kernel and I made the three export indicated in tutorials:
export ARCH=arm
export CROSS_COMPILE=arm-linux-androideabi- (Here I also tried with "export CROSS_COMPILE=arm-eabi-")
export PATH=$PATH:~/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin
Now I choosed a .config file in the arch/arm/configs directory and I used the command:
make *file config*
make menuconfig
And then, when I use the command "make -j2", I have some problems, in fact:
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CC scripts/mod/empty.o
arm-eabi-gcc: No such file or directory
Is your PATH set correctly?
make[2]: *** [scripts/mod/empty.o] Error 2
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....
Can you tell me where I'm wrong please?
Thanks

kernel compile problem need help

i tried to compile using linaro 4.8 toolchain but i always get this error...
[email protected]:/usr/src/kernel# cd Vengeance-Kernel-MSM7x27
[email protected]:/usr/src/kernel/Vengeance-Kernel-MSM7x27# export ARCH=arm
[email protected]:/usr/src/kernel/Vengeance-Kernel-MSM7x27# export CROSS_COMPILE=/usr/src/toolchain/Linaro-Toolchain-4.8/bin/arm-linux-androideabi-
[email protected]:/usr/src/kernel/Vengeance-Kernel-MSM7x27# make
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
/usr/src/toolchain/Linaro-Toolchain-4.8/bin/../libexec/gcc/arm-linux-androideabi/4.8.1/cc1: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
PratsPro said:
i tried to compile using linaro 4.8 toolchain but i always get this error...
[email protected]:/usr/src/kernel# cd Vengeance-Kernel-MSM7x27
[email protected]:/usr/src/kernel/Vengeance-Kernel-MSM7x27# export ARCH=arm
[email protected]:/usr/src/kernel/Vengeance-Kernel-MSM7x27# export CROSS_COMPILE=/usr/src/toolchain/Linaro-Toolchain-4.8/bin/arm-linux-androideabi-
[email protected]:/usr/src/kernel/Vengeance-Kernel-MSM7x27# make
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
/usr/src/toolchain/Linaro-Toolchain-4.8/bin/../libexec/gcc/arm-linux-androideabi/4.8.1/cc1: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
Click to expand...
Click to collapse
Try this:
sudo apt-get install lib32z1
And restart the build.
eagleeyetom said:
Try this:
sudo apt-get install lib32z1
And restart the build.
Click to expand...
Click to collapse
thanku.....compiled perfectly....just one more question....what r the files associated with clocks?? i have a kernel with oc and one without oc i want to know where the difference lies??
PratsPro said:
thanku.....compiled perfectly....just one more question....what r the files associated with clocks?? i have a kernel with oc and one without oc i want to know where the difference lies??
Click to expand...
Click to collapse
You're welcome It's not that easy, take a look at this commit: https://github.com/DooMLoRD/android...mmit/b572f11485465bc6de36b84270fb8bb0c418b487 to find out more.

Help compiling my first kernel

I've been trying to build a modified kernel and decided to start out by building the kernel I'm currently using on my device from the dev's github.
without modifying anything, I followed this guide: http://forum.xda-developers.com/android/software/ultimate-guide-compile-android-kernel-t2871276
I get to the point where I type "make -j<cores>"(in step 6) and I get this:
Code:
[email protected]:~/android/kernel# make
make: /root/android/kernel/arm-eabi-4.4.3/bin/arm-eabi-gcc: Command not found
scripts/kconfig/conf --silentoldconfig Kconfig
make: /root/android/kernel/arm-eabi-4.4.3/bin/arm-eabi-gcc: Command not found
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
/bin/sh: 1: /root/android/kernel/arm-eabi-4.4.3/bin/arm-eabi-gcc: not found
/root/android/kernel/./Kbuild:35: recipe for target 'kernel/bounds.s' failed
make[1]: *** [kernel/bounds.s] Error 127
Makefile:958: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
I dont know what I'm doing wrong, I've tried compiling with Kali Linux and Ubuntu.
I just can't get past this part.
Eventually I want to replace the wifi drivers with a modified one to allow the device to enter monitor mode.
Could someone please help?
Thank you.

Changing defconfig in kernel source tree

I want to add an option in a defconfig in the msm Android 10 kernel. Whenever I change the defconfig and run
build/build.sh
I get following error:
Code:
...
HOSTLD scripts/genksyms/genksyms
HOSTLD scripts/mod/modpost
UPD include/config/kernel.release
Using /home/mbuch/kernels/msm/private/msm-google as source for kernel
/home/mbuch/kernels/msm/private/msm-google is not clean, please run 'make mrproper'
in the '/home/mbuch/kernels/msm/private/msm-google' directory.
/home/mbuch/kernels/msm/private/msm-google/Makefile:1148: recipe for target 'prepare3' failed
make[2]: *** [prepare3] Error 1
Makefile:152: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
Makefile:24: recipe for target '__sub-make' failed
make: *** [__sub-make] Error 2
To change the defconfig I ran the following commands:
1. Copy existing defconfig template to arch/arm64/configs/mydefconfig
2. From private/msm-google I run
Code:
make ARCH=arm64 mydefconfig
make ARCH=arm64 savedefconfig
build/build.sh

Categories

Resources