Velocity is Like OpenTable on Steroids

We all enjoy a night out with friends or our significant other from time to time. However, there is … more

Android Lollipop Lands for the Sony Xperia Z Ultra

The undisputed king of the beasts–at least in Sony’s current stable,is the … more

Android 5.0 Lollipop in 3D–EVO 3D, That Is!

It is that time of the year once again. Flowers bloom (or snow falls, depending on which … more

Gaming Console with Lollipop? Ouya Gets an Android TV Port

Android is a very flexible platform, and it can be used on a large variety of … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Help with zImage kernel compilation

OP spkraul

24th June 2014, 12:08 AM   |  #1  
spkraul's Avatar
OP Member
Flag Naxos
Thanks Meter: 46
 
73 posts
Join Date:Joined: Nov 2012
More
This is my first time trying to compile my own kernel, i am dealing some problems and need help

i get these messages when executing the commang "make"

CHK include/linux/version.h
SYMLINK include/asm -> include/asm-arm
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
CC kernel/bounds.s
CC scripts/mod/empty.o
arm-linux-gnueabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
arm-linux-gnueabi-gcc: error trying to exec 'cc1make[1]: *** [kernel/bounds.s] Error 1
': execvp: make: *** [prepare0] Error 2
make: No such file or directory
*** Waiting for unfinished jobs....make[2]:
*** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2

i red quite many webpages and i follow this guides
http://lanrat.com/how-to-compile-a-l...l-for-android/
http://hertaville.com/2012/09/28/dev...ross-compiler/

i am running ubuntu 14.04 lts 64 bit. i am trying to compile kernel 2.6.32 for s3c6410. old chipset but even if brick it i do not care much

any help ?
Last edited by spkraul; 24th June 2014 at 12:47 AM.
24th June 2014, 03:43 AM   |  #2  
shimp208's Avatar
Recognized Contributor
Flag Boston
Thanks Meter: 1,655
 
2,297 posts
Join Date:Joined: Jan 2011
Donate to Me
More
Quote:
Originally Posted by spkraul

This is my first time trying to compile my own kernel, i am dealing some problems and need help

i get these messages when executing the commang "make"

CHK include/linux/version.h
SYMLINK include/asm -> include/asm-arm
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
CC kernel/bounds.s
CC scripts/mod/empty.o
arm-linux-gnueabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
arm-linux-gnueabi-gcc: error trying to exec 'cc1make[1]: *** [kernel/bounds.s] Error 1
': execvp: make: *** [prepare0] Error 2
make: No such file or directory
*** Waiting for unfinished jobs....make[2]:
*** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2

i red quite many webpages and i follow this guides
http://lanrat.com/how-to-compile-a-l...l-for-android/
http://hertaville.com/2012/09/28/dev...ross-compiler/

i am running ubuntu 14.04 lts 64 bit. i am trying to compile kernel 2.6.32 for s3c6410. old chipset but even if brick it i do not care much

any help ?

Which toolchain and version of the toolchain are you using? I would recommend checking out this information on someone who ran into the same problem as you and how they fixed it. Let me know if you still have questions.
26th June 2014, 06:27 PM   |  #3  
spkraul's Avatar
OP Member
Flag Naxos
Thanks Meter: 46
 
73 posts
Join Date:Joined: Nov 2012
More
i execute <<cd linux>>, <<make mrproper>>, <<make V=1 all>> and i get the following messages

alex@Alexandria:~$ cd linux
bash: cd: linux: No such file or directory
alex@Alexandria:~$ make mrproper
make: *** No rule to make target `mrproper'. Stop.
alex@Alexandria:~$ cd /home/alex/o2droid/kern_2.6.32
alex@Alexandria:~/o2droid/kern_2.6.32$ make prproper
make: *** No rule to make target `prproper'. Stop.
alex@Alexandria:~/o2droid/kern_2.6.32$ make V=1 all
set -e; : ' CHK include/linux/version.h'; mkdir -p include/linux/; (echo \#define LINUX_VERSION_CODE 132640; echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' < /home/alex/o2droid/kern_2.6.32/Makefile > include/linux/version.h.tmp; if [ -r include/linux/version.h ] && cmp -s include/linux/version.h include/linux/version.h.tmp; then rm -f include/linux/version.h.tmp; else : ' UPD include/linux/version.h'; mv -f include/linux/version.h.tmp include/linux/version.h; fi
make -f scripts/Makefile.build obj=arch/arm/tools include/asm-arm/mach-types.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
rm -f include/config/kernel.release
echo 2.6.32.9-00163-g4c4becf-dirty > include/config/kernel.release
set -e; : ' CHK include/linux/utsrelease.h'; mkdir -p include/linux/; if [ `echo -n "2.6.32.9-00163-g4c4becf-dirty" | wc -c ` -gt 64 ]; then echo '"2.6.32.9-00163-g4c4becf-dirty" exceeds 64 characters' >&2; exit 1; fi; (echo \#define UTS_RELEASE \"2.6.32.9-00163-g4c4becf-dirty\" < include/config/kernel.release > include/linux/utsrelease.h.tmp; if [ -r include/linux/utsrelease.h ] && cmp -s include/linux/utsrelease.h include/linux/utsrelease.h.tmp; then rm -f include/linux/utsrelease.h.tmp; else : ' UPD include/linux/utsrelease.h'; mv -f include/linux/utsrelease.h.tmp include/linux/utsrelease.h; fi
set -e; if [ -L include/asm ]; then asmlink=`readlink include/asm | cut -d '-' -f 2`; if [ "$asmlink" != "arm" ]; then echo "ERROR: the symlink include/asm points to asm-$asmlink but asm-arm was expected"; echo " set ARCH or save .config and run 'make mrproper' to fix it"; exit 1; fi; test -e $asmlink || rm include/asm; elif [ -d include/asm ]; then echo "ERROR: include/asm is a directory but a symlink was expected"; exit 1; fi
if [ ! -L include/asm ]; then : ' SYMLINK include/asm -> include/asm-arm'; if [ ! -d include/asm-arm ]; then mkdir -p include/asm-arm; fi; ln -fsn asm-arm include/asm; fi
mkdir -p .tmp_versions ; rm -f .tmp_versions/*
make -f scripts/Makefile.build obj=scripts/basic
(cat /dev/null; ) > scripts/basic/modules.order
make -f scripts/Makefile.build obj=.
(cat /dev/null; ) > modules.order
mkdir -p kernel/
/opt/cross/bin/arm-linux-gnueabi-gcc -Wp,-MD,kernel/.bounds.s.d -nostdinc -isystem include -Iinclude -I/home/alex/o2droid/kern_2.6.32/arch/arm/include -include include/linux/autoconf.h -D__KERNEL__ -mlittle-endian -Iarch/arm/mach-s3c6400/include -Iarch/arm/mach-s3c6410/include -Iarch/arm/plat-s3c64xx/include -Iarch/arm/plat-s3c/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -msoft-float -Uarm -fomit-frame-pointer -g -O3 -marm -march=armv6zk -mfpu=vfp -mtune=arm1176jzf-s -mtune=arm1136j-s -mfloat-abi=softfp -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(bounds)" -D"KBUILD_MODNAME=KBUILD_STR(bounds)" -fverbose-asm -S -o kernel/bounds.s kernel/bounds.c
arm-linux-gnueabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2


i am using toolchain arm-eabi 4.6
i red the documentation
i have nothing like <<cc1>> under usr/bin
I don't have a /usr/local/libexec directory
i installed anything about cc1 from package manager and still nothing changed.
i did something wrong with <<make menuconfig>> or else ?
i also follow this guide https://github.com/argentinos/o2droi...00/kern_2.6.32
i use the wrong toolchain ?
27th June 2014, 04:15 AM   |  #4  
shimp208's Avatar
Recognized Contributor
Flag Boston
Thanks Meter: 1,655
 
2,297 posts
Join Date:Joined: Jan 2011
Donate to Me
More
Quote:
Originally Posted by spkraul


i am using toolchain arm-eabi 4.6
i red the documentation
i have nothing like <<cc1>> under usr/bin
I don't have a /usr/local/libexec directory
i installed anything about cc1 from package manager and still nothing changed.
i did something wrong with <<make menuconfig>> or else ?
i also follow this guide https://github.com/argentinos/o2droi...00/kern_2.6.32
i use the wrong toolchain ?

If you follow the guide in the repository that is meant for a pure Linux kernel, what def config under arch/arm/configs did you use?

Try using a procedure similar to the following:

Code:
export TOP= [where you installed the toolchain or top of android AOSP code base]
export PATH=$TOP/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH (use corresponding arm-eabi bin path)
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi- 
make NAMEOFDEVICE_defconfig
make -jx (Where x is the number of jobs you want -j4 is a safe option)
27th June 2014, 06:44 PM   |  #5  
spkraul's Avatar
OP Member
Flag Naxos
Thanks Meter: 46
 
73 posts
Join Date:Joined: Nov 2012
More
i followed your commands and no result yet. same problems

i checked this guide http://ubuntuforums.org/showthread.php?t=2213325
and got the following

alex@Alexandria:~$ arm-none-linux-gnueabi-gcc -print-prog-name=cc1
arm-none-linux-gnueabi-gcc: command not found
alex@Alexandria:~$ arm-linux-gnueabi-gcc -print-prog-name=cc1
/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/cc1
alex@Alexandria:~$ arm-linux-gnueabihf-gcc -print-prog-name=cc1
The program 'arm-linux-gnueabihf-gcc' is currently not installed. You can install it by typing:
sudo apt-get install gcc-arm-linux-gnueabihf
alex@Alexandria:~$ dpkg -l | grep '\<gcc'
ii gcc 4:4.8.2-1ubuntu6 amd64 GNU C compiler
ii gcc-4.6 4.6.4-6ubuntu2 amd64 GNU C compiler
ii gcc-4.6-base:amd64 4.6.4-6ubuntu2 amd64 GCC, the GNU Compiler Collection (base package)
ii gcc-4.6-base:i386 4.6.4-6ubuntu2 i386 GCC, the GNU Compiler Collection (base package)
ii gcc-4.6-multilib 4.6.4-6ubuntu2 amd64 GNU C compiler (multilib files)
ii gcc-4.7-arm-linux-gnueabi 4.7.3-12ubuntu1cross1.85 amd64 GNU C compiler
ii gcc-4.7-arm-linux-gnueabi-base 4.7.3-12ubuntu1cross1.85 amd64 GCC, the GNU Compiler Collection (base package)
ii gcc-4.8 4.8.2-19ubuntu1 amd64 GNU C compiler
ii gcc-4.8-arm-linux-gnueabihf-base 4.8.2-16ubuntu4cross0.11 amd64 GCC, the GNU Compiler Collection (base package)
ii gcc-4.8-base:amd64 4.8.2-19ubuntu1 amd64 GCC, the GNU Compiler Collection (base package)
ii gcc-4.8-base:i386 4.8.2-19ubuntu1 i386 GCC, the GNU Compiler Collection (base package)
ii gcc-4.8-multilib 4.8.2-19ubuntu1 amd64 GNU C compiler (multilib files)
ii gcc-4.9-base:amd64 4.9-20140406-0ubuntu1 amd64 GCC, the GNU Compiler Collection (base package)
ii gcc-4.9-base:i386 4.9-20140406-0ubuntu1 i386 GCC, the GNU Compiler Collection (base package)
ii gcc-arm-linux-gnueabi 4:4.7.2-1 amd64 The GNU C compiler for armel architecture
ii gcc-multilib 4:4.8.2-1ubuntu6 amd64 GNU C compiler (multilib files)

i am using omniaII_defconfig
Last edited by spkraul; 27th June 2014 at 06:46 PM.
27th June 2014, 11:16 PM   |  #6  
spkraul's Avatar
OP Member
Flag Naxos
Thanks Meter: 46
 
73 posts
Join Date:Joined: Nov 2012
More
upd... i am searching and testing possible solutions, but nothing is working. i stuck on this mistake. cc1 exists on my pc and is executable. i also tried another toolchain 4.4.3 which is considered more compatible, but stuck on the same error again. really driving me crazy. i have too much job to do on the kernel improvement, but if i will never be able to compile it it doasn't worth trying. i appreciate your help. any ideas ?
28th June 2014, 02:36 AM   |  #7  
shimp208's Avatar
Recognized Contributor
Flag Boston
Thanks Meter: 1,655
 
2,297 posts
Join Date:Joined: Jan 2011
Donate to Me
More
Quote:
Originally Posted by spkraul

upd... i am searching and testing possible solutions, but nothing is working. i stuck on this mistake. cc1 exists on my pc and is executable. i also tried another toolchain 4.4.3 which is considered more compatible, but stuck on the same error again. really driving me crazy. i have too much job to do on the kernel improvement, but if i will never be able to compile it it doasn't worth trying. i appreciate your help. any ideas ?

After looking more into it I noticed there is a script included in the files for building the kernel called make_kernel, you should be able to build the kernel running the script, "./make_kernel -k" with the -k option being defined by the script to make the kernel. You may have to tweak the script to suite your build environment.
29th June 2014, 05:37 AM   |  #8  
spkraul's Avatar
OP Member
Flag Naxos
Thanks Meter: 46
 
73 posts
Join Date:Joined: Nov 2012
More
thanks a lot. i did run the script many times, with many ways. i see some compilation being done, but i always after a few minutes i end with the message "Error ... kernel not compiled!"

i guess some code errors cause it, but how to locate them and fix them under millions of programming lines ?
i red that before being able to compile a kernel and before this kernle is funtional you must fix many errors and deal many problems, but i am not sure how difficult this is going to be in my case.

i always get messages of this type " warning: variable ‘*’ set but not used [-Wunused-but-set-variable]
"

you follow any specific procedure to deal with these errors ?
3rd July 2014, 05:20 AM   |  #9  
shimp208's Avatar
Recognized Contributor
Flag Boston
Thanks Meter: 1,655
 
2,297 posts
Join Date:Joined: Jan 2011
Donate to Me
More
Quote:
Originally Posted by spkraul

thanks a lot. i did run the script many times, with many ways. i see some compilation being done, but i always after a few minutes i end with the message "Error ... kernel not compiled!"

i guess some code errors cause it, but how to locate them and fix them under millions of programming lines ?
i red that before being able to compile a kernel and before this kernle is funtional you must fix many errors and deal many problems, but i am not sure how difficult this is going to be in my case.

i always get messages of this type " warning: variable * set but not used [-Wunused-but-set-variable]
"

you follow any specific procedure to deal with these errors ?

In the error messages you will see what file the error is in and which line the error occurs going to that file and line(s) the error occurred at is the best place to start. Instead of using the script take the commands in the script and do them manually in the order the script would execute them in, until you get an error you can troubleshoot or it compiles successfully.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes