Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-19-2019, 08:23 AM   #1
WaseemAlkurdi
Enthusiast
WaseemAlkurdi began at the beginning.
 
Posts: 47
Karma: 10
Join Date: Jul 2019
Device: Kindle Touch (K5) Wi-Fi
Backporting a newer version of the Kindle firmware/GUI from Paperwhite to Touch

Is it possible at all to take a rootfs from a Kindle Paperwhite (especially the original Paperwhite, since it is very similar to the Touch on the inside) and coax that into booting with a Kindle Touch kernel?
I specifically asked about transplanting the whole root partition, beacuse the UI part alone is apparently too complex to be moved.
WaseemAlkurdi is offline   Reply With Quote
Old 07-19-2019, 09:35 AM   #2
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 8,949
Karma: 14300002
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O & Forma
Not the same CPU, not the same libc, possibly with a higher kernel requirement... Here be dragons.
NiLuJe is offline   Reply With Quote
Advert
Old 07-19-2019, 09:59 AM   #3
knc1
99.44/100% On Holiday
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 16,925
Karma: 18016732
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by NiLuJe View Post
Not the same CPU, not the same libc, possibly with a higher kernel requirement... Here be dragons.
Both devices have "Kindle" on the outside, but that is about the only thing the same.
knc1 is offline   Reply With Quote
Old 07-19-2019, 05:43 PM   #4
WaseemAlkurdi
Enthusiast
WaseemAlkurdi began at the beginning.
 
Posts: 47
Karma: 10
Join Date: Jul 2019
Device: Kindle Touch (K5) Wi-Fi
Quote:
Originally Posted by NiLuJe View Post
Not the same CPU, not the same libc, possibly with a higher kernel requirement... Here be dragons.
I've given that some thought, but as far as I can see online, at least the original Kindle Paperwhite and the Touch both have the same SoC, namely the Freescale i.MX508 (ref ere nces).
As libc version is concerned, we're transplanting the whole shebang, not just /opt, so that shouldn't be a problem, should it?
And even if it was, the SoCs are the same, so porting the kernel won't be a very big issue (regularly done in the world of Android and other embedded designs when the two devices share the same SoC).

I've also skimmed though this thread, which seems to be the only attempt here at doing something similar, and it (kind of, somewhat, a little) worked, despite the fact that there are much more differences.

Last edited by WaseemAlkurdi; 07-19-2019 at 05:46 PM.
WaseemAlkurdi is offline   Reply With Quote
Old 07-19-2019, 05:51 PM   #5
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 8,949
Karma: 14300002
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O & Forma
@WaseemAlkurdi: My bad, I was thinking of the PW2, which moved to an i.MX6SL.

The rest still stands though . The libc might be an issue because it can be compiled to *require* a minimum kernel version.

EDIT: Although, you might be in luck, since FW 5.9.7 was apparently still setup to support Linux 2.6.32, even on PW2+ which moved at least to 3.0.35 .

The K4 was a funny beast in that it was essentially a K5 masquerading as a K3. The hardware is roughly similar to a K5, but it's running on what's essentially the K3 FW. There's even a nifty epdc shim to bridge between the two different epdc APIs.

Last edited by NiLuJe; 07-19-2019 at 05:59 PM.
NiLuJe is offline   Reply With Quote
Advert
Old 07-19-2019, 05:59 PM   #6
WaseemAlkurdi
Enthusiast
WaseemAlkurdi began at the beginning.
 
Posts: 47
Karma: 10
Join Date: Jul 2019
Device: Kindle Touch (K5) Wi-Fi
Quote:
Originally Posted by NiLuJe View Post
@WaseemAlkurdi: My bad, I was thinking of the PW2, which moved to an i.MX6SL.

The rest still stands though . The libc might be an issue because it can be compiled to *require* a minimum kernel version.
I'm unsure of the exact kernel version on the Paperwhite, but I do have a feeling that it runs the same kernel version, for a very simple reason.
The PW and the Touch have the same SoC. I'm sure that you are aware that it takes some effort to bring up Linux on a particular SoC. So, since they decided to reuse the i.MX508, they are very, very likely to have reused their existing Linux kernel trees as well, but slightly modifying them to add drivers for the frontlight and so on. And doing otherwise means that there is a very serious disconnect between Lab126's various teams (which I don't believe to be the case).
I'm betting that it runs none other than Linux Kernel 2.6.31, the one on my Kindle Touch.
Edit (noticed yours after submitting mine):
Quote:
Although, you might be in luck, since FW 5.9.7 was still setup to support Linux 2.6.32, even on PW2+ which moved at least to 3.0.35
This is absolutely great news!
I was initially thinking about targeting 5.4.x, since this is the last version released to the original Paperwhite, but let's shoot for the stars!

Last edited by WaseemAlkurdi; 07-19-2019 at 06:01 PM.
WaseemAlkurdi is offline   Reply With Quote
Old 07-19-2019, 06:01 PM   #7
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 8,949
Karma: 14300002
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O & Forma
@WaseemAlkurdi: I don't have access to my PW1, and I'm way too lazy to check the final PW1 sources, but that sounds sensible .

The most notable differences will be the touch input (IR -> capa) and lighting (ext. port -> FL).

TL;DR: PW2+ FW is probably a no-go (req. 2.6.32), but PW1, eeeeeeh.

Which begs the question: is there anything at all worth the trouble between 5.3.7.3 and 5.6.1.1?

Last edited by NiLuJe; 07-19-2019 at 06:05 PM.
NiLuJe is offline   Reply With Quote
Old 07-19-2019, 06:04 PM   #8
WaseemAlkurdi
Enthusiast
WaseemAlkurdi began at the beginning.
 
Posts: 47
Karma: 10
Join Date: Jul 2019
Device: Kindle Touch (K5) Wi-Fi
Quote:
Originally Posted by NiLuJe View Post
@WaseemAlkurdi: I don't have access to my PW1, and I'm way too lazy to check the final PW1 sources, but that sounds sensible .

TL;DR: PW2+ FW is probably a no-go (req. 2.6.32), but PW1, eeeeeeh.

Which begs the question: is there anything at all worth the trouble between 5.3.7.1 and 5.6.1.1?
To answer your question, I want the new UI, the new font, and the sense of having achieved something, along with the learning experience that comes with that!

Edit: Wait ... isn't the kernel version on the Touch == 2.6.32? That means that it meets the base requirements, doesn't it?
WaseemAlkurdi is offline   Reply With Quote
Old 07-19-2019, 06:11 PM   #9
WaseemAlkurdi
Enthusiast
WaseemAlkurdi began at the beginning.
 
Posts: 47
Karma: 10
Join Date: Jul 2019
Device: Kindle Touch (K5) Wi-Fi
Quote:
Originally Posted by NiLuJe View Post
The most notable differences will be the touch input (IR -> capa) and lighting (ext. port -> FL).
Ouch. The Paperwhite has a capacitive touchscreen :-(
But if it works without porting the kernel ... then we're done!
There is something odd ... whenever I edit one of my posts, the post before the last disappears ... is it related to my new-user state?
WaseemAlkurdi is offline   Reply With Quote
Old 07-19-2019, 06:36 PM   #10
knc1
99.44/100% On Holiday
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 16,925
Karma: 18016732
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by WaseemAlkurdi View Post
To answer your question, I want the new UI, the new font, and the sense of having achieved something, along with the learning experience that comes with that!

Edit: Wait ... isn't the kernel version on the Touch == 2.6.32? That means that it meets the base requirements, doesn't it?
But the kernel firmware is not limited to just the version.
You must have matching builds of all modules.
Some of those are in the initramfs (u-image) and some are in the usual /lib/modules/<version>/* (rootfs.img) file system path.


And when you are re-building the PW kernel&modules for the touch kernel&modules hardware (including e-ink differences) don't forget that you must get everything ABSOLUTELY correct.
(If the newly built kernel hangs, while booting the kindle ...)


If you must insist on doing this -

You really should set-up the touch hardware to load the new, test u-image&rootfs.img combination over the network rather than committing to the flash drive hardware.
(Yes, the 5.x series hardware support includes loading over the network.)

Last edited by knc1; 07-19-2019 at 06:39 PM.
knc1 is offline   Reply With Quote
Old 07-19-2019, 06:39 PM   #11
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 8,949
Karma: 14300002
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O & Forma
@WaseemAlkurdi: 2.6.31 on the Touch (at least originally. Might have been updated later, although I doubt it).
NiLuJe is offline   Reply With Quote
Old 07-19-2019, 06:58 PM   #12
WaseemAlkurdi
Enthusiast
WaseemAlkurdi began at the beginning.
 
Posts: 47
Karma: 10
Join Date: Jul 2019
Device: Kindle Touch (K5) Wi-Fi
Quote:
Originally Posted by knc1 View Post
But the kernel firmware is not limited to just the version.
You must have matching builds of all modules.
Some of those are in the initramfs (u-image) and some are in the usual /lib/modules/<version>/* (rootfs.img) file system path.


And when you are re-building the PW kernel&modules for the touch kernel&modules hardware (including e-ink differences) don't forget that you must get everything ABSOLUTELY correct.
(If the newly built kernel hangs, while booting the kindle ...)
Does that result in a permanent brick?
This is currently my biggest fear, as I don't have a serial cable, nor are my soldering skills any good.

Quote:
If you must insist on doing this -

You really should set-up the touch hardware to load the new, test u-image&rootfs.img combination over the network rather than committing to the flash drive hardware.
(Yes, the 5.x series hardware support includes loading over the network.)
I think I'm pursuing 5.4.x for now, and if that works out, I'd move up. At least, I'd be targeting the original Paperwhite. The SoC is the same, so the kernel version is hopefully the same!

Quote:
Originally Posted by NiLuJe View Post
@WaseemAlkurdi: 2.6.31 on the Touch (at least originally. Might have been updated later, although I doubt it).
You're right, it is 2.6.31 indeed. But is a x.x.01 difference significant when it comes to making or breaking libc, especially when that difference is likely to be minor patches?
But anyhow, it's going to be 5.4.x first, as no kernel work is required (if the versions turn out to be identical).
WaseemAlkurdi is offline   Reply With Quote
Old 07-19-2019, 07:13 PM   #13
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 8,949
Karma: 14300002
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O & Forma
In this case, yes, as 2.6.32 > 2.6.31, so the dynamic loader will gently tell you to get out of its lawn .

The K5 is very, very, very, very hard to permanently brick, as we can put it in downloader / fastboot mode or whatever it's actually called (see Kubrick) .
NiLuJe is offline   Reply With Quote
Old 07-20-2019, 12:26 AM   #14
knc1
99.44/100% On Holiday
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 16,925
Karma: 18016732
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by WaseemAlkurdi View Post
- - - - -

But anyhow, it's going to be 5.4.x first, as no kernel work is required (if the versions turn out to be identical).
Duh...
You had better test the 'modinfo' output from the same named module in both rootfs.img files.*

"versions turn out to be identical" IS NOT the total criteria for getting the kernel to load modules from a different build.

*because I really do know what I am writing about.
knc1 is offline   Reply With Quote
Old 07-20-2019, 05:24 PM   #15
WaseemAlkurdi
Enthusiast
WaseemAlkurdi began at the beginning.
 
Posts: 47
Karma: 10
Join Date: Jul 2019
Device: Kindle Touch (K5) Wi-Fi
Quote:
Originally Posted by NiLuJe View Post
In this case, yes, as 2.6.32 > 2.6.31, so the dynamic loader will gently tell you to get out of its lawn .

The K5 is very, very, very, very hard to permanently brick, as we can put it in downloader / fastboot mode or whatever it's actually called (see Kubrick) .
And @yifanlu very clearly told us what happens when we try to recompile something that low-level on the Kindle ...


Quote:
Originally Posted by knc1 View Post
Duh...
You had better test the 'modinfo' output from the same named module in both rootfs.img files.*

"versions turn out to be identical" IS NOT the total criteria for getting the kernel to load modules from a different build.

*because I really do know what I am writing about.
So, @NiLuJe and @knc1, it looks like the first step seems to be a download and extraction of the stock Paperwhite 1 firmware to see what kernel version it runs.
An easy way would be by cracking rootfs open and seeing what's the name of the folder under /lib/modules/. If for some reason that doesn't work, then it could be checked via extraction of uImage.
What do you think?
WaseemAlkurdi is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Paperwhite w/ 3G firmware version question cspittell Amazon Kindle 7 06-15-2018 07:29 PM
Current Firmware Version of New Paperwhite or Voyage victoryhollow Kindle Developer's Corner 17 06-11-2015 08:08 AM
Paperwhite 2: what firmware version does it come with? ixtab Amazon Kindle 48 11-08-2013 10:57 PM
Backporting firmware 4.0.1 on Kindle 3 - in progress giorgio130 Kindle Developer's Corner 49 04-02-2012 04:18 AM
How to install prior version of Calibre when newer version installed? SilentSeven Calibre 3 04-13-2011 12:46 PM


All times are GMT -4. The time now is 06:58 AM.


MobileRead.com is a privately owned, operated and funded community.