Jump to content

Compile kernel w/out camera driver


Guest markiemannie

Recommended Posts

Guest markiemannie

Hey,

Got my blade (OSF LCD tpt gen2) a little over a year now and I'm loving it. Got ICS running on it (my housemates were all WTF, as I had ICS at my cheap chinese phone before they had at their SGS2?? yea) and it runs lovely. HOWEVER, there is one problem that really really really annoys me. Some kind of insane battery drain (100% -> empty in 8 hours with light usage. CPU spy shows 80% deep sleep so that's fine.).

Usual advice is of course check apps, wipe, try other rom blabla stuff like that. I did all of that already, but it seemed to be kind of random.

Here's a few bulletpoints on what I did. All was done on clean, wiped roms. Between CM7/ICS/SS/ICS there were TPTs so it should be really clean, right? ;)

  • CM7: worked fine up to some nightly. After that drain. So I upgraded to:
  • ColdFusionX (14 march version): no drain! However, due to lack of qualcomm libs browser was laggy so I flashed to:
  • Swedish Snow RLS7: drain! But I was willing to try something so I flashed:
  • Swedish Snow RLS7 new modavon stock kernel: no drain. Once it got randomly stuck in reboot loop, and as I had to wipe anyway switched to:
  • AKOP 29/4 (burstlam): drain.

At one point I also flashed RLS6 (before RLS7) which didn't have the drain IIRC but I can't be 100% sure about that, but I think it was clean, as in, no drain.

One of the few differences between the RLS7 original and custom kernel is the Dutch camera driver. Which is of course very useful for my mother (bought her Blade here in the Netherlands, I imported it way before), but it did seem not to like my camera.

Of course that's not the only reason I want to blame the camera. Some CM7 nightly "killed" it. The last pic my phone took itself was somewhere in june/july 2011. I have no idea which nightly it was, could be anywhere from 30 to 250ish (got them all).

Killed, you say? And no other roms work? Yup. I'm not the only one. The phone crashes when it tries to use the autofocus, preview works fine. After the crash the sensor seems to stay activated and drain battery like wtf, resulting in insane battery drain like the 8hr in standy one like I got now. It doesn't really bother me as blade camera is crap and I always carry a Sony pocket camera around :)

So, my camera is broken and the kernel with camera fix drains battery. Makes sense! Solution: compile a kernel without camera as I can't use it anyways.

Problem is: I have no clue at all how to do this. I do see the thread about compiling CM9 by Sej but I only want a small tiny 5mb kernel, not an entire ROM. And I doubt I can just use make menuconfig to modify it? (which is always fun to use for real kernels, ffs stupid NFS default on). Anyone who is willing to post a few steps or a link I missed on how to do it? I'd like to stick with my current ROM as it works fine otherwise.

tl;dr How can I compile a recent Blade gen2 kernel for ICS without camera drivers/support?

Link to comment
Share on other sites

Guest jeddy1

its not the camera driver-s the drainer of battery on AOKP +CM9 but it's the Wi-fi and not just on that rom but i think on all ICS roms

Edit: at least for me ..

maybe also bec my blade's battery get to old ;)

Edited by jeddy1
Link to comment
Share on other sites

Guest t0mm13b

Here's the kernel config I used for Burstlam's kernel that I used in my t0mm13bROM (on a separate thread). unzip it and rename it to .config

Don't worry if you're using another source, as the menuconfig will read it in and discard those that are not there in another source. Go into Device Drivers > Multimedia Support > Video Capture adaptors, de-select everything you see in there pertinent to different sensors. And exit out of the submenu, and save the .config, it will be overwritten with the one you have.

OR

Extract /proc/config.gz from your currently running ICS ROM, be sure you have that kernel source present. and unzip it and follow the instruction I highlighted above. :)

t0mm13bROM_Optimized2.cfg.gz

Link to comment
Share on other sites

Guest markiemannie

Thanks for the help :) However, it doesn't really want to boot I think. Stuck in adb mode (adb shell works).

Commands I used:

./mkbootimg --base 0x2600000 --kernel zImage --ramdisk boot.img-ramdisk.gz --cmdline 'androidboot.hardware=blade console=null' -o boot2.img

fastboot flash boot boot2.img

(after compiling kernel).

Link to comment
Share on other sites

Guest t0mm13b

Thanks for the help :) However, it doesn't really want to boot I think. Stuck in adb mode (adb shell works).

Commands I used:

./mkbootimg --base 0x2600000 --kernel zImage --ramdisk boot.img-ramdisk.gz --cmdline 'androidboot.hardware=blade console=null' -o boot2.img

fastboot flash boot boot2.img

(after compiling kernel).

How do you mean stuck in adb mode? the mkbootimg looks correct... after you fastboot flash it, did you fastboot reboot?

Paste in the adb logcat command and see where its hanging - would not be surprised if the kernel is keeling over due to omitted camera drivers...

Link to comment
Share on other sites

Guest markiemannie

Will flash again tomorrow, as I have to use the phone for now :P @ stuck in adb mode: green android on the screen. When I connect it to USB it presents itself as ZTE ADB interface and the ADB console recognizes it and I can do stuff like adb shell which gives me a rootshell with an unmounted sdcard (but that's regular, right?). Not sure if it's still initramfs or the actual root file system, but if I see an sdcard mountpoint it should be the real deal, right?

Link to comment
Share on other sites

Guest t0mm13b

Will flash again tomorrow, as I have to use the phone for now :P @ stuck in adb mode: green android on the screen. When I connect it to USB it presents itself as ZTE ADB interface and the ADB console recognizes it and I can do stuff like adb shell which gives me a rootshell with an unmounted sdcard (but that's regular, right?). Not sure if it's still initramfs or the actual root file system, but if I see an sdcard mountpoint it should be the real deal, right?

Like as I said, use adb logcat to log the android errors and go into adb shell and redirect dmesg to the sdcard to pull in and pastebin it :)

Link to comment
Share on other sites

Guest tilal6991

All you need to do to stop the drain is get rid of /system/lib/hw/camera.msm7x27.so with a root explorer.

Anyway in all the new ICS builds which are coming out/already out this has been fixed.

Link to comment
Share on other sites

Guest markiemannie

Deleted the file and it helped, thanks a lot!

That only leaves the ICS Wifi drain of which I'm 100% sure didn't exist in one of the old ColdFusion builds. Downgrading Wifi driver might work?

Still doesn't fully answer my question: why doesn't my kernel work? :P

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.