I would like to build my i9000's kernel but there are problems
I've installed ubuntu 9.10.
As you know, i could download the source code from the web
In that there are codes for making kerne
and also there is a script, named build_kernel, which makes me be able to build the kernel.
At first, i installed sourcery toolchain and then modified the build_kernel.sh
Because the instruction said i should change toolchain's directory and prefix
And finally i built it writing './build_kernel.sh'.
It seemd to be working but there were so many errors
And the zimage file was small, it's only 2.1MB
I tried to flash that kernel but it made my phone go black.
Can anyone help me please?
What should i do?
How did some people make such great kernels? Sorry im newbie.
dkcldark said:
I would like to build my i9000's kernel but there are problems
I've installed ubuntu 9.10.
As you know, i could download the source code from the web
In that there are codes for making kerne
and also there is a script, named build_kernel, which makes me be able to build the kernel.
At first, i installed sourcery toolchain and then modified the build_kernel.sh
Because the instruction said i should change toolchain's directory and prefix
And finally i built it writing './build_kernel.sh'.
It seemd to be working but there were so many errors
And the zimage file was small, it's only 2.1MB
I tried to flash that kernel but it made my phone go black.
Can anyone help me please?
What should i do?
How did some people make such great kernels? Sorry im newbie.
Click to expand...
Click to collapse
check few threads behind you ... it is illustrated in the links.
Dear all,
Did anyone succeed extracting kernel configuration from I9000XXJP3? Kernel version is 2.6.32.9, the vermagic is "2.6.32.9 mod_unload ARMv7"
extract-ikconfig doesn't work on it.
I succeeded extracting a zImage gzipped payload, but it seems not to contain any configuration in it (see attached).
/proc/config.gz doesn't exist, Samsung open source package (downloaded from Samsung open source site) contains only Android 2.1 Eclair or previous versions.
My target is to build tun.ko and, eventually, ext3/ext4 modules to make them working in Samsung Galaxy S I9000 with rooted I9000XXJP3.
Any idea?
Without froyo source code or a good Samsung Kernel (es. for himem capable) I think is impossible to play good with theses beta roms.
Ciao
Any news? I need tun.ko for jp3 too..
I have tried to compile the 2.6.32.9 kernel editing the .config in 2.6.9, the module tun.ko is accepted by the device, but I get a kernel panic!
redsh said:
I have tried to compile the 2.6.32.9 kernel editing the .config in 2.6.9, the module tun.ko is accepted by the device, but I get a kernel panic!
Click to expand...
Click to collapse
Did you use the stock linux kernel? Or the common from android.kernel.org?
I'm trying the same thing actually. Isn't there any default config for the processor that might work? I tried with the config from .29 but when loading the module it says wrong format.
try to build 2.6.32 with the 2.6.29 config ("yes" all missing stuff)
turn on your galaxy, adb push the tun.ko
try to load it, it will say "missing symbols" blabla
find the config options that match those symbols, enable them, recompile, try again
Great to see some people who are hacking the kernel! Keep it up!
But I'm afraid it is not going to be as easy as dropping aries_rev03_defconfig as .config in a 2.6.32 kernel tree and doing 'make oldconfig'. That's because many of Samsung's changes have not been included in the newer mainline kernel versions yet.
Samsung added quite a lot of low-level board support for their dev boards (and for the SGS, of course), did some customization and added a few drivers which you will need to forward-port to the newer kernel.
Please have a look at this thread, in which I've started a breakdown of the Samsung patches against Android Eclair's 2.6.29 kernel.
The best course of action I think is to git clone Android's kernel from AOSP, checkout the android-2.6.29 branch, apply Samsung's patches to that, then attempt to rebase your tree to a newer kernel version. (Note, you may want to start with small steps, to get a feel for what you're up against )
Note that there probably will be lots of merge conflicts which you need to resolve, and after dealing with all those, you also have to make sure that everything else that's merged still works as expected, but at least that will show you the amount of work involved. You will basically be doing all the work that Samsung is doing right now for their kernel for FroYo. It will be interesting to follow their progress on the mailing lists and on IRC.
bilboa1 said:
try to build 2.6.32 with the 2.6.29 config ("yes" all missing stuff)
turn on your galaxy, adb push the tun.ko
try to load it, it will say "missing symbols" blabla
find the config options that match those symbols, enable them, recompile, try again
Click to expand...
Click to collapse
Thats exactly what I did, but I got wrong module format... which is a fatal error. I need to invest further in the used config... maybe i did not pick up the right one properly..
miki4242 said:
Great to see some people who are hacking the kernel! Keep it up!
But I'm afraid it is not going to be as easy as dropping aries_rev03_defconfig as .config in a 2.6.32 kernel tree and doing 'make oldconfig'. That's because many of Samsung's changes have not been included in the newer mainline kernel versions yet.
Samsung added quite a lot of low-level board support for their dev boards (and for the SGS, of course), did some customization and added a few drivers which you will need to forward-port to the newer kernel.
Please have a look at this thread, in which I've started a breakdown of the Samsung patches against Android Eclair's 2.6.29 kernel.
The best course of action I think is to git clone Android's kernel from AOSP, checkout the android-2.6.29 branch, apply Samsung's patches to that, then attempt to rebase your tree to a newer kernel version. (Note, you may want to start with small steps, to get a feel for what you're up against )
Note that there probably will be lots of merge conflicts which you need to resolve, and after dealing with all those, you also have to make sure that everything else that's merged still works as expected, but at least that will show you the amount of work involved. You will basically be doing all the work that Samsung is doing right now for their kernel for FroYo. It will be interesting to follow their progress on the mailing lists and on IRC.
Click to expand...
Click to collapse
Yes that would be a lot of work. Maybe its better to just wait until they release the kernel from froyo. I read that they release their opensource stuff rather fast. But just for adding a module like ext4 I don't think you need those patches, because imho they didn't touch the fs of the kernel. We just need an adaquate kernel config and adding modules should be possible.
Phlogiston said:
Thats exactly what I did, but I got wrong module format... which is a fatal error. I need to invest further in the used config... maybe i did not pick up the right one properly..
Click to expand...
Click to collapse
Make sure you're using the same kernel version number and build number, because samsung kernels do not have the option to load incorrect module versions
Yes i've set the subversion as well but without the patches from samsung its impossible it seems. We need to wait and hope that they release the froyo kernel sources soon....
bilboa1 said:
Make sure you're using the same kernel version number and build number, because samsung kernels do not have the option to load incorrect module versions
Click to expand...
Click to collapse
Are you sure they set CONFIG_MODVERSIONS? It's off in the downloadable sources.
Just compare the output of `modinfo -F vermagic <yourmodule>` to `modinfo -F vermagic <modulewhichloads>` or to /proc/version .
did this get solved yet? I google'd for the tun.ko file for my i9000 using jp3 but nothing yet... if you have a proper one for the MoDaCo version here please attach it! ~
I think I saw someone's post with tun.ko for FroYo beta somewhere in these forums, I mean i9000 Android Dev. One of the guys here has found a way to compile kernel for jp* here. I am sure.
I actually found it attached somewhere in the forum and it was 1,5447 mb big I think it was... but it still didn't work for me so I presumed the kernel or something must have been wrong.
Will someone please make a tun.ko for the new released kernel or send links on how to and the tools needed? Thanks in advanced.
until HTC releases the source for kernel 2.6.32.15-ge2fb08e
we can not compile a "Real" tun.ko
I modified the version string on the current released code 2.6.32.15-g746f4f0 to ge2fb08e and am compiling it right now.
This will allow it to load and as long as there are no major changes in the kernel it could work for you. It will at least load so you can test it.
I will up load it as soon as it is done compiling
Bill Tedeski
dwertz said:
Will someone please make a tun.ko for the new released kernel or send links on how to and the tools needed? Thanks in advanced.
Click to expand...
Click to collapse
That would be great. Thank you
btedeski said:
until HTC releases the source for kernel 2.6.32.15-ge2fb08e
we can not compile a "Real" tun.ko
I modified the version string on the current released code 2.6.32.15-g746f4f0 to ge2fb08e and am compiling it right now.
This will allow it to load and as long as there are no major changes in the kernel it could work for you. It will at least load so you can test it.
I will up load it as soon as it is done compiling
Bill Tedeski
Click to expand...
Click to collapse
to build it yourself
you can get instructions for an android build system here
http://source.android.com/source/download.html
download the source from HTC http://developer.htc.com/
you will need a .config file should be /proc/config.gz on your phone, uncompress and rename to .config
http://code.google.com/p/android/issues/detail?id=3803
you will need to setup your path to include the build environment you download from source.android.com I will put mine at the end of this
edit the Makefile and change EXTRAVERSION = .15-ge2fb08e to contain version string you need
do a make modules
as long as the kernel has not changed to much from the base source HTC has provided it should work.....
I added the folllowing path statements to my .bash_profile
PATH=$PATH:$HOME/bin
PATH=$PATH:/opt/mydroid/prebuilt/linux-x86/
PATH=$PATH:/opt/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/
PATH=$PATH:/opt/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/arm-eabi/bin/
PATH=$PATH:/opt/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/arm-eabi/lib/
PATH=$PATH:/opt/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/
PATH=$PATH:/opt/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/lib/
PATH=$PATH:/opt/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/lib32/
PATH=$PATH:/opt/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/libexec/
PATH=$PATH:/opt/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/share/
PATH=$PATH:/user/lib/gcc/i686-redhat-linux/4.4.4./libgcc.a
dwertz said:
Will someone please make a tun.ko for the new released kernel or send links on how to and the tools needed? Thanks in advanced.
Click to expand...
Click to collapse
Tun.ko vermagic=2.6.32.15-ge2fb08e
the attached tun.ko is build from the released HTC source with the version string changed to ge2fb08e
as long as the kernel has not changed much on the leaked kernels this should load and work
[[email protected] net]$ strings tun.ko | grep magic
vermagic=2.6.32.15-ge2fb08e preempt mod_unload ARMv7
You are awesome. Thanks
update - The tun.ko does work so it looks like the leaked kernel did not change much.
I will try and learn how to make one. I have ubuntu in vmware to use. Does this have to be a linux box or can it be done on a MacOSX?
Do you have the cifs.ko and nls_utf8.ko for 2.6.32.15-ge2fb08e?
I am trying to get cifs working on my evo.
Never mind. Thanks for everyone's help.
Here is what I did to get the cifs.ko and nls_utf8.ko (from here http://forum.xda-developers.com/showthread.php?t=754793) to work for my kernel.
I took the cifs.ko and nls_utf8.ko created by "snq-" and used a hex editor to edit the kernel number to match mine.
That was all, no re-compile needed. then I followed the rest of the steps laid out by snq- to install the files and test them.
Lastly I installed CifsManager which is available on Market and everything worked.
I am able to connect to my network only locally. Comcast seems to be blocking ports so I cannot access smb from outside my network.
please post link for cifs.ko
If you have a working cifs.ko for this kernel, please post a link!
Thanks!
Any Suggestions
Any where else to go for a tun.ko for ge2fb08e? I've almost exhausted my searching. Thanks!
i am trying to set up OpenVPN on my Evo with the same ge2fb08e kernel version. i installed the pre-requisites, but do not have the tun driver. can you send me a copy of the tun.ko zip? TheEdge88
SR, You can download the tun.ko file in the previous post, but you need to post 9 more times before you can access it. It worked for me and now I can connect to the OpenVPN server. I think I still have a problem with routing though.
What I have done so far:
1) setup cross compiling
2) downloaded the HTC-provided kernel source
3) wrote my own lkm & Makefile
4) grabbed .config from /proc/config.gz off the phone
The problem though is that the distributed HTC kernel is only the source and it doesn't have the compiled files used in the kernel module building processing. It also doesn't have the autoconf files are shown here in the make error:
" ERROR: Kernel configuration is invalid.
include/linux/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it."
So I am wondering, do I have to compile my own kernel in order to be able to compile modules or is there someway to make it work with the stock HTC kernel? Loadable modules are enabled in the stock kernel, but unless I am missing something I don't see how you can actually compile modules for it.
Thanks for any help, and I am very experienced with kernel development (on Intel) so feel free to provide any technical details.
Does anyone know of a way we can take the coding scripts from the SBC mod and use it in another kernel that does not have it?
Thread moved to Q&A.
Use the git repos to get source files for the kernel you want and the sbc mod and compile it yourself.
If you don't currently use or know how to use adb or fastboot I suggest not doing this yourself because there are alot of terminal commands you will have to issue just to set up your working environment. Not to mention setting up the environment itself, creating the source directory, adding the sbc mod to the proper place, etc, etc.
The point I am making is that it isn't easy for people to just pick up compilng a kernel especially if they don't push themselves to learn simple adb/fastboot operations. Add to the fact that if they don't know how to read/edit code there is a severely high learning curve that will have to be completed.
If all you want is a kernel with the sbc mod added ask that dev to make it and hope they will do it. It's not worth the trouble of setting up the environment just to compile one change that is not guaranteed to compile the first time versus the dev already having the environment up and running and it would only take them minutes to compile a new kernel with the changes.
The dev himself already stated he will not include the SBC script in his kernels....but I just posted him a request and ask him if he could cook it up for me.
The Kernel I was trying to use it with is ziggy's latest kernel
BAttitude7689 said:
The dev himself already stated he will not include the SBC script in his kernels....but I just posted him a request and ask him if he could cook it up for me.
The Kernel I was trying to use it with is ziggy's latest kernel
Click to expand...
Click to collapse
I personally compiled the kernel and kernels I am using for this very reason. Plus I wanted more control over things like undervolt levels, governors available/default/settings etc. At this point it seems the kernel you want is just out of your reach for the time being. Sucks, I know.