Compile Kernel with Voodoo? - Galaxy S I9000 Q&A, Help & Troubleshooting

hi
i was using the instructions below and successfully compiled a kernel with ubuntu.
Code:
HOW TO BUILD KERNEL 2.6.35 FOR GT-I9000
1. Visit http://www.codesourcery.com/, download and install Sourcery G++ Lite 2009q3-68 toolchain for ARM EABI.
2. Extract kernel source and move into the top directory.
3. Execute 'make aries_eur_defconfig'.
4. Execute 'make' or 'make -j<n>' where '<n>' is the number of multiple jobs to be invoked simultaneously.
5. If the kernel is built successfully, you will find following files from the top directory:
arch/arm/boot/zImage
crypto/ansi_cprng.ko
drivers/scsi/scsi_wait_scan.ko
drivers/net/wireless/bcm4329/dhd.ko
drivers/misc/vibetonz/vibrator.ko
drivers/misc/fm_si4709/Si4709_driver.ko
drivers/bluetooth/bthid/bthid.ko
But i dont know how to integrate initram or Voodoo (lagfix,sound). Can someone give me a tip how to integrate these.
Any help is welcome.

Related

[TOOL] guestekrnL doItYourself STOCK KERNEL BUILDER for dummies - MAKE UR OWN KERNEL!

