HOPE XII: A FOSS Operating System For E-Readers




Hardware Targets

Marc started his talk with a rundown of the types of electronic readers currently on the market and their hardware specifications. The Amazon Kindle is unsurprisingly the most common model by a rather wide margin, with the rest of the market being made up of the Nook from Barnes and Noble and various models of the Kobo reader.

As it turns out, these devices are all exceptionally similar internally. Every major reader uses a Freescale i.MX6 chip, which Marc theorizes is because it includes a built-in electronic paper controller. They all use very similar electronic paper panels as well, largely due to the fact that there’s very little competition in that space.

The end result is that while the software and attached content marketplace is different, most of the readers are internally almost identical. This should make it relatively easy to create a common operating system that can be installed on most readers, though for the time being the focus is on the 4th and 5th generation Kindle devices as they are so popular and widely available for testing and development.

Luckily we don’t have to start from scratch. All these readers are running Linux, and the manufacturers have been pretty good with releasing their code under the terms of the GPL. Marc reports that Amazon provides all of their modified software packages as well as their kernel source which was invaluable when it came time to find what changes were necessary to get the software working on the Kindle. The Kindle also helpfully provides a serial port that allows local logins, making it easy to test binaries and kernels from the running device without having to make any permanent changes to the system’s software.

First Steps in a Long Journey

In his talk Marc demonstrated how easy it is to run Linux programs on the Kindle by way of the serial port. There’s even an application launcher available that lets you add program shortcuts to the Kindle’s library as if they were books. But while this can help with some of the shortcomings of the Kindle (such as the inability to read EPUB), it doesn’t change the fact that we still don’t have full control over the system.

With the ability to run binaries on the Kindle and the bootloader being released by Amazon under the GPL, Marc had everything he needed to start porting Debian over to the system. Unfortunately, the glibc used in Debian no longer supports kernels as old as what the Kindle is running. Without the technical experience to port a more modern kernel to the Kindle (though he mentions he’s open to working with anyone who wants to take on the challenge) he was forced to recompile glibc with different flags.

Marc experimented with several cross-compiling environments, everything from using an ODROID SBC to using an old Samsung Galaxy S5 phone with Busybox installed. In the end he found QEMU on his desktop to be the most convenient, and soon he was able to compile a build of Debian that would boot on the Kindle.

But all that was easy compared to getting X running on the electronic paper screen. These displays don’t work the same as normal computer monitors, and getting graphics working took a considerable amount of work and code. The kernel needs to have display-specific information known as a “waveform” which describes the display and how it performs. Unfortunately these waveforms are not well documented and Marc had to write his own software to manipulate the data. He then had to come up with patches for the window manager that would prevent the entire display from being constantly updated; the opposite of what you want on an electronic paper display.

Project Status

As of right now, Marc has the 5th generation Kindle largely working. Graphics, hardware buttons, and USB networking are working. WiFi needs some more work, and progress is being made on a new ebook reader program so the Kindle can still fulfill its original purpose while running this new GNU/Linux operating system. He hopes to have a stable version of the OS available before the end of the year, as well as an easy to use installer that won’t require any modification to the hardware.

How many people are likely to get an antiquated Kindle, disconnect it from the Amazon mothership, and install a variant of Debian on it? Probably very few. But that’s not the point. The option will be there for those who want it. In time the hardware compatibility will get better and the barriers for entry will come down. With a little luck, perhaps enough people will be running FOSS powered e-readers that manufacturers start taking notice and begin offering official options for installing new system software like some do now with Android devices. We don’t know for sure what the future holds, but this is a very promising first step that’s definitely caught our attention.

