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 03-07-2016, 02:43 AM   #1
zephray
Junior Member
zephray ought to be getting tired of karma fortunes by now.zephray ought to be getting tired of karma fortunes by now.zephray ought to be getting tired of karma fortunes by now.zephray ought to be getting tired of karma fortunes by now.zephray ought to be getting tired of karma fortunes by now.zephray ought to be getting tired of karma fortunes by now.zephray ought to be getting tired of karma fortunes by now.zephray ought to be getting tired of karma fortunes by now.zephray ought to be getting tired of karma fortunes by now.zephray ought to be getting tired of karma fortunes by now.zephray ought to be getting tired of karma fortunes by now.
 
Posts: 4
Karma: 605754
Join Date: Mar 2016
Location: China
Device: Kindle Paperwhite 2
PW2 eMMC Capicity Upgrade Tutorial!

WARNING: This hack need BGA chip soldering, if you havn't done this before, I do not recommand you to try this on your Kindle! Do ONLY when you know what you are doing.

And sorry for my poor English since I'm not a native speaker.

Before start, you would need these:
  • A new high capicity eMMC compatible with eMMC spec 4.0 (I used SDIN7DP2-8G which is quite similar with original SDIN7DP2-4G)
  • A BGA rework station (hot air gun?)
  • A Kindle Paperwhite 2 Of course
  • A USB to TTL to connect the serial port of KPW2
  • A Windows PC (virtual machine would also work fine)
  • A Linux PC (Raspberry Pi or other ARM-based Linux platform is preferred) (virtual machine would also work fine)

Yes, no programmer needed! You may flash everything with your PC.

Step 1: Back up your old data!
It's always wise to have your data backed up!
(optional)backup your system partition and diags partition following the guide in wiki. These things could be downloaded elsewhere.
Running idme in uboot you would see your pcbsn\serial and things alike, write them down!
(optional)u-boot can be backed up by using dd if=/dev/mmcblk0boot0. I would show how to build a new uboot later

Step 2: Solder new eMMC chip
No detailed process here, do this ONLY if you know how to

Here are the picture of replaced eMMC:

Link to image: http://www.zephray.com/lib/exe/fetch...din7dp2-8g.jpg

Step 3: Prepare U-boot image

Download source package on Amazon site: http://www.amazon.com/gp/help/custom...deId=200203720

Extract u-boot source code, and type following command to build U-Boot (I finished them on Raspberry Pi, so no CROSS_COMPILE is needed)

make imx60_wario_config
TYPE=prod make -j4
mv u-boot.bin u-boot-prod.bin
make distclean
make imx60_wario_bist_config
TYPE=bist make -j4
mv u-boot.bin u-boot-bist.bin
Cuz there is no u-boot in the new eMMC, a u-boot image which would work with MfgTools is needed. Actually u-boot-prod.bin would work, but that doesn't have fastboot, so add these codes to include/configs/imx60_wario.h in order to generate a full function uboot:
/* MMC drivers */
#define CONFIG_MMC
#define CONFIG_GENERIC_MMC
#define CONFIG_MMC_SDIO
#define CONFIG_IMX_MMC
#define CONFIG_SYS_FSL_ESDHC_NUM 3
#define CONFIG_SYS_FSL_ESDHC_DMA 1

/* crc32 Buffer*/
#define CRC32_BUFFER 0x02000000 + PHYS_SDRAM_1
#define CRC32_BUFFER_SIZE 0x00400000
#define CRC32_CHECK_UBOOT 0x00000010 /* check crc32 on u-boot.bin */
#define CRC32_CHECK_UIMAGE 0x00000020 /* check crc32 on uImage */
#define CRC32_CHECK_ROOTFS 0x00000040 /* check crc32 on rootfs.img */
#define CRC32_CHECK_MBR 0x00000080 /* check crc32 on mbr-xxx-bin */

/*
* USB Configs
*/
#define CONFIG_USB_DEVICE 1
/* #define CONFIG_IMX_UDC 1 */
#define CONFIG_DRIVER_FSLUSB 1
#define CONFIG_GADGET_FASTBOOT 1
/* #define CONFIG_GADGET_FILE_STORAGE 1 */
#define USB_BASE_ADDR OTG_BASE_ADDR

#define CONFIG_USBD_MANUFACTURER "Amazon"
#define CONFIG_USBD_PRODUCT_NAME "Kindle"

#define CONFIG_USBD_VENDORID 0x1949
#define CONFIG_USBD_PRODUCTID_FASTBOOT 0xd0e0
#define CONFIG_USBD_PRODUCTID_FILE_STORAGE 0x0003
#define CONFIG_FASTBOOT_MAX_DOWNLOAD_LEN ((get_dram_size()) - (2*1024*1024) - (CONFIG_FASTBOOT_TEMP_BUFFER - CONFIG_SYS_SDRAM_BASE))
#define CONFIG_FASTBOOT_TEMP_BUFFER CONFIG_LOADADDR

/* Standard commands */
#define CONFIG_CMD_BOOTD /* bootd */
#define CONFIG_CMD_CONSOLE /* coninfo */
#define CONFIG_CMD_ECHO /* echo arguments */
#define CONFIG_CMD_IMI /* iminfo */
#define CONFIG_CMD_ITEST /* Integer (and string) test */
#define CONFIG_CMD_LOADB /* loadb */
#define CONFIG_CMD_LOADS /* loads */
#define CONFIG_CMD_MEMORY /* md mm nm mw cp cmp crc base loop mtest */
#define CONFIG_CMD_MISC /* Misc functions like sleep etc*/
#define CONFIG_CMD_RUN /* run command in env variable */
#define CONFIG_CMD_SOURCE /* "source" command support */
#define CONFIG_CMD_ENV
#define CONFIG_CMD_MMC
#define CONFIG_CMD_PANIC
#define CONFIG_XYZMODEM
#define CONFIG_SRECORD
#define CONFIG_LOOPW
#define CONFIG_CMD_HALT
#define CONFIG_CMD_CRC 1
#define CONFIG_CMD_GADGET 1
#define CONFIG_CMD_IDME 1
#define CONFIG_CMD_LPM 1
#define CONFIG_CMD_VNI 1
#define CONFIG_CMD_HAPTIC 1
#define CONFIG_CMD_FSR 1

run "make clean" and "TYPE=prod make -j4" again to build the new u-boot.bin

Step 4: Run U-Boot in RAM

Since the new eMMC is empty, kindle would fail in booting uboot and fallback to USB download mode. A new HID device should appear in Device Manager when you connect USB to Kindle. If not, try to press and hold power key for ~15s to reset, and then wait ~15s for it to fallback.

Open this URL:
http://www.nxp.com/products/microcon...9-core:i.MX6SL
Click "Software&Tools", find "Tool and documentation for downloading OS images to the i.MX 6SoloLite (REV L3.0.35_4.1.0)" and download it. Registering at NXP.com would be needed.

Extract that package and modify Profiles\MX6DL Linux Update\OS Firmware\ucl2.xml, change pid from 0061 to 0063 like this:
<STATE name="BootStrap" dev="MX6D" vid="15A2" pid="0063"/>

Create a new config in ucl2.xml like this:
<LIST name="i.MX6SL-Kindle" desc="Kindle Paperwhite 2">
<CMD state="BootStrap" type="boot" body="BootStrap" file ="u-boot.bin" >Loading U-boot</CMD>
<CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>
</LIST>

Open cfg.ini, modify the "name" in "LIST" to "i.MX6SL-Kindle"

Copy u-boot.bin to Profiles\MX6DL Linux Update\OS Firmware

Run MfgTools.exe, HID device should be detected, Click Run

Now U-Boot log should appear in serial console:
U-Boot 2009.08-lab126 (Feb 29 2016 - 13:03:16)

CPU: Freescale i.MX6 family TO0.0 at 996MHz
Temperature: 35 C, calibration data 0x5a15215f
mx6sl pll1: 996MHz
mx6sl pll2: 528MHz
mx6sl pll3: 480MHz
mx6sl pll8: 50MHz
ipg clock : 66000000Hz
ipg per clock : 66000000Hz
uart clock : 80000000Hz
cspi clock : 60000000Hz
ahb clock : 132000000Hz
axi clock : 198000000Hz
emi_slow clock: 22000000Hz
ddr clock : 396000000Hz
usdhc1 clock : 198000000Hz
usdhc2 clock : 198000000Hz
usdhc3 clock : 198000000Hz
usdhc4 clock : 198000000Hz
MMC: FSL_ESDHC: 0,FSL_ESDHC: 1,FSL_ESDHC: 2
Board: Unknown
Boot Reason: [ POR ]
Boot Device: NAND
Board Id:
S/N:
I2C: ready
Invaild board id! Can't determine system type for RAM init.. bailing!
DRAM: 0 kB
Using default environment
Step 5: Fix environment

Note that Invaild board id, let's fix that.

Remember that pcbsn\serial\mac backed up in Step 1? Set them back with idme command. For example, use "idme mac 1234567890AB" to set MAC address to 12:34:56:78:90:AB. Remeber to clear empty variables too.

Reset your kindle and then boot to U-Boot with MfgTools again, RAM should work fine.
Board: Pinot WFO
...
DRAM: 256MB
Step 6: Flash system back

