[DEV]Instructions making kernel.elf for Xperia T & TX + kernel sources - Sony Xperia T, TL, TX, V

Dear Xperia T & TX user/dev,
Do you want to compile a kernel for Xperia T, no problem, just follow my instructions
First of all you need linux and the files I attached in this post.
== Make the kernel.elf ==
1. Put mkelf.py, RPM.bin, bootcmd, your zImage and ramdisk in the same folder.
2. Rename you own ramdisk to ramdisk and you zImage to zImage or edit the command to make it work.
3. make the kernel.elf using this command in linux terminal:
Code:
python mkelf.py -o kernel.elf [email protected] [email protected],ramdisk [email protected],rpm [email protected],cmdline
Now you will receive a kernel.elf, you can flash it using the following fastboot command:
Code:
fastboot -i 0x0fce flash boot kernel.elf
== Xperia T & TX kernel sources ==
You can download the kernel sources for build 7.0.A.1.303 here: Sony developer world
Enjoy it

Updated OP, new command and new attachment with bootcmd

krabappel2548 said:
Updated OP, new command and new attachment with bootcmd
Click to expand...
Click to collapse
Ooo, might this mean you're able to continue development as well? Hope things are okay...

charlatan01 said:
Ooo, might this mean you're able to continue development as well? Hope things are okay...
Click to expand...
Click to collapse
I'll make an overclock kernel for Xperia T in the future yes

Very useful script. thanks

Need Help
Hi , here im ask to you OP how to build kernel.elf for any Xperia 2012 ? for cmdline its same or not example for Xperia J ? Reply please thanks brother

Related

[GUIDE] Compiling CyanogenMod and Kernels from Source on Mac OS X Lion using Homebrew

