09-17-2010, 05:13 PM | #1 |
Member
Posts: 12
Karma: 152738
Join Date: Jul 2010
Device: Kindle DXG
|
Installing a "normal" Debian ARMEL Linux on the Kindle
Hey guys,
recently I got a regular Debian Linux to run on the Kindle. In this article I will describe how I got it up and running. Prerequisites:
Overview Here is a small overview of what we are going to do. First of all, we'll install Debian Armel on a QEMU virtual machine. Then we'll copy the ARMEL filesystem image over to the Kindle's USB-accessible FAT partition. After that we are going to create an initramfs(a small initial root filesystem loaded by the Kernel) which will start our newly created Debian Linux. Then we'll build the Kernel for the Kindle with our initramfs statically linked into it. Finally, we will transfer the Kernel and start it via the U-Boot bootloader. Part 1: Create a Debian Linux for ARM I won't go into this in detail as there is already some information on the internet. A good tutorial can be found here: http://blog.troyastle.com/2010/07/bu...n-vm-with.html Also, make sure you don't create a root filesystem with eight GB as described in this article :-). 1.3 GB should be enough for a basic Linux and a tiny X server. You'll notice that the VM is awfully slow, so it's always good to have a book at hand to busy yourself in the idle time during the install and fetching of additional packages. Part 2: Transfer Linux filesystem image on the Kindle's USB-Partition If your Kindle is still alive, just copy the image over via Code:
dd bs=32256 skip=1 < image > /media/kindle/ubuntu
Part 3: Creating the initramfs For this part, we'll need
First you'll need to create a directory to hold your initramfs. Compile a busybox binary by running Code:
make ARCH=arm menuconfig
Now we'll need to create some device nodes inside our initramfs. If your Kindle is still running, you can simply "ls -l" in the Kindle's /dev directory and you'll see the major and minor device numbers which you can pass to mknod, otherwise here's a listing of all device nodes that could be important: Code:
crw------- 1 root root 5, 1 2010-08-19 14:26 console brw-rw---- 1 root root 7, 0 2010-08-19 14:26 loop0 brw-rw---- 1 root root 7, 1 2010-08-19 14:26 loop1 brw-rw---- 1 root root 7, 2 2010-08-19 14:26 loop2 crw-rw---- 1 root root 1, 1 2010-08-19 14:26 mem brw-rw---- 1 root root 179, 0 2010-08-19 14:26 mmcblk0 brw-rw---- 1 root root 179, 1 2010-08-19 14:26 mmcblk0p1 brw-rw---- 1 root root 179, 2 2010-08-19 14:26 mmcblk0p2 brw-rw---- 1 root root 179, 3 2010-08-19 14:26 mmcblk0p3 brw-rw---- 1 root root 179, 4 2010-08-19 14:26 mmcblk0p4 crw-rw-rw- 1 root root 1, 3 2010-08-19 14:26 null crw-rw---- 1 root root 250, 0 2010-08-19 14:26 pmic crw-rw---- 1 root root 1, 8 2010-08-19 14:26 random crw-rw---- 1 root root 5, 0 2010-08-19 14:26 tty crw-rw---- 1 root root 207, 16 2010-08-19 14:26 ttymxc0 crw-rw---- 1 root root 189, 0 2010-08-19 14:26 usb1 crw-rw---- 1 root root 10, 130 2010-08-19 14:26 watchdog crw-rw---- 1 root root 1, 5 2010-08-19 14:26 zero I have attached my script. You will notice that it first creates a loop device for /dev/mmcblk0p4 with an offset of 1024(the start of the FAT partition) and then mounts the file system image(again by creating a loop device). We are almost done! But we still need to compress the initramfs: Code:
sudo find . | cpio -H newc -o > ../initramfs.cpio Simply follow the instructions from https://www.mobileread.com/forums/showthread.php?t=91862, but set CONFIG_INITRAMFS_SOURCE to the path of your initramfs.cpio. Part 5: Transfer image to device & boot Enter the U-Boot bootloader and type "run uboot_serial", which will wait for an YModem-G file transfer from your host. Use Minicom and send the file via ZModem(the YModem option won't work!). Do not try to send files via Kermit! U-Boot Kermit supports seems to be broken and didn't work with Kermit, Minicom and HyperTerminal. Now just run Code:
setenv bootargs "init=/bin/sh" bootm 0x84000000 You can get the normal System V init sequence to work by removing all lines containing "getty" from /etc/inittab. Remount the root of your filesystem and reset your kindle and start your linux again, this time without bootargs. If you're lucky, you should see a login prompt on the screen. Limitations Reboot and shutdown just freeze the Kindle until the battery is removed. Even reset does not work. I'll look into this. However, I was able to get a KDrive X server to run. Last edited by choff; 09-18-2010 at 07:04 AM. |
09-19-2010, 11:48 PM | #2 |
Enthusiast
Posts: 40
Karma: 34
Join Date: Aug 2010
Device: kindle dx US
|
Interesting!!!! plan to run gui program on framebuffer????
|
Advert | |
|
09-20-2010, 01:53 PM | #3 |
Member
Posts: 12
Karma: 152738
Join Date: Jul 2010
Device: Kindle DXG
|
Yeah, I'm working on 2 things at the moment:
|
01-02-2011, 03:05 PM | #4 |
Junior Member
Posts: 7
Karma: 10
Join Date: Dec 2010
Device: Kindle 3 - 3G
|
Can i install debian if my kindle's original OS is totally scrwed up- i cannot even turn i t on.
|
01-02-2011, 09:18 PM | #5 | |
I <3 my Kindle
Posts: 528
Karma: 51332
Join Date: Nov 2010
Location: United States
Device: Kindle 3G + WiFi
|
Quote:
If you ever get it working, I would want it. |
|
Advert | |
|
01-02-2011, 11:24 PM | #6 | |
Enthusiast
Posts: 35
Karma: 1566
Join Date: Nov 2010
Device: kindle 3wifi
|
Quote:
|
|
04-21-2011, 08:47 PM | #7 |
Junior Member
Posts: 4
Karma: 10
Join Date: Apr 2011
Device: Kindle 3 wifi
|
choff,
I'm planning to get a kindle 3 wifi soon. This looks like an awesome outdoor Linux console platform. One of the things I've been most concerned with is effective system image backup in case I mess something up while playing with it. Based on your deep experience with the kindle hardware, I've got a couple of questions that I haven't seemed to find a definitive answer for yet. Sorry if this is to far off the subject of this thread: (1) What would you say is the simplest, easiest procedure for performing a full system image backup of a kindle? (2) Do you think it is possible to do such a thing without having to build a serial adapter? For example, wouldn't it be awesome if it where possible to hold a certain key during startup that would put the machine into a mode that where by it exports the entire flash disk via UMASS. That way you could take an easy full image backup, and restore if something goes wrong. Thanks |
04-23-2011, 11:05 AM | #8 | ||
Member
Posts: 12
Karma: 152738
Join Date: Jul 2010
Device: Kindle DXG
|
Hey bdaddy,
Quote:
You are sure going to need ssh. I think the Kindle 3 have already figured out a way to make usbnetwork via the g_ether module work as they did with the DX. Then you should be able to just compress the whole root(/) as a .tar.gz. That part should be easy. Quote:
If you have serial console access, you could create your own initramfs for the Kindle(as I described in this thread). The init script in the initramfs could then load the g_ether or g_file_storage module after it has mounted the file system root in /dev/mmcblk0p1(I think, run mount to figure the devide out). g_ether would give you ssh access, allowing you to copy files via secure copy. g_file_storage will make the kindle behave like a mass storage medium, as you suggested. Then boot this image via U-Boot and here you go! |
||
04-29-2011, 02:52 AM | #9 |
Junior Member
Posts: 4
Karma: 10
Join Date: Apr 2011
Device: Kindle 3 wifi
|
Choff,
Thanks for the response. A couple follow up questions: (1) With the kindle 3 (wifi or 3g+wifi) why is still necessary to do the networking via usb? Why not just have a simple update payload that copies over a static ssh or telnet daemon, and starts it up. Then connect from a workstation via wifi. Or does the kindle cripple the networking over wifi? And if so, why not add some extra code in the update payload to uncripple it? (2) "On the Kindle 3, no soldering is required any more." Really? That sounds awesome. How does that work? Does a standard usb-rs232 cable work or something like that? Thanks again! |
05-12-2011, 05:53 PM | #10 |
Enthusiast
Posts: 31
Karma: 246
Join Date: Mar 2011
Device: Kindle 3G
|
Can you tell us how you got tinyx to work? Im interested
Also as a quick solution for your screen update problem, the guy that made savory wrote this: http://savory.googlecode.com/svn/tru..._update_daemon Last edited by Xqtftqx; 05-13-2011 at 11:03 PM. |
03-23-2013, 11:53 AM | #11 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
Thanks once again Choff for your excellent work. you are missed. I will dig through this again hopefully soon.
Thanks for all your great tips and insight |
03-23-2013, 04:01 PM | #12 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Actually there already is posted what you need; The KUAL launcher and the KUAL Firewall. On this forum you will find the details of where one person put the "allow" rule (it goes in as Rule #1 of the chain for the interface you want to use). Sorry - we do not support the Amazon firewall here, only our own, KUAL Firewall. |
|
03-26-2013, 12:33 AM | #13 |
Evangelist
Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
|
These posts are from 2 years ago... some good info, but I wouldn't spend much time trying to help
|
03-26-2013, 10:00 AM | #14 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
|
03-26-2013, 11:46 AM | #15 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
And they are still relevant today. Who knew?
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Are frequent resets "normal" | taspool | Bookeen | 20 | 04-08-2009 08:08 PM |
Normal to see an Adobe logo "watermark" while charging? | rahulm | Sony Reader | 3 | 03-16-2009 05:24 AM |
Does Calibre embed "normal" font? | radius | Calibre | 8 | 08-30-2008 06:04 PM |
"Error 1316" When Installing Ebook Library Upgrade | dsuden | Sony Reader | 1 | 08-01-2008 07:15 AM |
Installing "Send to Palm" plug-in in Adobe Reader 6? | daught | Reading and Management | 8 | 06-02-2003 07:15 PM |