I have been working on a Debian chroot with working x-server and am publishing my build scripts here, I see many people asking about this from time to time and while the forums are a great resource they are difficult to search sometimes and the information is often outdated and way beyond most people to apply let alone reverse engineer. To this end I am starting this thread. I am not by any means a programmer and Linux is more of a hobby for me than anything else, I will help where I can but understand that I will probably be using google just as much as you so try and solve as many issues as you can on your own first!
I would like it noted that nearly none of this is my own original work, it has been sourced and repackaged from other mobileread gurus of old. Marek, Ah-, Guang, Snowbody all come to mind, most of the credit goes to them.
Goals
To create and maintain a universal set of scripts to build a Debian chroot with working x-server on as many Kobo models as possible. I will be updating these scripts as and when I can, adding more features, compatibility and fun things (Doom anyone?

)
Known issues
1) This has only been tested on my device, Aura H2O 1st Gen. I have had two people try with on the Glo HD, the chroot works fine from the command line but the binary used to update the e-ink screen does not play nicely with that specific resolution. I am quite certain this can be fixed by editing the source codes in the fb_update folder. Apparently it is something to do with the resolution of the Glo HD not being devisable by 16 or something to that effect.
2) I could not get the standard Linux touch driver to work, it does not end the first touch correctly and while I have a vague idea of where the problem may lie I have not been able to fix it. It currently uses the custom touch driver written by Marek which is fine but if we want multitouch and gestures we either need to get this driver to work with touchegg or fix the standard Linux driver.
3) I started playing around with trying to get this to run from the KSM menu and return there after the chroot is terminated, at the moment I have achieved neither, I have not had the time to pry too deep into this.
For the moment this creates a very bare-bones installation, it is primarily for testing at the moment but the source codes are there and you can add anything you want really. I have been focusing more on actually getting it to work than aesthetics or actual, you know, usability.
What you will need
1) Debian Linux or one of it’s derivatives, Ubuntu or Mint for example. Windows users will need to use either a Live CD or Virtualbox.
2) KSM with telnet or SSH installed on your Kobo.
Instructions
Download the tarball on the link below
Code:
https://mega.nz/#!56xHVRhT!huwDBCAPFfiKr2QFnrTg6sshbeFjqldFuRFxI2tnBx4
Open a terminal and move to the directory where you downloaded the tarball (assuming ~/Downloads)
Unzip the tarball
Code:
tar -xvf build_kobo_chroot_vX.X.tar.xz
Move into the directory
Code:
cd build_kobo_chroot_vX.X
If you are using a device with a different resolution
Code:
nano source/fb_update/fast_update.c
Edit the lines
Code:
region.update_region.width = 1430;
region.update_region.height = 1080;
Press cntrl+o to save and then cntrl+x to exit
Edit the line
Code:
xvkbd.windowGeometry: 1080x400+0+998
The 1080 represents the width of the keyboard, the 400 the height and the 998 is it’s y coordinate on the screen, change according to resolution width and preference. Press cntrl+o to save and cntrl+x.
Run image_create_base.sh as super user
Code:
sudo sh image_create_base.sh
You will now be prompted to enter a few details for your base image, the entries below should be fine.
Code:
Set image size in MB: 1000
Set filesystem type: ext3
Set target architecture: armhf
Set Debian release: jessie
This will take a while, go get a coffee or a beer.
Assuming nothing catastrophic happened you should now have a file named armhf_debian_jessie_base.ext3, this is your base image and will be used for all your beautiful creations in the future.
Next we run the script that makes it usable on the Kobo
Code:
sudo sh image_build_system.sh
Again you will be prompted for information on your desired image.
Code:
Set new image name: Whatever your little heart desires.
Set new image size in MB: I wouldn’t go lower than 1500MB, it has to fit on your device though.
Set new image filesystem: ext3
Set user name: Whatever you want
Set user password: Again, whatever you want, just don’t forget it
Time for another coffee or beer. .
Once this is all done you will be left with a folder with the name given above, it contains the image file and all scripts you may need. Copy this onto your devices storage.
Once in KSM move to the "USB" submenu, telnet onto your Kobo from your computer.
Code:
telnet 192.168.2.101
Move into the correct directory.
Code:
cd /mnt/onboard/chrootdirectory
Run the launch_chroot.sh script.
Code:
sh launch_chroot.sh
Once you see the line "starting framebuffer update script" press the "Return" button in KSM, you should see the screen go black, give it a few seconds and it should all be up and running!
Here is a (pretty badly done) video of how to get the framebuffer script to start from within KSM
Code:
https://mega.nz/#!xnxSDahL!9IXTfsOwYzWDNSP1oK0JTjTedyWQTBPVBufDTWn8YQc
I will be uploading some pictures a bit later
Happy hacking!
NH