Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dts: msm8916: heatqlte: Failure to boot from SD card #361

Closed
celele64 opened this issue Jun 11, 2024 · 1 comment
Closed

dts: msm8916: heatqlte: Failure to boot from SD card #361

celele64 opened this issue Jun 11, 2024 · 1 comment

Comments

@celele64
Copy link

I've been unable to boot a pmbootstrap install --disk -installed system off a SD card in my Samsung Galaxy Ace 4 (heatqlte), neither with an older version of lk2nd (git 64d3c6c, first one I've used) where having a card inserted at boot just completely hung the device, nor current lk2nd (git ff96cb9) where boot from SD gets skipped after some errors and continues booting from internal storage

Here's the UART log from such a failed SD boot:

[390] muic-reset: Successful, earlier UART log might be lost!
[410] MDP continuous splash detected: pipe RGB_0, base: 0x83200000, stride: 1440, src: 480x800 (0,0), img: 480x800, out: 480x800 (0,0), format: 0x2243f (bpp: 3)
[420] Display refresh: cmd mode: 0, auto refresh: 0 (sel: 0x1f20)
[430] Registering wrapper bio devices...
[440] Registering mmc_sdhci bio devices...
[450] Error: Command timeout error
[450] Failure getting OCR response from MMC Card
[450] MMC card failed to respond, try for SD card
[520] SD card: 00000 (1.0, 10 2010), manufacturer: 1b, OEM: 534d, capacity: 2002780160 bytes
[520] Done initialization of the card
[530] block devices:
[530]  | dev        | label           | size       | Leaf |
[530]  | mmc2p1     |                 |   1781 MiB | Yes  |
[540]  | mmc2p0     |                 |    128 MiB | Yes  |
[540]  | mmc2       |                 |   1910 MiB |      |
[550]  | wrp0p27    | lk2nd           |    512 KiB | Yes  |
[550]  | wrp0p26p1  |                 |   4919 MiB | Yes  |
[560]  | wrp0p26p0  |                 |    243 MiB | Yes  |
[560]  | wrp0p26    | userdata        |   5163 MiB |      |
[570]  | wrp0p25    | hidden          |    100 MiB | Yes  |
[580]  | wrp0p24    | cache           |    500 MiB | Yes  |
[580]  | wrp0p23    | system          |   1500 MiB | Yes  |
[590]  | wrp0p22    | persdata        |      9 MiB | Yes  |
[590]  | wrp0p21    | persist         |      8 MiB | Yes  |
[600]  | wrp0p20    | ssd             |      8 KiB | Yes  |
[600]  | wrp0p19    | fsc             |      3 MiB | Yes  |
[610]  | wrp0p18    | backup          |      6 MiB | Yes  |
[610]  | wrp0p17    | fota            |     12 MiB | Yes  |
[620]  | wrp0p16    | recovery        |     15 MiB | Yes  |
[620]  | wrp0p15    | boot            |     12 MiB | Yes  |
[630]  | wrp0p14    | modemst2        |      3 MiB | Yes  |
[630]  | wrp0p13    | modemst1        |      3 MiB | Yes  |
[640]  | wrp0p12    | efs             |     14 MiB | Yes  |
[640]  | wrp0p11    | param           |     10 MiB | Yes  |
[650]  | wrp0p10    | pad             |     10 MiB | Yes  |
[650]  | wrp0p9     | sec             |     16 KiB | Yes  |
[660]  | wrp0p8     | fsg             |      3 MiB | Yes  |
[670]  | wrp0p7     | qhee            |    512 KiB | Yes  |
[670]  | wrp0p6     | qsee            |    512 KiB | Yes  |
[680]  | wrp0p5     | rpm             |    512 KiB | Yes  |
[680]  | wrp0p4     | aboot           |      2 MiB | Yes  |
[690]  | wrp0p3     | ddr             |     32 KiB | Yes  |
[690]  | wrp0p2     | sbl1            |    512 KiB | Yes  |
[700]  | wrp0p1     | modem           |     57 MiB | Yes  |
[700]  | wrp0p0     | apnhlos         |     15 MiB | Yes  |
[710]  | wrp0       |                 |   7456 MiB |      |
[710] boot: Trying to boot from the file system...
[25720] Error: Transfer never completed
[25730] Error: CMD or DAT lines were never freed
[25730] Failed to send stop command
[25750] Error: CMD or DAT lines were never freed
[25760] Error: CMD or DAT lines were never freed
[25760] Failed to send stop command
[25850] Updating device tree: start
[26000] Custom CPU enable-method detected, skipping SMP spin table
[26010] Updating device tree: done
[26020] booting linux @ 0x80008000, ramdisk @ 0x82200000 (3135148), tags/device tree @ 0x82000000

