5,597,937 Members 38,767 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Help Compiling kernel from sony source

Tip us?
 
anikesh102
Old
#1  
anikesh102's Avatar
Member - OP
Thanks Meter 24
Posts: 82
Join Date: Nov 2012
Location: Chennai
Default [Q] Help Compiling kernel from sony source

root@anikesh-Lenovo-IdeaPad-Y500:/home/anikesh/android/kernel# make -j8
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CC scripts/mod/empty.o
make[1]: `include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
/root/home/anikesh/android/android_prebuilt_toolchains/arm-eabi-4.4.3/bin/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....
/root/home/anikesh/android/android_prebuilt_toolchains/arm-eabi-4.4.3/bin/arm-eabi-gcc: No such file or directory
Is your PATH set correctly?
make[1]: *** [kernel/bounds.s] Error 2
make: *** [prepare0] Error 2
root@anikesh-Lenovo-IdeaPad-Y500:/home/anikesh/android/kernel#

Pls Can someone Help?
 
Envious_Data
Old
#2  
Senior Member
Thanks Meter 290
Posts: 910
Join Date: Oct 2012
Location: Yaizu
Do you have the prebuilt toolchains installed

And if so, do you have them placed in /android/android_prebuilt_toolchains?

Sent from my LT26i using XDA Premium 4 mobile app
Hit thanks if it helped, and if your unsure about something, Think... think some more, then post your question.

Current Devices:
Sony Xperia S
Sony Xperia Z1 (not exactly mine yet :/)

Previously Owned:
Nokia 3310 (the tank)
Nokia N95

 
anikesh102
Old
#3  
anikesh102's Avatar
Member - OP
Thanks Meter 24
Posts: 82
Join Date: Nov 2012
Location: Chennai
Quote:
Originally Posted by Envious_Data View Post
Do you have the prebuilt toolchains installed

And if so, do you have them placed in /android/android_prebuilt_toolchains?

Sent from my LT26i using XDA Premium 4 mobile app
i have solved that problem. thanks btw.
i m using this guide
http://forum.xda-developers.com/show....php?t=2285731

now i have created kernel.elf file and when i flash it to my device xperia S i just get a black screen that turns on for 5 sec and den off continuously. i haven't changed any configuration and no changes in ramdisk... simply just compiled with no errors .. then why the kernel is not booting.. Am i doing some thing wrong?
 
Dark Wraith
Old
#4  
Dark Wraith's Avatar
Senior Member
Thanks Meter 531
Posts: 252
Join Date: Feb 2013
Location: Bangalore

 
DONATE TO ME
Quote:
Originally Posted by anikesh102 View Post
i have solved that problem. thanks btw.
i m using this guide
http://forum.xda-developers.com/show....php?t=2285731

now i have created kernel.elf file and when i flash it to my device xperia S i just get a black screen that turns on for 5 sec and den off continuously. i haven't changed any configuration and no changes in ramdisk... simply just compiled with no errors .. then why the kernel is not booting.. Am i doing some thing wrong?
Did you implement all the makefile and defconfig fixes for making the toolchain work....you can find it in xda..search doomlords tutorial for compiling xperia kernels...link is also in my tool thread in the faq section....link is in my signature
Hit Thanks if i helped you in any way

New to Android kernel development : Check out my Tool Dark_multitool1.0
Want to develop kernels for Xperia devices : Check out my Tool Xperia_kerneltool
Beginner's guide to Programming in C/C++/Java/Python/bash : Check out this guide
A few basics about Android and how not to brick your Xperia S or any Xperia : Check out this guide


"Never argue with idiots.They will drag you down to their level and beat you with their experience"
 
anikesh102
Old
(Last edited by anikesh102; 11th December 2013 at 07:00 PM.)
#5  
anikesh102's Avatar
Member - OP
Thanks Meter 24
Posts: 82
Join Date: Nov 2012
Location: Chennai
Quote:
Originally Posted by Dark Wraith View Post
Did you implement all the makefile and defconfig fixes for making the toolchain work....you can find it in xda..search doomlords tutorial for compiling xperia kernels...link is also in my tool thread in the faq section....link is in my signature
yes i saw your thread.. and yes i made those changes.. i want to build the kernel without modifying anything... i ll tell u what i did..
1. extracted source
2. changed the directory
3. export ARCH=arm
4. export CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-
5. make fuji_nozomi_defconfig
6. make menuconfig (didn't do any changes)
7. edited makefile with Doomlord's fix
8. edited .config with Doomlord's fix
9. make -j5
it successfully compiled with no errors
now the i got the zImage
then i made a folder "compile" which consist of RPM.bin, mkelf.py, zImage, ramdisk.img
here RPM.bin and ramdisk.img are extracted from kernel.sin from official ftf file and mkelf.py from Doomlord's
10. python mkelf.py -o kernel.elf zImage@0x40208000 ramdisk.img@0x41200000,ramdisk RPM.bin@0x20000,rpm

that's all i got kernel.elf and flashed it to my device.

So now pls tell me have i done something wrong?
 
Dark Wraith
Old
#6  
Dark Wraith's Avatar
Senior Member
Thanks Meter 531
Posts: 252
Join Date: Feb 2013
Location: Bangalore

 
DONATE TO ME
Quote:
Originally Posted by anikesh102 View Post
yes i saw your thread.. and yes i made those changes.. i want to build the kernel without modifying anything... i ll tell u what i did..
1. extracted source
2. changed the directory
3. export ARCH=arm
4. export CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-
5. make fuji_nozomi_defconfig
6. make menuconfig (didn't do any changes)
7. edited makefile with Doomlord's fix
8. edited .config with Doomlord's fix
9. make -j5
it successfully compiled with no errors
now the i got the zImage
then i made a folder "compile" which consist of RPM.bin, mkelf.py, zImage, ramdisk.img
here RPM.bin and ramdisk.img are extracted from kernel.sin from official ftf file and mkelf.py from Doomlord's
10. python mkelf.py -o kernel.elf zImage@0x40208000 ramdisk.img@0x41200000,ramdisk RPM.bin@0x20000,rpm

that's all i got kernel.elf and flashed it to my device.

So now pls tell me have i done something wrong?
try python mkelf.py -o kernel.elf zImage@0x40208000 ramdisk.cpio.gz@0x41300000,ramdisk RPM_JB.bin@0x20000,rpm

and tell the result....before doing it....go to the kernel folder and do a make clean
Hit Thanks if i helped you in any way

New to Android kernel development : Check out my Tool Dark_multitool1.0
Want to develop kernels for Xperia devices : Check out my Tool Xperia_kerneltool
Beginner's guide to Programming in C/C++/Java/Python/bash : Check out this guide
A few basics about Android and how not to brick your Xperia S or any Xperia : Check out this guide


"Never argue with idiots.They will drag you down to their level and beat you with their experience"
 
anikesh102
Old
#7  
anikesh102's Avatar
Member - OP
Thanks Meter 24
Posts: 82
Join Date: Nov 2012
Location: Chennai
Quote:
Originally Posted by Dark Wraith View Post
try python mkelf.py -o kernel.elf zImage@0x40208000 ramdisk.cpio.gz@0x41300000,ramdisk RPM_JB.bin@0x20000,rpm

and tell the result....before doing it....go to the kernel folder and do a make clean
yeah i tried that also... result is same.. just a black screen... can u give me a complete procedure like i told u what i did... or pls just tell me how to create kernel.elf...
from where to get all these files -
ramdisk.cpio.gz
RPM.bin
mkelf.py

i extracted kernel.elf.rpm.bin and kernel.elf.ramdisk.gz from stock kernel.elf(extracted from ftf)

and this kernel.elf.ramdisk.gz(1) file contains kernel.elf.ramdisk(2)

so while using python command i have to use (1) or (2)...

pls help me i m stuck here since last 4 days.
 
Dark Wraith
Old
#8  
Dark Wraith's Avatar
Senior Member
Thanks Meter 531
Posts: 252
Join Date: Feb 2013
Location: Bangalore

 
DONATE TO ME
Quote:
Originally Posted by anikesh102 View Post
yeah i tried that also... result is same.. just a black screen... can u give me a complete procedure like i told u what i did... or pls just tell me how to create kernel.elf...
from where to get all these files -
ramdisk.cpio.gz
RPM.bin
mkelf.py

i extracted kernel.elf.rpm.bin and kernel.elf.ramdisk.gz from stock kernel.elf(extracted from ftf)

and this kernel.elf.ramdisk.gz(1) file contains kernel.elf.ramdisk(2)

so while using python command i have to use (1) or (2)...

pls help me i m stuck here since last 4 days.
normally i do this...extract kernel.sin from ftf package
convert kernel.sin to kernel.elf to get the bin file
unpack kernel.sin to get ramdisk.cpio.gz
now compile the zImage(same way as you did)
use mkelf.py to create kernel.elf...

and no need to flash it to check your kernel.elf...use : fastboot boot kernel.elf...

if you wanna know how to extract kernel.sin...just search...i have forgotten the link..doomlord had created a unpack-kernel.sin.pl file....
or you can use my tool...link is in my signature(Dont mean to promote it..but it has kernel.sin unpacker option.)
Hit Thanks if i helped you in any way

New to Android kernel development : Check out my Tool Dark_multitool1.0
Want to develop kernels for Xperia devices : Check out my Tool Xperia_kerneltool
Beginner's guide to Programming in C/C++/Java/Python/bash : Check out this guide
A few basics about Android and how not to brick your Xperia S or any Xperia : Check out this guide


"Never argue with idiots.They will drag you down to their level and beat you with their experience"
 
Envious_Data
Old
#9  
Senior Member
Thanks Meter 290
Posts: 910
Join Date: Oct 2012
Location: Yaizu
Quote:
Originally Posted by Dark Wraith View Post
normally i do this...extract kernel.sin from ftf package
convert kernel.sin to kernel.elf to get the bin file
unpack kernel.sin to get ramdisk.cpio.gz
now compile the zImage(same way as you did)
use mkelf.py to create kernel.elf...

and no need to flash it to check your kernel.elf...use : fastboot boot kernel.elf...

if you wanna know how to extract kernel.sin...just search...i have forgotten the link..doomlord had created a unpack-kernel.sin.pl file....
or you can use my tool...link is in my signature(Dont mean to promote it..but it has kernel.sin unpacker option.)
That helps me too

Usualy i use rpm_bins and other files from other kernels but now i can make my own entirely from scratch

(usualy i change the recovery for twrp and the boot screen, also usualy edit init so i dont have dual recovery (usualy from ffl kernel)



Sent from my LT26i using XDA Premium 4 mobile app
Hit thanks if it helped, and if your unsure about something, Think... think some more, then post your question.

Current Devices:
Sony Xperia S
Sony Xperia Z1 (not exactly mine yet :/)

Previously Owned:
Nokia 3310 (the tank)
Nokia N95

 
anikesh102
Old
#10  
anikesh102's Avatar
Member - OP
Thanks Meter 24
Posts: 82
Join Date: Nov 2012
Location: Chennai
Quote:
Originally Posted by Envious_Data View Post
That helps me too

Usualy i use rpm_bins and other files from other kernels but now i can make my own entirely from scratch

(usualy i change the recovery for twrp and the boot screen, also usualy edit init so i dont have dual recovery (usualy from ffl kernel)



Sent from my LT26i using XDA Premium 4 mobile app
I have tried almost all methods of extracting kernel.elf provided in xda... and still i get black screen and the phone doesnt boot up...

so pls tell after extracting kernel.sin from ftf with 7zip what method you use to convert kernel.sin to kernel .elf and how to extract kernel.elf to get all the other files....

i cant even make the phone boot up without making any changes in kernel.. how the hell i m going to make it work wen i make some changes :P

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes