View Single Post
Old 06-23-2012, 06:16 AM   #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 UnknownUser View Post
oky then. heres what I've done:

- created a debian disk image using debootstrap, and completeing the --second-stage bit with qemu.
- moved the image onto the /mnt/us partition
- used the script from http://xkid.biz/wordpress/?p=4
- ssh into the kindle
- execute the chroot script
- in the chroot:
--- add debian testing repo into sources.list
--- apt-get update
here the output from apt:
Get:1 http://ftp.debian.org testing InRelease [190 kB]
Get:2 http://ftp.debian.org testing/main armel Packages [5710 kB]
Get:3 http://ftp.debian.org testing/main Translation-en [3886 kB]
100% [2 Packages bzip2 0 B]

- in another ssh session with the kindle, outside the chroot (after apt hangs):
--- ls / (works just fine)
--- ls /mnt (hangs)

also, other programs seem to get stuck.
as mentioned, the framework locks up trying to access a book (the user guide in my case). from running ps outside the chroot, tinyrot also seems to gets stuck, for example.
You are running out of free memory without any swap available.

You do not need a lot, just enough to work around some VFS problems not solved until last week's kernel release.
Half of your RAM (128mb) will do fine.

There are network file systems that will let you put the swap on another machine accessed over whatever networking you have installed.
For casual use, not worth the effort.

Your choices are a swap partition or a swap file, in this case choose a swap file.

Yes, you can run swap on the internal eMMC.
Yes, this will generate eMMC wear that would not otherwise happen.
Yes, this will reduce the amount of time before you have to replace it.
Yes, it is difficult to replace and expensive to hire done. Cheaper to just toss the Kindle when the eMMC wears out.

You will be taking a few years off the devices expected ten year useful life. Where you going to keep this Kindle longer than two or three years anyway?

Got all that? Agreed? All right then:
Use dd to make a 128Mb file of zeros (must be zeros for swap, not a sparse file, swap doesn't do sparse files);
Use mkswap on the filename;
Use swapon <filename> and swapoff <filename> as appropriate.

Enjoy.

Edit: As GM points out, keep the Kindle on the charger whenever your using it this way.

The device type which MMC devices are built on does not do "write", only erase and re-program.
The base device is an EEEProm, it generates its erase and programming voltages internally.
The micro-controller in the MMC device just "fakes" the write command with a "read, merge, erase, re-program" sequence in "erase block" size chunks.
Not only power hungry but a slow process.

On the upside, swap only writes in page size (4096byte) chunks and this eMMC has an erase block size of 4096 bytes. So there should not be any "merge" operation if the file location is erase block aligned. Since you are putting this file on FAT-32, you can (manually) diddle with the file alignment with any decent MSDOS disk editor.

Last edited by knc1; 06-23-2012 at 06:54 AM.
knc1 is offline   Reply With Quote