compilng modules for Samsung Galaxy S - config.gz for the kernel is required - Galaxy S I9000 Android Development

Hi,
I am trying to compile a module for Samsung Galaxy S Froyo kernel. (Actuallu tunnel module - tun.ko)
I know how to compile a module but I need the config.gz file for the device.
Unfortunately I couldn't find it under /proc filesystem.
Where can I get it ?
Thanks.

Hi,
I need help about this. Still couldn't find the config for the kernel...

Hi, I got the same problem, did you found a solution?

mrmrmrmr said:
Hi,
I am trying to compile a module for Samsung Galaxy S Froyo kernel. (Actuallu tunnel module - tun.ko)
I know how to compile a module but I need the config.gz file for the device.
Unfortunately I couldn't find it under /proc filesystem.
Where can I get it ?
Thanks.
Click to expand...
Click to collapse
This is already built into hardcore's kernel.

mrmrmrmr said:
Hi,
I am trying to compile a module for Samsung Galaxy S Froyo kernel. (Actuallu tunnel module - tun.ko)
I know how to compile a module but I need the config.gz file for the device.
Unfortunately I couldn't find it under /proc filesystem.
Where can I get it ?
Thanks.
Click to expand...
Click to collapse
i don have such file but i don have any problem

That's just the gzipped file that shows the compile time options. General setup -> tick "Enable .config support"
Would be great if all the kernel devs would tick this, it'd be a lot easier to build custom ones tailored to just me.

You are mean the "General setup" of the Kernel- config (make menuconfig), right?
The SpeedMod Kernel I'm running at this time has no config.gz, so if I want that file I have to try some other Kernels, hoping that the Kernel- Modder checked ".config support" before building, is that right?
Samsung Galaxy I9000 - Froyo 2.2

mainster said:
You are mean the "General setup" of the Kernel- config (make menuconfig), right?
The SpeedMod Kernel I'm running at this time has no config.gz, so if I want that file I have to try some other Kernels, hoping that the Kernel- Modder checked ".config support" before building, is that right?
Samsung Galaxy I9000 - Froyo 2.2
Click to expand...
Click to collapse
You will find it under Tweaks I believe.
My bad, I did not notice the OP date, its 11th November 2010, 03:50 PM. Nearly 2 month old topic. And with no real reason to exist. I suggest Mod to remove this topic.

aziztcf said:
That's just the gzipped file that shows the compile time options. General setup -> tick "Enable .config support"
Would be great if all the kernel devs would tick this, it'd be a lot easier to build custom ones tailored to just me.
Click to expand...
Click to collapse
+1.
i thought the same thing several times in the past

Related

Extracting kernel config from I9000XXJP3

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.

[REF] cifs.ko for samsung galaxy s [including froyo 2.2]