I assume you know how to use kindle's fastboot. If not, check wiki. Simply you need to install libusb-win32 and a custom driver. But insted of use "bist fastboot", issue "fastboot" to enter fastboot this time.

Use these command to flash DIAGs and main kernel (I assume you downloaded them or have them backed up yourself)
fastboot flash kernel main_kernel.img
fastboot flash diags_kernel diags_kernel.img
fastboot flash diags mmcblk0p2.bin
fastboot flash prod u-boot-prod.bin
fastboot flash bist u-boot-bist.bin
Then reboot to DIAGS:
fastboot setvar bootmode diags
fastboot reboot
Note that you may still need to use MfgTool to load U-Boot before Step 7.

Note that in the following steps, system may encounter some errors, if it stopped working, just reboot your kindle and see if work after reboot. Worst case is just redo the fastboot step.

Boot to diags menu like this:
PINOT-WFO - System Diags
~~~~ 1.12.536.206610 ~~~~
pcbId:XXXXX
~ S ~ Device Setting
P) Touch Sensor Plate Test
O) Operator test suite
E) 511
N) Misc individual diagnostics
Y) nART factory test
U) USB device mode
H) Touch Hold Test
D) Exit, Reboot or Disable Diags
L) Lock diags screen
X) Exit
Press D and enter, then L (Exit to login prompt) and Enter.

Use root/mario to login to shell.

Execute "fdisk -l" to check the parition table.
Disk /dev/mmcblk0: 7818 MB, 7818182656 bytes
4 heads, 16 sectors/track, 238592 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

Device Boot Start End Blocks Id System
/dev/mmcblk0p1 * 1025 12224 358400 83 Linux
/dev/mmcblk0p2 12225 14272 65536 83 Linux
/dev/mmcblk0p3 14273 16320 65536 83 Linux
/dev/mmcblk0p4 16321 238592 7112704 b Win95 FAT32
Execute "mkfs -t ext3 /dev/mmcblk0p1" to format the rootfs partition.

Boot to normal mode and enter recovery menu. Use E to export FAT to USB and copy a normal upgrade .bin file into kindle. Safely unmount and use U to install system update. After this step, your kindle should be able to boot into system.

Step 7: Fix boot
Note: if your kindle could boot without MfgTool now, you do not need to do this step.

Previously kindle won't boot directly from eMMC even when u-boot is flashed via fastboot. It was caused by inproperate "BOOT_BUS_WIDTH" setting. Modify U-Boot code to fix that.

Open drivers/mmc/mmc.c, find the function "mmc_switch_partition", enable code previously disabled with "#if 0 ... #endif", delete "if ((ext_csd[EXT_CSD_CARD_TYPE] & 0xC) && enable_boot != 0)" and following boot_bus_width selecting code (that bunch of if-then-else), leave boot_bus_width=0.

Build U-Boot again and run it with MfgTools, now enter "mmc dev 1"and "mmcinfo", it should says that current boot width is 1-bit SDR.

Reset your kindle, u-boot should run without MfgTools. Enjoy your high capicity(mine is 8GB) Kindle~

-------------

Mine kindle have a broken screen so I can't show off you guys with System Info screen But that is just the reason I would try this "surgery" on Kindle

Feel free to comment if you have any questions.

For more detailed explain & my own full walk through, visit my website: www.zephray.com (in Chinese)

Last edited by zephray; 03-07-2016 at 08:26 AM.
zephray is offline   Reply With Quote
Old 03-07-2016, 06:35 AM   #2
Dr. Drib
Grand Sorcerer
Dr. Drib ought to be getting tired of karma fortunes by now.Dr. Drib ought to be getting tired of karma fortunes by now.Dr. Drib ought to be getting tired of karma fortunes by now.Dr. Drib ought to be getting tired of karma fortunes by now.Dr. Drib ought to be getting tired of karma fortunes by now.Dr. Drib ought to be getting tired of karma fortunes by now.Dr. Drib ought to be getting tired of karma fortunes by now.Dr. Drib ought to be getting tired of karma fortunes by now.Dr. Drib ought to be getting tired of karma fortunes by now.Dr. Drib ought to be getting tired of karma fortunes by now.Dr. Drib ought to be getting tired of karma fortunes by now.
 
Dr. Drib's Avatar
 
Posts: 34,831
Karma: 20733077
Join Date: Jan 2007
Location: San Borja (Lima), Peru
Device: Kindle PW2(WiFi) / FireHD; Kobo-Glo; Ipad Air; Voyage; Boox C67-ML
Moderator Notice

Zephray:
Please take a few moments to read our Posting Guidelines, in particular the part about the maximum image size allowed (600x600 pixels). Images that violate those guidelines will be deleted.

It is every member's responsibility to read our Posting Guidelines and follow them.

