Nook Touch kernel hacking

Search This thread

case-sensitive

Senior Member
Nov 4, 2010
344
33
Positive side effect of all of this is that now I've quite rich kernel with :
- CFQ iosched
- reiserfs/ext4/ntfs enabled
- DroidWall support (iptables match target)
- Group process scheduling
- UTF8 enabled (can't switch to it entirely cause B&N stuff uses non utf all around the place)
- half of kernel debugging off
- PM debug off
- fastfpe works quite fine
- ondemand cpu governor

If anybody was interested in config or binaries then give me a shout please. I really need somebody to give me a hand with SGX and WLAN sources in order to push it forward.

Is this modified kernel stable for normal, day-to-day use? How difficult would it be to install this modified kernel on a rooted NST? Are you able to sync with google contact with no additional hack?

I really miss droidwall. Google contact would be a huge bonus :) I can follow instruction but I'm not a developer/hacker :-(

Thanks!
 

Renate

Recognized Contributor / Inactive Recognized Dev
Getting all the debug messages on the graphic systems turned off would make life easier when dealing with logcats. Filtering always makes you lose something important.

Also: I got my old Microsoft USB GPS block to spit out stuff using USB host mode.
The baud rate on the driver defaults to 9600. I got my NMEA data, I just need to get a LocationProvider.

http://xdaforums.com/showthread.php?t=1457971
 
Last edited:

bisbal

Senior Member
Nov 19, 2011
64
13
Guys what a cliff hanger this thread is, everyday I wake up hoping you guys got all the bits put together, and that we all can install custom roms, and icecream, and... :)~~
 

sokoow

Member
Jan 3, 2011
15
6
Dublin
All,

I'll try to post all needed files together with some instructions as a separate thread. Hopefully will manage to do it later this week. I've been using it for quite a while now - seems to be stable. Hopefully we'll move it a bit further, but it's already hard as there's half of sources missing.

Greetings, Karol
 
  • Like
Reactions: bisbal

darkguy2008

Senior Member
Apr 30, 2011
672
240
Heredia
Hey guys, I read the whole thread and this all seems very interesting.

