02-01-2012, 05:04 PM | #1 |
Connoisseur
Posts: 55
Karma: 124493
Join Date: Jan 2012
Device: Kindle Touch
|
opkg, opkg GUI and plans on package repository for Kindle Touch
Hi everyone! I have a big plan but little time and things don't go as fast as I would like them to. That's why I decided to make this post so you know what it's easier to track how the things are going.
Note at the beginning: I have Kindle Touch and so what I did and what I'm interested in considers KT. But even though you're interested in other Kindles keep reading as this might be interesting for you too. Long story short: I would like to see a working package manager on kindle and have package repository that could be used also by non-geeks to install hacks/apps/games/etc. I was thinking that user would just use jailbreak to drop in the package manager and later install packages with the manager (either downloaded by wifi or uploaded on kindle from computer). Now I realize that this is in fact a long run and will take some time to achieve. But I was quite surprised that there's no such initiative been going on (or considered). So I have decided to start working on that (I am expecting your comments about this "vision" of mine). Now first things first. What you need to consider before you can even start something like this:
ad 1) I am well aware that people are using the update feature of Kindles' to install stuff. I don't like this option for several reasons:
and you could find more. Opposed to that with package management system you don't have this issues, more over you get:
For small devices it should be OK to have something lightweight. People here have already played with ipkg (simple debian like package manager) from optware. The ipkg developement has been discontinued but there is also it's fork opkg that can be considered a successor. I have compiled it to a package (see the end of the post for the links) and also have statically linked version that I use to bootstrap the packaging system). And it works (you can e.g. install stuff from optware repositories with it). No problem there except for one thing. Now it is set to store it's files in /var/local (the only writable partition besides /mnt/us). Sadly this now seems like a poor choice as KT bricks when the partition gets full (can't find the thread about it now). But this will get solved by addressing the point 3). Now you may ask why bother with opkg, why not use the available ipkg and optware. There are known issues with the ipkg solution (like wrong wget arguments) and as I have already said it's been discontinued. As for the optware, it is good for geeks and you can install whatever you know if you know what you're doing (I did that too). But sooner or later you will run into problems like missing files that are expected to exist in the system (remember that the packages were meant for different system) or wrong versions of the existing files. So in a long run it's not an option. From now on I'll try to be more brief. ad 2) I have started on this and made Gtk+2 frontend to the opkg. You can find the pre-alpha version in links below. There are still flaws to be addressed, but the concept works. If you would want to try on KT you will also need a few hacks to gtkrc (because it's poorly set up) that I can't find at the moment. I will add this later. ad 3) Now this is a tricky one. My first idea is do mount rw/ro during install and put files on the root partition (but it seems a little dirty). The only writable partitions are /var/local and /mnt/us and there's not much space on /var/local. As for /mnt/us it's FAT which means:
A loop device placed in /mnt/us and mounted on /opt is an option. It solves the first problem, but the issue with potential security hole remains. So what I want to try is use a FS encryption. Further more nueva suggested using an overlay filesystem on root and I find this idea reather interesting. ad 4) Unlike with other Kindles where there seem to be tons of different ways to launch apps this seems quite simple for KT. To my knowledge there's just one (yifanlu's) launcher, is that correct? From what I have read about it so far I like the design so I'll try to make a package for this soon too. So for me the next steps are:
If anyone is willing to give a helping hand don't hesitate. I am personally interested only in Kindle Touch (because that's what I have) but in my wild imagination I don't see a reason why this couldn't work for all kindles. (You can distinguish packages by architecture field if necessary.) What more, maybe even a OS replacement for different kinds of readers (not just Kindles). But let's not get too excited yet. If you managed to read all this you are either very interested or very opposed and want to tell me something really ugly. So now is the time to relieve the tension by leaving a comment. Links: Statically compiled version of opkg is here: http://nyoxi.net/files/kindle/opkg-bootstrap.tar.bz2 EDIT: But don't use that, I suggest you use the attached installer for opkg and overlay (for writable root filesystem). My packages are here (not much there yet): http://nyoxi.net/files/kindle/packages/ The opkg GUI sources and build scripts for packages are here: http://hg.nyoxi.net/ EDIT: I have attached archive with opkg & root fs overlay (see this thread https://www.mobileread.com/forums/sho...d.php?t=170261). To install just unpack it into userstore (under boostrap directory) and run runme.sh. If you have already installed opkg with my original script you should do the following to remove it first: Code:
mntroot rw opkg-cl remove '*' opkg-cl remove --force-remove '*' opkg-cl remove --force-removal-of-essential-packages '*' rm -fr /var/local/opkg /usr/lib/opkg/ mntroot ro When the runme.sh has finished you have to restart the device. After that run opkg-cl update and you're ready to rock&roll again. Edit /etc/opkg/opkg.conf to your liking, now it contains the nslu2 Optware repository. Last edited by Nyoxi; 03-11-2012 at 10:14 PM. Reason: removing the big warning |
02-01-2012, 06:04 PM | #2 |
fbdev
Posts: 107
Karma: 70177
Join Date: Jul 2011
Device: kindle
|
kite makes it very easy to install onto the kindle 3.
just drop a self-extracting script into kite/ondrop and unplug the kindle. the script will run; changes to the device will be immediate. no reboot. additionally, it has the capacity to run scripts at boot time. just drop a script in kite/onboot and it will run every time the device starts. |
Advert | |
|
02-02-2012, 05:51 AM | #3 |
Groupie
Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
|
Nyoxi,
Good to read this somewhere except IRC, keep up the good work man! BTW I don't get what you mean by "security hole" if you do non-encrypted loop mount. It still would be almost always mounted, right? As I think this would be the place where you store installed stuff. Thus it would always be accessible from the KT to any application that has sufficient rights (however I believe everything there runs as root... if I were you I'd better look into running user stuff under non-root account first as it seems like much bigger hole than that somebody could plug Kindle to Linux PC and mount your loop partition and change it... if they're skilled enough to do this they're almost certainly skilled enough to get SSH over USB and mess with things on Kindle themselves) And I would certainly be against installing anything from packaging system to root FS. If something went wrong with this soft and it broke my KT I can remove this loop mount file from USB drive, reboot and be safe, but if it's installed right into root FS I'm doomed. That is, I fully support your selected option of loop partition. That possible breakage not that important for update.bin technology yet because most devs test their update.bins manually before uploading, but when you create some public repo there may be some, say, nightly updates and such. P.S. I know Linux a bit, I know programming a bit (do not know GTK but I can learn if needed). I'm interested in giving you a hand when I have spare time. And I think there're many people around here who could give a hand, too. So feel free to point where you need some help. I think that would benefit the project |
02-10-2012, 09:11 AM | #4 |
Groupie
Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
|
Any progress or help needed? Seems like this topic was quiet for quite a long time...
|
02-10-2012, 09:30 AM | #5 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
https://dev.mobileread.com/trac/hub/ |
|
Advert | |
|
02-10-2012, 11:32 AM | #6 |
Groupie
Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
|
Nope. I wasn't browsing this site a lot, only using its forum. Thanks for pointing!
|
02-10-2012, 01:05 PM | #7 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
I should have put a "sarcasum" icon on that statement. The "News" section hasn't been updated in four years; The "Kindle" section is still empty, after being up for six years. Going by that, you could probably just set your browser to check this thread once every ten years or so to see if anything has happened. |
|
02-10-2012, 02:03 PM | #8 |
Groupie
Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
|
Yeah, I saw what you meant when I actually had time to look at the page That was like 10 minutes ago, way after I answered to your post
|
02-13-2012, 08:27 AM | #9 | |||||
Connoisseur
Posts: 55
Karma: 124493
Join Date: Jan 2012
Device: Kindle Touch
|
Quote:
Quote:
But you made me think again about all this encryption stuff and whether it's really worth the effort. Because with those data.tar.gz jailbreaks all you have to do is trick the user to restart their kindle. And that's not so difficult. Quote:
Quote:
Quote:
Last edited by Nyoxi; 02-13-2012 at 08:31 AM. Reason: fixing typos |
|||||
02-13-2012, 10:05 AM | #10 | |
Groupie
Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
|
Quote:
I can also write basic init.d scripts (and most of them are really basic ), however I think we should refer to them as "upstart" scripts (KT uses upstart, right?). What I propose is having some kind of site/wiki that describes what needs to be done and advertise this somehow so people could go there and help. BTW, as for "stripping the framework" from OpenWrt (I didn't read the links yet) - is it really needed to be stripped? I think if it would have some more MBs it's okay - we can afford this at least at the start because we'll save developers' time (and seeing we don't have many developers out there I think it's really critical to spend as little time as possible to get this working safe & reliable). |
|
02-25-2012, 11:10 AM | #11 |
Connoisseur
Posts: 55
Karma: 124493
Join Date: Jan 2012
Device: Kindle Touch
|
I have finally managed to get the overlay filesystem working. More here: https://www.mobileread.com/forums/sho...76&postcount=1
This brings us another big step forward. @JustAMan: did you find out anything usefull about the openembeded tool? Later when the overlay is more tested I will create single install tool that will setup the overlay and put opkg there. |
02-28-2012, 10:27 AM | #12 |
Groupie
Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
|
Nope, didn't have time yet to mess with this... A bit busy at my work.
|
02-28-2012, 10:49 AM | #13 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
@nyoxi
Are you running your Kindle image under QEMU where you have full control of what happens? Do you ever use HG? My HG repository supports public-published, public-unpublished, and per-user-unpublished repos. PM me if interested in other details. |
02-29-2012, 08:36 AM | #14 | |
Connoisseur
Posts: 55
Karma: 124493
Join Date: Jan 2012
Device: Kindle Touch
|
Quote:
Yes, my repositories are HG. (See the links at the end post #1) |
|
02-29-2012, 06:04 PM | #15 |
Connoisseur
Posts: 55
Karma: 124493
Join Date: Jan 2012
Device: Kindle Touch
|
Good news everyone! It looks like knc1 is able to supply us with the repository for packages (and more!) so this thing will have a place to live.
I'll start looking at the Openembeded to see what magick we can do with that. Later next week I will prepare single installer for the overlay+opkg combo. What is still in the alpha stage is the GTK+ frontend. I wasn't able to do any coding on that lately and I don't expect this will change much. Fortunatelly this isn't a pressing issue because I expect you pepole can handle console app. But if there's a C developer skilled in GTK+ feel free to give a helping hand. |
Tags |
kindle touch, opkg, opkg gui, optware, package management |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kindle 4 (no touch) GUI Localization | Sir Alex | Kindle Developer's Corner | 43 | 09-13-2013 07:19 AM |
Extended Linux Functionality - GUI Launcher Kindle Touch | dasmoover | Kindle Developer's Corner | 41 | 02-11-2013 06:05 PM |
GUI Launcher for Kindle Touch | yifanlu | Kindle Developer's Corner | 299 | 01-24-2013 01:59 PM |
Touch/Fire - Protection Plans | nynaevelan | Amazon Kindle | 5 | 11-16-2011 10:36 AM |