• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[KERNEL][3.x][dev] Nook Color ICS/CM9 kernel development

Search This thread

fattire

Inactive Recognized Developer
Oct 11, 2010
2,280
6,473
www.eff.org
This thread is for development of a long-discussed 3.x kernel for encore/nookcolor. The goal is not only to have a modern kernel, but to take advantage of the expected support for hardware accelerated video and such.

TI has released an incomplete 3.x branch which is now being used as a base. The project so far has been about getting stuff ready and working so that as more source comes into omapzoom, it can be readily incorporated into our kernel.

keyodi (with some contributions from me, but mostly keyodi, so thank him below) has been doing the work thusfar for a few days, and there is now a VERY buggy build up-and-running. But since there has been so much discussion in the other cm9 dev thread, we felt maybe moving it here would be a good idea.

Current status:
(updated 5/27/12)

  • it boots up
  • accel 2d graphics work
  • mounting read/writing internal & external SD card
  • touchscreen (updated 3.4 driver) works but "stutters" (see below)
  • bluetooth works
  • adb works
  • no wifi wifi!
  • accelerometer works
  • charger not recognized on boot.
  • random restarts when sleeping
  • general sleep issues (pwr_core doesn't enter sleep)
  • no sound
  • weirdness where touchscreen is responsive only in short bursts.
  • no hardware accelerated video (no source for it)

Userland-wise, OMAP_ENHANCEMENT support needs to be added back into ICS, but that's beyond the scope of this thread.

Devs are invited to help. Anyone else should probably stay away, as this is buggy as hell.

To Build:

Add the following local_manifest.xml to ~/android/system/.repo:

--------------------

<?xml version="1.0" encoding="UTF-8"?>
<manifest>

<remote name = "gh"
fetch="git://github.com/" />

<remove-project name="CyanogenMod/android_hardware_ti_omap3" />

<project path="device/bn/encore"
name="fat-tire/android_device_bn_encore"
remote="gh"
revision="ics-3.0"/>

<project path="kernel/bn/encore"
name="keyodi/ti-omap-encore-kernel3"
remote="gh"
revision="encore-omap3-3"/>

<project name="platform/hardware/ti/omap3" remote="oz" path="hardware/ti/omap3" revision="ics-mr1" />


</manifest>


--------------------
Then repo sync, and then re-build (doing a make clobber may not be a bad idea to pick up changes to the BoardConfig.mk file). Changes were made to the device on its own branch to turn off audio for now. Also the kernel, using the cm9 conventions, is built along with the rest of CM9.

Try at your own risk. It is truly an unusable, barely completed result at the moment. Kernel devs, meet up on irc.

Also see the NookTablet (OMAP4, but lots of similar hardware) 3.x thread here as well as hashcode's Kindle Fire (OMAP4 also, but with 512MB) 3.x kernel thread here.
 
Last edited:

fattire

Inactive Recognized Developer
Oct 11, 2010
2,280
6,473
www.eff.org
I can def confirm the issues that fattire has stated. Touch is VERY sluggish. I'm surprised I haven't broke my screen yet. lol.

I may have figured out wifi though. gotta rebuild to test that out. Had to fix some stuff in the kernel source and device tree just to get it to build the 1st time.

I successfully built the compat wifi driver on-the-fly per the NT. Is that what you're doing as well? I kinda only started... Are you still using WPA_SUPPLICANT 6 or are you using 8 now?

If you've got it working, I'll stop, git reset --hard, and wait for your commits :)
 

krylon360

Retired Recognized Developer
May 10, 2010
2,226
3,102
Provo
www.teamwhiskey.com
I successfully built the compat wifi driver on-the-fly per the NT. Is that what you're doing as well? I kinda only started... Are you still using WPA_SUPPLICANT 6 or are you using 8 now?

If you've got it working, I'll stop, git reset --hard, and wait for your commits :)

I'm using v8. I added the mac80211 source into kernel/external/wlan and built it with the build. Ill know if my changes worked when I get into the office here in a few.

Sent from my SPH-D710 using XDA
 

Dj-Gutz

Senior Member
Sep 1, 2010
198
83
Tel Aviv
Will this commit help when fixed/merged?
Looks like it activate the hardware decoders , also look at the dependencies

If not , can you please elaborate on this OMAP_ENHANCEMENT? What it triggers?
Couldn't get good info on google
 

fattire

Inactive Recognized Developer
Oct 11, 2010
2,280
6,473
www.eff.org
I'm using v8. I added the mac80211 source into kernel/external/wlan and built it with the build. Ill know if my changes worked when I get into the office here in a few.

