06-28-2024, 04:11 PM | #1 |
Junior Member
Posts: 2
Karma: 10
Join Date: Jun 2024
Device: Kobo Libra H20
|
How to boot uboot via mfgtools/uuu?
Hello, I attempted to install postmarketos on my Libra 2 H2O, and some mount issues during flashing ended up wiping the emmc, or at any rate corrupting the partition table. As described on the pmos wiki, it now shows up as
Code:
hiddev96,hidraw2: USB HID v1.10 Device [ NXP SemiConductor Inc SE Blank 6SLL] on usb-0000:00:14.0-3/input0 According to the wiki, it should be possible to get back into uboot from this mode. Before attempting the pmos install, I mounted the emmc over usb as described in the wiki and did a dd image dump, though I haven't found any way to make use of it yet. My first instinct was to try to flash the full emmc image using uuu, but that doesn't seem possible. I'm now rather of ideas and any pointers in the right direction would be much appreciated. Should I be trying to build uboot, package it into a uuu compatible image, and flash that? There's 25MB of free space before the first partition in the dd image, which I'm guessing is where uboot lives, is that correct? Should I be trying to convert that to something usable by uuu? Or something else? Thanks! |
06-30-2024, 08:24 PM | #2 |
cosiñeiro
Posts: 1,304
Karma: 2200073
Join Date: Apr 2014
Device: BQ Cervantes 4
|
Hi. Not familiar with uuu but quite familiar with low level things on kobos a few years ago. Hope these things are still relevant.
Based on the pmos wiki you linked it seems that uboot environment is at offset 768, so it is safe to assume that uboot goes first, from 0 up to 768. I would try to boot that uboot from the backup you already have, just make a copy with the first chunks: Code:
dd if=backup.img of=uboot.img bs=128k count=6 Code:
uuu -b spl uboot.img You don't need to care about u-boot enviroment at this point, it will use the one that's compiled in case it fails to load it from disk. |
06-30-2024, 08:52 PM | #3 |
cosiñeiro
Posts: 1,304
Karma: 2200073
Join Date: Apr 2014
Device: BQ Cervantes 4
|
Or
Code:
dd if=backup.img of=uboot.img bs=128k count=4 |
07-06-2024, 06:32 AM | #4 |
Junior Member
Posts: 2
Karma: 10
Join Date: Jun 2024
Device: Kobo Libra H20
|
Thanks pazos, nice to know I'm on the right track. I tried booting the first chunks as you suggested. uuu seems to hang with "Success 0 Failure 0".
After replugging the kobo, it appears in dmesg with Code:
[[129961.122394] usb 1-1: new high-speed USB device number 48 using xhci_hcd [129966.531420] usb 1-1: device descriptor read/64, error -110 [129982.403312] usb 1-1: device descriptor read/64, error -110 [129982.512361] usb usb1-port1: attempt power cycle [129982.899300] usb 1-1: new high-speed USB device number 49 using xhci_hcd [129987.922329] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command [129993.552290] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command [129993.760309] usb 1-1: device not accepting address 49, error -62 To get the kobo back into uuu mode I can just unplug it, hold the power for a few seconds and plug it back in. Is there more debugging I could try from here, would a uart connection make this easier? |
Yesterday, 04:58 PM | #5 |
cosiñeiro
Posts: 1,304
Karma: 2200073
Join Date: Apr 2014
Device: BQ Cervantes 4
|
Hi, sorry about the delay
Yes, uart is mandatory to see if it works, as the uboot binary you're trying to restore outputs to the serial port. Otherwise you'll need to build an uboot that outputs to the usb serial loader. In any case we're trying to restore the second stage loader here. Once uboot is restored on the emmc it should be possible to restore your full backup using the same steps you did to create it. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
KT3 wiped mmc, only uboot | csakakirc | Kindle Developer's Corner | 15 | 08-21-2023 02:06 PM |
uboot ignores input | cwalls | Kindle Developer's Corner | 5 | 01-15-2022 11:36 PM |
PW Source for PaperWhite uboot? | hjalfi | Kindle Developer's Corner | 11 | 03-17-2021 07:36 PM |
Uboot needed for pw2 | Merlin09 | Kindle Developer's Corner | 67 | 03-13-2020 08:31 PM |