msm8916-mainline / lk2nd

Custom bootloader for Qualcomm MSM8916/MSM8226/MSM8974/... devices
Other
393 stars 335 forks source link

I'm unable to boot into ROM #333

Closed ElectroBoy404NotFound closed 8 months ago

ElectroBoy404NotFound commented 8 months ago

I'm unable to boot into rom and this is the UART log:

Format: Log Type - Time(microsec) - Message - Optional Info
Log Type: B - Since Boot(Power On Reset),  D - Delta,  S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.BF.3.0.C4.4-00007
S - IMAGE_VARIANT_STRING=HAAAANAZA
S - OEM_IMAGE_VERSION_STRING=wingtech-desktop
S - Boot Config, 0x000002e1
S - Core 0 Frequency, 0 MHz
B -      1548 - PBL, Start
B -      3496 - bootable_media_detect_entry, Start
B -     83367 - bootable_media_detect_success, Start
B -     83371 - elf_loader_entry, Start
B -     84763 - auth_hash_seg_entry, Start
B -     84975 - auth_hash_seg_exit, Start
B -     99225 - elf_segs_hash_verify_entry, Start
B -    158259 - PBL, End
B -    164578 - SBL1, Start
B -    228567 - pm_device_init, Start
D -     14792 - pm_device_init, Delta
B -    243878 - boot_flash_init, Start
D -        30 - boot_flash_init, Delta
B -    247873 - boot_config_data_table_init, Start
D -     13999 - boot_config_data_table_init, Delta - (0 Bytes)
B -    266448 - CDT version:3,Platform ID:11,Major ID:1,Minor ID:1,Subtype:7
B -    272639 - sbl1_ddr_set_params, Start
B -    276360 - cpr_init, Start
D -         0 - cpr_init, Delta
B -    281972 - Pre_DDR_clock_init, Start
D -       213 - Pre_DDR_clock_init, Delta
D -         0 - sbl1_ddr_set_params, Delta
B -    294538 - pm_driver_init, Start
D -      3660 - pm_driver_init, Delta
B -    307836 - clock_init, Start
D -        30 - clock_init, Delta
B -    307928 - Image Load, Start
D -     23302 - QSEE Image Loaded, Delta - (460616 Bytes)
B -    331260 - Image Load, Start
D -       396 - SEC Image Loaded, Delta - (2048 Bytes)
B -    338458 - sbl1_efs_handle_cookies, Start
D -       335 - sbl1_efs_handle_cookies, Delta
B -    346236 - Image Load, Start
D -     11529 - QHEE Image Loaded, Delta - (51952 Bytes)
B -    357795 - Image Load, Start
D -     12566 - RPM Image Loaded, Delta - (145640 Bytes)
B -    370392 - Image Load, Start
D -     18208 - APPSBL Image Loaded, Delta - (448040 Bytes)
B -    388631 - QSEE Execution, Start
D -        61 - QSEE Execution, Delta
B -    394304 - SBL1, End
D -    232105 - SBL1, Delta
S - Flash Throughput, 121000 KB/s  (1108296 Bytes,  9150 us)
S - DDR Frequency, 400 MHz
Android Bootloader - UART_DM Initialized!!!
[50] pon_reason = 17.
[50] Not able to search the panel:
[50] ===>runin ILI9881_QIMEI_720P_VIDEO_PANEL[300] dsi panel init error
[400] Not able to search the panel:
[400] ===>runin ILI9881_720P_VIDEO_PANEL[450] QUP: I2C status flags :0xc1343c8 
[660] dsi panel init error
[750] Not able to search the panel:
[750] ===>runin HX8394D_720P_VIDEO_PANEL[750] QUP: I2C status flags :0xc1343c8 
Android Bootloader - UART_DM Initialized!!!
[0] welcome to lk