74 thoughts on “HOPE XII: A FOSS Operating System For E-Readers

    1. Sadly hardly.

      The screen updating is what kills the battery, unless you only ever read books on your laptop in which case it’s perfect ;)

      I’m setting up a 3G kindle to give me a weather display, isn’t going too badly at all, but Amazon wiping any changes made to the OS when it’s booted is rather annoying ;D

      1. How often would the screen need to refresh to get a bearable amount of input lag while typing? Between reading books, browsing the text web, and typing text documents/code I think it could be pretty useful. Also, I think only the parts of the screen that are changing actually update the pixels, so maybe if you’re only updating the end of a line of text, then the power drain is much lower. Obviously the drivers for the screen would have to be more intelligent to get these efficiency gains.

    1. FOSS means Free Open Source Software.
      Even if the kernel they’re running is based on FOSS, the hardware-specific implementation and operative system is non-free closed source software and thar’s the exact opposite of what people want.

    2. Good question. They are already running some free software but many pieces of the software are non-free. They only released the pieces that are GPL licensed and essential stuff like the waveform format converter are closed source. The only really useful FOSS pieces that they released are the bootloader, the kernel and to some degree the window manager.

    3. What they want to do is to do is own is what they bought. Not having any company collecting telemetry. e.g. That they installed a new book, read until page 47, ignored that book for 2 weeks, move physical location, read another 50 more pages, ….

      Individually bits and pieces of information are not all that interesting or important, it is just that so much is being collects and eventually it will all be cross correlated.

      1. Thank you.
        Some folks drank way too much linux koolaid early on.
        Forking stuff doesn’t necessarily mean it doesn’t belong to a company that is trying to make money off of it. I think folks believe the altruistic ideals when forking but it is kinda like when we are teens and an Anarchist society seemed like a good idea lol.
        These folks are pretty smart so it seems like they could simply have Shenzen/Mordor replicate the hardware end of it and simply substitute the fussy parts with compliant ones.
        Honestly, my first gen Kindle is still going strong and I have no issue with Amazon knowing what I have read and even giving me free ebooks, but I salute their effort.

  1. This is pretty awesome. Long i’ve wanted to repurpose these to utilise the epaper display for displaying info around my apartment. Once this project is running, it’d be as simple as writing a small mqtt client program.

    1. I saw a whole crowd of people on segways this week. Of course it was a downtown tour group, but I see them often.

      It’s simply a technology that has found its niche. Lots of things go through the absurd hype phase before settling down into their proper niche. just because it failed to take over the world–like everything does–doesn’t mean it’s extinct or useless.

    2. eInk is pretty common in asian supermarkets, they use little rf connected eInk tags for pricing so they can change prices remotely and post updates on sales and deals.

      It’s not useful everywhere, but where you need a display, that is daylight viewable, extremely low power and don’t need to update the display at any more than a few times a minute there is nothing better.

      Full colour eInk has been demoed at tech shows, and fast update eink also, capable of showing video smoothly without much ghosting (a major issue with current tech when run at high speeds).

      I expect to see future eInk become quite popular for digital signage as it makes solar powered, stand alone advertising displays possible.

      Definitely wasn’t a passing hype, development is ongoing and really interesting tech is coming out of that.

      1. Not only in Asia, in Germany it’s also pretty common.
        And recently many electronics markets have replaced their former paper based standees by (ebook reader sized) e-ink displays.

      2. Also here in the US. Stop And Shop has a chain of half-convenience-half-market stores and they use the eInk price tags. They update via powerful IR transmitters scattered around the store.

        Oh, and last I checked, e-readers were still selling quite handily. Nearly everyone I know – especially non-techies – has one, and the industry is still slowly rolling out improvements like more eye-friendly backlights, waterproofness, etc

        I am puzzled why he didn’t start out hacking on the Nook or Kobo readers. Both are more open to start with, but more hackable as well. That would let him work on the non-system stuff first (or in parallel with efforts involving the hardware) The UI, the reader application, databases to manage the library, syncing with tools like Calibre…all of those are pretty substantial efforts.

    3. I think e-ink is still in its early days, there’s a lot of applications where it’s an awesome solution, but LCD’s / TFT’s have decades of head-start so e-ink modules carry a ~10x price penalty which will only come down as people use them more.

      There’s been a few useful mono and mono + 1 colour modules come out for the Pi which are reasonably priced, I’m hoping at those find their way into projects things will snowball a bit.

    4. I’m not aware of anything beating eInk at reading in ambient light. Lower eye strain is a good thing when you’re reading for long periods of time.

      The main issue with eInk is that its limitations result in a very narrow application. Unless those limitations are overcome it won’t be general purpose.

  2. Have we not learned this lesson many times before? Remember the Netpliance i-Opener or even the early nooks? Kindle e-readers are sold for that low price with the understanding that you will be using the amazon service model, if you want to install a different operating system so you are not ” monitored by faceless corporate overlords or being told what they can and cannot do on the hardware they purchased then buy an e-reader that is priced without the service model and hack that or do a kickstarter project with FOSS if you think the community will actually support it. Creating a bypass to the amazon service model will pretty much just mean the end of the current kindle pricing structure if not the kindle line itself and at that point the project defeats itself.

    1. Valid point though I very much doubt it will have such far-reaching consequences. For one thing people will still need to run Amazon’s OS if they want to read the books they buy from Amazon due to the DRM and Amazon’s OS does not prevent reading your own books. In the end I think only two kinds of people will run fread.ink as their primary OS: Those who want to re-purpose the devices for something other than e-reading and those who care about free software and corporate control and have some degree of technical savvy. This is not likely to be a large chunk of Amazon’s customer base. I’m also planning to support as many e-readers as possible, not just the Kindle, and while I didn’t mention it in my HOPE talk I’ve started putting together an open hardware e-reader prototype based on a pocketbeagle :)

      1. Since amazon traditionally sells the kindle line at or below manufacturing cost I think your underestimating how fast they will react to their products being jail broken but we will see.
        An open hardware version would be cool, I’ll have to order a pocketbeagle to try with the waveshare 3 color e-ink displays, please post some updates on that as they are available.

        1. Ah but I’m not developing nor redistributing any jailbreaks since that would be illegal. I am offering a launch script to allow dual-booting for those who already have root access and I’m working towards an image that can be flashed onto the device, replacing the existing operating system. Other people have created various jailbreaks. These have been available for a long time and for anything older than 6th generation Kindles they haven’t even bothered issuing updates to prevent the jailbreaks. It’s an interesting situation where I can legally offer people a method for wiping the existing OS and replacing it with fread.ink but I can’t legally offer a method for dual-booting, even though I’m sure Amazon would prefer that people dual-boot. Anyone who has bought DRM’ed e-books from Amazon will need to keep the original OS since fread.ink will never implement DRM support.

        2. We don’t need to estimate. The kindle has been jail broken for close to a decade now so there’s history to judge by. All of the ones I’ve picked up second hand have been trivial to JB. You just copy an update bin file to it just like you do to apply updates from Amazon itself, and then reboot. To be fair, the newest one I have the PW 2, unless you count android based ones, and that’s also has some history to judge by.

          They do react but JBs come in time. I do not expect these hacks to be applied to current gen as a rule however.

      2. I think this is largely not about being monitored. You do NOT have to connect many(most?) of these to the internet. It’s very easy to use a Kindle without connecting it to the net. Many do. It’s also easy to apply hacks to provide many features Amazon didn’t build in.

        To me this is about using what you own the way you want.

        It puzzles me that people think you have to buy books from Amazon to use a Kindle or from Barnes and Noble to use a Nook. I own several models of each and don’t read books bought from either.

        I don’t even read books from Amazon or Nook on the ones based on Android and use DRM. Those are from my local library.

        I think it’s misleading to think or, even worse, to feel that you are somehow obligated to buy from then to offset a discount for the hw.

        Having said that, I’ll surely put this on my devices when it gets to about beta.

    2. “Have we not learned this lesson many times before? Remember the Netpliance i-Opener or even the early nooks?”

      I think you’ve learned the wrong lesson from those examples: it is certainly true that there are various hardware bits that are cheaper because they are bundled(with degrees of force varying from ‘the UI nudges you’ to ‘enforced by contractually and by a crypto bootloader without known workarounds’); but that’s not a virtue.

      A product that is artificially cheap because of bundling/tying is both a threat to the development of the market for unencumbered devices(if, say, i-Opener had succeeded the market for low cost PCs would likely be heavily distored by the shelves full of ‘free/cheap-with-fine-print-and-2-year-contract’ competitors(much like the American celllphone market and what the carriers are willing to ‘subsidize’ as an incentive to sign contracts making or breaking a device, or even an entire company’s fortunes)); and the deliver a worse outcome:

      While nobody likes higher sticker prices; there is a fundamental honesty to them: if you want the product you pay the vendor enough to cover their costs and profit margin; and that’s it. You don’t owe them anything more; and their incentive is to make a product that you’ll like enough that you’ll buy another; or version 2, or what have you.

      If you get a ‘subsidy’/’bundle/tying arrangement; this is missing: since they didn’t get paid in full the vendor has an overwhelmingly strong incentive to make design choices that allow the product to act as a collections agent and scrape the balance out of you over a period of time. You end up paying either way; and you have to deal with a product designed at least in part to ‘monetize’ you rather than purely to please you.

      1. Yes, we get blinded by the low sticker price. We are all greedy to sbe me extent and want as much as possible for as little as possible.

        I have a fundamental issue with FOSS in that FREE to most people means I dont pay for it rather than Free meaning I am free to do what I like with it.

        Every body needs to make money to pay the bills. Intellectual work is just as valuable as physical work.

          1. As I read [Saabman]’s comment, it struck me that “greed” does not explain all such actions.
            Conservation, IMO, is not greedy, but prudent. “As much as possible, for as little as possible”, is efficiency, not greed.

    3. My Kindle works perfectly without connection to Amazon. I use Calibre to convert and/or load eBooks to it and I never connect it to an Amazon account, I think I did not even configured one on the device and rarely activate it’s WLAN.

    4. I wrote a prototype bootloader and initrd for Kindle some 10 years ago to lock it down pretty tightly. We decided not to enable my changes because we anticipated that people hacking into it wouldn’t do much harm and the main cost was not the hardware but the WhisperNet service and we could boot off unauthorized devices pretty easily already.
      Even when the discounted Kindles that included ads on the suspend screen showed up there wasn’t much push to go too crazy on locking down. That hardware we used meant that we couldn’t make it totally foolproof. But we definitely explored a lot of things we could do to make it a whole lot harder than it is today, and make a conscious decision not to go overboard. (ex: chain of trust bootloader, buried vias, fused debug/jtag, TPM, signed updates, filesystem checksums, …)

      1. Very interesting. It is pretty obvious that the Lab126 Kindle developers made a conscious choice not to lock down these devices from looking at the i.MX capabilities with regards to secure booting and the fact that the efuses and hardware is configured such that just holding down a button during boot gets you into USB download mode. What I’m not sure about is whether to even try to enable 3G modem support in fread.ink. It seems that it’s already limited to 50 MB for anything other than Amazon and Wikipedia so I don’t see a difference from Amazon’s point of view between people using those 50 MB for accessing non-amazon websites on the original OS or another OS, but are you saying that this is a major cost for Amazon and enabling the modem would be likely to trigger a response (e.g. locking down the Kindles further)? The Kindle hacking community seems to have assumed that this would likely be the case. I’m personally not super interested in the 3G modem in the first place since most Kindles don’t even have it and you can just make a wifi hotspot from your phone (50 MB doesn’t cost much these days).

        1. a 2 MB book download while roaming is around $10 for them. So it depends. Generally anywhere where the ACCESS browser would be enabled is where Amazon doesn’t seem to care, sort of a gift for buying the Kindle. Mostly people use the WhisperNet bandwidth to buy books, which is exactly what AMZN intended.

    5. The number of uberleet people hacking their Nooks paled in comparison to the number of grandmothers reading romance novels on theirs.

      The Nook died because B&N couldn’t compete with Amazon. I loved my Nook Touch because at the time I bought it, it was a better reader. But the reason Amazon had a crappier device was because they had a stronger market position.

      The suggestion that an effort like this will cause Amazon to stop making Kindles, or change the pricing model, is ludicrous. There are plenty more people hacking their ad-sponsored kindles to not show ads, and Amazon hasn’t even blinked. It’s a drop in the bucket.

  3. Thanks for your work, Marc Juul. I spend a lot of time on e-readers (Kindles and Kobo) and am often frustrated by the limitations of the software. I wonder if manufacturers would actually be enthusiastic about contributing to an open source e-reader OS? They make their money by selling books, not on the devices themselves. They do like to capture readers for their eco-system, but other than that, I don’t think they want to invest much themselves in their own OSs.

      1. “progress is being made on a new ebook reader program” That’s the part I’m interested in. A single reader program that’s portable to many operating systems while being able to open as many e-book formats as possible without having to use software like calibre to convert the book files.

        Since many e-book files are just some sort of text markup language in a common archive file format with the extension changed, supporting different formats could be done via translation files. The reader’s render engine functions would always display the same while the translation file (itself just text) would have a list of all its format’s markup commands in order. If a book format has no equivalent command, use a blank line for that spot in the command list. That would make it easy to make new translation files. Provide an example file with the software’s list of markup commands.

        With open source, should someone want to, it could be ported to platforms without unicode support (like Palm OS) with an additional plugin or module to add in-app unicode character display capability. I used to have to do find and replace in book files to replace tons of punctuation characters pointlessly done in unicode so they would convert and display properly on my Palm devices. Except for one character in Norwegian, the Extended ASCII character set contains exact equivalents for Unicode characters in all the languages that use those letters. Thus there’s no #%#% reason to ever use unicode for things like left and right single or double quotes, or ampersands or question marks or en and em dashes. That only makes the file sizes larger (replacing several thousand pairs of unicode left/right double quotes with Ex-ASCII left/right double quotes shrinks the size quite a bit) it makes absolutely no difference in the look of the book.

        The name I’ve long liked for such a reader program is One Ultimate Reader, or OUR. As in “Our Software, Not Theirs”. You may use that name for your reader app, if you wish. :)

        1. Kobo needs help mostly making their software not slow as molasses.

          Great reader, completely shit software. Trying to adjust the screen brightness is an exercise in complete annoyance, as it responds a second or two after you’ve moved your finger!

  4. People spend quite a bit on hardware wallets for cryptos. I wonder if a jail-broken and reloaded reader running debian FOSS would be a great foundation to install software wallets securely. It seems possible considering there are a lot of linux based wallets out there. I’m trying to think of the flaw in that idea. :-)

  5. Sad I have too many project to work on, and not the patience to work on such a thing, especially knowing I have all the knowledge to make such a project :p

    But unless you want to read only thing coming from public domain, a complete FOSS eReader will be useless, you will never have access on the DRM system, like reading ePub using ADE DRM found at most sellers, or the Amazon DRM.

    And if you want a FOSS device it is to stay on the legal side, because yes, you can remove the DRM, but the license you accept to be the book does not allow you to remove it.

    So as sad as it is, what would be the use case of a completely FOSS eReader? By the way if you want a complete FOSS eReader, you are not going to install any thing like xorg, but make or use a software made for eReading. There are already some like koreader: https://github.com/koreader/koreader

    PS: you don’t touch the waveform “data” to display something unless you want to harm the screen.

    1. True that you won’t be able to read DRM’ed ebooks but there are lots of non-DRM’ed ebooks that aren’t in the public domain :) I personally never buy an e-book if it’s DRM’ed. Not even all Amazon ebooks are DRM’ed. Also, while I’m personally located in the U.S. and thus fread.ink will not include any DRM removal software there are other countries where stripping DRM from your ebooks is perfectly legal.

      You’re saying not to use Xorg so it might suprise you that later model Kindles actually use Xorg and the awesome window manager. KOreader is a great and I’m working to port it to fread.ink. It can already run on X using SDL.

      I already wrote a tool to convert the waveform between the E Ink format and the EPDC format and dump them to a human readable format. I’m actually planning to create my own waveforms from scratch. We’ll see how many screens I wreck :p

    2. For many this is NOT about FOSS only, just as Firefox is not about FOSS only. It’s about the choice to use the hw you bought the way you want. DRM readers will likely follow for those who want to consume DRM content. It’s already available in linux. Doesn’t appear to be any real blockers unless the old kernel is one.

      While it grinds my gears, I could very legally watch Netflix on Firefox in linux right now if I had a netflix account.

  6. If only there were some sort of code of conduct preventing people from stating such divisive, hurtful opinions, so the MAGA-hat-wearing snowflakes wouldn’t get triggered and we could use the hackaday comments for discussing hacks instead of some hacker’s political opinions.

    1. It’s not just “some hacker” its the leader of this whole project that is a hater. That’s worth acknowleging. I don’t want to use software written by someone of such bad character. Remember, software is only as good as its author(s). Chill out man, see the hatred for what it is. I too would rather be hacking. I was already looking at ebay to see if I could get a 5th gen kindle to try this out until I saw that crap. Now I don’t want anything to do with it. Who knows, the developer might include code with a back door, just so he can get at the people he hates. I’d rather get software from someone who loves all of humanity.

    1. Yea, it could be a bit like Reagan, Carter, LBJ, and Nixon robbing the bank. (Site the 1991 film “Point Break” – a really well done and memorable scene) Anyone can buy those MAGA hats and nothing spreads hate like doing nasty things while wearing attire of your perceived enemies. (usually its the wearers of the MAGA hats that get the hateful abuse) I still don’t trust the author of this project, though. He was way to quick to amplify the hate.

  7. With this I could make great reference books out of old e readers. But instead of having 30lb of books a small light device.

    This is a free thing I would pay for, and I am thrifty.

    1. You can do this already. Although converting PDFs to ereader formats is not easy and often does not deliver a good result. Directly displaying PDFs is only useful on larger screens.
      but with Calibre you can convert eBook Formats and load them to Amazon and non-Amazon eReaders.

    1. A couple points. I often read on gp devices because I have them on me more often. But when I’m at home I prefer an e-ink display when reading books.

      With a properly free distro, an ereader becomes a gp device for anything which doesn’t require fast refresh rates. Fast is a loose term in this contect.

  8. I wondered about calling the Galaxy S5 old. :-) It’s still the phone I use daily and it performs really well. The only thing I did was insertingn a new battery after about 3 years as the old one seemed to show a little weakness. Luckily this was no problem: Open backcover, replace battery and close it again – it’s designed that way.

  9. So you want to keep your data to yourself. You don’t want Amazon or whoever knowing what you read and when? Good for you.

    Here’s my anecdotal story which is probably pretty normal and probably a big part of the reason why most of the world gave up their privacy years ago.

    Sometimes I read on my breaks on my work computer. Sometimes I read on my Windows tablet. Sometimes I read on the iPad that my workplace gave me. Other times I read on my android phone. Occasionally I even read on my home desktop computer. What a pain in the ass it would be if those nice folks at Amazon and Google didn’t keep track of where I left off and sync it among all those devices!

    So you want to bring privacy back? Great! What we need is a whole suite of easy to use yet secure servers that offer all the functions people currently get from “the cloud”. Then we need a really great distribution that wraps them all together into something that an only slightly above average technical user can safely use. Finally, since some people aren’t going to do this themselves no matter how easy you make it we need to form companies that will host this package for users so that the totally non-technical and the self-hosters can still communicate. But, will they do this for free? Will people pay for it?

    1. There might not even be any need to pay for anything, and they could be running it on one of those computer systems you listed and still access it from the other places.

      Most of it might already exist. But are you sure there is a benefit in making it easy enough for you to use? Would people working on it be better off if comments like this were not only on the internet, but also in their mailing list or forums?

      When people “bring privacy back,” they bring it to themselves, and thanks to software, to other people who want it. You want something else, and you believe these companies are providing it. Great!

      The benefit of writing the software is the choice to use it. What is the benefit in promoting it?

      The last thing that would help the people who DO care is having people pay for things. That would only shift which company controls it. People who still have some privacy are already doing better than that without the babysitter. It might even be that the tools for what you describe existed in the 1990s, but the average person doesn’t value software features without marketing to tell them how much they love the features, or to tell them which features they value so that they can repeat it when the subject comes up.

    2. except that the companies you’re currently supporting are actively stopping is from doing just that. Android is “open source” – with the important stuff getting close sourced steadily. ios won’t let you have another store. you give up your privacy to finance them to stop you from moving out.

  10. I remember reading about when the Nook Simple Touch came out, which was the first consumer device with a fast-refresh E-Ink display, and that someone found out how to get fast refresh to work by hacking the Android kernel on the device, and even demonstrated ePSXe running on it at 20fps, which is very good for an E-Ink display.

Leave a Reply to jonmayo Cancel reply