This is the kernel module for smb/cifs mount.(windows shares)
You need it for example for this: hxxp://forum.xda-developers.com/showthread.php?t=756158
I didn't found a compatible cifs.ko for samsung s anywhere so I had to compile it.
[recommended] cifs.zip - Eclair(2.1)
[recommended] froyo.zip - Froyo(2.2) - cifs.ko & slow-work.ko (insmod slow-work.ko first)
cifs_froyo_slow_work.zip - Froyo(2.2) - cifs & slow_work in one .ko Do NOT use this because its buggy (slow, reboots when rmmod)
could you pls explain what is this for? Experts needn't, but there're lots of newbies hangin aroud here, like me . Thanks
It's a kind of file system like ext2/3/4, for example.
Sent from my GT-I9000 using Tapatalk
This is the kernel module for smb/cifs mount.(windows shares)
You need it for example for this: hxxp://forum.xda-developers.com/showthread.php?t=756158
I didn't found a compatible cifs.ko for samsung s anywhere so I had to compile it.
Awsome. We can now mount samba shares! Freakin awsome
Sent from my Apple Newton 2100
You have my gratitude
Very usefull! thank you!
i'm back, when i'm trying an insmod i have cifs.ko : invalid module format
i use a jm5 samset 1.9f roms.
I use jm5 (mimocam's fix + root) and I've compiled the module from source-code provided by samsung (opensource.samsung.com) using arm-none-eabi-(Sourcery G++ from codesourcery.com). Maybe samset used something else which is incompatible.
ickyboo said:
Sent from my Apple Newton 2100
Click to expand...
Click to collapse
Bwahahahaha
ethanfel said:
i'm back, when i'm trying an insmod i have cifs.ko : invalid module format
i use a jm5 samset 1.9f roms.
Click to expand...
Click to collapse
Setenza said he'll add Cifs in the next SamSet release.
can you make one that is compatible with the Vibrant version? Either stock Vibrant kernel or any working kernel compatible.
Greatly appreciated
I've tried the module, but also get the "invalid module format" message.
However, I'm using JM5 + root using kernel 2.6.29 built on Fri Jul 30 15:12:44 KST 2010 armv71 GNU/Linux
Can you tell us for which kernel you've build this module?
thoriam said:
I've tried the module, but also get the "invalid module format" message.
However, I'm using JM5 + root using kernel 2.6.29 built on Fri Jul 30 15:12:44 KST 2010 armv71 GNU/Linux
Can you tell us for which kernel you've build this module?
Click to expand...
Click to collapse
I've compiled for kernel 2.6.29.2 using samsung's sources
my phone says he has kernel 2.6.29 [email protected] #1
I'm attaching the module compiled with latest toolchain I could find(binutils-2.20.1, gcc-4.5.1,newlib-1.18.0)
ctran81 said:
can you make one that is compatible with the Vibrant version? Either stock Vibrant kernel or any working kernel compatible.
Greatly appreciated
Click to expand...
Click to collapse
No idea if will work bc I don't have a Vibrant.
In the mean time I've also compiled my own version of the cifs.ko module.
I've used the Samsung sources and used the Sourcery G++ Lite 2010q1-188 for ARM EABI toolchain.
I've only enabled cifs in the kernel config and compiled the module.
I've attached the compiled result.
Thanks for your effort. I'm using JM5 +samset1.9f and couldn't get the cifsmanager to work with all 3 of your cif.ko . I've just dont know why the size the last 2 versions are huge compare to the first one? Thanks anyway. Hope you can come up with something.
thoriam said:
In the mean time I've also compiled my own version of the cifs.ko module.
I've used the Samsung sources and used the Sourcery G++ Lite 2010q1-188 for ARM EABI toolchain.
I've only enabled cifs in the kernel config and compiled the module.
I've attached the compiled result.
Click to expand...
Click to collapse
darkbyt3 said:
no idea if will work bc i don't have a vibrant.
Click to expand...
Click to collapse
thank you very much. It's working on my stock vibrant kernel! YOU ROCK SIR! (using attached vibrant.zip)
Now I can stream all my media files!
(I'm vary curious how you did this, if you can point me to some guides that would be awesome, (I can write some C/C++ code))
Works great for me - had been looking around to see if anybody had compiled the CIFS module for the Galaxy S. I started reading up on how to cross compile kernel modules myself but didn't get very far.
Anyway; I have a slight problem. while mounting and browsing from the terminal as root and through adb as non-root work, I can't seem to browse in any mounted folders actually on the device using either the stock 'My Files' or Astro which was what I was aiming to do.
What I do to mount said:
\\\\192.168.0.0\\Directory /sdcard/smbshare -o user=Username,pass=password,uid=1000,gid=1015
Click to expand...
Click to collapse
Without setting the user and group settings I can't browse unprivileged as everything in the share is 'owned' by root.
I also tried using mount -t smbfs //192.168.0.0/Directory /sdcard/smbshare with the same result.
Anybody else having a similar problem? Maybe it's just something obscure about my setup.
thoriam said:
In the mean time I've also compiled my own version of the cifs.ko module.
I've used the Samsung sources and used the Sourcery G++ Lite 2010q1-188 for ARM EABI toolchain.
I've only enabled cifs in the kernel config and compiled the module.
I've attached the compiled result.
Click to expand...
Click to collapse
Sorry for the noob questions:
- Can you please give more details on how to enable cifs in the kernel config?
- Is there a specific plate to copy the cifs.ko module?
- Is there a simple (one-click) way to install this?
- is the module dependent on the kernel version? has to be exactly the same?
- is there a easy way to check if it's working (I'm using cifsmanager and get some error saying cannot access device / folder not found -not sure about the exact message text)
Thanks in advance

[Q] Can we compile a working firmware with the Samsung source?

Pretty much as the title suggests. If not, where do I find a kitchen that works?
Nobody? How about kitchens?
Pretty much
But if you would set everything up and run the build_kernel.sh script, you would end up with a 2.5 MB zImage, which is almost half the size of original zImage. This is beacuse initramfs is not available. I am not sure about the consequence of flashing this.
You can initramfs for i9000 from LeshaK's github. Though you'll have to modify the script not to replace the downloaded .config with the defconfig for aries_rev03.
Wow, finally another DEVELOPMENT question!
Keep it up!
Now for my answer: I'm working on a kitchen, have the extract / mod part mostly done, now working on initramfs extract / mod / repack (without the need to compile the kernel!) and repacking everything for flashing.
I hope to come up with something where you can start with any existing rom (different from some kitchens which are based on a particular version), mix and match apps and features compatible with that rom, then cook it for flashing either straight from Odin or installing from an update.zip.
Search in Google for
SamdroidMod Kitchen All in One for Samsung Galaxy S i9000
Does the Samsung source distribution include all the drivers or are some binary only?
snaff said:
Does the Samsung source distribution include all the drivers or are some binary only?
Click to expand...
Click to collapse
Sources included
ykk_five said:
Sources included
Click to expand...
Click to collapse
Just be sure to get the most recent sources. An older zip I had still had only binary blobs for the graphics kernel module, but they have now been GPL'ed. Joy!

[HOWTO] tun.ko to run OpenVPN on Froyo xxJPK Galaxy S I9000

NOTE: there is no guarantee this will work, because without access to the corresponding kernel source I can't be sure. It may wipe out your device if there's memory corruption! You're warned, use it only at your risk!!
Over the last weekend I wanted to familiarize with the arm assembly, buildsystem, SDK so I created a tun.ko module for kernel running in the JPK ROM. But lots of the time was also wasted trying to guess their config (things like disabled DMABOUNCE and removal of the dummy they added in 2.6.29 from struct net_device, I hope I got it all right).
I encourage to release the kernel source along with the ROM images in the future (it'd be much simpler if there was a git tree that they can just tag with the name of the ROM), and to include the tun device into the modules/tun/tun.c (as in the tarball) so that it is included by default in the future. I won't be doing this process again.
I had to install openvpn with the openvpn installer a second time with openvpn in xbin, busybox in xbin/bb and I created the bb directory and two symlinks from xbin/bb/{ifconfig,route} to xbin/busybox (after mounting /system rw). The DNS to change during VPN must be set by long pressing on the left of the openvpn config slot in the OpenVPN settings GUI.
The tun.ko I keep it in /sdcard/openvpn/tun.ko and the path has to be configured in the openvpn settings advanced settings menu and I choose to load it with insmod.
This JPK rom works great for me, so I'll likely keep using it for a long while now that I've got openvpn running fine.
252ae6e655fa08774f32f67dd76dad3a tun.ko
EDIT: the same tun.ko module works for JPM too
Great job!!!
I use vpnc daily, so I couldn't even think to upgrade to JPK without an available tun module.. now I can!
Would you share your .config, so other devs can use it? Maybe we can hope in a Froyo-voodoo in a short time..
I'm confirming that it works.
Here is how I did it (I garantee that THIS IS NOT THE MOST ELEGANT WAY to make it work)
Install Openvpn from Openvpn Installer
openvpn in /system/xbin
route and ifconfig in /system/bin
At this point, Openvpn could connect and create a tun device, but route are not pushed so it's not very usefull
So, I downloaded this version of Openvpn
http://github.com/downloads/fries/android-external-openvpn/openvpn-static-2.1.1.bz2
As superuser
Code:
su
I remounted in rw /system
Code:
mount -o remount,rw /system
I renamed /system/xbin/openvpn into openvpn_old
Code:
mv /system/xbin/openvpn /system/xbin/openvpn_old
I put that new openvpn binary in /system/xbin
I created symlinks from /system/bin/route and ifconfig to /system/xbin
Code:
ln -s /system/bin/route /system/xbin/route
ln -s /system/bin/ifconfig /system/xbin/ifconfig
I also created a symlink os /system/xbin to /system/xbin/bb, just in case
Code:
ln -s /system/xbin /system/xbin/bb
Here we go
captive said:
Would you share your .config, so other devs can use it?
Click to expand...
Click to collapse
+1
i tried to complie cifs.ko and tun.ko for the JPC kernel and couldnt get it to work. i ultimately went back to eclair because of this so would like to be able to compile modules and other filesystem support.
thanks.
kanemari said:
+1
i tried to complie cifs.ko and tun.ko for the JPC kernel and couldnt get it to work. i ultimately went back to eclair because of this so would like to be able to compile modules and other filesystem support.
thanks.
Click to expand...
Click to collapse
config attached, but the config is not enough and it may not be fully correct (it is enough as far as the data structures used by tun.ko are concerned, I checked them all against the zImage assembly). The diff of the v2.1 image, has to be applied too but with DMABOUNCE removed from Kconfig of the subarch of the galaxy as far as I can tell and the placeholder added to struct net_device in their v2.1 diff, has to be removed too. cifs.ko may be more complicated than tun, good luck. Unless you've personal interest to familiarize with the enviroment and the arm assmbly like I had, I would wait the source to released, it has to be released eventually to comply with the GPLv2.
Thankyou Newmail!!
I've tryed VPNC 0.99 and works great!!
You have only to type from terminal: insmod /system/folder/tun.ko
After that you can use VPNC...
I've found an issue with the FQDN of the VPN gateway... solved setting the IP address
Just a question:
when I'll update my JPK.. what I have to do to recompile the tun.ko?
Can you write here the procedure?
Cheers
Paolo
newmail said:
config attached, but the config is not enough and it may not be fully correct (it is enough as far as the data structures used by tun.ko are concerned, I checked them all against the zImage assembly). The diff of the v2.1 image, has to be applied too but with DMABOUNCE removed from Kconfig of the subarch of the galaxy as far as I can tell and the placeholder added to struct net_device in their v2.1 diff, has to be removed too. cifs.ko may be more complicated than tun, good luck. Unless you've personal interest to familiarize with the enviroment and the arm assmbly like I had, I would wait the source to released, it has to be released eventually to comply with the GPLv2.
Click to expand...
Click to collapse
OK, but is the placeholder field at the end of the net_device struct?
If so it shouldn't matter and a module cross compiled from the 2.6.29 source should be OK. The absence of DMABOUNCE shouldn't matter for tun.ko either.
In theory you should be able to clone the AOSP git kernel repo and use that kernel for building a module, as long as the module itself doesn't actually use changes that have been made by Samsung (unlikely).
The .config used probably does deserve some attention though, as you have done.
foloap said:
Thankyou Newmail!!
I've tryed VPNC 0.99 and works great!!
You have only to type from terminal: insmod /system/folder/tun.ko
After that you can use VPNC...
I've found an issue with the FQDN of the VPN gateway... solved setting the IP address
Just a question:
when I'll update my JPK.. what I have to do to recompile the tun.ko?
Can you write here the procedure?
Cheers
Paolo
Click to expand...
Click to collapse
Glad it works great for you too. So the tun.ko has to be recompiled if they alter .config. It may work but it's not guaranteed. The procedure is nasty and hard to document and I don't have enough time for that sorry. But I'm sure we'll get the source when there will be an official Froyo release that is shipped to all phones so I wouldn't worry.
raven-au said:
OK, but is the placeholder field at the end of the net_device struct?
If so it shouldn't matter and a module cross compiled from the 2.6.29 source should be OK. The absence of DMABOUNCE shouldn't matter for tun.ko either.
In theory you should be able to clone the AOSP git kernel repo and use that kernel for building a module, as long as the module itself doesn't actually use changes that have been made by Samsung (unlikely).
The .config used probably does deserve some attention though, as you have done.
Click to expand...
Click to collapse
The .config is the fundamental part, and it may be enough I'm not sure. There was a placeholder was a samsung customization done in the middle of net_device and that was removed in the Froyo ROM (initially I applied it). the DMABOUNCE removal affects the struct device that is part of net_device so a lot of stuff goes off by 4 bytes by tweaking that arch config option. That gets set in some Kconfig patched in by samsung. You're right that probably tun isn't affected by the DMABOUNCE but I tried to get the net_device size right (just in case) and it may affect other net modules.
Hi newmail, thanks so much for the tun.ko file, this is the first time I've managed to get VPNC working on my SGS!! One question though, I find I'm having to run insmod everytime I reboot the phone to make tun.ko available again, does anyone know if there's a way around this please so it stays permanently available? Many thanks!!
@bdl1969
I made a subdir in /system/lib called "modules" and placed my tun.ko there.
Now it's insmodded automagically..
newmail said:
The .config is the fundamental part, and it may be enough I'm not sure. There was a placeholder was a samsung customization done in the middle of net_device and that was removed in the Froyo ROM (initially I applied it). the DMABOUNCE removal affects the struct device that is part of net_device so a lot of stuff goes off by 4 bytes by tweaking that arch config option. That gets set in some Kconfig patched in by samsung. You're right that probably tun isn't affected by the DMABOUNCE but I tried to get the net_device size right (just in case) and it may affect other net modules.
Click to expand...
Click to collapse
Oh crap, that is bad news.
Then both the DMABOUNCE and the net_device are likely a problem.
That's a stupid way of doing things.
raven-au said:
Oh crap, that is bad news.
Then both the DMABOUNCE and the net_device are likely a problem.
That's a stupid way of doing things.
Click to expand...
Click to collapse
The smart way of doing things I already mentioned in the first post (public git tree tagged at every ROM release .
captive said:
@bdl1969
I made a subdir in /system/lib called "modules" and placed my tun.ko there.
Now it's insmodded automagically..
Click to expand...
Click to collapse
hmm I tried and it didn't work for me... are you sure? openvpn GUI runs insmod for me so it's no big deal.
That worked great for me, thanks for the suggestion! The only problem I found was that it caused my Good for Enterprise app to crash so I uninstalled and reinstalled it and then it was all fine. Only problem I'm left with now is when using VPNC, I make the VPN connection fine but I can't disconnect via the app, I have to bounce the network connection (eg. toggle WiFi) to drop the tunnel!
I compiled tun.ko using the 2.6.32 kernel from android git and your .config, but it won't load with dmesg saying "Unknown symbol mem_map". May I ask which kernel version did you use, and what arm toolchain are you using?
sztupy said:
I compiled tun.ko using the 2.6.32 kernel from android git and your .config, but it won't load with dmesg saying "Unknown symbol mem_map". May I ask which kernel version did you use, and what arm toolchain are you using?
Click to expand...
Click to collapse
Probably you have discontigmem off in the .config. The platform of the galaxy isn't in the android kernel, it's in arch/arm/plat-s5pc11x (it's the thing that sets DMABOUNCE in v2.1 roms and I guess it doesn't on the JPK kernel).
You need to make a diff between android 2.6.29 and their tree, and apply it to the 2.6.32 kernel, then you need to solve enough rejects so that it can build external module. I didn't port the whole diff of course, just enough so make can start with the headers and .config all right. Then I built the module externally (adding the tun/ directory to their modules/ directory) but it should also work with just make modules setting CONFIG_TUN=m if you want to build it in-tree.
It's a bit tricky.. If you really need I can give you the broken diff to apply to the 2.6.32.9 android kernel. That is enough to build some module including tun.ko
newmail said:
Probably you have discontigmem off in the .config. The platform of the galaxy isn't in the android kernel, it's in arch/arm/plat-s5pc11x (it's the thing that sets DMABOUNCE in v2.1 roms and I guess it doesn't on the JPK kernel).
You need to make a diff between android 2.6.29 and their tree, and apply it to the 2.6.32 kernel, then you need to solve enough rejects so that it can build external module. I didn't port the whole diff of course, just enough so make can start with the headers and .config all right. Then I built the module externally (adding the tun/ directory to their modules/ directory) but it should also work with just make modules setting CONFIG_TUN=m if you want to build it in-tree.
It's a bit tricky.. If you really need I can give you the broken diff to apply to the 2.6.32.9 android kernel. That is enough to build some module including tun.ko
Click to expand...
Click to collapse
It'd be great. I've already tried to do the patching. It compiles, but crashes the phone when loaded. Maybe your version is a bit better.
sztupy said:
It'd be great. I've already tried to do the patching. It compiles, but crashes the phone when loaded. Maybe your version is a bit better.
Click to expand...
Click to collapse
Did you find the source now that JPM has been released officially with Kies? I upgraded to JPM now, in the hope we get the source....
BTW, my tun.ko and my rfs_async.ko also works fine on JPM. I don't know about my ext4 build but I assume that will work too.
I used one CSC of this thread http://forum.xda-developers.com/showthread.php?t=802909 and I deleted the KOR /efs/nv_data* created by the JPK ROM (leaving the .nv_data.bak*). So with this combination of CSC from that thread, and MODEM and PDA from the JPM rar, I apparently restored the original product_id (SGSToolbox also says I'm back to the original product_id). Not that product_id matters but I thought I'd try that next time I flashed and apparently it worked fine...
newmail said:
Did you find the source now that JPM has been released officially with Kies? I upgraded to JPM now, in the hope we get the source....
BTW, my tun.ko and my rfs_async.ko also works fine on JPM. I don't know about my ext4 build but I assume that will work too.
I used one CSC of this thread http://forum.xda-developers.com/showthread.php?t=802909 and I deleted the KOR /efs/nv_data* created by the JPK ROM (leaving the .nv_data.bak*). So with this combination of CSC from that thread, and MODEM and PDA from the JPM rar, I apparently restored the original product_id (SGSToolbox also says I'm back to the original product_id). Not that product_id matters but I thought I'd try that next time I flashed and apparently it worked fine...
Click to expand...
Click to collapse
The JPM source was avialable for a few hours on the samsung's site, did grap it. You can find it on megaupload somewhere. I couldn't manage to compile a working module from that source either (it now loads fine, but does a kernel panic when I try to mount a loop device formatted with ext4), but I'm sure that's my fault.

[Q] Where is stock wireless module, and can I compile my own?

Sorry if this should be obvious, but I am new to kernel compiling and have searched with no luck.
Where is the wireless module located on the stock S3 ROMs? I have looked in /system/lib/modules and found a wlan.ko link to /system/lib/modules/prima/prima_wlan.ko - but the prima directory does not seem to exist, and searching the entire filesystem for prima_wlan.ko comes up with nothing.
I have also searched for the source to compile this driver module myself, to no avail. Is the source closed?
The rest of the details: I am running stock Jelly Bean T999UVDMD5 with root injected (mrRobinson's root66). I am trying to achieve CD-ROM emulation via USB so I can use DriveDroid. I have successfully applied the patches listed in the DriveDroid thread to the stock T-Mobile Jelly Bean kernel SGH-T999_JB_TMB source from Samsung. My compiled kernel boots and DriveDroid works. However, I have no wifi.
I have seen discussions that the original wireless .ko module can be copied over, and others that say it will not work unless it is compiled with the kernel to be used. I can't find the original or the means to compile it, as stated above. Any help is appreciated.
I'm not sure right off hand about the prima-wlan.ko.
But kernel source can be found at opensource.Samsung.com
Touchwiz source is closed.
Sent from my SGH-T999 using xda premium
DocHoliday77 said:
I'm not sure right off hand about the prima-woman.lo.
But kernel source can be found at opensource.Samsung.com
Click to expand...
Click to collapse
Yep that's the source that I patched.
Looks like wifi is already in the kernel build, but not enabled by default.
http://forum.xda-developers.com/showthread.php?p=42793761
Compiled again with
CFLAGS_MODULE=-fno-pic
and added
EXTRA_CFLAGS=-fno-pic
in the Makefile. (not sure if the second was needed) and wifi is working. Thanks to farhanito.

Categories

Resources