I have written this guide as most existing guides for Mac OS X use MacPorts and include steps that are now unnecessary. It is geared towards intermediate users and up, who know some Terminal basics.
I had used the same build environment previously on Snow Leopard and later on when I upgraded to Lion. Now that I have just clean installed Lion, I documented the steps I took to rebuild my build environment.
I did the following on Lion 10.7.2 and Xcode 4.2. As far as I can recall, it should work with Snow Leopard and Xcode 4 and above. Do let me know if it does not.
Setup Build Environment
Install Xcode
Install Java
Install Homebrew: (For more on Homebrew: http://mxcl.github.com/homebrew)
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
Click to expand...
Click to collapse
Install Android SDK:
$ brew install android-sdk
Click to expand...
Click to collapse
with ADB:
$ android
Click to expand...
Click to collapse
then install "Android SDK Platform-tools" and close the window.
Install Repo:
$ brew install repo
Click to expand...
Click to collapse
Install and symlink packages:
$ brew install findutils gnu-sed gnupg pngcrush
$ echo "PATH=/usr/local/bin:\$PATH" >> ~/.bash_profile
$ ln -s /usr/local/bin/gfind /usr/local/bin/find
$ ln -s /usr/local/bin/gsed /usr/local/bin/sed
Click to expand...
Click to collapse
Create a case-sensitive partition or disk image:
$ hdiutil create -type SPARSE -fs "Case-sensitive Journaled HFS+" -size 16g -volname "Android" -attach ~/Desktop/Android
Click to expand...
Click to collapse
Download CyanogenMod Source
$ mkdir /Volumes/Android/cm7
$ cd /Volumes/Android/cm7
$ repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
$ repo sync -j32
Click to expand...
Click to collapse
Copy Proprietary Files
This only needs to be done once.
Connect device to computer and then:
$ cd /Volumes/Android/cm7/device/samsung/crespo
$ ./extract-files.sh
Click to expand...
Click to collapse
Download ROM Manager
This only needs to be done when ROM Manager is updated.
$ /Volumes/Android/cm7/vendor/cyanogen/get-rommanager
Click to expand...
Click to collapse
Edit CyanogenMod Source
Build will fail unless the following edits are made.
Add lines in red to cm7/external/elfutils/config-compat-darwin.h:
#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070
static inline size_t strnlen (const char *__string, size_t __maxlen)
{
int len = 0;
while (__maxlen-- && *__string++)
len++;
return len;
}
#endif
Click to expand...
Click to collapse
Comment out every line in cm7/external/qemu/Android.mk:
# the following test is made to detect that we were called
# through the 'm' or 'mm' build commands. if not, we use the
# standard QEMU Makefile
#
#ifeq ($(DEFAULT_GOAL),droid)
# LOCAL_PATH:= $(call my-dir)
# include $(LOCAL_PATH)/Makefile.android
#else
# include Makefile.qemu
#endif
Click to expand...
Click to collapse
Compile CyanogenMod Source
$ cd /Volumes/Android/cm7
$ . build/envsetup.sh
$ brunch crespo -j`sysctl -an hw.logicalcpu`
Click to expand...
Click to collapse
If the build was successful, there should be an update-cm-X.X.X-NS-KANG-signed.zip in the cm7/out/target/product/crespo folder.
Congrats! If you've made it up to here, you can breathe a sigh of relief and enjoy your own hot smoking bacon. And when you want fresher bacon:
Update CyanogenMod Source
$ cd /Volumes/Android/cm7
$ repo sync -32
Click to expand...
Click to collapse
then build as before.
Building Kernels
If you have done the above, there is nothing much more to add for building kernels.
Install packages:
$ brew install coreutils xz
Click to expand...
Click to collapse
Download kernel source:
$ cd /Volumes/Android
$ git clone git://github.com/CyanogenMod/samsung-kernel-crespo.git
Click to expand...
Click to collapse
Generate default config:
$ cd samsung-kernel-crespo
$ make ARCH=arm herring_defconfig
Click to expand...
Click to collapse
Compile kernel source:
$ ln -s /usr/local/bin/gstat /usr/local/bin/stat
$ ln -s /usr/local/bin/gexpr /usr/local/bin/expr
$ make -j`sysctl -an hw.logicalcpu` ARCH=arm CROSS_COMPILE=../cm/prebuilt/darwin-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- HOSTCFLAGS="-I../cm/external/elfutils/libelf"
$ rm /usr/local/bin/stat
$ rm /usr/local/bin/expr
Click to expand...
Click to collapse
Best to put the above in a Bash script. Temporarily symlink stat and expr, only for kernel compilation, as OS X versions might be expected elsewhere (like in CyanogenMod's scripts). Other guides for cross-compiling Linux kernels on Mac mention several ways to resolve missing elf.h definitions. Luckily for us, CM7 source already has an elf.h, so we can include it with HOSTCFLAGS="-I../cm/external/elfutils/libelf".
Wow...and guide for compile kernel??
Ihihih...
Inviato dal mio Nexus S
Mac?..........
Hahahhahaahahahahhahahahahahhaa
dario3040 said:
Mac?..........
Hahahhahaahahahahhahahahahahhaa
Click to expand...
Click to collapse
Unfortunately yeah, I need it for *gasp* iOS development
coloxim said:
Wow...and guide for compile kernel??
Ihihih...
Inviato dal mio Nexus S
Click to expand...
Click to collapse
Just added. It's about the same as on linux, much less mac quirks to work around.
ahbeng said:
Just added. It's about the same as on linux, much less mac quirks to work around.
Click to expand...
Click to collapse
Thank you so much...
Inviato dal mio Nexus S
I know a lot of people will be able to save precious time due to this. Including me Thanx a lot!
So how do you take the compiled kernel and make it the default kernel in the new Bacon, or will it be automatic on the next Bacon build?
Sent from my Nexus S using XDA App
viper2g1 said:
So how do you take the compiled kernel and make it the default kernel in the new Bacon, or will it be automatic on the next Bacon build?
Sent from my Nexus S using XDA App
Click to expand...
Click to collapse
It won't, that's just to compile. The kernel part of the guide is more to document Mac-specific workarounds for people who want to work with the source of the CM7 kernel or other kernels.
If you're just making Bacon, the latest CM7 kernel binary would already be included in the CM7 source. It is the same as what you'd get if you compiled unmodified CM7 kernel source and I think it is a good idea to have that to fall back on.
However, I guess it would be useful to document how to package the compiled kernel and modules in a flashable AnyKernel zip. Bit busy now, will add it later.
ahbeng said:
It won't, that's just to compile. The kernel part of the guide is more to document Mac-specific workarounds for people who want to work with the source of the CM7 kernel or other kernels.
If you're just making Bacon, the latest CM7 kernel binary would already be included in the CM7 source. It is the same as what you'd get if you compiled unmodified CM7 kernel source and I think it is a good idea to have that to fall back on.
However, I guess it would be useful to document how to package the compiled kernel and modules in a flashable AnyKernel zip. Bit busy now, will add it later.
Click to expand...
Click to collapse
Ok thanks, it would be awesome to know how to make Bacon with matr1x already set as the default kernel.
Sent from my Nexus S using XDA App
quality post.
viper2g1 said:
Ok thanks, it would be awesome to know how to make Bacon with matr1x already set as the default kernel.
Sent from my Nexus S using XDA App
Click to expand...
Click to collapse
I realized that if I started to include instructions for that, I should split it out along with other tips into a new post on how I bake in some simple customizations with a bash script, without a full-blown kitchen. (Because that is not platform-specific) When I have time! In the meantime, some quick pointers:
To change the default kernel for any ROM, you'll need to change the boot.img in the zip using unpackbootimg and mkbootimg, which would have been built along with CM7 in cm7/out/host/darwin-x86/bin (linux-x86 for linux). Copy them to somewhere in your path like /usr/local/bin. Copy the boot.img from the ROM zip and the zImage for the kernel you want to embed into another directory then run the following commands in that directory:
unpackbootimg -i boot.img
mkbootimg --kernel zImage --ramdisk boot.img-ramdisk.gz --cmdline "`cat boot.img-cmdline`" --base `cat boot.img-base` --pagesize `cat boot.img-pagesize` -o boot.img
Click to expand...
Click to collapse
then replace the original boot.img in the ROM zip with this new one. Hope that helps!
PS: And replace the modules in system/modules with the ones from the kernel you want to embed. (Caveat: I don't do any of this manually)
ahbeng said:
I realized that if I started to include instructions for that, I should split it out along with other tips into a new post on how I bake in some simple customizations with a bash script, without a full-blown kitchen. (Because that is not platform-specific) When I have time! In the meantime, some quick pointers:
To change the default kernel for any ROM, you'll need to change the boot.img in the zip using unpackbootimg and mkbootimg, which would have been built along with CM7 in cm7/out/host/darwin-x86/bin (linux-x86 for linux). Copy them to somewhere in your path like /usr/local/bin. Copy the boot.img from the ROM zip and the zImage for the kernel you want to embed into another directory then run the following commands in that directory:
then replace the original boot.img in the ROM zip with this new one. Hope that helps!
PS: And replace the modules in system/modules with the ones from the kernel you want to embed. (Caveat: I don't do any of this manually)
Click to expand...
Click to collapse
I'm gonna give this a shot after work. Its great info and I never found it searching. Thanks!
Sent from my Nexus S using XDA App
Couldn't one just us the process for initializing the environment like how you would for AOSP? Or will that still have issues?
BlueDrgBlade said:
Couldn't one just us the process for initializing the environment like how you would for AOSP? Or will that still have issues?
Click to expand...
Click to collapse
No need. What you see is just cosmetic fix
Sent from my Nexus S using Tapatalk 2
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
-e:1: syntax error, unexpected ']'
[This script has been moved.]
^[/QUOTE]
... What do I do :$
Click to expand...
Click to collapse
Does anyone know where I can find a CM9 version of this guide?
Sorry for bump...will this work for any gingerbread device?
Aquethys said:
Sorry for bump...will this work for any gingerbread device?
Click to expand...
Click to collapse
Yes
I get an error trying to mkdir /Volumes/Android/cm7
mkdir: /Volumes/Android: No such file or directory
Help?

[Tool] BlendMIUI Speed-Porting Software [V04.7] [Add NEO V][Fully working Auto-Flash]

Since I don't have much time to keep on updating my BlendMIUI so I decided to writte a program to give you guys the chance to build BlendMIUI for your own with latest MIUI sources in just few minutes!
Q:What is BlendMIUI Speed-Porting Software For XPERIA 2011
Ans:This is a short program trying to help you guys to build your own BlendMIUI rom for Xperia 2011 in just few minutes.
Q:How to use it?
Unlock Bootloader first!
1.Download BMSPS(BlendMIUI Speed-Porting Software) then unpack it to anywhere you like(Windows environment).Btw,you should install JAVA SE JRE first or it won't works because it needs JAVA environment to sign the rom.You can goto oracle.com/java to download the latest Java SE JRE.
2.Download latest MIUI rom for Desire HD from miui.us(or anywhere you want).
3.Rename the rom you just downloaded as MIUI.zip then put it into BMSPS/MIUI_DHD_ROM directory.(Do not rename it as MIUI.zip.zip!)
4.Run BMSPS_luancher.exe to start.
5.Do as follows then it will automatically create update.zip under the BMSPS directory.
Then you have two choices:
=>Help youself:
6.Put the update.zip rom to your SD-card.
7.Flash BlendMIUI kernel(I have put it into \BlendMIUI-kernel directory) or DooMKernel for MIUI.
8.Use CWM-recovery to flash the update.zip rom.
=>Use Auto-Flash Function
You don't need to do anything on your phone,it will help you to do all works automatically and boot into the new system!
Features:
1.Support Devices: Xperia Arc,Xperia Arc S,Xperia NEO,Xperia NEO V,Xperia Ray.
2.Latest CM7.2.0 rebuilted sources as base.
3.Automatically port MIUI for your device then output unpdate.zip and sign the rom to let you flash it into your device directly.
4.Your choice Function (addons)
5.Fully working Auto-Flash Function
P.S: CM7 sources and kernel for XPERIA RAY are come from bheremans.
Changelog for Version 02:
1.Add moded Packageinstall to let you chose where you would like to install your apps including SD-card.
2.Fixed function to remind you to install java-jre if update.zip is not created.
3.Small changes.
Changelog for Version 03:
1.Fixed PackageInstaller and Torch FC problem when using the ROM from www.miui.com as base.
2.Automatically recognize MIUI version (Depends on the MIUI rom you use) and change Build version for porting rom.
3.Add "Your Choice" function to help you customize your own BlendMIUI rom(BlendUI,DSPManager,Tweaks,Audios from SE).
4.[For DEVs] Whole-New Source code:More easy to read,more easy to add new language(I mean the BMSPS itself) and new functions.
Changelog for Version 04:
1.Disable echoing information for better display.
2.Fixes and improve performance of BMSPS.
3.Add "Auto-Flash" function to help you flash BlendMIUI automatically
Changelog for Version 04.3:
1.Add Xperia Ray ST18i support(All sources for Xperia Ray are come from bheremans).
2.Fixed Auto-Flash function.
3.Fixed ADB Detective bug which cause the software stuck at entering into Auto-Flash function when you input "yes".
Changelog for Version 04.7:
1.Add Xperia Neo V support.
2.Fully working Auto-Flash function (You don't need to do anything on your phone now until it boots into the new system.BMSPS will help you to do everything automatically.)
3.Some small changes
WARNING:This is not an update-package and you'd better delete all old files if you have installed early version of BMSPS.
Make sure you have unlocked bootloader before using this tool.Baseband 56 is recommanded.
Download links:
BMSPS V04.7: http://www.mediafire.com/?4xxna5rim6txmmn
Latest Source Code @ github.com/JasonStein
[Credit]
Bheremans,Eamars,FXP,DooMloRd,enzo...
Please report bugs with screenshots!
Great...!!!
Only one question...!!! What about the kernel...???
great tool !
Now everyone can make his own personal miUI !
thanks man
adiktz said:
Great...!!!
Only one question...!!! What about the kernel...???
Click to expand...
Click to collapse
here is what he said for the kernel.
7.Flash BlendMIUI kernel(I have put it into \BlendMIUI-kernel directory) or DooMKernel for MIUI.
Click to expand...
Click to collapse
Sounds so cool! thanks
Just tried it for 1.11.18 and it works perfectly, a million thanks!
EDIT:
Because I'm lazy and I don't wanna boot into Win7 each time (I just have it for gaming), I compiled the BMSPS_launcher for use on my Fedora installation. I thought I'd upload it here, if anyone else using Linux wants to give it a try.
You just need the zip and unzip packages installed, in addition to the pre-requisites mentioned by Jason.
I attached the modified source file and the binaries for 32 and 64-bit installations.
@Jason: I hope this is fine with you. If not, let me know and I'll remove them. Thanks again for all your work.
Wow! So nice of you guy.
Sent from my LT15i using XDA App
crimilde said:
Just tried it for 1.11.18 and it works perfectly, a million thanks!
EDIT:
Because I'm lazy and I don't wanna boot into Win7 each time (I just have it for gaming), I compiled the BMSPS_launcher for use on my Fedora installation. I thought I'd upload it here, if anyone else using Linux wants to give it a try.
You just need the zip and unzip packages installed, in addition to the pre-requisites mentioned by Jason.
I attached the modified source file and the binaries for 32 and 64-bit installations.
@Jason: I hope this is fine with you. If not, let me know and I'll remove them. Thanks again for all your work.
Click to expand...
Click to collapse
Sure,go ahead,it would be much convenient to Linux users.
Btw I have updated my latest sources on github and I will keep on adding more functions to BMSPS.
crimilde said:
Just tried it for 1.11.18 and it works perfectly, a million thanks!
EDIT:
Because I'm lazy and I don't wanna boot into Win7 each time (I just have it for gaming), I compiled the BMSPS_launcher for use on my Fedora installation. I thought I'd upload it here, if anyone else using Linux wants to give it a try.
You just need the zip and unzip packages installed, in addition to the pre-requisites mentioned by Jason.
I attached the modified source file and the binaries for 32 and 64-bit installations.
@Jason: I hope this is fine with you. If not, let me know and I'll remove them. Thanks again for all your work.
Click to expand...
Click to collapse
Btw you can compiled it for Linux and pack whole things into an package like what I did and give me the download link so that I can attach it to my post.
crimilde said:
Just tried it for 1.11.18 and it works perfectly, a million thanks!
EDIT:
Because I'm lazy and I don't wanna boot into Win7 each time (I just have it for gaming), I compiled the BMSPS_launcher for use on my Fedora installation. I thought I'd upload it here, if anyone else using Linux wants to give it a try.
You just need the zip and unzip packages installed, in addition to the pre-requisites mentioned by Jason.
I attached the modified source file and the binaries for 32 and 64-bit installations.
@Jason: I hope this is fine with you. If not, let me know and I'll remove them. Thanks again for all your work.
Click to expand...
Click to collapse
I have checked your file,there is a mistake:
Code:
if( Device==1 )
{
chdir("DATA/LT15i/");
system("zip -r -u ../../temp.zip *");
}
should be:
Code:
if( Device==1 || Device==2)
{
chdir("DATA/LT15i/");
system("zip -r -u ../../temp.zip *");
}
Cuz LT15i & LT18i share most files
WOW really thanks i just updated my BlendMIUI it works like a charm !
thank you soo much
Edit: Thanks for adding DSPManager !! ^_^
it works soo great on my ARC !!
JasonStein said:
I have checked your file,there is a mistake:
Code:
if( Device==1 )
{
chdir("DATA/LT15i/");
system("zip -r -u ../../temp.zip *");
}
should be:
Code:
if( Device==1 || Device==2)
{
chdir("DATA/LT15i/");
system("zip -r -u ../../temp.zip *");
}
Cuz LT15i & LT18i share most files
Click to expand...
Click to collapse
Ooops, you're right, I must've deleted it by mistake. Thanks for pointing it out!
I'll recompile the thing tomorrow morning and send you the package.
Sent from my LT15i using xda premium
Is there any way to edit this rom to something we want like which APKS are installed and default launcher that kinda stuff?
this is great. it would be accelent if i could chose the language that i whant to install instead of english(not in the cmd window, but for the ROM itself).
can you make a feature for this? only then you will not only be A king you will be THE king.
@Jason: Ok so I've compiled the v2 you posted for Linux 32bit/64bit and archived the whole thing:
EDIT: Reuploaded
http://www.mediafire.com/?9uemvociipaopnn
PS - the source code is attached to the post for your reference. I commented out the Windows-specific lines (instead of deleting them) and put the Linux version below for an easier comparison.
Just one thing, I noticed that even if the update.zip was properly signed and created, the program would still display "5. Failed!" but then clear the screen and show that update.zip was successfully created...
I added an extra condition like below in the Show_Progress function and now it's fine:
Code:
if( i==5 && Step==5 && Out_Check()==0 ) printf("Failed!\n");
crimilde said:
@Jason: Ok so I've compiled the v2 you posted for Linux 32bit/64bit and archived the whole thing:
http://www.mediafire.com/?8vz0xxpyq69afo3
PS - the source code is attached to the post for your reference. I commented out the Windows-specific lines (instead of deleting them) and put the Linux version below for an easier comparison.
Just one thing, I noticed that even if the update.zip was properly signed and created, the program would still display "5. Failed!" but then clear the screen and show that update.zip was successfully created...
I added an extra condition like below in the Show_Progress function and now it's fine:
Code:
if( i==5 && Step==5 && Out_Check()==0 ) printf("Failed!\n");
Click to expand...
Click to collapse
Yes,I made a little mistake:
Code:
void Sign_Rom()
{
Show_Progress(4);
system("java -jar signapk.jar testkey.x509.pem testkey.pk8 temp.zip update.zip");
system("del temp.zip");
Show_Progress(5); // Delete this line!!!
}
Code:
Show_Progress(5);
shouldn't be there.Just remove this line and it will be fine.
I will keep on updating my source code to add more useful functions to give you more choices and let it become not only a speed-porting software but also an MIUI rom customization tool.The early version of BMSPS is quite short with some basic functions and it's not written in a standard way.I'm going to do some changes and if you like to contribute to it,you can always fork my source code and add your own things including some useful functions and I will be appreciate.
P.S:
I will release next version of BMSPS with some useful functions before MIUI 1.11.25 released.
JasonStein said:
Yes,I made a little mistake:
Code:
void Sign_Rom()
{
Show_Progress(4);
system("java -jar signapk.jar testkey.x509.pem testkey.pk8 temp.zip update.zip");
system("del temp.zip");
Show_Progress(5); // Delete this line!!!
}
Code:
Show_Progress(5);
shouldn't be there.Just remove this line and it will be fine.
Click to expand...
Click to collapse
Yeah, you're right, it's better to just remove that line instead of adding an extra condition. I'm reuploading now and I'll update the link in my post above once it's done.
crimilde said:
Yeah, you're right, it's better to just remove that line instead of adding an extra condition. I'm reuploading now and I'll update the link in my post above once it's done.
Click to expand...
Click to collapse
And it's done.
Thanks. Updated the MIUI to the latest version. This is so awesome

[Q] How to build GT-S5830I rom AOSP from source

Hey guys,
I am traying to build aosp rom for the Samsung Galaxy ace GT-S5830I from Source then i have download the kernel and platform from [opensource.samsung.com/reception/receptionSub.do?method=list&menu_item=mobile&classification1=mobile_phone&classification2=&classification3=],
i followed the instructions that i find inside the zip to build the kernel, after that i unpack and repack zimage to boot.img,
i have build the plateform by following the instructions when, but i flash all of them (boot.img, system.img, userdata.img) to the Phone it not start.
Please help me to know what is the probleme
Sorry for my english
To make an AOSP ROM you're going to have the device specific config files and folders for your particular device .
Do you have them ?
"As a friend, just....put an end to me." - Ventus
BOUNS said:
Hey guys,
I am traying to build aosp rom for the Samsung Galaxy ace GT-S5830I from Source then i have download the kernel and platform from [opensource.samsung.com/reception/receptionSub.do?method=list&menu_item=mobile&classification1=mobile_phone&classification2=&classification3=],
i followed the instructions that i find inside the zip to build the kernel, after that i unpack and repack zimage to boot.img,
i have build the plateform by following the instructions when, but i flash all of them (boot.img, system.img, userdata.img) to the Phone it not start.
Please help me to know what is the probleme
Sorry for my english
Click to expand...
Click to collapse
Prepare device config and sync sources using
$ mkdir android
$ cd android
$ repo init -u https://android.googlesource.com/platform/manifest -b android-2.3.7_r1
$ repo sync
For a detailed explanation just search the threads
There r many link on how to build AOSP from source
Becarefull while doin it.... A small advice : Do not try unless xperienced
wilfredcool007 said:
Prepare device config and sync sources using
$ mkdir android
$ cd android
$ repo init -u android.googlesource.com/platform/manifest -b android-2.3.7_r1
$ repo sync
For a detailed explanation just search the threads
There r many link on how to build AOSP from source
Becarefull while doin it.... A small advice : Do not try unless xperienced
Click to expand...
Click to collapse
Yes i have did all of that, i have downloaded the source from android repo, and i have integrated the GT-S5830I as it says in the instructions, and i have builded.
The probleme is that the Device not start (not work) when i flash system.img and userdata.img that result from the build.
BOUNS said:
Yes i have did all of that, i have downloaded the source from android repo, and i have integrated the GT-S5830I as it says in the instructions, and i have builded.
The probleme is that the Device not start (not work) when i flash system.img and userdata.img that result from the build.
Click to expand...
Click to collapse
U made a kernel for it ???
Is the device config debugged ???
after u lunch the build
Brunch the build

Compiling frandom module for kernel 2.6.32.9

hi.
i would like to get some information about how to compile frandom module for my kernel.
here is the wiki... https://github.com/pier11/kernel_hu...-packing-the-kernel-into-a-flashable-boot.img
and git https://github.com/pier11/kernel_huawei_u8220
so which command i should use ? (i ve been told ---> CONFIG_*=m)
and when ?
i have the frandom kernel module tarball. dl it here= http://billauer.co.il/frandom.html
do i have to extract it? in which directory?
thank you very much...
desalesouche said:
hi.
i would like to get some information about how to compile frandom module for my kernel.
here is the wiki... https://github.com/pier11/kernel_hu...-packing-the-kernel-into-a-flashable-boot.img
and git https://github.com/pier11/kernel_huawei_u8220
so which command i should use ? (i ve been told ---> CONFIG_*=m)
and when ?
i have the frandom kernel module tarball. dl it here= http://billauer.co.il/frandom.html
do i have to extract it? in which directory?
thank you very much...
Click to expand...
Click to collapse
as there is no teachers(for the moment) in that "university", i had to "harass" some regonized people from xda...(sorry for that)
and they kindly try to help me...
i had this kind of answer which i could do : i think that the following is to build the module included in the kernel..
Download Makefile, Kconfig, and frandom.c and put all three in your downloaded kernel source (drivers/char directory) overwriting any existing file.
this part is done...
but how to do that ? add FRANDOM=m to the kernel .config file ? and where is located that file?
2 minutes of googling suggests you take a look at these:
http://forum.xda-developers.com/showthread.php?t=1236576
http://yatsec.blogspot.co.uk/2011/01/guide-to-compiling-custom-kernel.html
pulser_g2 said:
2 minutes of googling suggests you take a look at these:
http://forum.xda-developers.com/showthread.php?t=1236576
http://yatsec.blogspot.co.uk/2011/01/guide-to-compiling-custom-kernel.html
Click to expand...
Click to collapse
i have been googling far much more than 2 minutes and i already found these threads...but couldn't manage...
by egg with this one ...which contains error... http://yatsec.blogspot.co.uk/2011/01...om-kernel.html
PREPARING YOUR KERNEL SOURCE
First we must retrieve and copy the kernel config from our device.
Code:
$ cd /path/to/android-sdk/tools ----->ok
$ ./adk pull /proc/config.gz ----->not good! you have to make first $ adb devices in terminal....then $ adb pull /proc/config.gz
$ gunzip ./config.gz ----->ok
$ cp config /path/to/kernel/.config not working! ----> cp: cannot create regular file /path/to/kernel/.config : No such file or directory....
so what to do now?
how to solve this please? i will keep on googling to try to find out solution...any help is welcome
thank you
when i will finish my little project , i think that other people would benefit from that... i might make a how to .
for information ,i have been setting ubuntu 12.10 64 bits from this thread ---->http://soupdawg.wordpress.com/2012/...-for-building-android-jellybean-all-variants/
new link : http://nathanpfry.com/2014/02/07/how-to-prepare-ubuntu-14-04-lts-trusty-tahr-to-compile-android-roms
Re: [Q] Compiling frandom module for kernel 2.6.32.9
desalesouche said:
i have been googling far much more than 2 minutes and i already found these threads...but couldn't manage...
by egg with this one ...which contains error... http://yatsec.blogspot.co.uk/2011/01...om-kernel.html
PREPARING YOUR KERNEL SOURCE
First we must retrieve and copy the kernel config from our device.
Code:
$ cd /path/to/android-sdk/tools ----->ok
$ ./adk pull /proc/config.gz ----->not good! you have to make first $ adb devices in terminal....then $ adb pull /proc/config.gz
$ gunzip ./config.gz ----->ok
$ cp config /path/to/kernel/.config not working! ----> cp: cannot create regular file /path/to/kernel/.config : No such file or directory....
so what to do now?
how to solve this please? i will keep on googling to try to find out solution...any help is welcome
thank you
when i will finish my little project , i think that other people would benefit from that... i might make a how to .
for information ,i have been setting ubuntu 12.10 64 bits from this thread ---->http://soupdawg.wordpress.com/2012/...-for-building-android-jellybean-all-variants/
Click to expand...
Click to collapse
That's because you are meant to put in the path to your kernel, rather than literally /path/to/kernel...
@OP
I know you sent me a PM, but it's better if I reply here.
THIS is what did it for me. Of course my goal wasn't achieved as the extraversion bit was wrong. The X8 is a tricky device.
And make sure to go through the whole thread first.
And also try to use the arm-eabi toolchain from CM as that one throws the least errors.
sgt. meow
hi all. i manage to compile the module thanks to Blechd0se http://forum.xda-developers.com/member.php?u=4855459 i will soon edit the working how to kindly provided by him.
i thank all people who have been providing help and advices... and XDA
here are the change provided by bledchOse to be able to compile the frandom module for my kernel. and little how to
1---> https://github.com/pier11/kernel_hu...-packing-the-kernel-into-a-flashable-boot.img
2---> https://github.com/desalesouche/kernel_huawei_u8220
make the change in kernel before to build it ( change are in green)
3---> https://github.com/desalesouche/jordan-kernel/commit/52e4f2d00b2ea11e3643adb4c4235bdda7a87b5b
4---> Originally Posted by Blechd0se
" change CONFIG_FRANDOM=y to CONFIG_FRANDOM=m, it make you a nice and shiny *.ko file.
And if you already compiled your kernel its inside the kernel, no need to compile another module which does exactly the same and you can instead push your kernel to your device "
5 build the kernel and or module and finish to follow explanation of link 1...
you will find the frandom .ko under drivers/char/frandom/ where your kernel is located... copy it under system/lib/modules/ in your rom zip.
you will need a script to make it load:be activated at boot
Et voilà!!!
It's funny because it is true.....
pulser_g2 said:
2 minutes of googling suggests you take a look at these:
http://forum.xda-developers.com/showthread.php?t=1236576
http://yatsec.blogspot.co.uk/2011/01/guide-to-compiling-custom-kernel.html
Click to expand...
Click to collapse
Had been researching kernel mods came across frandom, googled "frandom module".... Your post was number 2 result.... your first link was my answer.... I win! 5 seconds googling!!! Thank you sir!

[HELP][DEV]Making kernel from source

I was trying to compile the kernel from source (cm12.1 kernel) using doomlords 4.7 toolchain.
I was able to get the zImage but during the building process saw the following 3 errors:-
Code:
/home/user/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 25 of arch/arm/common/built-in.o is not in EXIDX output section
/home/user/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 99 of arch/arm/mach-msm/built-in.o is not in EXIDX output section
/home/user/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 955 of kernel/built-in.o is not in EXIDX output section
/home/user/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 1121 of fs/built-in.o is not in EXIDX output section
/home/user/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 57 of crypto/built-in.o is not in EXIDX output section
/home/user/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 402 of block/built-in.o is not in EXIDX output section
/home/user/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 284 of lib/built-in.o is not in EXIDX output section
/home/user/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 77 of drivers/built-in.o is not in EXIDX output section
/home/user/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 11 of sound/built-in.o is not in EXIDX output section
/home/user/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-ld: warning: unwinding may not work because EXIDX input section 859 of net/built-in.o is not in EXIDX output section
Code:
arch/arm/kernel/return_address.c:62:2: warning: #warning "TODO: return_address should use unwind tables" [-Wcpp]
Code:
defined(@array) is deprecated at kernel/timeconst.pl line 373.
(Maybe you should just omit the defined()?)
I tried cleaning and mrproper but same errors kept propping!
Please if anyone can help do post and will it be safe to use the zImage for further steps(building kernel.elf)
Thanks in advance
Anyone??? @Furrydaus @Mrcl1450 @Tomoms
Sent from my Xperia SP using XDA Free mobile app
[==)BULLET(==] said:
Anyone??? @Furrydaus @Mrcl1450 @Tomoms
Sent from my Xperia SP using XDA Free mobile app
Click to expand...
Click to collapse
Try to build with a different toolchain, maybe.
The kernel isn't modified for the Toolchain. Try looking at DoomKernel sources to see how he modifies it to work with his tool chain
Mrcl1450 said:
Try to build with a different toolchain, maybe.
Click to expand...
Click to collapse
Any recommended toolchain?
Sent from my Xperia SP using XDA Free mobile app
[==)BULLET(==] said:
Any recommended toolchain?
Sent from my Xperia SP using XDA Free mobile app
Click to expand...
Click to collapse
Since is for xsp try to search for a Krait Optimized one like linaro.
I use Linaro toolchain based on GCC 4.9 (the latest version): http://www.google.it/url?sa=t&rct=j...7XDpqF255c0-mytVQ&sig2=kgiWuzjIcEATdjeDiUenBw
Before building I run export ARCH=arm, export CROSS_COMPILE=/path/to/toolchain/toolchainprefix- and then I start editing the kernel configuration.
GCC 4.7 & its toolchains are outdated bro!
Tomoms said:
I use Linaro toolchain based on GCC 4.9 (the latest version): http://www.google.it/url?sa=t&rct=j...7XDpqF255c0-mytVQ&sig2=kgiWuzjIcEATdjeDiUenBw
Before building I run export ARCH=arm, export CROSS_COMPILE=/path/to/toolchain/toolchainprefix- and then I start editing the kernel configuration.
GCC 4.7 & its toolchains are outdated bro!
Click to expand...
Click to collapse
Thanks finally got the zImage.
Any good guides for the following?
1: converting to elf
2. Converting elf into flashable zip
3. Adding and changing recoveries
4. Adding features to kernel
Sent from my Xperia SP using XDA Free mobile app
[==)BULLET(==] said:
Thanks finally got the zImage.
Any good guides for the following?
1: converting to elf
2. Converting elf into flashable zip
3. Adding and changing recoveries
4. Adding features to kernel
Sent from my Xperia SP using XDA Free mobile app
Click to expand...
Click to collapse
1. Converting to elf: download Tangerine kernel or the zip of any Lollipop ROM. Then extract the boot.img/tangerine.elf from the zip andrename it to boot.elf and unpack it w/ FlashTool. You will find 4 files. Delete the kernel Image and leave only ramdisk, bootcmd and bin files. Download this script: https://github.com/DooMLoRD/build_tools/blob/master/msm8960t_viskan/mkelf.py
Then place it into a directory together with the three files mentioned above + the zImage. Then run this command
Code:
python mkelf.py -o kernel.elf [email protected] [email protected],ramdisk [email protected],rpm [email protected],cmdline
don't forget to change the filenames in the command to match the real names.
2. Download Tangerine kernel zip, open the zip and delete tangerine.elf. Then go to the updater-script file, change the name of the file the script will flash from tangerine.elf to your_kernel_name.elf and edit the messages that will be displayed on the screen.
3. Unpack the ramdisk with some ramdisk unpack/repack scripts you will find on XDA. Then delete ramdisk-recovery.cpio and replace it with a cpio archive of any recovery you want (you can extract the cpio's from XZDR - rename the recovery to ramdisk-recovery.cpio).
4. To add features to the kernel you need to import them from a repository of another kernel for another device. Git will help you. Then when you will run make oldconfig it will ask to activate the new features. Anyway, you can run make menuconfig/xconfig/gconfig depending on your favorite GUI to enable disable built-in and new features whenever you want.
A good read: http://forum.xda-developers.com/android/software/ultimate-guide-compile-android-kernel-t2871276
Hey !
I worked today on two decompiling / recompiling scripts for the boot.img from CM12.1 ROMs,
here's what it does (running under Ubuntu 15.04) :
[ boot.img-Decompile.sh ]
- Extract the boot.img
- Extract the ramdisk.img
- Extract the ramdisk.cpio
- Extract the ramdisk.recovery.cpio
- Export the logo.rle to logo.png
[ boot.img-Compile.sh ]
- Rebuild the logo.rle
- Rebuild the cpios
- Rebuild the ramdisk.img
- Rebuild the boot.img
It worked just now to replace the boot logo with one I made (Sony make.believe and Powered by Android)
and an other change in the init.target.rc files.
You can find and test it here : http://adriandc.comeze.com/xperiaspbootimg.html

Categories

Resources