[0] calling constructors
[0] initializing heap
[0] initializing threads
[0] initializing dpc
[0] initializing timers
[0] creating bootstrap completion thread
[10] top of bootstrap2()
[10] initializing platform
[10] platform_init()
[10] initializing target
[10] target_init()
[10] initialising mmc_slot =1
[20]  Initializing MMC host data structure and clock!
[30] Decoded CID fields:
[30] Manufacturer ID: 15
[40] OEM ID: 0x100
[40] Product Name: Q7XSAB
[40] Product revision: 0.1
[40] Product serial number: 8E8FC2E5
[40] Manufacturing date: 2 2003
[50] Decoded CSD fields:
[50] cmmc_structure: 3
[50] card_cmd_class: f5
[60] write_blk_len: 512
[60] read_blk_len: 512
[60] r2w_factor: 3
[60] sector_size: 0
[60] c_size_mult:7
[70] c_size: 4095
[70] nsac_clk_cycle: 100
[70] taac_ns: 15000000
[70] tran_speed: 0 kbps
[70] erase_blk_len: 1
[80] read_blk_misalign: 0
[80] write_blk_misalign: 0
[80] read_blk_partial: 0
[80] write_blk_partial: 0
[90] wp_grp_size: 16384
[90] Card Capacity: 7818182656 Bytes
[90] SDHC Running in HS200 mode
[110] Done initialization of the card
[110] erase_grpsize: 31
[110] erase_grpmult: 31
[110] wp_grpsize: 15
[110] wp_grpen: 1
[120] perm_wp: 0
[120] temp_wp: 0
[120] mbr partition table dump:
[120]   0: status 0x0, type 0xee, start 0x1, len 0xffffffff
[130]   1: status 0x0, type 0x0, start 0x0, len 0x0
[130]   2: status 0x0, type 0x0, start 0x0, len 0x0
[140]   3: status 0x0, type 0x0, start 0x0, len 0x0
[140] found GPT
[150] initialising mmc_slot =2
[150]  Initializing MMC host data structure and clock!
[170] Error: Command timeout error
[170] Failure getting OCR response from MMC Card
[170] MMC card failed to respond, try for SD card
[180] Error: Command timeout error
[180] The response for CMD8 does not match the supplied value
[190] Failed to initialize SD card
[190] Failed detecting MMC/SDC @ slot2
[190] sdcard init failed![200] qhypstub image lacks magic, not loading
[200] pm8x41_get_is_cold_boot: cold boot
[200] calling apps_init()
[210] Display Init: Start
[210] Continuous splash detected: pipe: 1, base: 0x83200000, stride: 2160, source: 720x1280 (0,0), output: 720x1280 (0,0), format: 0x2243f (bpp: 3) (cmd mode: 0)
[220] smem ram ptable found: ver: 1 len: 5
[230] smem ram ptable found: ver: 1 len: 5
[230] Display Init: Done
[230] serial number: 8e8fc2e5
[230] ### Ohai, this is lk2nd (or lk1st?) ###
[240] Board: platform: 206, foundry: 0x0, platform_version: 0x10000, platform_hw: 0xb, platform_subtype: 0x7, target: 0x701010b, baseband: 0x0, platform_hlos_subtype: 0x0
[250] pmic_info[0]: type: 0x1000b, version: 0x20000, target: 0x2000b
[260] Command line from primary bootloader: lk2nd androidboot.emmc=true androidboot.serialno=8e8fc2e5 androidboot.baseband=msm mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_hx8394d_720p_video:1:none
[280] Device model: Lenovo A6000 (Wingtech WT86518)
[280] qcom,msm-id entry not found
[280] model does not exist in device tree
[290] qcom,msm-id entry not found
[290] Device keymap:
[310] fs-boot: Can't open hd2
[320] Unable to load boot.img from ext2. Continuing legacy boot
[320] Unable to locate /bootselect partition
[330] Loading boot image (7751680): start
[380] Loading boot image (7751680): done
[390] use_signed_kernel=0, is_unlocked=1, is_tampered=0.
[390] smem ram ptable found: ver: 1 len: 5
[390] smem ram ptable found: ver: 1 len: 5
[400] smem ram ptable found: ver: 1 len: 5
[400] smem ram ptable found: ver: 1 len: 5
[410] smem ram ptable found: ver: 1 len: 5
[410] smem ram ptable found: ver: 1 len: 5
[410] smem ram ptable found: ver: 1 len: 5
[420] DTB Total entry: 4, DTB version: 2
[420] ERROR: Unable to find suitable device tree for device (206/0x00010000/0x0701010b/7)
[430] ERROR: Getting device tree address failed
[430] ERROR: Could not do normal boot. Reverting to fastboot mode.
[440] ptn[0]:Name[modem] Size[131072] Type[0] First[131072] Last[262143]
[450] ptn[1]:Name[sbl1] Size[1024] Type[0] First[262144] Last[263167]
[450] ptn[2]:Name[sbl1bak] Size[1024] Type[0] First[263168] Last[264191]
[460] ptn[3]:Name[aboot] Size[2048] Type[0] First[264192] Last[266239]
[460] ptn[4]:Name[abootbak] Size[2048] Type[0] First[266240] Last[268287]
[470] ptn[5]:Name[rpm] Size[1024] Type[0] First[268288] Last[269311]
[480] ptn[6]:Name[rpmbak] Size[1024] Type[0] First[269312] Last[270335]
[480] ptn[7]:Name[tz] Size[1024] Type[0] First[270336] Last[271359]
[490] ptn[8]:Name[tzbak] Size[1024] Type[0] First[271360] Last[272383]
[500] ptn[9]:Name[hyp] Size[1024] Type[0] First[272384] Last[273407]
[500] ptn[10]:Name[hypbak] Size[1024] Type[0] First[273408] Last[274431]
[510] ptn[11]:Name[pad] Size[2048] Type[0] First[274432] Last[276479]
[510] ptn[12]:Name[modemst1] Size[3072] Type[0] First[276480] Last[279551]
[520] ptn[13]:Name[modemst2] Size[3072] Type[0] First[279552] Last[282623]
[530] ptn[14]:Name[misc] Size[2048] Type[0] First[282624] Last[284671]
[530] ptn[15]:Name[fsc] Size[2] Type[0] First[284672] Last[284673]
[540] ptn[16]:Name[ssd] Size[16] Type[0] First[284674] Last[284689]
[550] ptn[17]:Name[splash] Size[20480] Type[0] First[284690] Last[305169]
[550] ptn[18]:Name[DDR] Size[64] Type[0] First[393216] Last[393279]
[560] ptn[19]:Name[fsg] Size[3072] Type[0] First[393280] Last[396351]
[560] ptn[20]:Name[sec] Size[32] Type[0] First[396352] Last[396383]
[570] ptn[21]:Name[boot] Size[64512] Type[0] First[397408] Last[461919]
[580] ptn[22]:Name[system] Size[3686400] Type[0] First[461920] Last[4148319]
[580] ptn[23]:Name[persist] Size[65536] Type[0] First[4148320] Last[4213855]
[590] ptn[24]:Name[cache] Size[536576] Type[0] First[4213856] Last[4750431]
[600] ptn[25]:Name[recovery] Size[65536] Type[0] First[4750432] Last[4815967]
[600] ptn[26]:Name[keystore] Size[1024] Type[0] First[4849664] Last[4850687]
[610] ptn[27]:Name[config] Size[64] Type[0] First[4850688] Last[4850751]
[620] ptn[28]:Name[oem] Size[131072] Type[0] First[4850752] Last[4981823]
[620] ptn[29]:Name[userdata] Size[10158047] Type[0] First[5111808] Last[15269854]
[630] ptn[30]:Name[lk2nd] Size[1016] Type[0] First[396384] Last[397399]
[640] ptn[31]:Name[qhypstub] Size[8] Type[0] First[397400] Last[397407]
[640] fs-boot: Scanned devices:
[650] fs-boot: Can't open hd2
[650] fs-boot: Looking at hd1:
[650]   hd1p23:      system (  1800 MiB): 
[660]   hd1p25:       cache (   262 MiB): 
[660]   hd1p30:    userdata (  4959 MiB): 
[660] fastboot_init()
[660] serial number: 8e8fc2e5
[770] USB init ept @ 0x8f67b000
[790] udc_start()
[810] SCM call: 0x84000000 failed with :ffffffff
[810] HVC call: 0x200010f failed with :fffffffe
[820] creating fastboot menu keys detect thread
[930] -- reset --
[940] -- portchange --
[1070] -- reset --
[1070] -- portchange --
[1230] fastboot: processing commands

