Jump to content

Welcome to CyanogenMod

Welcome to our forum. Like most online communities you must register to post, but don't worry this is a simple free process that requires minimal information for you to signup. Be a part of the CyanogenMod Forum by signing in or creating an account. You can even sign in with your Facebook or Twitter account.
  • Start new topics and reply to others
  • Subscribe to topics and forums to get automatic updates
  • Get your own profile and make new friends
  • Download files attached to the forum.
  • Customize your experience here
  • Share your CyanogenMod experience!
Guest Message by DevFuse
 

Kernel config files available?

kernel custom build

  • Please log in to reply
5 replies to this topic

#1 d33733t

d33733t
  • Members
  • 3 posts
  • Country:us
  • Device Model:Samsung Epic 4G
  • MOD Version:7.2
  • Recovery Image:ClockworkMod

Posted 17 January 2012 - 06:56 AM

Looking to make a custom build of the CM gingerbread kernel for my Epic 4G, or at least custom kernel modules. Wanted support for custom voltages, CIFS, NFS, and USB host mode.

I'm familar with the kernel build process, and am aware that I will be on my own as far as bricking the device, causing system instability, and potentially damaging the hardware goes. If I understand correctly, the recovery area uses the same kernel, so if the kernel is for whatever reason less than perfect, the recovery partition will be useless and I will be forced to reflash my device to stock - assuming I don't damage it in the process.

I've downloaded your kernel sources using the information available in the wiki here, but the information on that page is out of date. Your kernel builds no longer support /proc/config.gz, and the config files you use for the devices don't appear to be available in the git repositories for the kernel or the OS, unless the msm config in the kernel sources is used for multiple targets.

I tried using the Samsung config from their open-source release of EI22, but the kernel build fails on the SDHCI driver. Wasn't really expecting that to work on a different version of the kernel sources, but thought it might be worth trying.

Wondering if someone on the dev team might be so kind as to provide information about the config files used. Updating the wiki might not be a bad idea, either. Again, I understand that custom kernels are not officially supported under CM, and building your own is not recommended. I'm willing to accept that risk, and there are probably others who frequent this forum who would as well.

And, of course, if I'm totally off base here and I've overlooked the location of the config files, this post will at least be informative to other people who make the same mistake I did.

#2 Yochai Gal

Yochai Gal
  • Members
  • 23 posts
  • LocationBoston, MA
  • Country:us
  • Device Model:Epic4G
  • MOD Version:7
  • Recovery Image:ClockworkMod

Posted 19 January 2012 - 10:17 PM

Perhaps I can be of service.
https://github.com/C...bread/README.md

You need to get the entire CM source, create a local manifest unique to the phone then go to [CM SOURCE TREE]/device/samsung/epicmtd/kernel.
You need to then follow steps 1 and 2 in the link above with the phone connected and it should output an existing kernel image, which you can then use to create a config.gz file.
Hope that helps. Not a kernel dev, not a developer, just another linux sysadmin who tried to customize the CM kernel to support the dock audio (if you feel like doing this too, let me know and I'll give you all I got).

EDIT: Let me mention another thing - I was just as confused as you, spent maybe six hours figuring it out!  Then when I saw how damn difficult it would be to import the other samsung kernel code I understood why noobnl gave up on it - and he knows what he's doing!  I even went on IRC to the CM channel, no one answered me for an hour, ended up helping someone else.

Edited by Yochai Gal, 19 January 2012 - 10:22 PM.


#3 DRockstar

DRockstar
  • Members
  • 3 posts
  • Device Model:Samsung SPH-D700 Epic 4G
  • MOD Version:CM 7.1
  • Recovery Image:ClockworkMod

Posted 20 January 2012 - 03:28 AM

I think this is what you may be looking for...

https://github.com/CyanogenMod/android_kernel_samsung_victory/blob/gingerbread/Kernel/arch/arm/configs/cyanogenmod_epicmtd_defconfig

From the repo:

https://github.com/CyanogenMod/android_kernel_samsung_victory/

If you've synced the cm source, then from ~/android/system:

mkdir -p kernel/samsung
cd kernel/samsung
git clone https://github.com/CyanogenMod/android_kernel_samsung_victory 
mv android_kernel_samsung_victory victory
cd victory

Then edit build_kernel.sh to point to your toolchain, etc. This build script will also dump a proper kernel image inside the epicmtd device tree automatically as well.

Hope this helps!

P.S. This was a pita to edit from my epic... hope you understand all this OK...

Sent from my Samsung Epic4G CM7

Edited by DRockstar, 20 January 2012 - 09:29 AM.


#4 sgtkwol

sgtkwol
  • Members
  • 22 posts
  • Country:us
  • Device Model:SPH-D700
  • MOD Version:CyanogenMod-9.0.0-RC0-EpicMTD-KANG
  • Recovery Image:ClockworkMod

Posted 20 January 2012 - 03:56 AM

Shouldn't need to edit for toolchain, anymore, if you are synced with CM sources.

#5 d33733t

d33733t
  • Members
  • 3 posts
  • Country:us
  • Device Model:Samsung Epic 4G
  • MOD Version:7.2
  • Recovery Image:ClockworkMod

Posted 24 January 2012 - 04:08 AM

That is better than I was hoping for. Thanks! I'll be sure to report if I get USB host mode working. With the necessary disclaimer, of course :)

#6 d33733t

d33733t
  • Members
  • 3 posts
  • Country:us
  • Device Model:Samsung Epic 4G
  • MOD Version:7.2
  • Recovery Image:ClockworkMod

Posted 25 January 2012 - 04:06 AM

One more question: I have downloaded the kernel source as specified, but now I am unable to update the Cyanogenmod tree because the kernel has been modified. The information online mentions .gitignore for git repositories, but the Google repo command seems to ignore this file. Is there anything I can do to force the repo command to ignore the custom kernel without having to write a build wrapper that moves the old file back after a build?

EDIT: Nevermind. My source tree was hopelessly scrambled by the git server instabilities of late. I had to completely delete the entire tree and checkout everything all over again. Works fine now that I cleared it all out and downloaded as a single thread instead of with the -j16 switch.

Edited by d33733t, 28 January 2012 - 06:22 PM.