Ohai, everypwny!​Wanna impress your girlfriend without spending any money? Show her your love through compiling her your own O2X stock kernel! ​
Requirements: A PC capable of running a virtual Linux machine -- if your PC isn't much older than 5-6 years there shouldn't be a problem. Just make sure you have enough RAM (at least 1,5 - 2 GB recommended) -- no programming - or special linux knowledge required!
## Info: The VMWare image has been created by Jonas Hendrickx for XDA (I just altered/modified it for my needs).
5 simple steps to success: -- EVERYONE can do that!
Download and install Vmware Player (Freeware): http://www.vmware.com/go/get-player (VirtualBox will work too if you like this app better)
Download the file "guestekrnL_doItYourself_developer.rar" (http://guendhoer.com:9000/guestekrnL_doItYourself_developer.rar or https://docs.google.com/open?id=0B5HJ_FpcC9ymM3ZCS0l5RFJtZnc , 1.5GB) and unpack it (using WinRar or 7Zip or...) to any folder of your choice, and afterwards double-click the file "Android Developer.vmx" -- or alternatively open VMware Player first and then import the virtual machine located in the unpacked .rar contents
Click "I copied it" and wait until virtual machine starts up, login with password "root"
Open folder "kernel_source" (on Desktop), double-click file "buildkernel" and click "run in terminal"
Wait until terminal window closes, and start using your new kernel located in folder Desktop/kernel_source/guestekrnL_BUILDS
After this an exact copy of current guestekrnL "SR99R100.1PI.1337-GoodBye" has been built and packaged to a flashable CWM-Zip.
Possible things you can easily change yourself for making your own different/improved kernel versions:
Use a different compilation toolchain
(p.ex. http://releases.linaro.org/<choose a release version>/components/android/toolchain/<choose a gcc version>/)
download the file "android-toolchain-eabi-linaro-..." and replace the folder "android-toolchain-eabi" on Desktop of virtual machine with the unpacked content of the downloaded file
There are many different builds of linaro toolchains available, resulting in different smoothness, battery life and stability of the built kernel. Important:
[*]After toolchain change you have to edit the file "buildkernel" (rightclick -> open with gedit) and change the gcc version number to the one of your new toolchain (you find it here: Desktop/android-toolchain-eabi/lib/gcc/arm-eabi/<gcc version number>), save the file afterwards
Attention: if you switch to a toolchain newer than september 2011, you MUST change
# CONFIG_ALLOW_CPU_ALIGNMENT is not set
Click to expand...
Click to collapse
to
CONFIG_ALLOW_CPU_ALIGNMENT=y
Click to expand...
Click to collapse
in file Desktop/kernel_source/arch/arm/configs/gueste_defconfig -- otherwise kernel won't boot!
Only use toolchains with a number up to "4.6" in name, the newer ones ("4.7") are for ICS and not Gingerbread!
NOT every new toolchain will work with O2X stock kernels -> p.ex. 4.6.4 might not work while 4.6.2 works. Every toolchain older or equal to september 2011 should work BUT maybe you will have to remove some of the build flags not recognized by the older chain.
Always check Desktop/kernel_source/guestekrnL_BUILDS/build.log for errors after you made a new kernel build, especially at the bottom of the file. (Warnings don't matter.)
Use a different version-name for the built kernel
right-click file "buildkernel" in kernel_source folder -> open with gedit -> change kernelVersion there
Use a different general name for the built kernel (other than "guestekrnL")
double-click file "Makefile" in kernel_source folder -> click "Display" -> change kernel name there (change ".9-guestekrnL" to ".9-<yourKernelName>")
Attention: the Android app GuesteOC won't work if it doesn't find the String "guestekrnL" in kernel name! You then have to use the function-reduced version of the OC app by TrymHansen available for all kernels!
Use different build optimization flags
double-click file "Makefile" in kernel_source folder -> click "Display" -> search "CFLAGS_GUESTE" -> edit the build flags there
you find a good overview + explainations of available build flags here http://gcc.gnu.org/onlinedocs/gcc-4.5.3/gcc/Optimize-Options.html
and an interesting article on which flags the toolchain guys use here: http://www.linaro.org/linaro-blog/2...aro-android-2011-10-and-future-optimizations/
it is completely up to YOU which flags to use and not to use!
Stock standard would be:
CFLAGS_GUESTE = -O2
Click to expand...
Click to collapse
while the flags of current guestekrnL are:
CFLAGS_GUESTE = -O3 -ffast-math \
-mtune=cortex-a9 -march=armv7-a \
-mfloat-abi=softfp -mfpu=vfpv3-d16 \
-fsingle-precision-constant -fgraphite-identity \
-ftree-loop-distribution -ftree-loop-linear \
-floop-interchange -floop-strip-mine -floop-block \
-fmodulo-sched -fmodulo-sched-allow-regmoves \
-fno-inline-functions
Click to expand...
Click to collapse
if you have many flags like above, make line-breaks using slashes like above and only put 2-3 flags in one line!
Use different basic kernel configuration values
open folder "kernel_source", click the search-icon, search for "gueste"
edit the 2 files "guestekrnl.c" and "guestekrnl.h" of the result set according to your needs
guestekrnl.c and guestekrnl.h contain many default voltage/speed/... values, you can change them easily there
if you change MAX_OVERCLOCK to a higher value, you might need to change MAX_VOLTAGE as well and have to alter the whole cpu voltage and frequency table (see next point)
Help & explainations here: http://forum.xda-developers.com/showpost.php?p=26696158&postcount=25
Change CPU scaling voltages and speed steps
Edit the file Desktop/kernel_source/arch/arm/mach-tegra/nvrm/core/common/nvrm_clocks_limits.c and alter the two arrays "FakeShmooVoltages[]" and "FakepScaledCpuLimits"
the difference from one voltage step to another one needs to be lower or equal than 100mV;; too low voltages for a step results in freezes !!
the values for MAX_VOLTAGE and MAX_OVERCLOCK are located in file guestekrnL.h!
Help & explainations here: http://forum.xda-developers.com/showpost.php?p=26696158&postcount=25
Example of creating a kernel overclockable to 1.5 GHz: http://forum.xda-developers.com/showpost.php?p=26759653&postcount=58
Enable/Disable kernel features you want to use or don't want to use
open folder "kernel_source", click the search-icon, search for "gueste", edit the file "gueste_defconfig" according to your needs
"<featureName>=y" means the feature is enabled
"#<featureName> is not set" means the feature is disabled
Google for more information about what the different kernel features do, just past the kernel feature name in Google and you will find a description for most of them
Change the text shown to user on CWM installation of kernel
Edit the file Desktop/kernel_source/zipstructure/META-INF/com/google/android/updater-script according to your needs
If you are completely bad-ass you can also compile the compilation toolchain from the official sources yourself instead of using a prebuilt one (even if the prebuilt ones tend to be much more stable than the self-compiled ones)
Useful & important additional tipps/hints: Check this out
Info: If you ever stop the compilation progress before finishing, you have to edit the file "Makefile" in kernel folder and remove the version number from the version string (so only .9-guestekrnL should remain), otherwise you will have double version number in next kernel build.
Start being a kernel developer for XDA right now, today!
Advantages:
- U can impress many users by presenting them your hard work
- You will be acknowledged
- You will be able to easily express your creativity to the world wide web
- And much much more ,,, Sign up today! Oh, wait, no signup needed
If you think you have created an extremely good version of guestekrnL or maybe a completely new kernel, think about posting it here in the thread (I will link the posted kernels here in first posting) or open your own thread for your new kernel, it is up to you
As always I'm not responsible for any harm you might do to your system
Wanna build other stock sources than the ones of guestekrnL? Check this out
Awesome, Stefan!
Downloading...
Yeehhaawwwww!!! This is what im searching for.. thank you very very very much..
Edit: You need to edit your post.. looks unorganized.. quite difficult to read..
Sent from my LG-P990 using XDA
ghadap said:
Yeehhaawwwww!!! This is what im searching for.. thank you very very very much..
Edit: You need to edit your post.. looks unorganized.. quite difficult to read..
Sent from my LG-P990 using XDA
Click to expand...
Click to collapse
Thx I restructured a bit
Great work!
sent from my wii remote
You are great, thx!!!
Hy Stefan,
thx a lot
Herzlichen Dank
Craxx
Direct download Link from my own FTP server coming soon, because some users might have problems with download of the 1.5GB .rar from current mirror
Stefan Gündhör said:
Ohai, everypwny!​Wanna impress your girlfriend without spending money? Show her your love through compiling her your own O2X stock kernel! ​
Click to expand...
Click to collapse
LOL..! I can't think of any more evil scheme that this . Great work, Stefan..!
OH, on afterthoughts, a better thing that serves the purpose would be "How to build a theme..."
Yes Stefan, i have tried 3 times and download stops after around 300 MB, so i wait for direct download link
This is so awesome! Thanks alot!
Sent from my LG-P990 using Tapatalk
Great initiative Stefan. Download stops at ~300MB for me as well, looking forward to trying it.
Are the guestekrnl-scripts included in the finished kernel installer? (Just wondering if GuesteOC will work out of the box.)
TrymHansen said:
Great initiative Stefan. Download stops at ~300MB for me as well, looking forward to trying it.
Are the guestekrnl-scripts included in the finished kernel installer? (Just wondering if GuesteOC will work out of the box.)
Click to expand...
Click to collapse
Yeah I'm just uploading to a new FTP mirror, will take about 2 more hours I guess!
And yeah, the exact zipstructure of current guestekrnL release will be built automatically, including GuesteOC v2.1.5 + Myrt UV GUI, all working out of the box!
(In fact the most actual guestekrnL release was built exactly the way I describe it in first posting: I ran the virtual machine and double-clicked/ran the buildkernel-script. That's it.)
great tutorial Stefan...made it look very simple....NOTHING IS IMPOSSIBLE IN THIS WORLD..I am going to try doing it myself Stefan...as they say...the modern world is a place where a butcher can become a goldsmith, a carpenter can be a captain of the ship and a cleaner can be a pilot....
Thanks for the make urself tool kit mate.I am sure that we will find a lot of Kernels floating in this forum....
just a matter how many are good like urs or temaseks or vadonkas or so many others....time will tell that...have to wait to see that.
I appreciate the hard work put by you to make it so simple for starters and noobs morons like me to understand.
THANKS THANKS THANKS a million.I really mean it truthfully my friend
Stefan, will your tutorial works with original source (eg, V20q) and others (eg, spica HP)? and which file/folder to make our kernel support ext4?
My idea was using stock kernel but add ext4..
Downloading with FF stopped at 500MB, but with Free Download Manager, I could download it without problems.
The sources are very cool. Playing a bit around with them...
ghadap said:
Stefan, will your tutorial works with original source (eg, V20q) and others (eg, spica HP)? and which file/folder to make our kernel support ext4?
My idea was using stock kernel but add ext4..
Click to expand...
Click to collapse
Example of building unchanged stock kernel and only add ext4 compatibility:
start the kernelBuilder,
delete all folders located in Desktop/kernel_source except the folders "guestekrnl_BUILDS" and "zipstructure"
delete all files located in Desktop/kernel_source except the file "buildkernel"
edit the file "buildkernel" (rightClick-> open with gEdit) and change line
make ARCH=arm gueste${1}_defconfig;
Click to expand...
Click to collapse
to
make ARCH=arm star_ifx${1}_defconfig;
Click to expand...
Click to collapse
if you use v20 sources or to
make ARCH=arm star_rev_f_android${1}_defconfig;
Click to expand...
Click to collapse
if you use v10 sources
Download the official kernel sources you want from http://www.lg.com/global/support/opensource/opensource-detail.jsp?detailCustomerModelCode=LGP990
Extract the sources until you get a folder kalled "kernel"
copy the contents from inside "kernel" folder to Desktop/kernel_source
edit file Desktop/kernel_source/drivers/net/wireless/bcm4329/Makefile -> change line
-Wall -Wstrict-prototypes -Werror \
Click to expand...
Click to collapse
to
-Wall -Wstrict-prototypes \
Click to expand...
Click to collapse
edit file Desktop/kernel_source/arch/arm/configs/star_ifx_defconfig (or star_rev_f_android_defconfig): enable ext4 through replacing ext4 config (search for it in the file) with following:
CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_XATTR=y
# CONFIG_EXT4_FS_POSIX_ACL is not set
# CONFIG_EXT4_FS_SECURITY is not set
# CONFIG_EXT4_DEBUG is not set
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_JBD2=y
# CONFIG_JBD2_DEBUG is not set
Click to expand...
Click to collapse
run the buildkernel script, kernel will be built
Attention: don't use linaro/gcc toolchain newer than september 2011, otherwise kernel won't boot without additional modifications (the included default toolchain will work fine)
For every other stock kernel sources (in order to compile & zip-package them using kernelBuilder) the procedure should work similar!
Spica horsepower kernel however won't work that way, because spica does not upload his defconfig to his sources @GitHub (thus making rebuilding more difficult).
And default defconfig of stock kernel won't work with spica kernel. (Without the right defconfig the kernel does not boot.)
Older spica kernels (older than SR3) completely won't work and can't be rebuilt because spica never offered full sources @GitHub until SR3.
So in order to get a current spica kernel source working, you have to additionally
install the kernel you want to rebuild first on your phone and then
copy the file /proc/config.gz first to your internal SD and then to your PC,
unpack it and then rename the file you get to "spica_defconfig" and
place it in Desktop/kernel_source/arch/arm/configs/
finally edit the buildkernel file again so you have
make ARCH=arm spica${1}_defconfig;
Click to expand...
Click to collapse
in there!
In order to see the differences of guestekrnL compared to stock kernel, Download Meld Diff Viewer in App Store of virtual linux machine and make a folder-comparison of folder Desktop/kernel_source and a folder where you keep unchanged v10E kernel sources!
New direct download mirrors online! (Thx to cojo & myself ) Please report if the .rar files are error-free thx!
Additional tipps/hints:
change your keyboard layout to the one of your language/country (right-click top right most left icon and choose "change keyboard layout")
use versioning! :
double-click "Terminal" on desktop
enter "sudo apt-get install git-core git-gui" (internet connection is required)
enter the password ("root") , confirm installation, after install exit the window
enter "cd Desktop/kernel_source"
enter "git init"
enter "git add ./"
enter "git commit -a" then enter "first commit" & save & exit (the keyboard combinations for this are shown)
enter "git gui" and in first menu click "visualize master's history" -> you will see all commits and changes you made in each commit there
everytime you have made a few changes to the kernel, run "git commit -a" again (and if you add new file git add ./), so a new commit will be added to the commit history and you can see all changes there
use a diff viewer (Meld Diff Viewer of virtual machine linux software repository) for comparing guestekrnL sources with unchanged v10E stock kernel sources, so you can understand custom kernel making better! -- you can find orig sources here http://www.lg.com/global/support/opensource/opensource-detail.jsp?detailCustomerModelCode=LGP990 , download the v10E archive and unpack until you get a folder called "kernel", make a folder-comparison with Meld Diff Viewer afterwards!
Just take your time, begin with only compiling the kernel without changes (and try if it boots) and then slowly change more and more stuff, don't change too many things at once, always compile&try the kernel between more changes.
Learn by viewing the commits other developers make for their kernels, but pay attention that some commits might not be complete or incompatible with your kernel! Some commits of CM7 kernels can be useful, but not all will be compatible. When I started I learned much by just reading the commits of ironkrnL, from this commit page upwards: https://github.com/SetiroN/lge-kernel-star/commits/v2?page=5 (only the things "SetIron" directly commited) -- Please note that my own git repo is a mess, as I don't split up changes to single commits, I just make a commit for all changes a new kernel version has, so my repo won't help u much in learning
Always check Desktop/kernel_source/guestekrnL_BUILDS/build.log for errors after you made a new kernel build, especially at the bottom of the file. (Warnings don't matter.)
Stefan Gündhör said:
New direct download mirrors online! (Thx to cojo & myself ) Please report if the .rar files are error-free thx!
Click to expand...
Click to collapse
Downloaded from Google Docs and unpacked without incident. Now compiling under VirtualBox, which also worked without any modification.
...and as I was writing this it finished. Whole compilation job took less than 2 mins on a 4-core VM. ;-)

[HOWTO] Building from sources [Kernel only for now]

Hello everyone.
This guide will help you in building a kernel from source for your Nexus 4
Later, when 4.2 hits AOSP, i'll add a guide for building that too
You will need a computer running Linux / OSX to build the kernel, natively, or via a VM.
This guide assumes you’re running any Linux distro.
Getting a toolchain:
You need a toolchain to build the kernel.
The preferred one is Google’s toolchain, the same they use to build AOSP.
In a terminal, type:
Code:
git clone [url]https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/[/url]
export PATH=$PATH:$(pwd)/arm-linux-androideabi-4.6/bin
export CROSS_COMPILE=arm-linux-androideabi-
TIp: paste the export statements in your ~/.bashrc to have them exported each login.
Getting the kernel source:
The kernel source for Nexus devices is available from Google’s servers.
Nexus 4 : https://android.googlesource.com/kernel/msm
Github Mirror: https://github.com/android/kernel_msm
Open the terminal, and type the below commands to get the kernel source on your computer.
Code:
mkdir -p android/kernel
cd android/kernel
For Nexus 4, we get the msm kernel sources.
Code:
git clone [url]https://android.googlesource.com/kernel/msm[/url]
Next, we change our directory to the newly fetched source.
Type
Code:
cd msm
Figuring out what to build:
Now, we need to figure out which revision to build.
You need to be exactly sure about this, otherwise there are chances that the compiled kernel won’t work.
The commit to build upon can be found by a few ways.
To get the kernel sources matching the device tree, type the below in the device tree.
Code:
git log kernel
Next, type the below in the kernel tree
Code:
git checkout <commit>
The commit of the version running of the current review units is 7a47627, which is same as branch android-msm-mako-3.4-jb-mr1-fr .
Compiling:
Name of defconfig: mako_defconfig
cd to the directory of the kernel source, then type the below in a terminal.
Code:
export ARCH=arm
export SUBARCH=arm
Code:
make <name_of_defconfig>
make
The kernel image will be ready at arch/arm/boot/zImage
To flash it, you need to make it into a boot.img, more on that later, when we have more sources.
1) what is the branch "android-msm-mako-3.4-jb-mr1-fr" for?
2) what does mr1 mean? sounds like milestone/alpha/beta. Maybe it's not final? Last commit is 2 weeks ago.
3) great guide
m11kkaa said:
1) what is the branch "android-msm-mako-3.4-jb-mr1-fr" for?
2) what does mr1 mean? sounds like milestone/alpha/beta. Maybe it's not final? Last commit is 2 weeks ago.
3) great guide
Click to expand...
Click to collapse
mr1 could stand for "Milestone Release 1", it might not be final.
That being said, you should never checkout a branch directly for compiling a kernel, but the commit directly.
cdesai said:
...You need a toolchain to build the kernel. The preferred one is Google’s toolchain, the same they use to build AOSP.
Click to expand...
Click to collapse
Could you also use linaro to compile the kernel? I believe it's a toolchain anyway, but I'm not too sure on it's benefits or compatibility...
nice didn't realize kernel source was already available- can't wait to test this zImage and start testing changes noticed they left out kernel compression makes for a big zimage
randomblame said:
nice didn't realize kernel source was already available- can't wait to test this zImage and start testing changes noticed they left out kernel compression makes for a big zimage
Click to expand...
Click to collapse
Are you planning on developing for the N4?
Loved your work on the DHD
espionage724 said:
Could you also use linaro to compile the kernel? I believe it's a toolchain anyway, but I'm not too sure on it's benefits or compatibility...
Click to expand...
Click to collapse
Linaro isn't a toolchain, but they do make toolchains.
Yes, you can use it to compile the kernel, though it may not compile at all with it, or not work well - your mileage may vary.
randomblame said:
nice didn't realize kernel source was already available- can't wait to test this zImage and start testing changes noticed they left out kernel compression makes for a big zimage
Click to expand...
Click to collapse
Nope, LZO compression is enabled by default
cdesai said:
Linaro isn't a toolchain, but they do make toolchains.
Yes, you can use it to compile the kernel, though it may not compile at all with it, or not work well - your mileage may vary.
Click to expand...
Click to collapse
Linaro has proven to increase android performance up 30 - 100% not sure if that is with -O3 optimizations or not. That is all I use on my kernels
Sucks this phone is not coming to Sprint, might be time to change carriers...
randomblame said:
nice didn't realize kernel source was already available- can't wait to test this zImage and start testing changes noticed they left out kernel compression makes for a big zimage
Click to expand...
Click to collapse
-mvectorize-with-neon-quad ---> I use this in my makefile for cflags and drops the zImage size from 5.0mb to 4.4mb.
cdesai said:
Linaro isn't a toolchain, but they do make toolchains.
Yes, you can use it to compile the kernel, though it may not compile at all with it, or not work well - your mileage may vary.
Nope, LZO compression is enabled by default
Click to expand...
Click to collapse
ah I didn't see it - 6+mb still pretty big from what I'm used to at least
I'm going through the mind numbing process of bringing in mainline patches and squashing them all together. I'm up to 3.4.1 ... woot where's the hang me emoticon lol
*finally got smart and cloned mainline and reset the head back to each sublevel and merged into my local n4 source
got it all the way up to date with mainline 3.4.18
Thanks cdesai. I didn't think anything was out yet!!
randomblame said:
ah I didn't see it - 6+mb still pretty big from what I'm used to at least
I'm going through the mind numbing process of bringing in mainline patches and squashing them all together. I'm up to 3.4.1 ... woot where's the hang me emoticon lol
*finally got smart and cloned mainline and reset the head back to each sublevel and merged into my local n4 source
got it all the way up to date with mainline 3.4.18
Click to expand...
Click to collapse
Yea, it's big, but partitions on new devices are big as well.
y u no use git to merge
Just add korg as a remote, fetch, merge.
Each version is tagged, so you can do that incrementally too.
Also, kernel.org hosts patches as well, if you prefer that way.
snowman77 said:
Thanks cdesai. I didn't think anything was out yet!!
Click to expand...
Click to collapse
Google <3
I got it straightened out so it's up to date with mainline and I think I've got overclocking up to 1.89ghz ready lots of more fun to be had but damn I'm just teasing myself till tuesday/whenever the thing comes in the mail. hard to test anything without hardware.
I may need a tip. I have followed your guide - which I find great and simple - but I'm having a problem with the arm binaries when I launch the make command after checking out the remotes/origin/android-msm-mako-3.4-jb-mr1-fr and executed make mako_defconfig:
Code:
/bin/sh: 1: arm-linux-androideabi-ld: not found
I have cloned the toolchain and msm repos, and added to the PATH environment var the location of the bin directory. I can reach arm-linux-androideabi-ld from the command line, but no luck executing it:
Code:
[email protected]:~/android/kernel/msm$ /home/echedey/android/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-ld
bash: /home/echedey/android/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-ld: No such file or directory
And it is there with execution rights:
Code:
[email protected]:~/android/kernel/msm$ ll /home/echedey/android/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-ld
-rwxrwxr-x 1 echedey echedey 3145332 Nov 10 16:32 /home/echedey/android/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-ld*
My repos are in these paths:
Code:
/home/echedey/android/arm-linux-androideabi-4.6
/home/echedey/android/kernel
And my $PATH is:
Code:
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/echedey/android/arm-linux-androideabi-4.6/bi
Am I missing anything?
josjator said:
I may need a tip. I have followed your guide - which I find great and simple - but I'm having a problem with the arm binaries when I launch the make command after checking out the remotes/origin/android-msm-mako-3.4-jb-mr1-fr and executed make mako_defconfig:
Code:
/bin/sh: 1: arm-linux-androideabi-ld: not found
I have cloned the toolchain and msm repos, and added to the PATH environment var the location of the bin directory. I can reach arm-linux-androideabi-ld from the command line, but no luck executing it:
Code:
[email protected]:~/android/kernel/msm$ /home/echedey/android/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-ld
bash: /home/echedey/android/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-ld: No such file or directory
And it is there with execution rights:
Code:
[email protected]:~/android/kernel/msm$ ll /home/echedey/android/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-ld
-rwxrwxr-x 1 echedey echedey 3145332 Nov 10 16:32 /home/echedey/android/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-ld*
My repos are in these paths:
Code:
/home/echedey/android/arm-linux-androideabi-4.6
/home/echedey/android/kernel
And my $PATH is:
Code:
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/echedey/android/arm-linux-androideabi-4.6/bi
Am I missing anything?
Click to expand...
Click to collapse
You path has a "n" missing from bin at the end.
You could type arm- and try to use tab-completion to see if it's accessible, then the same thing with full path (~/android/arm-linux-androideabi-4.6)
cdesai said:
You path has a "n" missing from bin at the end.
You could type arm- and try to use tab-completion to see if it's accessible, then the same thing with full path (~/android/arm-linux-androideabi-4.6)
Click to expand...
Click to collapse
Sorry, the missing 'n' came from the c&p. I can actually see the file by tabing it from any path but after the auto completing it tells this weird thing:
Code:
[email protected]:~$ arm-linux-androideabi-ld
bash: /home/echedey/android/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-ld: No such file or directory
I'm a experienced *nix user but I don't get this. The repos are correctly cloned and all files under bin has exec rights. I'm running ubuntu 12.10. Maybe a problem with the shell? I should try any other environment, but that would be like killing flies with missiles. Thanks for your help.
Do you definitely have the appropriate executable at
'/home/echedey/android/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-ld'?
Can you do an ls -lF of that directory?
Perhaps the arm-linux-androideabi-ld file there is actually just a symlink which has lost its target.
@josjator Yeah, seems I have the same problem as you. I'm also using Ubuntu 12.10 with a bash shell. I think it may be a recursive make/shell issue thing (sorry, I'm not too hot on make files). Will keep plugging away to see if I can resolve the problem.
The device trees have hit AOSP
https://android.googlesource.com/device/lge/mako/
dsana123 said:
@josjator Yeah, seems I have the same problem as you. I'm also using Ubuntu 12.10 with a bash shell. I think it may be a recursive make/shell issue thing (sorry, I'm not too hot on make files). Will keep plugging away to see if I can resolve the problem.
Click to expand...
Click to collapse
@josjator: Using the 4.7 toolchain sorted me out (at least it's building now and past the initial problem).
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7
Click to expand...
Click to collapse
The objdump and ld binaries are much happier now.
BTW, I did download the 4.6 toolchain again (just in case there was some problem in the initial git clone), but I still encountered objdump and ld problems.
Works like a champ on Ubuntu 12.10 exactly as outlined in the OP. Thanks!
Code:
[email protected]:~/Documents/AOSP/kernel/msm$ ls -l arch/arm/boot/zImage
-rwxrwxr-x 1 android android 6314888 Nov 16 23:45 arch/arm/boot/zImage
[email protected]:~/Documents/AOSP/kernel/msm$ uname -a
Linux ubuntu 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
[email protected]:~/Documents/AOSP/kernel/msm$ arm-linux-androideabi-gcc -v
[...]
gcc version 4.6.x-google 20120106 (prerelease) (GCC)

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!

[Q] Sony Developer Open Source

Hi XDA
I downloaded the Open source archive for build 9.1.A.1.141 from:
http://developer.sonymobile.com/downloads/xperia-open-source-archives/open-source-archive-for-build-9-1-a-1-141/
Really i wanna know
1.What is this?
2.Can i flash it on my device?
3.What is included in it? (the file name is "9.1.A.1.141.tar.bz2)
Thanks.
1. Open source (kernel) archives by Sony.
2. In a non-compiled state - No. The kernel has to be compiled into a zImage. Then repacked into a flashable kernel.elf along with ramdisk, cmdline & rpm.bin
3. Kernel sources which is what developers mostly need - and other things as well.

Help me compile and build a Lollipop kernel (currently BlissPop preferable)

I want to compile a kernel for lollipop, but I always get somekind of error... Can this be cause of toolchain that I use or cause sources from GitHub arent good? Do u have any recomendation on stable, working source, and toolchain that goes along with it? I compiled cm11 rom, but couldn't compile just a kernel... Do u have any nice tutorials on that, ones that i found arent working for me...
i tried with this toolchain gcc/linux-x86/arm/arm-eabi-4.6 from tutorial source.android.com/source/building-kernels.html
download the kernel source. in this tutorial we will use the cm-12.1 cyanogen kernel.
Code:
git clone -b cm-12.1 https://github.com/CyanogenMod/lge-kernel-p880
there now is a folder in your home 'lge-kernel-p880'
download a toolchain. for now i prefer the google aosp toolchain because i am not knowing the code of the cyanogen kernel. compiling with other toolchains and recenter releases (for example 4.9 5.0 5.1 5.1 and 6.0 needs a few changes and fixes in the coding else it will not complete compiling)
Code:
git clone -b aosp-4.8-arm-eabi https://github.com/ArchiDroid/Toolchain toolchain
now that u have both u are ready to compile.
in terminal cd to the downloaded source.
Code:
cd lge-kernel-p880
set some things up and start compiling
Code:
export ARCH=arm
export CROSS_COMPILE=/home/[B]yourubuntu-username[/B]/toolchain/bin/arm-eabi-
make cyanogenmod_x3_defconfig
start compiling
Code:
make -j4
Now sit back, relax, and watch the code! Or you could read a book, watch ****, count your fingers, play with your toes...
If you have an error during the waterfall of code, find the part where it actually says *error* (you'll probably have to scroll upwards) and search it on Google or post it here.
If you manage to get something that says "the kernel zImage is ready" or something like that, that means you've made it!
You have officially compiled your own kernel from source! Now you need to put it in a flashable zip with the .ko files.
As i dont know what .ko files cyanogenmod compiles u should find this out yourself.
it is probably listed in the end of the terminal when the compiling is finished
hope this will bring u further then you are now.
mistercheese said:
download the kernel source. in this tutorial we will use the cm-12.1 cyanogen kernel.
Code:
git clone -b cm-12.1 https://github.com/CyanogenMod/lge-kernel-p880
there now is a folder in your home 'lge-kernel-p880'
download a toolchain. for now i prefer the google aosp toolchain because i am not knowing the code of the cyanogen kernel. compiling with other toolchains and recenter releases (for example 4.9 5.0 5.1 5.1 and 6.0 needs a few changes and fixes in the coding else it will not complete compiling)
Code:
git clone -b aosp-4.8-arm-eabi https://github.com/ArchiDroid/Toolchain toolchain
now that u have both u are ready to compile.
in terminal cd to the downloaded source.
Code:
cd lge-kernel-p880
set some things up and start compiling
Code:
export ARCH=arm
export CROSS_COMPILE=/home/[B]yourubuntu-username[/B]/toolchain/bin/arm-eabi-
make cyanogenmod_x3_defconfig
start compiling
Code:
make -j4
Now sit back, relax, and watch the code! Or you could read a book, watch ****, count your fingers, play with your toes...
If you have an error during the waterfall of code, find the part where it actually says *error* (you'll probably have to scroll upwards) and search it on Google or post it here.
If you manage to get something that says "the kernel zImage is ready" or something like that, that means you've made it!
You have officially compiled your own kernel from source! Now you need to put it in a flashable zip with the .ko files.
As i dont know what .ko files cyanogenmod compiles u should find this out yourself.
it is probably listed in the end of the terminal when the compiling is finished
hope this will bring u further then you are now.
Click to expand...
Click to collapse
Ty for help, i tried it, it worked, i guess it was the toolchain the first time...
After that i compiled euphoria kernel, but with uber 5.2 which didnt work for cm kernel...
I had to change some < > to " ", why are sources set with wrong ones, or am i making some mistake?
I replaced only zImage with euphoria zImage in anykernel .zip, can something go wrong when i do it like that?

Categories

Resources