I know a lot of coding, but alas, compiling a kernel always makes me rip my hair off because it never works :(.

Anyways, I'd be really glad if someone here could provide me a small guide on how to get on compiling the B&N source code (nook2_1-1.tgz) and installing it on my device (or SD card, as I saw on a post around the first pages)... I see lots of theories and verbose info, which is useful, but nothing that I can really understand.

Like... a toolchain? what's that? how do I get it? I've heard about codesorcery, okay cool, which one to download? latest one or the one it says in the OMAP wiki? what to do after I download & extract it? where to put the B&N source code?... stuff like that, you know...

Not everybody knows how to compile this, yet they know how to code. I could give you guys a hand in this as I want a custom ROM for my NST, but it's impossible if I can't build a ROM/kernel for saving my own life, and there is no step-by-step guide, as most stuff assumes the user already knows things :/.

Thanks in advance!
- DARKGuy

---
EDIT: Nevermind, I found this -> http://nookdevs.com/Nook_Simple_Touch/Kernel . Let's see how it goes...

---
EDIT 2: Okay, compiled very well, woo-hoo! :D

I need to find out how to put it in though. I'm making a SD card now to give my compiled images a try, however, I have a question:

The only way to modify init.rc is to unpack the already-built uImage? isn't there a way to edit it before compiling? how are those files generated anyways, if they don't exist in the filesystem?

---
EDIT 3:

I also followed the instructions here: http://xdaforums.com/showpost.php?p=21192057&postcount=44 to build a bootable SD card. It seems to boot, but it doesn't mount /system correctly.

ADB seems to work, but it doesn't output anything:

Code:
darkguy@cave:~/dev/nst/src/fullImg$ adb devices
List of devices attached 
XXXXXXXXXXXXXXXX    device

darkguy@cave:~/dev/nst/src/fullImg$ adb logcat
- exec '/system/bin/sh' failed: No such file or directory (2) -

Any ideas?
 
Last edited:

darkguy2008

Senior Member
Apr 30, 2011
672
240
Heredia
BumpBumpityBump.

I hate bumping, but I'm not the only one in this thread.

Also, I checked the mmcblk0 & 1 with fdisk -l when inserted into the nook and both numbers and sizes are the same.
 

mali100

Senior Member
Jun 3, 2007
209
140
EDIT 2: Okay, compiled very well, woo-hoo! :D

I need to find out how to put it in though. I'm making a SD card now to give my compiled images a try, however, I have a question:

The only way to modify init.rc is to unpack the already-built uImage? isn't there a way to edit it before compiling? how are those files generated anyways, if they don't exist in the filesystem?
init.rc is in the uRamdisk not the uImage and uRamdisk doesn't get generated when you compile the kernel, but when your make build a complete android system. So the easiest way is to unpack the uRamdisk, make your changes and repack it.
---
EDIT 3:

I also followed the instructions here: http://xdaforums.com/showpost.php?p=21192057&postcount=44 to build a bootable SD card. It seems to boot, but it doesn't mount /system correctly.

ADB seems to work, but it doesn't output anything:

Code:
darkguy@cave:~/dev/nst/src/fullImg$ adb devices
List of devices attached 
XXXXXXXXXXXXXXXX    device

darkguy@cave:~/dev/nst/src/fullImg$ adb logcat
- exec '/system/bin/sh' failed: No such file or directory (2) -

Any ideas?
I never tried it this way. The easiest solution is to create a noogie sd-card and replace the uImage on the /boot-partition. If I remember correctly it should also be possible to put your kernel and a uRamdisk from the nook (not the one included in noogie) on the sd-card, this way the uRamdisk and the uImage from the sdcard are used, the rest of the system gets booted from the internal memory.
 
  • Like
Reactions: darkguy2008

darkguy2008

Senior Member
Apr 30, 2011
672
240
Heredia
O hai!

Thanks for the prompt reply! :D here are my comments ^^.
init.rc is in the uRamdisk not the uImage and uRamdisk doesn't get generated when you compile the kernel, but when your make build a complete android system. So the easiest way is to unpack the uRamdisk, make your changes and repack it.
Oh okay, that explains a lot. It seems I was unpacking the wrong files which were so hard to unpack I couldn't unpack them. I guess the uImage is a binary kernel not able to be unpacked? I tried lots of cpio/gunzip commands and scripts online to unpack u-boot files but they didn't work :(.

I have a question now though: In order to get the uRamdisk, I need to build an android system. The thing is... B&N didn't give sources for an android version, it seems. They only gave sources for a kernel, which is okay but it isn't enough (I think??) to build an android filesystem from the ground zero, right?

I'm wondering, if I want to build Eclair (for example, which is the current working version in the NST), which config should I use? I've seen I could use something like "encore" or "zoom2" (as the same build.prop in the NST states, "zoom2") to build /system and mix it with B&N's kernel? or am I wrong? my objective is to build, aside from a kernel, a pure android ROM too.
I never tried it this way. The easiest solution is to create a noogie sd-card and replace the uImage on the /boot-partition. If I remember correctly it should also be possible to put your kernel and a uRamdisk from the nook (not the one included in noogie) on the sd-card, this way the uRamdisk and the uImage from the sdcard are used, the rest of the system gets booted from the internal memory.
Hm, but that would still run /system from the nook. My idea was to make a SD that would boot -and- use the files from itself instead of touching the NST's files. That way, I could happily work on a custom android version without having to mess with my NST's filesystem and risk messing it up and having to restore it again with dd.
 

mali100

Senior Member
Jun 3, 2007
209
140
It seems I was unpacking the wrong files which were so hard to unpack I couldn't unpack them. I guess the uImage is a binary kernel not able to be unpacked? I tried lots of cpio/gunzip commands and scripts online to unpack u-boot files but they didn't work :(.
Correct, the kernel is a compiled binary and not packed, so no way to unpack it.
If you want to unpack the uRamdisk, you can use the attached scripts.

I have a question now though: In order to get the uRamdisk, I need to build an android system. The thing is... B&N didn't give sources for an android version, it seems. They only gave sources for a kernel, which is okay but it isn't enough (I think??) to build an android filesystem from the ground zero, right?

I'm wondering, if I want to build Eclair (for example, which is the current working version in the NST), which config should I use? I've seen I could use something like "encore" or "zoom2" (as the same build.prop in the NST states, "zoom2") to build /system and mix it with B&N's kernel? or am I wrong?
I also think hhe sourcecode released by BN isn't enough to build android, and there is no configuration that you could use, so you have to start from scratch.
I think it would be a lot easier to take CM7, checkout the branch for the Nook Color (encore) and customize it to run with the NST.
my objective is to build, aside from a kernel, a pure android ROM too.Hm, but that would still run /system from the nook. My idea was to make a SD that would boot -and- use the files from itself instead of touching the NST's files. That way, I could happily work on a custom android version without having to mess with my NST's filesystem and risk messing it up and having to restore it again with dd.
It should be possible, but I never tried it:
-partition and format the sd in a similiar way like the nook,
-unpack the uRamdisk and edit the mountpoints in the init.rc from mmcblk0 to mmcblk1

Again, I'm not sure if it works, thats what I read somewhere. And even if it works, it will be slow if you don't use a really fast sd-card.
 

Attachments

  • mkuramdisk.zip
    599 bytes · Views: 208

mrWax

Senior Member
Jan 31, 2012
147
24
no-refresh always on?

Looks great!
If you manage in complete this quest, will then be possible to ..?
  • have no-refresh mode always on?
  • to have Gapps running?- (calendar..)
  • to add drivers for using usb mouse?
  • to add drivers for using usb sound card - mic+headphones ?

would be manifique :)

thx
 

cceerrtt

Senior Member
Sep 14, 2010
147
24
Both calendar and contacts are working on my nook. Calendar was working right after I have rooted, but not all nooters have calendar sync provider. Stock calendar app shows big sdcard image on the screen but the sync works and I am using CalendarPad to browse calendar items.

To make contacts work you need do some steps on your own, although the procedure is not bulletproof yet. Read the thread at least starting from here
http://xdaforums.com/showpost.php?p=21123816&postcount=6

Kdybys nebyl linej, tak si to tady na foru najdes. ;-) Zadat slovo "contacts" do vyhledavaciho formulare zase neni tak slozity.
 

klausef

Senior Member
Jul 17, 2011
57
31
Raleigh
I'll get a chance to fiddle with the kernel this weekend but through reading this thread it doesn't sound like they've provided much. From what I gather from the discussion, all B&N has provided us with is the source code for the kernel, but with a select few integral modules missing (GPU, WLAN). They didn't give us the source for their little proprietary parts either, like sourcecode for the Nook Homescreen app and stuff like that.

If we want to build a new userland for the device it then looks like we have two options:
1) Somehow extract the drivers from the stock kernel and then try to integrate them into a newer kernel
2) Find the drivers and integrate them into a newer kernel as you would usually.