After flashing through edl mode, I flashed my phone's boot.img though the lk2nd's fastboot interface using fastboot flash boot image-new.img and even tried fastboot flash boot:raw image-new.img; still no boot. Please help.

TravMurav commented 8 months ago

[420] ERROR: Unable to find suitable device tree for device (206/0x00010000/0x0701010b/7)

https://github.com/msm8916-mainline/lk2nd/blob/654921d0616d20487a8e77256d228b18e5697f58/dts/msm8916/msm8916-qrd7%2B12-v1.dts#L8

Seems like you may want to add msm/board id override to the device.

Try adding

        qcom,msm-id = <206 0>;
        qcom,board-id = <11 12>;

to the device node in that file.

ElectroBoy404NotFound commented 8 months ago

[420] ERROR: Unable to find suitable device tree for device (206/0x00010000/0x0701010b/7)

https://github.com/msm8916-mainline/lk2nd/blob/654921d0616d20487a8e77256d228b18e5697f58/dts/msm8916/msm8916-qrd7%2B12-v1.dts#L8

Seems like you may want to add msm/board id override to the device.

Try adding

      qcom,msm-id = <206 0>;
      qcom,board-id = <11 12>;

to the device node in that file.

Ok, But my device is a lenovo a6000 (WT86518) not a qrd or what it is

ElectroBoy404NotFound commented 8 months ago

But yes, the provided Redmi device seems to use a similar interface... Time to get my hands dirty i guess

TravMurav commented 8 months ago

Ok, But my device is a lenovo a6000 (WT86518) not a qrd or what it is

Sorry, referenced a wrong file, would need to add here and I guess you'd need to check what msm/board id is in the stock then to add it.

https://github.com/msm8916-mainline/lk2nd/blob/654921d0616d20487a8e77256d228b18e5697f58/dts/msm8916/msm8916-qrd8-v1.dts#L8-L14

ElectroBoy404NotFound commented 8 months ago

Ok, But my device is a lenovo a6000 (WT86518) not a qrd or what it is

Sorry, referenced a wrong file, would need to add here and I guess you'd need to check what msm/board id is in the stock then to add it.

https://github.com/msm8916-mainline/lk2nd/blob/654921d0616d20487a8e77256d228b18e5697f58/dts/msm8916/msm8916-qrd8-v1.dts#L8-L14

Err which line?

ElectroBoy404NotFound commented 8 months ago

Okkk finally got it to work! Thank you!