Danct12 changed the topic of #msm8937-mainline to: Boot Linux on your MSM8917/37/40 and QM215 mobile! | GitHub: https://github.com/msm89x7-mainline | Logs: https://oftc.irclog.whitequark.org/msm8937-mainline | Bridged to #msm8937-mainline:kde.org on Matrix
<KamalChandraUpreti[m]> <barni2000[m]> "Use dtc to decompile it" <- Thanks a lot
<semi2309[m]> hello, do you think it will be enought to get telnet on initfs hook?
<barni2000[m]> <semi2309[m]> "// SPDX-License-Identifier: GPL-..." <- > <@semi2309:matrix.org> ```... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/OryNKZRBVmemkcRncCEKDhHn>)
<barni2000[m]> usb will not work this whay
<barni2000[m]> s/whay/way/
<semi2309[m]> i ahve changed usb
<semi2309[m]> this is bad
<semi2309[m]> wait
<semi2309[m]> msm8917.dtsi is included by msm8937.dtsi
<semi2309[m]> and in msm8917 is something like this:... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/SViuudxkOcRqRratlUfmdDwf>)
<barni2000[m]> there is a pmi8950 usb extcon you should use that check redmi 4x dts
<barni2000[m]> but it depends on what is in the downstream dts
<barni2000[m]> and you will need to define the regulators also for usb to work
<semi2309[m]> pmi8950 has only this with usb word... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/OVTEQzFRqKdrHBAqbpvndzHS>)
<semi2309[m]> barni2000[m]: how to do that?
<semi2309[m]> <barni2000[m]> "> <@semi2309:matrix.org> ```..." <- and how simplefb node looks?
<barni2000[m]> semi2309[m]: check redmi 4x dts
<barni2000[m]> for the correct values you will need to check downstream dt also
<semi2309[m]> do you think i can use some lines from 4x dts?
<semi2309[m]> for example
<semi2309[m]> it is using pm8937 and 8937 is my soc so it should work right?
<semi2309[m]> Regulators values are also from pm8937
<barni2000[m]> semi2309[m]: you should define the voltage ranges like in downstream
<barni2000[m]> and also check which regulators are binded for usb
<barni2000[m]> if you have schematic that also could help a lot
<semi2309[m]> I have found this in downstream decompiled dts:... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/YjsTefJRPoEoIaMtLjrZzkqS>)
<semi2309[m]> this is it?
<barni2000[m]> yes you will need regulator-max/min-voltages
<semi2309[m]> okay, can i copy &rpm_requests node from xiaomi 4x and change values?
<barni2000[m]> yes
<semi2309[m]> nice
<barni2000[m]> but you should compare everything with downstream
<semi2309[m]> yeah so copy node from 4x dts and change values to be like in downstream dts
<barni2000[m]> and check all regulators are enabled in downstream there is chance for some difference
<semi2309[m]> how do i know if some are disabled?
<barni2000[m]> status="disabled"
<semi2309[m]> okay
<semi2309[m]> okay
<semi2309[m]> values are the same for my lenovo karatep and xiaomi santoni
<semi2309[m]> barni2000: whats next?
<barni2000[m]> Try it
<semi2309[m]> and i think i was supposed to make spframebuffer
<barni2000[m]> yes framebuffer is recommended
<semi2309[m]> how can i find values to framebuffer?
<barni2000[m]> and you will need reserved-memory section also
<barni2000[m]> semi2309[m]: your screen resoultion and check santoni
<semi2309[m]> i have found reserved-memory
<semi2309[m]> semi2309[m]: > <@semi2309:matrix.org> ```... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/ZxvHplAZvacFtWJKBRblXhry>)
<barni2000[m]> for reserved memory you will only need the differnece for 3.18
<semi2309[m]> barni2000[m]: what does that mean?
<barni2000[m]> you will need check reserved memory sections in msm-3.18 reference kernel
<barni2000[m]> reg = <0x00 0x84a00000 0x00 0x1e00000>; this will be the qseecom but 0x1e00000 will be 0x1900000
<semi2309[m]> barni2000[m]: how to do that
<semi2309[m]> barni2000[m]: okay soo pretty much like in santoni
<barni2000[m]> semi2309[m]: i think it will be the same but you should find the qseecom node in downstream
<semi2309[m]> which file?
<semi2309[m]> s/```/````/
<semi2309[m]> if i have a 1080x1920 screen than i sould put hexadecimal values of these numbers here right?
<barni2000[m]> reg = <0x0 0x90001000 0x0 (1080 * 1920 * 3)>;
<semi2309[m]> so reserved-memory section should look like that?
<semi2309[m]> i have found that in downstream dts
<semi2309[m]> semi2309[m]: > <@semi2309:matrix.org> ```... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/nAniSTYXyHcvSphOkUnQSIKg>)
<barni2000[m]> semi2309[m]: you will need qseecom node not qseecom_region
<barni2000[m]> reg property will tell the correct range
<semi2309[m]> this?
<barni2000[m]> reg = <0x84a00000 0x1900000>;
<semi2309[m]> yeah
<semi2309[m]> like in santoni
<semi2309[m]> okay so, now framebuffer node
<semi2309[m]> what i need to change here
<barni2000[m]> Change the resolution and it will be fine
<semi2309[m]> Soo all of it looks like that:
<semi2309[m]> `//` SPDX-License-Identifier: GPL-2.0-only... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/GNkvaLXuPueyVFGstwUkjSfl>)
<semi2309[m]> is it good?
<barni2000[m]> it this correct cd-gpios = <&tlmm 67 GPIO_ACTIVE_LOW>;?
<semi2309[m]> um idk how to check that
<barni2000[m]> compatible = "qcom,msm8937-pmi8950-karatep-row\0qcom,msm8937-pmi8950-qrd-sku1\0qcom,msm8937-qrd\0qcom,msm8937\0qcom,qrd"; this seems downstream compatible to me
<barni2000[m]> semi2309[m]: downstream
<semi2309[m]> barni2000[m]: how should it look?
<barni2000[m]> check santonin
<barni2000[m]> * check santoni
<barni2000[m]> just use msm8937 instead of msm8940
<semi2309[m]> compatible = "lenovo,karatep", "qcom,msm8937";
<semi2309[m]> like that?
<semi2309[m]> cd-gpios = <0xa7 0x43 0x01>; i have that in downstream
<semi2309[m]> Where i would find value of &tlmm
<semi2309[m]> <semi2309[m]> "cd-gpios = <0xa7 0x43 0x01>; i..." <- expect &tlmm all values are correct
<semi2309[m]> i dont know how to find where this is declarated
<semi2309[m]> barni2000:
<barni2000[m]> 0x43 = 67, and don't need to mentioning me i am reading the chat just some times i am away
<semi2309[m]> okay, sorry about that
<semi2309[m]> soo this line is correct right?
<barni2000[m]> yes it seems
<semi2309[m]> okay
<semi2309[m]> i have to add more lines
<semi2309[m]> i took this from santoni
<semi2309[m]> beacuse in kernel compilation was error about vph_pwr not defined
<barni2000[m]> yes fixed regulator should be defined
<semi2309[m]> its values are okay?
<barni2000[m]> i guess every device use the same values
<semi2309[m]> so is it ready to go?
<barni2000[m]> it is good for dump some logs if you have issues
<semi2309[m]> okay
<semi2309[m]> and how could i get these logs if i will have issues?
<semi2309[m]> i mean how to acces them
<barni2000[m]> twrp
<barni2000[m]> adb pull /sys/fs/pstore/console-ramoops-0
<semi2309[m]> okay i have added this, so now, compile and try to ran
<semi2309[m]> right?
<barni2000[m]> the trick is you should pull it at first reboot because after twrp will overwrite it
<barni2000[m]> semi2309[m]: right
<semi2309[m]> i have added dts file to Makefile
<semi2309[m]> btw
<semi2309[m]> barni2000[m]: so if i do pmbootstrap flasher boot, and then my device will froze i need to reboot to stock fastboot, boot twrp and type this command right?
<barni2000[m]> why not reboot to twrp instantly
<barni2000[m]> * twrp instantly?
<semi2309[m]> um how could i do that if device will be frozen?
<barni2000[m]> push power+vol up for 10 or 15 seconds
<semi2309[m]> i do not have twrp flashed on device
<semi2309[m]> should i flash it with stock fastboot or lk2nd?
<barni2000[m]> you can use fastboot boot
<barni2000[m]> the easiet way to try it first concatenate zImage with dtb
<semi2309[m]> barni2000[m]: um, what
<barni2000[m]> ```cat zImage <your dtb> > zImage-dtb```
<barni2000[m]> fastboot boot zImage-dtb
<semi2309[m]> where i will find zImage
<semi2309[m]> and dtb
<barni2000[m]> it depends how you compile the kernel
<barni2000[m]> arch/arm64/boot/dts/qcom
<barni2000[m]> you will have .output dir
<semi2309[m]> device has frozen after booting kernel
<barni2000[m]> everything is ther
<barni2000[m]> * everything is there
<barni2000[m]> use msm8917 config from pmos packahr
<barni2000[m]> s/packahr/package/
<semi2309[m]> how?
<semi2309[m]> just paste it in configs folder?
<barni2000[m]> copy to arch/arm64/configs as msm8917_defconfig
<semi2309[m]> okayy
<barni2000[m]> but you will need to enable 28nm usb in the config also
<semi2309[m]> how
<barni2000[m]> make menuconfig
<semi2309[m]> so first make msm8917_defconfig pmos.config
<semi2309[m]> and then make menuconfig?
<barni2000[m]> yes
<semi2309[m]> Qualcomm 28nm High-Speed PHY?
<semi2309[m]> in phy Subsystem
<barni2000[m]> semi2309[m]: yes
<semi2309[m]> okay
<semi2309[m]> i have it
<semi2309[m]> what next
<semi2309[m]> make -j6?
<barni2000[m]> CONFIG_PHY_QCOM_USB_HS_28NM=m
<semi2309[m]> oh m
<semi2309[m]> i have set it Y
<barni2000[m]> semi2309[m]: if you have six core
<barni2000[m]> semi2309[m]: Y is fine
<semi2309[m]> oh i have change it to M haha
<semi2309[m]> M is fine as well?
<barni2000[m]> use Y instead
<barni2000[m]> for m you will need to put the module in the initfs
<semi2309[m]> okay, now im waiting for kernel to build
<semi2309[m]> is there easiest way to boot it instead of pmbootstrap
<semi2309[m]> <barni2000[m]> "fastboot boot zImage-dtb" <- you have sent that
<semi2309[m]> but i dont know where files are at .output
<barni2000[m]> the structure is same like source dirs so dtb will be in .output/arch/arm64/boot/dts/qcom and the zImage will be in the .output/zImage
<barni2000[m]> wait
<semi2309[m]> <semi2309[m]> "semi@semi:~/LenovoPLIKI/MAINLINE..." <- > <@semi2309:matrix.org> ```... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/vmzqxhFyqZCjmzuopiMtquof>)
<barni2000[m]> cat .output/arch/arm64/boot/Image.gz .output/arch/arm64/boot/dts/qcom/msm8917-xiaomi-ugglite.dtb > Image.gz-dtb
<semi2309[m]> oh, okay
<barni2000[m]> i have not rememberd correctly sry
<semi2309[m]> omg!
<semi2309[m]> it did something
<semi2309[m]> but not too much
<semi2309[m]> It is trying to run
<semi2309[m]> Thats good i think? Haha
<barni2000[m]> now you can create boot.img with pmbootstrap
<semi2309[m]> so, pmbootstrap build --envkernel linux-postmarketos-qcom-msm8916 then pmbootstrap build device-lenovo-karatep then pmbootstrap install then pmbootstrap flasher boot?
<semi2309[m]> should i add PMOS_NOSPLASH to cmdline?
<semi2309[m]> so, i have done that, i have penguin at the top of screan
<semi2309[m]> screen
<semi2309[m]> but nothing else
<semi2309[m]> i have added initfs hook
<semi2309[m]> i have no telnet, and no message in dmesg about new device connecting
<semi2309[m]> without initfs hook the same happens
<semi2309[m]> so usb not working
<barni2000[m]> check usb
<barni2000[m]> did you installed rootfs?
<semi2309[m]> Yes
<semi2309[m]> Maybe a silly question but is it diffrence if i connect it to 3.0 or 2.0 port on my host pc?
<barni2000[m]> should not be
<semi2309[m]> okay
<semi2309[m]> Thank you very much i need to end, i will reach out when i will work on this again