• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Triumph kernel build failed

dsmryder

Android Expert
Code:
11:41:18_~$ cd kernel
11:41:28_~/kernel$ make
Makefile:530: /home/daddy/kernel/arch/x86/Makefile: No such file or directory
make: *** No rule to make target `/home/daddy/kernel/arch/x86/Makefile'.  Stop.
11:42:53_~/kernel$ export ARCH=arm
11:43:09_~/kernel$ export CROSS_COMPILE=/home/daddy/kernel/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
11:43:33_~/kernel$ make
make: /home/daddy/kernel/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: Command not found
  CHK     include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-arm
  CC      kernel/bounds.s
/bin/sh: /home/daddy/kernel/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
11:43:39_~/kernel$
I don't what is wrong. I'm not sure what I'm doing in the first place, I normally just do whatever I see in a post or whatever. Did I loose GCC?
 
Code:
11:41:18_~$ cd kernel
11:41:28_~/kernel$ make
Makefile:530: /home/daddy/kernel/arch/x86/Makefile: No such file or directory
make: *** No rule to make target `/home/daddy/kernel/arch/x86/Makefile'.  Stop.
11:42:53_~/kernel$ export ARCH=arm
11:43:09_~/kernel$ export CROSS_COMPILE=/home/daddy/kernel/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
11:43:33_~/kernel$ make
make: /home/daddy/kernel/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: Command not found
  CHK     include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-arm
  CC      kernel/bounds.s
/bin/sh: /home/daddy/kernel/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
11:43:39_~/kernel$
I don't what is wrong. I'm not sure what I'm doing in the first place, I normally just do whatever I see in a post or whatever. Did I loose GCC?
Man, I don't have a clue either. Hopefully someone more knowledgeable than me knows what's up here. Try purging and installing gcc again. If I had to guess, I would say that there was an issue upgrading gcc recently. But I am by no means an expert.
 
