07-25-2022, 04:10 PM | #1 |
Junior Member
Posts: 7
Karma: 10052
Join Date: Jul 2022
Location: Prague
Device: PW4,5
|
PW2 flashing system after eMMC replacement
Hi,
I've got a non-functional kindle PW2 (sn. prefix 9017). After investigating logs on UART, I've concluded that the original eMMC is non-functional. (IO errors) I was able to obtain SN and PCBSN. (however due to my stupidity I did not backup MAC addresses) So I bought a new eMMC, which I replaced. eMMC seems to be working, as I was able to set back the SN and the PCBSN. I based my approach on this thread. I successfully compiled u-boot with the fastboot support and production version without fastboot. Then I successfully booted them via MfgTool and verified their functionality. In order to prevent problems, I opted to flash the bootloader only after I'll be able to boot into the main system as I don't want to have bootloader without fastboot in device eMMC (I had to patch the source in order to compile it properly, due the references to non-existent functions) In this thread I found information that the Amazon update package includes the MMC images, but when I tried to unpack the update file update_kindle_paperwhite_v2_5.8.7.0.1.bin with kindletool I've got only the u-boot binary and rootfs.img image. I tried to dig here at the forum, but most of the published links are outdated and nonfunctional. For example here and here. I would like to ask if someone is able to provide me with the correct images for flashing all system partitions via fastboot or point me on how to extract them from available sources as I couldn't find any relevant sources here or anywhere else. --- Sorry if the post is a bit inconsistent, it's been a long day and I did not make any progress to the successful boot. Thanks in advance. |
07-26-2022, 07:28 AM | #2 |
Groupie
Posts: 199
Karma: 123456
Join Date: Jan 2018
Device: Too Much Kindle :-)
|
Everything you need you have in the update file. After unzipping in the imx60_wario directory you have u-boot.bin - that's the bootloader and uImage - that's the kernel. Using fastboot flash the kernel and boot the reader normally. Then using the tools built into the kernel, initialize the partitions, share the FAT partition over USB, record the update file there and run the update from the options.
You will be missing the diag partition, but it is not really needed for the reader to work. If you had the reader registered to your account then Amazon employees should give you the correct MAC address. |
Advert | |
|
07-26-2022, 10:29 AM | #3 |
Junior Member
Posts: 7
Karma: 10052
Join Date: Jul 2022
Location: Prague
Device: PW4,5
|
Thanks for pointing me in the right direction. Because I was tired, I missed that there is uImage.
After trying to boot it, it started just fine and I was able to initialize the eMMC and boot system, so now I have PW2 with 32GB of internal storage! Just one last thing, where can I obtain diags partition and kernel. I would like to have my kindle full-featured. |
07-26-2022, 11:45 AM | #4 |
Groupie
Posts: 199
Karma: 123456
Join Date: Jan 2018
Device: Too Much Kindle :-)
|
Check those from the attachment.
|
07-26-2022, 12:41 PM | #5 |
Junior Member
Posts: 7
Karma: 10052
Join Date: Jul 2022
Location: Prague
Device: PW4,5
|
Thank you for providing the archives.
However, it will need more digging around because there is a potential problem with diags kernel version. I would like to know, what is variable "sec" in u-boot idme command. I set it to zero, but I cannot find what it's related to. Code:
[ 2.035511] mmc0: unrecognised EXT_CSD revision 8 [ 2.040281] mmc0: error -22 whilst initialising MMC card [ 2.050390] Freeing init memory: 1036K 3.0.35-lab126 #1 Tue Sep 3 03:12:16 PDT 2013 armv7l [ 2.258350] emmc: I def:mmcpartinfo:vendor=unknown, host=mmc0, manufacturer_id=0x13: [ 2.296709] mmc0: unrecognised EXT_CSD revision 8 [ 2.301440] mmc0: error -22 whilst initialising MMC card [ 2.399185] add wake up source irq 104 [ 2.530019] emmc: I def:mmcpartinfo:vendor=unknown, host=mmc0, manufacturer_id=0x13: [ 2.559302] KERNEL: I pmic:fg battery init::mg config init successful [ 2.566926] max77696-battery max77696-battery.0: Voltage alert 3400mV ... 4260mV [ 2.575359] max77696-battery max77696-battery.0: SOC alert (disabled) [ 2.591427] mmc0: unrecognised EXT_CSD revision 8 [ 2.596156] mmc0: error -22 whilst initialising MMC card [ 3.507313] KERNEL: I pmic:fg battery id check::wario_battery_valid=1 |
Advert | |
|
07-26-2022, 12:55 PM | #6 |
Groupie
Posts: 199
Karma: 123456
Join Date: Jan 2018
Device: Too Much Kindle :-)
|
It's just that the memory you used is too "new" for this kernel to recognize. Unfortunately, Amazon has not upgraded the diagnostic kernel.
As for the "sec" number, unfortunately, this is a great secret of Amazon. I tried once after replacing the memory to recover this number from them but apparently they do not have it in any database. It looks like it must be somehow related to the rest of the serial numbers. In any case, without it, you will no longer register this reader. The only option is to solder back the old Flash memory and make a backup of all numbers. |
08-03-2022, 08:34 AM | #7 |
Junior Member
Posts: 7
Karma: 10
Join Date: Aug 2022
Device: Kindle Paperwhite 2
|
I'm in a similar situation with my Paperwhite 2. All of a sudden (since a lot of months, tbh, but it makes no difference) the device is being recognized as "SE Blank MEGREZ" and I've been trying to reflash the bootloader and all the stuff.
I managed to compile u-boot but now when I try to load it with MfgTool I am missing some of the expected serial output, such as the board name and the ram size: Code:
U-Boot 2009.08-lab126 (Aug 03 2022 - 12:50:24) CPU: Freescale i.MX6 family TO0.0 at 996 MHz Temperature: 45 C, calibration data 0x5734fe5f 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 I downloaded the Kindle_src_5.6.2.1_2634390002 source package (more recent ones are missing the boardinfo.h, and I found this to be complete, maybe there are more recent ones that are also complete). I compiled the bundled linaro toolchain. I patched include/configs/imx60_wario.h as explained here, then I did the following: Code:
make CROSS_COMPILE=arm-linux-gnueabi- imx60_wario_config TYPE=prod make CROSS_COMPILE=arm-linux-gnueabi- -j4 cp u-boot.in ../u-boot-prod.bin make clean make CROSS_COMPILE=arm-linux-gnueabi- imx60_wario_bist_config TYPE=bist make CROSS_COMPILE=arm-linux-gnueabi- -j4 cp u-boot.in ../u-boot-bist.bin The MfgTool itself reports a failure and here's the log, but still I get the (partial) information on the serial port. Code:
DLL version: 2.2.3 Wednesday, August 03, 2022 14:28:39 Start new logging ModuleID[2] LevelID[10]: CMyExceptionHandler thread is running ModuleID[2] LevelID[1]: new MxHidDeviceClass ModuleID[2] LevelID[10]: new MxHidDevice[03AED888] ModuleID[2] LevelID[10]: Device Manager thread is running ModuleID[2] LevelID[10]: CmdOperation[0] device chagned and reset to state 0 ModuleID[2] LevelID[10]: ExecuteCommand--Boot[WndIndex:0], File is C:\<hidden for privacy>\Mfgtools-Rel-4.1.0_130816_MX6SL_UPDATER\Profiles\MX6SL Linux Update\OS Firmware\u-boot.bin ModuleID[2] LevelID[10]: *********MxHidDevice[03AED888] Jump to Ramkernel successfully!********** ModuleID[2] LevelID[1]: PortMgrDlg(0)--MxHidDevice--Command Boot excute failed ModuleID[2] LevelID[10]: CmdOperation[0], current command executed failed, so SetEvent(hDevCanDeleteEvent) Code:
DLL version: 2.2.3 Wednesday, August 03, 2022 14:33:26 Start new logging ModuleID[2] LevelID[10]: CMyExceptionHandler thread is running ModuleID[2] LevelID[1]: new MxHidDeviceClass ModuleID[2] LevelID[10]: new MxHidDevice[0413D888] ModuleID[2] LevelID[10]: Device Manager thread is running ModuleID[2] LevelID[10]: CmdOperation[0] device chagned and reset to state 0 ModuleID[2] LevelID[10]: ExecuteCommand--Boot[WndIndex:0], File is C:\<hidden for privacy>\Mfgtools-Rel-4.1.0_130816_MX6SL_UPDATER\Profiles\MX6SL Linux Update\OS Firmware\u-boot.bin ModuleID[2] LevelID[1]: MxHidDevice::Write() Error writing to device 0x3e3. ModuleID[2] LevelID[1]: RunPlugIn(): TransData(0x9804A0, 0x1A1DC,0x4147FC0) failed. ModuleID[2] LevelID[1]: PortMgrDlg(0)--MxHidDevice--Command Boot excute failed ModuleID[2] LevelID[10]: CmdOperation[0], current command executed failed, so SetEvent(hDevCanDeleteEvent) |
08-03-2022, 01:15 PM | #8 |
Junior Member
Posts: 7
Karma: 10
Join Date: Aug 2022
Device: Kindle Paperwhite 2
|
I think I've found the problem.
The interrupt-checking loop inside drivers/mmc/imx_edshc.c, at line 380, never terminates. Seems like the interrupt never gets raised. Code:
while (!(tmp = (readl(®s->irqstat) & IRQSTAT_TC)) ); Code:
esdhc_send_cmd mmc_read idme_check_update setup_board_info ... Aside from this, I don't understand why the stock pre-built u-boot.bin is not printing anything at all. |
08-04-2022, 02:08 AM | #9 | |
Groupie
Posts: 199
Karma: 123456
Join Date: Jan 2018
Device: Too Much Kindle :-)
|
Quote:
|
|
08-04-2022, 05:38 AM | #10 | |
Junior Member
Posts: 7
Karma: 10
Join Date: Aug 2022
Device: Kindle Paperwhite 2
|
Quote:
It goes past the log I posted but it reports an mmc failure. Maybe newer versions have included a timeout to detect it, but I've not checked the source code to actually confirm it. It's funny to see how it broke even though the device has been barely used at all. Code:
esdhc_send_cmd: data2 ransfer fail status=0x100000 mmc read failed Error! Couldn't read NV variables. (-1) |
|
08-04-2022, 04:08 PM | #11 |
Groupie
Posts: 199
Karma: 123456
Join Date: Jan 2018
Device: Too Much Kindle :-)
|
Unfortunately, you have lost all the identification numbers of your device. It will never be 100% operational, i.e. you will not register it in your Amazon account again.
You can try to freeze the Flash memory chip - sometimes it is enough to make it work for a while. Last edited by eddie.t.h; 08-04-2022 at 04:11 PM. |
08-04-2022, 05:32 PM | #12 | |
Junior Member
Posts: 7
Karma: 10
Join Date: Aug 2022
Device: Kindle Paperwhite 2
|
Quote:
|
|
08-05-2022, 03:20 AM | #13 |
Groupie
Posts: 199
Karma: 123456
Join Date: Jan 2018
Device: Too Much Kindle :-)
|
Serial number, mac address of the WiFi card, pcb serial number - these three can be recovered without a problem, unfortunately there is still such a thing as a second serial number (SEC), which is somehow mysteriously calculated from the remaining numbers (I suppose). Without it, the reader will not pass verification on Amazon servers.
|
08-05-2022, 05:39 AM | #14 |
Junior Member
Posts: 7
Karma: 10
Join Date: Aug 2022
Device: Kindle Paperwhite 2
|
So you're saying that who performed an emmc upgrade didn't get a fully operational Kindle? Where is the SEC stored?
|
08-05-2022, 06:42 AM | #15 |
Groupie
Posts: 199
Karma: 123456
Join Date: Jan 2018
Device: Too Much Kindle :-)
|
If you have an working orginal memory (at least a working u-boot) , you can read off all the numbers. They are stored in a protected Flash Memory Area (RPMB). Numbers can be read and written to uboot using the idme command.
Last edited by eddie.t.h; 08-05-2022 at 06:46 AM. |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PW2 eMMC Capicity Upgrade Tutorial! | zephray | Kindle Developer's Corner | 29 | 08-14-2023 06:52 PM |
PW2 Unbricking PW2 - erased eMMC | mecnal | Kindle Developer's Corner | 2 | 12-15-2019 07:39 PM |
Jbed pw2 trashes file system of it crashes | barkas | Kindle Developer's Corner | 17 | 01-06-2015 04:10 PM |
I pulled a goof and broke my Kindle. Replacement: can someone help downgrade PW2 | drakebelisarius | Kindle Developer's Corner | 1 | 02-23-2014 07:36 PM |
need replacement for PW2 | peaceridge | Which one should I buy? | 45 | 12-10-2013 09:42 AM |