Sent from my SPH-D710 using XDA

Yeah I used the mac80211 source from compat... using v8 also... I wasn't seeing a /sys/class/net/wlan0 show up tho... which is where i stopped when I saw your post..
 
  • Like
Reactions: mussieonlinux

fattire

Inactive Recognized Developer
Oct 11, 2010
2,280
6,473
www.eff.org
OMAP_ENHANCEMENTS and touchscreen issues...

Will this commit help when fixed/merged?
Looks like it activate the hardware decoders , also look at the dependencies

If not , can you please elaborate on this OMAP_ENHANCEMENT? What it triggers?
Couldn't get good info on google

OMAP_ENHANCEMENT gets set true for omap devices, and this allows the android build-process to know that it's got an omap device, and so in the frameworks or anywhere else there can be optimizations for that particular architecture added for enhanced performance or offloading calculations or whatever to OMAP-specific subsystems.

It doesn't have much to do with the kernel development except insofar as it needs to be able to support those enhancements. The Android software itself has to have the OMAP_ENHANCEMENT stuff integrated.

You can look at the CM7 code and grep for OMAP_ENHANCEMENT to find places where the omap hardware-supported functions are used instead of the regular android ones to get an idea.

Usually you'll see a check "if OMAP_ENHANCEMENT is set, do such and such instead of the normal way of doing it" and sometimes even a "If the OMAP type is OMAP4, then do this..."... So I don't know what kind of OMAP3 support will be built in or what.

Right now though, there are other issues. like this touchscreen thing. Epsylon3 says Atrix had the same issue but was fixed by Turl. He pointed me to some commits that may fix it... though I think this has to do with touch events being lost somewhere.
 
  • Like
Reactions: therkr and Dj-Gutz

Dj-Gutz

Senior Member
Sep 1, 2010
198
83
Tel Aviv
Thanks for the detailed response :)

I actually figured these stuff out before I posted my question , I wanted to focus on what is missing for it to be able to do h/w decoding for youtube hd/netflix

So far I've seen commits ( ics branch , I'll go through gb also later ) involving these files
media/libstagefright/MPEG4Extractor.cpp
media/libstagefright/OMXCodec.cpp
include/media/stagefright/OMXCodec.h
omx/video/src/openmax_il/video_decode/src/OMX_VideoDecoder.c
omx/video/src/openmax_il/video_decode/inc/OMX_VideoDec_Utils.h
original/linux/ion.h

I understand those patches I'm seeing are not completed , and the extent of how they work is questionable
I also know some related to camera recording ( encoding ) , but also decoding

you stated 2d acceleration works , that means hwcomposer is working?

I'll be ok leaving that as it is for now , since you're focusing on different issues now and we need to let you do your thing on the important stuff first - we can get back to that in a later date..

Thanks for the great work!
 

krylon360

Retired Recognized Developer
May 10, 2010
2,226
3,102
Provo
www.teamwhiskey.com
I successfully built the compat wifi driver on-the-fly per the NT. Is that what you're doing as well? I kinda only started... Are you still using WPA_SUPPLICANT 6 or are you using 8 now?

If you've got it working, I'll stop, git reset --hard, and wait for your commits :)

no luck on wifi yet. changed to many things the last build and only got a backlight.

I did notice in the wifi driver source that there is a conf file saying the interface is wlan1. I changed that to wlan0 for this build I'm doing now.
 

keyodi

Senior Member
Feb 3, 2011
133
476
Touch Screen

I discovered something interesting while trying to figure out the issue w/ the touch screen, which was by accident of course. I was running a benchmark on quadrant when i noticed that the responsiveness of touch screen improved dramatically! Once the benchmark finished so did the responsiveness of the touch.

What does this mean? I dunno, but it looks like the issue may be CPU related, not driver.
 

fattire

Inactive Recognized Developer
Oct 11, 2010
2,280
6,473
www.eff.org
...hum. change your cpu governor setting to see if things get better?

Sent from my A1_07 using xda premium

New governor has been tried.

New IO scheduler was tried by keyodi.

new task scheduler was tried by me just now. Still has the problem, and cat /dev/zero still makes it run without issue.

keyodi, et al-- here's the BFS commit. Use git am to try it.

Update: One other thought. If someone with a newer nook (and newer touchscreen) could give it a shot, that might help eliminate the driver as the issue (even though I think we can reasonably do that now..). I'd expect the new nooks to have the same issue.
 
Last edited:

krylon360