Code:
11:41:18_~$ cd kernel
11:41:28_~/kernel$ make
Makefile:530: /home/daddy/kernel/arch/x86/Makefile: No such file or directory
make: *** No rule to make target `/home/daddy/kernel/arch/x86/Makefile'.  Stop.
11:42:53_~/kernel$ export ARCH=arm
11:43:09_~/kernel$ export CROSS_COMPILE=/home/daddy/kernel/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
11:43:33_~/kernel$ make
make: /home/daddy/kernel/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: Command not found
  CHK     include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-arm
  CC      kernel/bounds.s
/bin/sh: /home/daddy/kernel/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
11:43:39_~/kernel$
I don't what is wrong. I'm not sure what I'm doing in the first place, I normally just do whatever I see in a post or whatever. Did I loose GCC?

Here is the steps I do to build the kernel

$ git clone https://github.com/MTDEV-CM7/WX_435_Kernel-CM7.git
$ cd WX_435_Kernel-CM7
$ cp config .config
$ export ARCH=arm
$ export CROSS_COMPILE=~/your_android_platform_folder/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
$ make -jX

Once your done you will find a the zimage located in arch/arm/boot/zImage. Copy that to cm7/devices/motorola/triumph and rename it to kernel. Then build the android source code.

Here is some info to take the zImage and build it into a boot.img from b_randon

b_randon14 said:
On my repo, I include some tools that build a boot.img from the comrpessed zImage, along with the initram files. Everything is in the build.sh script (where the actual commands to build the boot.img and zip), in tools/bootimg folder(tools to make the boot.img from an initram zip and a zImage), the releasetools folder(which contains the META-INF folder for the CWM zip, with the updater-script and update binary) and then in usr/initram-files is where the init ramdisk files are.

Basically the build script exports ARCH=arm and the cross compile varialbe(you would need to change it to point to the toolchain you use), then it calls make(it checks to see if a .config file is present, so you would need to make your default config you use, otherwise it will make the stock triumph config, you can configure it otherwise though) then after the kernel has finifshed making, it copies the zImage to the release tools folder, makes an initramzip with the mkbootfs tool, then packs those two together using mkbootimg, then removes everything from the releasetools follder besides the META-INF folder and the newly created boot.img, then zips that up into a flashable CWM zip.

If you got any questions let me know, I can help you get your kernel repo set up to have an automated build script like mine. Makes it a 1,000 times easier!!
 
It helps if I have the tool chain. I forgot I didn't bring it with me when I cloned the kernel. I also grabbed the script from b_random and modified it too work.
Thank you for the ideas
 
It helps if I have the tool chain. I forgot I didn't bring it with me when I cloned the kernel. I also grabbed the script from b_random and modified it too work.
Thank you for the ideas

As long as you have the CM7 source code you have the tool chain, it's built into the source based on the directory I listed.
 
As long as you have the CM7 source code you have the tool chain, it's built into the source based on the directory I listed.

Yeah, that's where I snagged it from. I copied it to the kernel so it would be a total package. I just forgot to push the modified script frome b_random.
 
I figure this would be a good place to post. I can not get a kernel to build, I have tried 5 different tool chains but each one gives a different error. I have gotten past most of the errors but am stuck.

The most common now is:
CC scripts/mod/empty.o
as: unrecognized option '-EL'
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2

I've looked at the scripts but they are all basically the same between kernels, I can not for the life of me find an -EL option anywhere. Any ideas would be greatly appreciated. I have broke down to no modifications at all and just trying to build. I have tried building stock, cm7, bkernel, and a GB kernel and all get the same errors. :banghead:
 
I figure this would be a good place to post. I can not get a kernel to build, I have tried 5 different tool chains but each one gives a different error. I have gotten past most of the errors but am stuck.

The most common now is:
CC scripts/mod/empty.o
as: unrecognized option '-EL'
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2

I've looked at the scripts but they are all basically the same between kernels, I can not for the life of me find an -EL option anywhere. Any ideas would be greatly appreciated. I have broke down to no modifications at all and just trying to build. I have tried building stock, cm7, bkernel, and a GB kernel and all get the same errors. :banghead:

Did you follow my instructions that I have written above?
 
Did you follow my instructions that I have written above?
Yes, that is with the commands you posted. I got further with arm-2012.03-56-arm-none-eabi, it built bkernel with a bunch of warnings, but I got a zimage. I'm reading up but still confused. I'll get it, I think I may be missing some dependencies in my system. Or, it could just be some deficiencies in my Linux knowledge. Thanks for helping out though, it is very much appreciated.
 
Yes, that is with the commands you posted. I got further with arm-2012.03-56-arm-none-eabi, it built bkernel with a bunch of warnings, but I got a zimage. I'm reading up but still confused. I'll get it, I think I may be missing some dependencies in my system. Or, it could just be some deficiencies in my Linux knowledge. Thanks for helping out though, it is very much appreciated.

My problem was I didn't have the tool chain pointed. I ended up coping the toolchain and fixed the script to find the toolchain, now all's good.
 
Yes, that is with the commands you posted. I got further with arm-2012.03-56-arm-none-eabi, it built bkernel with a bunch of warnings, but I got a zimage. I'm reading up but still confused. I'll get it, I think I may be missing some dependencies in my system. Or, it could just be some deficiencies in my Linux knowledge. Thanks for helping out though, it is very much appreciated.

The problems are in the toolchains. I am looking for one that would work best. I think I'll start with the one that b_random suggested.
 
I like linaro 4.6 myself. Haven't had much luck with 4.7.

How do you setup linaro? I downloaded it and I currently forgot where I am with it.:D
I have been able to build the kernel even with errors, and I'm running one of them now. I just saw that you just pointed to it in your script. Is there anything else I need to do?
I found out wher I am. I had errors pointing to "libstdc++.so.6". It says I don't have the file, but I know I do because when it said it the first time, I hunted it down and put it where it said it should be (/usr/lib32 I think) Now the errors a slighly different, just not mentioning the directory any more.

I guess the better question would be "why" should we use linaro's toolchain? Is it more error resistant?
 
Back
Top Bottom