The first is hackish and very likely flat impossible, depending on if the modules support versioning and stuff like that. The second is far, far more likely although probably harder.

Beyond this drivers bottleneck, (admittedly, it's quite a bottleneck) it doesn't look like porting future Android versions would be too difficult. Contrary to what others have been saying, I believe the device has enough resources to run newer OSes like ICS; lack of processing power should be the least of our worries, at least for the next while.

Are all these inferences correct?

Thanks!
 

darkguy2008

Senior Member
Apr 30, 2011
672
240
Heredia
I'll get a chance to fiddle with the kernel this weekend but through reading this thread it doesn't sound like they've provided much. From what I gather from the discussion, all B&N has provided us with is the source code for the kernel, but with a select few integral modules missing (GPU, WLAN). They didn't give us the source for their little proprietary parts either, like sourcecode for the Nook Homescreen app and stuff like that.

If we want to build a new userland for the device it then looks like we have two options:
1) Somehow extract the drivers from the stock kernel and then try to integrate them into a newer kernel
2) Find the drivers and integrate them into a newer kernel as you would usually.

The first is hackish and very likely flat impossible, depending on if the modules support versioning and stuff like that. The second is far, far more likely although probably harder.

Beyond this drivers bottleneck, (admittedly, it's quite a bottleneck) it doesn't look like porting future Android versions would be too difficult. Contrary to what others have been saying, I believe the device has enough resources to run newer OSes like ICS; lack of processing power should be the least of our worries, at least for the next while.

Are all these inferences correct?

Thanks!
Yes, you're absolutely right.

It only takes somebody to have enough expertise and time to be able to compile some userland files for it. I haven't got much time lately, though I already have an environment already set up.

I'm looking for a way to make a bootable SD card that could use the files off itself though, instead of the nook, that way one could experiment with kernel & ROM compiling and stuff without screwing the nook up.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    So i have downloaded the nook touch kernel source and have gotten it to build using the gossamer defconfig. (as described somewhere by jesusfreke)

    then as a test i enabled ext4 support and recompiled
    then converted my system partition to ext4 while booted into noogie on the sdcard.
    i also edited the init.rc to mount /system as ext4 and enable adb over usb support
    and it seems like it works as shown in the code below.

    Code:
    drew@master: nook_touch$ adb shell cat /proc/version
    Linux version 2.6.29-omap1 (drew@master) (gcc version 4.4.1 (Sourcery G++ Lite 2009q3-67) ) #3 PREEMPT Tue Oct 4 14:37:59 CDT 2011
    
    drew@master: nook_touch$ adb shell cat /proc/mounts
    rootfs / rootfs ro 0 0
    tmpfs /dev tmpfs rw,mode=755 0 0
    devpts /dev/pts devpts rw,mode=600 0 0
    proc /proc proc rw 0 0
    sysfs /sys sysfs rw 0 0
    tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
    /dev/block/mmcblk0p2 /rom vfat rw,sync,noatime,nodiratime,uid=1000,gid=1000,fmask=0117,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,errors=remount-ro 0 0
    /dev/block/mmcblk0p5 /system ext4 ro,barrier=1,data=writeback 0 0
    /dev/block/mmcblk0p8 /data ext3 rw,nosuid,nodev,noatime,nodiratime,errors=continue,data=ordered 0 0
    /dev/block/mmcblk0p7 /cache ext3 rw,nosuid,nodev,noatime,nodiratime,errors=continue,data=ordered 0 0

    so where do i go from here? how do i start forward porting the kernel to .32 or .35 or do i even need to do that? in general what needs to change to get a cyanogenmod compatible kernel?

    also how can we get a serial or UART output from the nook touch. I have been testing some cm builds from the nook color but it doesnt boot far enough for abd to give any output. ive looked at the back of the board but there doesnt seem to be any blatantly obvious serial port connections on it like the nook color has.

    ps. uImage and uRamdisk are attached for reference. i try them if you want. but backup yours first!
    3
    It seems I was unpacking the wrong files which were so hard to unpack I couldn't unpack them. I guess the uImage is a binary kernel not able to be unpacked? I tried lots of cpio/gunzip commands and scripts online to unpack u-boot files but they didn't work :(.
    Correct, the kernel is a compiled binary and not packed, so no way to unpack it.
    If you want to unpack the uRamdisk, you can use the attached scripts.

    I have a question now though: In order to get the uRamdisk, I need to build an android system. The thing is... B&N didn't give sources for an android version, it seems. They only gave sources for a kernel, which is okay but it isn't enough (I think??) to build an android filesystem from the ground zero, right?

    I'm wondering, if I want to build Eclair (for example, which is the current working version in the NST), which config should I use? I've seen I could use something like "encore" or "zoom2" (as the same build.prop in the NST states, "zoom2") to build /system and mix it with B&N's kernel? or am I wrong?
    I also think hhe sourcecode released by BN isn't enough to build android, and there is no configuration that you could use, so you have to start from scratch.
    I think it would be a lot easier to take CM7, checkout the branch for the Nook Color (encore) and customize it to run with the NST.
    my objective is to build, aside from a kernel, a pure android ROM too.Hm, but that would still run /system from the nook. My idea was to make a SD that would boot -and- use the files from itself instead of touching the NST's files. That way, I could happily work on a custom android version without having to mess with my NST's filesystem and risk messing it up and having to restore it again with dd.
    It should be possible, but I never tried it:
    -partition and format the sd in a similiar way like the nook,
    -unpack the uRamdisk and edit the mountpoints in the init.rc from mmcblk0 to mmcblk1

    Again, I'm not sure if it works, thats what I read somewhere. And even if it works, it will be slow if you don't use a really fast sd-card.
    3
    Here's what I managed to find out about kernel source so far :

    Ros87 was right about SGX source code - it seems to be missing. Without it there's not much you can display bar the bootup logo. I wasn't able to recompile the official TI one the way it works with provided sources. Anybody have any results in this ?

    tiwlan_drv.ko WLAN module acts funny as well, seems to hang as soon as you disable kernel debug.

    I managed to change a lot in kernel config, and I noticed that are two sections that you can't just touch without breaking either WLAN of SGX modules :
    - Kernel profiling must remain on in order for tiwlan_drv.ko module to be able to work. Otherwise it wouldn't turn off.
    - without recompiling sgx modules, you need to leave preemt debug, mutex debug and soft locks detection on, otherwise SGX PVR modules are failing to initialize, and the whole lot stays at the boot screen forever

    Positive side effect of all of this is that now I've quite rich kernel with :
    - CFQ iosched
    - reiserfs/ext4/ntfs enabled
    - DroidWall support (iptables match target)
    - Group process scheduling
    - UTF8 enabled (can't switch to it entirely cause B&N stuff uses non utf all around the place)
    - half of kernel debugging off
    - PM debug off
    - fastfpe works quite fine
    - ondemand cpu governor

    If anybody was interested in config or binaries then give me a shout please. I really need somebody to give me a hand with SGX and WLAN sources in order to push it forward.
    2
    A lot of information about the sgx kernel-modules can be found on http://omapedia.org/wiki/Graphics

    Omappedia is a really great source for us. There is also a git repo for the dsp-bridge.

    Well, yes I've already tracked down the SGX SDK for Omap35x and I know the km sources are in there, just hoping they will work on the 36x aswell :)

    I guess I'll find out a little later today, setting up the build environment to use the kernel sources from B&N is a bit of a pita...
    2
    thx and where to read

    Hi!
    I really appreciate you excitement into this thread. I had atleast send some thx here for now.
    I'll try to find some good source of knowleadge to read on this (dont know where yet) to educate mysefl.