Interestingly the MBR appears to be read fine as the partition layout is detected correctly however trouble begins when doing further reads

For comparison here's a successful boot without SD card:

[390] muic-reset: Successful, earlier UART log might be lost!
[400] MDP continuous splash detected: pipe RGB_0, base: 0x83200000, stride: 1440, src: 480x800 (0,0), img: 480x800, out: 480x800 (0,0), format: 0x2243f (bpp: 3)
[420] Display refresh: cmd mode: 0, auto refresh: 0 (sel: 0x1f20)
[420] Registering wrapper bio devices...
[430] Registering mmc_sdhci bio devices...
[440] Error: Command timeout error
[440] Failure getting OCR response from MMC Card
[440] MMC card failed to respond, try for SD card
[450] Error: Command timeout error
[450] The response for CMD8 does not match the supplied value
[450] Failed to initialize SD card
[460] Failed detecting MMC/SDC @ slot2
[460] SD card MMC is unavailable.
[460] block devices:
[470]  | dev        | label           | size       | Leaf |
[470]  | wrp0p27    | lk2nd           |    512 KiB | Yes  |
[480]  | wrp0p26p1  |                 |   4919 MiB | Yes  |
[480]  | wrp0p26p0  |                 |    243 MiB | Yes  |
[490]  | wrp0p26    | userdata        |   5163 MiB |      |
[490]  | wrp0p25    | hidden          |    100 MiB | Yes  |
[500]  | wrp0p24    | cache           |    500 MiB | Yes  |
[500]  | wrp0p23    | system          |   1500 MiB | Yes  |
[510]  | wrp0p22    | persdata        |      9 MiB | Yes  |
[510]  | wrp0p21    | persist         |      8 MiB | Yes  |
[520]  | wrp0p20    | ssd             |      8 KiB | Yes  |
[520]  | wrp0p19    | fsc             |      3 MiB | Yes  |
[530]  | wrp0p18    | backup          |      6 MiB | Yes  |
[540]  | wrp0p17    | fota            |     12 MiB | Yes  |
[540]  | wrp0p16    | recovery        |     15 MiB | Yes  |
[550]  | wrp0p15    | boot            |     12 MiB | Yes  |
[550]  | wrp0p14    | modemst2        |      3 MiB | Yes  |
[560]  | wrp0p13    | modemst1        |      3 MiB | Yes  |
[560]  | wrp0p12    | efs             |     14 MiB | Yes  |
[570]  | wrp0p11    | param           |     10 MiB | Yes  |
[570]  | wrp0p10    | pad             |     10 MiB | Yes  |
[580]  | wrp0p9     | sec             |     16 KiB | Yes  |
[580]  | wrp0p8     | fsg             |      3 MiB | Yes  |
[590]  | wrp0p7     | qhee            |    512 KiB | Yes  |
[590]  | wrp0p6     | qsee            |    512 KiB | Yes  |
[600]  | wrp0p5     | rpm             |    512 KiB | Yes  |
[600]  | wrp0p4     | aboot           |      2 MiB | Yes  |
[610]  | wrp0p3     | ddr             |     32 KiB | Yes  |
[610]  | wrp0p2     | sbl1            |    512 KiB | Yes  |
[620]  | wrp0p1     | modem           |     57 MiB | Yes  |
[630]  | wrp0p0     | apnhlos         |     15 MiB | Yes  |
[630]  | wrp0       |                 |   7456 MiB |      |
[640] boot: Trying to boot from the file system...
[720] Updating device tree: start
[870] Custom CPU enable-method detected, skipping SMP spin table
[890] Updating device tree: done
[890] booting linux @ 0x80008000, ramdisk @ 0x82200000 (3135148), tags/device tree @ 0x82000000

Once Linux is booted reading/writing the SD card works fine, even if mounted as rootfs during the initramfs phase

P.S.: here's some eye-candy as a treat:
neatqlte

@celele64
Copy link
Author

I have tested with a different and newer card and lk2nd worked correctly with it

I'm closing this issue for now, however feel free to re-open it if work on quirky/slow cards is of interest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant