Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-26-2017, 06:08 PM   #1
bennybean
Junior Member
bennybean began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jun 2017
Device: Kindle Paperwhite 3
Question Installing a regular linux distro?

Despite being decently knowledgeable in the field of linux/Unix I will admit that I don't know much about my Paperwhite 3 kindle. I've "Jailbroken" it and installed Alpine Linux in a Chroot that works quite well, but I've found that since it's not my primary reading device, I don't often use it for much except as a portable linux terminal.

This makes me figure that I could remove the Amazon software components from the device, except the kernel (bootloader is locked right?) and drivers; and then just replace the root fs with the Alpine rootfs that I'm already using in a chroot, and then set the device to load X11>Kterm on boot.

Point being, I'm fairly certain this is possible, but I thought it would be a good idea to run this past people who have more experience with the device than I do in case I'm missing something obvious.

Thank you in advance.
bennybean is offline   Reply With Quote
Old 06-26-2017, 06:14 PM   #2
coplate
Guru
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
Generally speaking, yes.

There are a variety of ways to flash the linux kernel, I've been considering it but don't have the picture firmly in mind.

Here is a good thread to read through I think?

https://www.mobileread.com/forums/sh...ad.php?t=91862.


Things are probably a lot eaiser if you have a serial port to use for recovery, but at least in that thread he did it without one.

I'll let someone else come talk about the various partitions and boot phases of the kindle system.

As I understand it, the linux kernel lives in the uImage partition, I'm not entirely sure of how it interacts with the filesystem.
coplate is offline   Reply With Quote
Advert
Old 06-26-2017, 06:32 PM   #3
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Two points:

*) That is a very old thread, and is written about a very simple Kindle (a K2) model. *

*) yifanlu was at one time employed as a lab126 consultant. (not a secret, its in his CV).

With the series 5.x devices, at least the more modern ones based on the i.MX6SL, SoC (which is PW2 or newer) -
You really, really, really want to use a serial port connection.

Prior to loading a boot loader, the SoC only communicates with the serial port.

After loading the boot loader (u-boot is used by Amazon, but there are builds of Redboot for the i.MX6SL also), then the boot loader only communicates with the serial port.

The next thing that loads and runs is the linux kernel, which only communicates via the serial port.
When first loaded, it is running in a memory (ram) resident, initramfs system.
That contains enough code to run the display (for the recovery menu) but its primary communications path is via the serial port.

Once the boot sequence gets past that point and does its 'switch root' command to replace the initramfs file system with the one rooted in an eMMC partition - -
THEN and only then can you bring up USBnetwork (main) or Rescue Pack (diags).

So you should be able to read above that without a serial port, any error you introduce to that very long boot sequence converts your Kindle into a PaperWeight.

You want to install a serial port. You really do.

You also want to get the Kindle network booting, or at least running its filesystem from NFS (the kernel, while still running ram resident, can use an NFS export for its main file system).
Of course, you need a serial port connection to 'talk' u-boot into giving the kernel the proper set of command line arguments when it loads the kernel.

Yes, you want a working serial port.

You can probably get away without a JTAG setup.

- - - - -

* For instance, the K2 was long before Kindle devices became dual boot machines.

= = = =

In general, replacing the Amazon OS is a very bad idea (tm).

Replacing any embedded system with a non-embedded system is an even worse idea.

If you feel you need more memory, there are a lot of the Amazon services specific to the Kindle that you can just stop.
There are threads here on how to do that on the modern Kindles.

If you still feel you need more memory, set-up and enable swap.
There are threads here on that also.

Last edited by knc1; 06-26-2017 at 06:54 PM.
knc1 is offline   Reply With Quote
Old 06-26-2017, 06:59 PM   #4
bennybean
Junior Member
bennybean began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jun 2017
Device: Kindle Paperwhite 3
Quote:
Originally Posted by knc1 View Post
Two points:

*) That is a very old thread, and is written about a very simple Kindle (a K2) model. *

*) yifanlu was at one time employed as a lab126 consultant. (not a secret, its in his CV).

With the series 5.x devices, at least the more modern ones based on the i.MX6SL, SoC (which is PW2 or newer) -
You really, really, really want to use a serial port connection.

Prior to loading a boot loader, the SoC only communicates with the serial port.

After loading the boot loader (u-boot is used by Amazon, but there are builds of Redboot for the i.MX6SL also), then the boot loader only communicates with the serial port.

The next thing that loads and runs is the linux kernel, which only communicates via the serial port.
When first loaded, it is running in a memory (ram) resident, initramfs system.
That contains enough code to run the display (for the recovery menu) but its primary communications path is via the serial port.

Once the boot sequence gets past that point and does its 'switch root' command to replace the initramfs file system with the one rooted in an eMMC partition - -
THEN and only then can you bring up USBnetwork (main) or Rescue Pack (diags).

So you should be able to read above that without a serial port, any error you introduce to that very long boot sequence converts your Kindle into a PaperWeight.

You want to install a serial port. You really do.

You also want to get the Kindle network booting, or at least running its filesystem from NFS (the kernel, while still running ram resident, can use an NFS export for its main file system).
Of course, you need a serial port connection to 'talk' u-boot into giving the kernel the proper set of command line arguments when it loads the kernel.

Yes, you want a working serial port.

You can probably get away without a JTAG setup.

- - - - -

* For instance, the K2 was long before Kindle devices became dual boot machines.

= = = =

In general, replacing the Amazon OS is a very bad idea (tm).

Replacing any embedded system with a non-embedded system is an even worse idea.

If you feel you need more memory, there are a lot of the Amazon services specific to the Kindle that you can just stop.
There are threads here on how to do that on the modern Kindles.

If you still feel you need more memory, set-up and enable swap.
There are threads here on that also.
Ok, so what you are saying is that what I want to do is possible but not a good idea. I'm not really *that* concerned about breaking the device so that warning wont stop me. It is probably worth noting, though, that alpine is designed for embedded devices and routers, so I don't see a reason that that would be a problem. If I'm not worried about replacing the kernel, what's the easiest route (just a point in the right direction is fine) to go about setting the device up so I can load alpine with the default kernel?

Essentially, if i'm not misunderstanding, the easiest way to accomplish what I'm going for is to change that late stage of the boot sequence that you described as the initramfs changing root to the emmc, but replace the os it "changes" to with alpine?

Last edited by bennybean; 06-26-2017 at 07:04 PM.
bennybean is offline   Reply With Quote
Old 06-26-2017, 07:12 PM   #5
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by bennybean View Post
Ok, so what you are saying is that what I want to do is possible but not a good idea. I'm not really *that* concerned about breaking the device so that warning wont stop me. It is probably worth noting, though, that alpine is designed for embedded devices and routers, so I don't see a reason that that would be a problem. If I'm not worried about replacing the kernel, what's the easiest route (just a point in the right direction is fine) to go about setting the device up so I can load alpine with the default kernel?

Essentially, if i'm not misunderstanding, the easiest way to accomplish what I'm going for is to change that late stage of the boot sequence that you described as the initramfs changing root to the emmc, but replace the os it "changes" to with alpine?
Run the 'alpine' file system from an NFS export on your PC until you get things working.

I am the only person left here to be handling the help desk.
I don't have any interest in loading 'alpine' on one of my Kindles, so you do it, you write it up.
That is where all of this information comes from, the users like you.

Oh, did you get the message that you need to connect to the serial port?
You really, really do need that.

= = = =

And if you had to ask the questions you just asked -
Then you really need to learn more about the design and implementation of embedded systems.
Which is normal taught as post graduate work to your PhD. in computer science.
You haven't mentioned how long you have had your PhD. in computer science or from what institution.

Last edited by knc1; 06-26-2017 at 07:15 PM.
knc1 is offline   Reply With Quote
Advert
Old 06-26-2017, 08:39 PM   #6
bennybean
Junior Member
bennybean began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jun 2017
Device: Kindle Paperwhite 3
Quote:
Originally Posted by knc1 View Post
Run the 'alpine' file system from an NFS export on your PC until you get things working.

I am the only person left here to be handling the help desk.
I don't have any interest in loading 'alpine' on one of my Kindles, so you do it, you write it up.
That is where all of this information comes from, the users like you.

Oh, did you get the message that you need to connect to the serial port?
You really, really do need that.

= = = =

And if you had to ask the questions you just asked -
Then you really need to learn more about the design and implementation of embedded systems.
Which is normal taught as post graduate work to your PhD. in computer science.
You haven't mentioned how long you have had your PhD. in computer science or from what institution.
I intended no disrespect or anything of the sort in my response. I apologize if it sounded that way. I merely meant to convey that I don't care if the device is bricked, not that it was an impossible outcome.

Anyways, thank you for the help. I WILL do a post on it if I manage to get it working.
bennybean is offline   Reply With Quote
Old 06-26-2017, 08:50 PM   #7
Cinisajoy
Just a Yellow Smiley.
Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.
 
Cinisajoy's Avatar
 
Posts: 19,161
Karma: 83862859
Join Date: Jul 2015
Location: Texas
Device: K4, K5, fire, kobo, galaxy
Quote:
Originally Posted by bennybean View Post
I intended no disrespect or anything of the sort in my response. I apologize if it sounded that way. I merely meant to convey that I don't care if the device is bricked, not that it was an impossible outcome.

Anyways, thank you for the help. I WILL do a post on it if I manage to get it working.
Please post if it doesn't work. That way others will know either way.
Cinisajoy is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple linux fastboot installing command aditya3098 Kindle Developer's Corner 20 04-23-2019 04:13 PM
Problems installing Linux Version Ababakar Calibre 4 09-23-2016 10:41 AM
Installing Calibre on Headless Linux dchagnon Devices 3 12-17-2013 04:18 PM
Installing Calibre in Arch Linux jatz Calibre 0 03-23-2010 01:41 PM
Calibre will build but won't install on bluewhite64 linux distro angevin Calibre 5 10-18-2008 10:20 PM


All times are GMT -4. The time now is 02:15 PM.


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