X running (limping) on a Nook ST

p42

Member
May 12, 2013
26
19
0
Manchester
www.treblig.org
Hi,
I've got X just about running a Nook ST :eek: :


I say running, the e-ink is erm fun; I've got it sitting there in a loop kicking a refresh every couple of seconds, and I'm sure there is a better way,

So, some notes:
* I'm running with the Nook kernel patched up with:
- USB host patch (see other thread)
- The gcc stuff from the fastmode patches so it will build on a recent Ubuntu
- The fastmode code - but I don't understand it yet
* The following that I needed to get debian/armhf to run - if you stick with armel you shouldn't need them:
- The TLS hack off http://arowboat.wordpress.com/2011/08/10/android-linux-arm-and-tls-register-emulation/ together with updated TLS files patches from newer kernels; I think it's possible just to turn it on with the existing 2.6.29 and take that TLS fix.
- I also pulled in ec706dab from a newer git to map the vector page - but not sure if it's needed

* Nookmanager on my uSD card
* in a directory on a 2nd ext formatted partition there I've got a debian chroot
* Debian wheezy armhf built using debootstrap , pass --include=apt to make life bearable
* xserver-xorg-video-fbdev, xserver-xorg-input-multitouch, xserver-xorg-input-evdev

* Note the nook kernel is too old for udev so some config has to be done manually, so in /usr/share/X11/xorg.conf.d/05-dave.conf I put:
(based on http://blog.rot13.org/2012/08/x11-running-on-nook-color-without-android-stack.html ):
Section "ServerLayout"
Identifier "Layout0"
Screen "Screen0"
InputDevice "touchscreen" "CorePointer"
InputDevice "gpio-keys" "CoreKeyboard"
InputDevice "twl4030-keypad" "CoreKeyboard"
InputDevice "usbkbd" "CoreKeyboard"
InputDevice "usbmouse" "CorePointer"
EndSection

Section "ServerFlags"
Option "AutoAddDevices" "off"
EndSection

Section "InputDevice"
Identifier "touchscreen"
Option "Device" "/dev/input/event2"
Driver "evdev"
Option "SwapAxes" "on"
Option "InvertX" "on"
EndSection

Section "InputDevice"
Identifier "usbkbd"
Option "Device" "/dev/input/event4"
Driver "evdev"
EndSection

Section "InputDevice"
Identifier "usbmouse"
Option "Device" "/dev/input/event3"
Driver "evdev"
EndSection
Section "InputDevice"
Identifier "gpio-keys"
Driver "evdev"
Option "Device" "/dev/input/event0"
# code 102 (KEY_HOME)
# code 116 (KEY_POWER)
EndSection

Section "InputDevice"
Identifier "twl4030-keypad"
Driver "evdev"
Option "Device" "/dev/input/event1"
# code 114 (KEY_VOLUMEDOWN)
# code 115 (KEY_VOLUMEUP)
EndSection

Section "Device"
Identifier "Card0"
#Driver "omapfb"
#Option "fbdev" "/dev/graphics/fb0"
# rotate screen to be in sync with touchpad orientation
Option "Rotate" "CCW" # CW=90 UD=180 CCW=270
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
EndSection

I had to make most of the device nodes in /dev based on the contents from the android version and also mount /proc, /sys and /dev/pts

then set DISPLAY and also set XAUTHORITY=/.Xauthority

Then once I've started the wireless and ssh from nookmanager I do:
startx -- tty01 -sharevts -novtswitch &

and:
while true; do echo 1 > /sys/class/graphics/fb0/epd_refresh; sleep 2; done &

Then for that picture I had matchbox-keyboard, fvwm and epiphany-browser

Fun! Any tips on doing something more sain with the eink appreciated!

Dave
 

p42

Member
May 12, 2013
26
19
0
Manchester
www.treblig.org
Interactive!

OK, find attached a program that uses the XDamage extension to more intelligently update the display (I'm sure there is a way to use the DSP to do this properly!

A video (shakey camera work, slow update, just about interactive touchscreen - what else can you want!) will eventually arrive here:

http://youtu.be/PxVjqJZcspc

Wahey!

Dave
 

Attachments

FreyaBlack

Member
Sep 10, 2013
23
1
0
Hey, you do know that there are native omap drivers available for X11.
This might help get things moving a bit faster. I suspect part of your problem might be using the framebuffer.

Check out these links:

http://cgit.freedesktop.org/xorg/driver/xf86-video-omap

http://packages.debian.org/search?keywords=xserver-xorg-video-omap

I seem to remember that the Nook Simple Touch is OMAP 3 based.

I think you are doing great with this! I'd love to get Linux working properly on the Nook Simple Touch, even if it was just the console.
I'd love to have gcc on there! I was hoping I could change the runlevel to get to a console but I discovered that busybox doesn't support that.
Do you know if the Nook even has a console?

I'm in a good mood today as I managed to get my external usb keyboard working, not sure if I should continue pushing forward today! ;)

Freya

---------- Post added at 05:18 PM ---------- Previous post was at 04:43 PM ----------

Having watched the video I suspect it would be way easier if you hooked up a usb mouse! ;)

Freya
 
Last edited:

p42

Member
May 12, 2013
26
19
0
Manchester
www.treblig.org
Hey, you do know that there are native omap drivers available for X11.
This might help get things moving a bit faster. I suspect part of your problem might be using the framebuffer.

Check out these links:

http://cgit.freedesktop.org/xorg/driver/xf86-video-omap

http://packages.debian.org/search?keywords=xserver-xorg-video-omap

I seem to remember that the Nook Simple Touch is OMAP 3 based.

I think you are doing great with this! I'd love to get Linux working properly on the Nook Simple Touch, even if it was just the console.
I'd love to have gcc on there! I was hoping I could change the runlevel to get to a console but I discovered that busybox doesn't support that.
Do you know if the Nook even has a console?

I'm in a good mood today as I managed to get my external usb keyboard working, not sure if I should continue pushing forward today! ;)

Freya

---------- Post added at 05:18 PM ---------- Previous post was at 04:43 PM ----------

Having watched the video I suspect it would be way easier if you hooked up a usb mouse! ;)

Freya
Yeh I think I tried those OMAP3 X servers without success; I think one of the problems is the kernel on the NST is *ancient*,
so my current fiddling is to try and build a newer kernel with the NST drivers in; I'm currently fighting a 3.4 tree that I've thrown the NST diffs into - it's a bit of a fight and I don't know how close I am to even have it building yet; I'm kind of hopeful that that might have a chance of using the OMAP3 drivers; even so I'm not sure how they will interact with the eink display because it's so different.

Oh and yes a USB mouse does work but that's cheating :)

Dave
 
  • Like
Reactions: dombeef

FreyaBlack

Member
Sep 10, 2013
23
1
0
Yeh I think I tried those OMAP3 X servers without success; I think one of the problems is the kernel on the NST is *ancient*,
so my current fiddling is to try and build a newer kernel with the NST drivers in; I'm currently fighting a 3.4 tree that I've thrown the NST diffs into - it's a bit of a fight and I don't know how close I am to even have it building yet; I'm kind of hopeful that that might have a chance of using the OMAP3 drivers; even so I'm not sure how they will interact with the eink display because it's so different.

Oh and yes a USB mouse does work but that's cheating :)

Dave
You should check out the framebuffer driver I link to at the end then! I bet that will work for the time being! :)

Freya