lk2nd icon indicating copy to clipboard operation
lk2nd copied to clipboard

[experimental-tmp2] Add msm8956 Sony Loire (kugo & suzu)

Open vknecht opened this issue 2 years ago • 5 comments

This is not booting yet (it reboots), so creating as draft for further discussion. Several this are still unclear to me:

  • license : guess BSD-3-Clause is prefered, not sure if something warrants setting another
  • lk2nd,match-cmdline : comparing one kugo & one suzu, about only differences are lcdid_adc and serial which begins with BH902H (kugo) or BH902F (suzu), so I choose lcdid_adc for now
  • from chat discussion, it would seem something like b8f0b9d is needed to not hang wrt. cores/clusters. Setting would be the same as msm8939 so I guess it would be done by :
    • add APCS defines in platform/msm8952/include/platform/iomap.h (not exactly same as msm8916 ?)
    • create lk2nd/smp/clock-msm8952.c (probably not same as msm8916 ?) and add msm8952 at lk2nd/smp/rules.mk#L8 ?
    • add something in platform/msm8952/msm8952-clock.c ?
  • in msm8953 fork, several devices need changing #address-cells / #size-cells, how to check if that's required for loire ?
  • ...

vknecht avatar Apr 29 '23 10:04 vknecht

Is doing device detection based on panel variation really reliable?

minlexx avatar Apr 29 '23 14:04 minlexx

Is doing device detection based on panel variation really reliable?

To me these look like veeeery sony specific parameters that would probably work fine but I'm pretty concerned with the fact it says "adc" in the name which implies it would measure an analog value...

TravMurav avatar Apr 29 '23 14:04 TravMurav

Change to match cmdline on (partial) serial number. Should work at least here for my tests, will check how "universal" that numbering rule is...

vknecht avatar Apr 30 '23 14:04 vknecht

It boots now on kugo with latest change, but doesn't seem to be able to fastboot boot twrp (stuck on tux logo)

(bootloader) Staged. Use 'fastboot get_staged <file>' to fetch.
OKAY [  0.002s]
Finished. Total time: 0.002s
Uploading '/dev/stdout'                            [0] welcome to lk

[10] platform_init()
[10] target_init()
[100] MMC card: 032G34 (0.0, 03 1999), manufacturer: 11, OEM: 100, capacity: 31268536320 bytes
[110] SDHC Running in HS400 mode
[110] Done initialization of the card
[120] Waiting for the RPM to populate smd channel table
[120] MDP continuous splash detected: pipe RGB_0, base: 0x83200000, stride: 2160, src: 720x1280 (0,0), img: 720x1280, out: 720x1280 (0,0), format: 0x2243f (bpp: 3)
[140] Display refresh: cmd mode: 1, auto refresh: 0 (sel: 0x21f20)
[160] lk2nd_init()
[160] Booted @ 0x20008000, r0=0x0, r1=0x0, r2=0x21e00000
[170] MMU mapping mismatch @ 0x21e00000: 0x21e01c1e != 0x21e00c1a
[170] Found valid DTB with 1419 bytes total
[180] Command line from previous bootloader: lk2nd androidboot.emmc=true androidboot.veritymode=enforcing androidboot.verifiedbootstate=orange androidboot.bootloader=s1 oemandroidboot.s1boot=1299-4841_S1_Boot_MSM8956_LA1.0.1_O_168 androidboot.serialno=BH902HOOOO ta_info=1,16,256 startup=0x00000001 warmboot=0x00000000 oemandroidboot.imei=OOOOOOOOOOOOOOOO oemandroidboot.phoneid=OOO:OOOOOOOOOOOOOOOO oemandroidboot.security=0 oemandroidboot.babe09a9=00 oemandroidboot.babe08b3=50000000 oemandroidboot.babe137e=0e oemandroidboot.securityflags=0x00000003 oemandroid.aid=4 lcdid_adc=0x3903E display_status=on androidboot.baseband=msm
[230] Failed to find matching lk2nd device node: -1
[250] Loading (boot) image (10014720): start
[290] Loading (boot) image (10014720): done
[290] use_signed_kernel=0, is_unlocked=1, is_tampered=0.
[290] decompressing kernel image: start
[740] decompressing kernel image: done
[740] DTB offset is incorrect, kernel image does not have appended DTB
[750] Device info 0x0000010a/00010001/0x00010008/0, pmic 0x20010/0x20011/0x1000c/0x0
[760] ERROR: Appended Device Tree Blob not found
[760] ERROR: Could not do normal boot. Reverting to fastboot mode.
[770] fastboot_init()
[870] USB init ept @ 0x8f690000
[890] udc_start()
[910] creating fastboot menu keys detect thread
[12940] -- reset --
[12940] -- portchange --
[13050] -- reset --
[13060] -- portchange --
[13190] fastboot: processing commands
[50020] fastboot: oem log
OKAY [  0.003s]
Finished. Total time: 0.003s

vknecht avatar May 06 '23 14:05 vknecht

My SO-02J (Xperia X Compact, Docomo) here has BH905X started serial number and lcdid_adc=0x3959A .

Icenowy avatar Jan 22 '24 10:01 Icenowy