Retired Recognized Developer
May 10, 2010
2,226
3,102
Provo
www.teamwhiskey.com
New governor has been tried.

New IO scheduler was tried by keyodi.

new task scheduler was tried by me just now. Still has the problem, and cat /dev/zero still makes it run without issue.

keyodi, et al-- here's the BFS commit. Use git am to try it.

Update: One other thought. If someone with a newer nook (and newer touchscreen) could give it a shot, that might help eliminate the driver as the issue (even though I think we can reasonably do that now..). I'd expect the new nooks to have the same issue.

flashing with OnDemand as default right now. Will edit with results.

Edit. No Change.
 
Last edited:

krylon360

Retired Recognized Developer
May 10, 2010
2,226
3,102
Provo
www.teamwhiskey.com
here's where we are at on wifi

I can get it to read the wpa_supplicant.conf file.
D/wpa_supplicant( 973): wpa_supplicant v0.8.x
D/wpa_supplicant( 973): Initializing interface 'wlan0' conf '/data/misc/wifi/wp
a_supplicant.conf' driver 'nl80211' ctrl_interface 'N/A' bridge 'N/A'
D/wpa_supplicant( 973): Configuration file '/data/misc/wifi/wpa_supplicant.conf
' -> '/data/misc/wifi/wpa_supplicant.conf'
D/wpa_supplicant( 973): Reading configuration file '/data/misc/wifi/wpa_supplic
ant.conf'
D/wpa_supplicant( 973): update_config=1
D/wpa_supplicant( 973): ctrl_interface='wlan0'
D/wpa_supplicant( 973): ap_scan=1
D/wpa_supplicant( 973): fast_reauth=1
D/wpa_supplicant( 973): Could not open file /sys/class/net/wlan0/phy80211/name:
No such file or directory

However, as you can see... the main files for WLAN0 do not exist. There isn't a wlan0 dir, just this:
[email protected]:/sys/class/net # ls
ls
lo
sit0
 

fattire

Inactive Recognized Developer
Oct 11, 2010
2,280
6,473
www.eff.org
here's where we are at on wifi

I can get it to read the wpa_supplicant.conf file.
D/wpa_supplicant( 973): wpa_supplicant v0.8.x
D/wpa_supplicant( 973): Initializing interface 'wlan0' conf '/data/misc/wifi/wp
a_supplicant.conf' driver 'nl80211' ctrl_interface 'N/A' bridge 'N/A'
D/wpa_supplicant( 973): Configuration file '/data/misc/wifi/wpa_supplicant.conf
' -> '/data/misc/wifi/wpa_supplicant.conf'
D/wpa_supplicant( 973): Reading configuration file '/data/misc/wifi/wpa_supplic
ant.conf'
D/wpa_supplicant( 973): update_config=1
D/wpa_supplicant( 973): ctrl_interface='wlan0'
D/wpa_supplicant( 973): ap_scan=1
D/wpa_supplicant( 973): fast_reauth=1
D/wpa_supplicant( 973): Could not open file /sys/class/net/wlan0/phy80211/name:
No such file or directory

However, as you can see... the main files for WLAN0 do not exist. There isn't a wlan0 dir, just this:
[email protected]:/sys/class/net # ls
ls
lo
sit0