Thanks.
Dr. Drib is offline   Reply With Quote
Old 03-07-2016, 08:23 AM   #3
zephray
Junior Member
zephray ought to be getting tired of karma fortunes by now.zephray ought to be getting tired of karma fortunes by now.zephray ought to be getting tired of karma fortunes by now.zephray ought to be getting tired of karma fortunes by now.zephray ought to be getting tired of karma fortunes by now.zephray ought to be getting tired of karma fortunes by now.zephray ought to be getting tired of karma fortunes by now.zephray ought to be getting tired of karma fortunes by now.zephray ought to be getting tired of karma fortunes by now.zephray ought to be getting tired of karma fortunes by now.zephray ought to be getting tired of karma fortunes by now.
 
Posts: 4
Karma: 605754
Join Date: Mar 2016
Location: China
Device: Kindle Paperwhite 2
Quote:
Originally Posted by Dr. Drib View Post

Zephray:
Please take a few moments to read our Posting Guidelines, in particular the part about the maximum image size allowed (600x600 pixels). Images that violate those guidelines will be deleted.

It is every member's responsibility to read our Posting Guidelines and follow them.

Thanks.
I'm extremely sorry about that, I thought that high resolution picutures would be nice to look at but forgot the posting guideline...
zephray is offline   Reply With Quote
Old 03-07-2016, 08:45 AM   #4
knc1
Helpdesk Junkie
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: 10,089
Karma: 9846574
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by zephray View Post
I'm extremely sorry about that, I thought that high resolution picutures would be nice to look at but forgot the posting guideline...
Attach it to the post rather than in-line it.

In the editor box, choose the 'advanced' editor, scroll down past the text entry box to the 'manage attachments' sections.

= = = =

There are two different PW-2 models -
Yours must have been the 4Gbyte model.

I am not sure if the 2Gbyte model used the SDIN7DP2 series of eMMC devices, so a user considering this upgrade for an early PW-2 (2Gbyte) should check the part number of the eMMC device.
It may be a different series of parts (different pin-out (ball-out? ) ).

I do know that the firmware for the old model (2Gbyte) will not recognize the new model (4Gbyte) eMMC. Which suggests that it is a different part series.

- - - - -

For the curious - it is about a $10 part and most major distributors will sell them one at a time.

- - - - -

This thread includes the information on how to get the dram running, which is an open question here in another thread (somebody here needed that information).

- - - - -

There is a fairly recent thread here about recovering an erased Kindle using Fastboot.
That thread started with a working install of u-boot, but once you reach that point in this thread, you can also use the additional info in that other thread.

Notes:
That other thread has a lot of log files attached, so you can see what you should expect.
If that other thread is for a different model, the procedure is still the same.

See:
http://www.mobileread.com/forums/sho...d.php?t=269099

PS:
You don't have to format mmcblk0p1 - the recovery install will do that for you anyway.
You don't have to use 'diags' menu to do the recovery install - you can do that from initramfs (I.E: only u-boot and kernel installed, a 'diags' install is optional).
The recovery install will also re-size mmcblk0p4 to use all the remaining (extra 4Gbyte) of space for you.

Last edited by knc1; 03-07-2016 at 09:24 AM.
knc1 is online now   Reply With Quote
Old 03-07-2016, 09:21 AM   #5
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 42,344
Karma: 123768403
Join Date: Jul 2007
Location: Norfolk, England
Device: nook GlowLight
Wow. That's some serious hacking. I think I'll just live with 4GB storage.
pdurrant is offline   Reply With Quote
Old 03-07-2016, 09:26 AM   #6
knc1
Helpdesk Junkie
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: 10,089
Karma: 9846574
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by pdurrant View Post
Wow. That's some serious hacking. I think I'll just live with 4GB storage.
Only the write-up is new and original.

IIRC - the K5 can accept up to a 16Gbyte eMMC (different manufacturer part series on the K5).
Just that no one ever wrote it up for us.
knc1 is online now   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
Which one are you ordering: PW2 wifi or PW2 3G jocampo Amazon Kindle 37 08-18-2014 10:48 AM
eMMC storage mgmueller General Discussions 5 02-27-2013 09:27 AM
Why can’t I complete the Kobo Touch firmware upgrade or Desktop upgrade? DarrellAtKobo Kobo Reader 31 08-31-2012 10:45 PM
Color Nook Color - Process to move from CM7.0.3 on SD to CM7.1 in emmc? scarab1 Nook Developer's Corner 4 11-02-2011 01:32 PM
iLiad First HelloWorld tutorial, a n00b primer First Hello World Tutorial, a n00b primer mind iRex Developer's Corner 13 09-19-2008 09:43 AM


All times are GMT -4. The time now is 05:01 AM.


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