02-27-2013, 05:38 PM | #1 |
Member
Posts: 19
Karma: 36674
Join Date: Jan 2013
Device: Kindle Paperwhite
|
Compiling U-Boot Problem
In an attempt to fix my completely wiped (serial, board ID and all) Paperwhite, I am trying to modify amazon's u-boot source to have the RAM initialisation hardcoded.
However, I am running into issues. While I can get u-boot to compile easily, whenever I try to actually load the u-boot.bin file, I get errors. With mfgtool, I get a "The handle is invalid., Error code:6"" error. When I try to use imx_usb_loader, it tells me: Spoiler:
Other, pre-compiled u-boots work perfectly. I assume I have made some sort of silly error that has caused a load address to be omitted in the header of the file. Could anyone point me in the right direction? |
02-28-2013, 06:24 AM | #2 |
Linux devotee
Posts: 598
Karma: 2069047
Join Date: Feb 2011
Device: Kindle 3, Kindle 4B, Kindle PW2
|
Do I understand it right that you are trying to add magic-key-less USB downloader mode support to u-boot ?
That would be a nice addition to the rescue pack... I think you would increase the chance to get an advice by posting a diff between working and non-working code. Complete source code would be even more helpful. |
Advert | |
|
02-28-2013, 06:24 PM | #3 |
Member
Posts: 19
Karma: 36674
Join Date: Jan 2013
Device: Kindle Paperwhite
|
Not quite. When the kindle boots, it uses the board ID to work out what model it is and as such initialise the RAM in the appropriate manner for that board. When one totally wipes a kindle, it removes that information which prevents it from booting.
I want to bypass the detection routine and so remove the need for the board ID. That being said, the modification you suggested is something I would gladly work on once I get my kindle running again! However, my issue is that I can't get any u-boot.bin file that I have compiled on my system to boot, even one that was produced from amazon's unmodified source code. I have tried on multiple machines on multiple os'es, so I assume I am missing something here. |
02-28-2013, 06:37 PM | #4 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
|
|
02-28-2013, 06:55 PM | #5 |
but forgot what it's like
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
|
Advert | |
|
02-28-2013, 07:41 PM | #6 |
Member
Posts: 19
Karma: 36674
Join Date: Jan 2013
Device: Kindle Paperwhite
|
I've tried charging the battery for 24 hours - I don't think this is a battery issue. Bear in mind that u-boots that I have not compiled work perfectly.
EDIT: Just worked out that his u-boot is the one that auto-enters fastboot. Yeah, I have tried that. Bizarrely, no computer I have tried it with recognises a fastboot device or in fact any device at all when I use that. I can't seem to find eureka's u-boot. Mind pointing me in the right direction? Also, while his u-boot might enable me to fix my kindle, I would still love to know if you have any ideas with regards to what on earth is wrong with my build environment! Last edited by lporter; 02-28-2013 at 07:43 PM. |
02-28-2013, 07:51 PM | #7 | ||
but forgot what it's like
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
Quote:
Quote:
|
||
02-28-2013, 10:06 PM | #8 |
but forgot what it's like
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
Are you using this recipe to build U-Boot?
|
03-01-2013, 10:50 AM | #9 |
Wizard
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
|
lporter: The original message in the <spoiler> part suggests that your binary is in a format that imx_usb_loader doesn't understand correctly. At least it looks as if it is an imx_usb_loader error, not an error reported by the unit.
I'm still scratching my head - probably I missed important bits of communication here in the board: How do you (or anyone else) bring a KPW into USB downloader mode? Or does that happen automatically because the flash/MMC is fully erased? It seems to be in USB downloader mode, the return codes reported by imx_usb_loader indicate this. |
03-01-2013, 01:15 PM | #10 |
Member
Posts: 19
Karma: 36674
Join Date: Jan 2013
Device: Kindle Paperwhite
|
Okay, so I got the compiler to work by including
Code:
TYPE=prod With a working u-boot, I made up a fake pcbsn so that the device would boot properly and set the idme variable accordingly. Bizarrely, loading a stock u-boot.bin to my paperwhite then allowed me to use eureka's fastboot u-boot. I then tried to reflash the diags partition using the command: Code:
>fastboot flash diags pw_5.2.0-mmcblk0p2.img Code:
ERROR : [fsl_arc_udc.c] udc_irq:1127: Packet sys err Any idea what's going on here? |
03-01-2013, 01:36 PM | #11 |
but forgot what it's like
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
If you have serial access and proper booting with stock U-Boot pre-flashed on device, then you can use fastboot mode included in pre-flashed U-Boot: don't use custom U-Boots, just reboot PW and execute bist fastboot in U-Boot console.
|
03-01-2013, 01:37 PM | #12 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
For compiling tips, check out some of the early links in the simple debricking sticky thread (with links to posts from yifanlu and eureka, I think) that suggests what flags to set when compiling u-boot. EDIT: Ahh... Nevermind! I see after reading more posts in this thread that eureka already provided a link to such information. Sorry! |
|
03-01-2013, 02:00 PM | #13 |
Member
Posts: 19
Karma: 36674
Join Date: Jan 2013
Device: Kindle Paperwhite
|
Sorry, I wasn't clear. Nothing at all is flashed on to my device. Whenever I upload the stock u-boot to my kindle with mfgtool, it works, but crashes when I use anything bist-related for some reason.
|
03-01-2013, 02:14 PM | #14 |
but forgot what it's like
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
Well, now I'm curious not only about how you've got to USB downloader mode on PW (as was pointed by hawhill), but also about how exactly did you wipe your device, so that pre-flashed U-Boot had been wiped too.
|
03-01-2013, 02:31 PM | #15 |
(offline)
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
...which still leaves the question that hawhill posted, and which I'm also very much interested in: how did you manage to get your Paperwhite into USB downloader mode in the first place? Did you find the holy grail that we have all desperately been looking for?
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to show kernel boot information instead Amazon boot picture? | madtrapper | Kindle Developer's Corner | 8 | 01-04-2013 08:51 AM |
Smartq v5 boot problem | exscentric | Android Devices | 0 | 08-09-2012 06:11 PM |
Compiling for Lubuntu (regarding compiling instructions) | jgratero | Sigil | 5 | 07-15-2012 07:54 PM |
Problem compiling booxsdk | rfog | Onyx Boox | 1 | 07-07-2012 05:36 AM |
Connection problem on dual boot Nook Color | pops1959 | Barnes & Noble NOOK | 0 | 02-03-2012 05:27 PM |