Hah. This is EXACTLY where I had gotten stuck as well. No /sys/class/net/wlan0. I couldn't remember if this gets set up in the board file, by the module, or what. although I only had 2 files in /sys/class/net. netcfg also doesn't show anything....
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 47
    This is quite awesome.

    Here's some amazing things that have happened today:

    * jellybean has been built by krylon360 from AOSP and he's testing it out. I'm doing the same with the cm10 repo. I've already created some jellybean branches in the device_repo and I'll push that.

    * epsylon3 has a module for defy that allow full video/omx stuff to work on omap3. It's for the .32 kernel and it may be a fast way to get omx using the old kernel. nemith has expressed interest if no one else wants to try it.

    * I started a 3.4 kernel port and got it to build. it's a mess so I want to start over at some point. I haven't tried it, I know it won't work and I lost all my microUSB cables for the moment.

    * oh, and keyodi has sound working in 3.0!!!

    Holy crap!
    35
    This thread is for development of a long-discussed 3.x kernel for encore/nookcolor. The goal is not only to have a modern kernel, but to take advantage of the expected support for hardware accelerated video and such.

    TI has released an incomplete 3.x branch which is now being used as a base. The project so far has been about getting stuff ready and working so that as more source comes into omapzoom, it can be readily incorporated into our kernel.

    keyodi (with some contributions from me, but mostly keyodi, so thank him below) has been doing the work thusfar for a few days, and there is now a VERY buggy build up-and-running. But since there has been so much discussion in the other cm9 dev thread, we felt maybe moving it here would be a good idea.

    Current status:
    (updated 5/27/12)

    • it boots up
    • accel 2d graphics work
    • mounting read/writing internal & external SD card
    • touchscreen (updated 3.4 driver) works but "stutters" (see below)
    • bluetooth works
    • adb works
    • no wifi wifi!
    • accelerometer works
    • charger not recognized on boot.
    • random restarts when sleeping
    • general sleep issues (pwr_core doesn't enter sleep)
    • no sound
    • weirdness where touchscreen is responsive only in short bursts.
    • no hardware accelerated video (no source for it)

    Userland-wise, OMAP_ENHANCEMENT support needs to be added back into ICS, but that's beyond the scope of this thread.

    Devs are invited to help. Anyone else should probably stay away, as this is buggy as hell.

    To Build:

    Add the following local_manifest.xml to ~/android/system/.repo:

    --------------------

    <?xml version="1.0" encoding="UTF-8"?>
    <manifest>

    <remote name = "gh"
    fetch="git://github.com/" />

    <remove-project name="CyanogenMod/android_hardware_ti_omap3" />

    <project path="device/bn/encore"
    name="fat-tire/android_device_bn_encore"
    remote="gh"
    revision="ics-3.0"/>

    <project path="kernel/bn/encore"
    name="keyodi/ti-omap-encore-kernel3"
    remote="gh"
    revision="encore-omap3-3"/>

    <project name="platform/hardware/ti/omap3" remote="oz" path="hardware/ti/omap3" revision="ics-mr1" />


    </manifest>


    --------------------
    Then repo sync, and then re-build (doing a make clobber may not be a bad idea to pick up changes to the BoardConfig.mk file). Changes were made to the device on its own branch to turn off audio for now. Also the kernel, using the cm9 conventions, is built along with the rest of CM9.

    Try at your own risk. It is truly an unusable, barely completed result at the moment. Kernel devs, meet up on irc.

    Also see the NookTablet (OMAP4, but lots of similar hardware) 3.x thread here as well as hashcode's Kindle Fire (OMAP4 also, but with 512MB) 3.x kernel thread here.
    29
    We have sound!!!

    I just got sound working...I pushed all the changes so we at least have the source, but the codec needs to be cleaned up a little and I still need to compare the current source w/ the .32 to make sure we're not missing anything.

    The legacy audio (BOARD_USES_AUDIO_LEGACY := true), also needs to be enabled in the BoardConfig in order for audio to work.
    16
    Okay, another brief update:

    1. rebuilt w/linaro 4.7 & 3.0 kernel using slightly different cflags.
    2. it got stuck again on netd.
    3. I straced to see where it was getting stuck. replaced libjpeg.so with a recent nightly.
    4. It boots!

    Update: I think I need to redo this. I'm not 100% sure which compiler it used actually.. Update #2-- Hmm, no I actually suspect I did it right. but jic I'm gonna rebuild and try it again.

    Here's what I used. Hopefully it still picked up the -O3 stuff, though i wasn't looking while it was building.

    Code:
    -TARGET_GLOBAL_CFLAGS += -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp 
    -TARGET_GLOBAL_CPPFLAGS += -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp 
    +TARGET_GLOBAL_CFLAGS += -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
    +TARGET_GLOBAL_CPPFLAGS += -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
    +TARGET_arm_CFLAGS   := -O3 -fomit-frame-pointer -fstrict-aliasing -funswitch-loops \
    +                       -fmodulo-sched -fmodulo-sched-allow-regmoves
    +TARGET_thumb_CFLAGS :=  -mthumb \
    +                        -Os \
    +                        -fomit-frame-pointer \
    +                        -fstrict-aliasing
    +TARGET_TOOLS_PREFIX=/home/fattire/Development/linaro/android-toolchain-eabi-4.7/bin/arm-linux-androideabi-
     TARGET_BOOTLOADER_BOARD_NAME := encore
     TARGET_PROVIDES_INIT_TARGET_RC := true
     TARGET_USERIMAGES_USE_EXT4 := true
    +CROSS_COMPILE=~/Development/arm-2010q1/bin/arm-none-linux-gnueabi-

    Looks like the kernel modules didn't load for some reason, so no wifi so I can't test quadrant or anything. Just wanted to update in case anyone was following along.