ChanServ changed the topic of #sm8250-mainline to: Mainline Linux for Qualcomm Snapdragon 865/865+/870 (SM8250) | Bridged to #sm8250-mainline on matrix.org
<ellyqw> hey folks, i have a problem with booting... anything on this cursed hardware
<ellyqw> any idea what could cause absolutely zero UART output and reboot into XBLRamDump?
<ellyqw> checked everything - set regulators according to schematic, correct UART address and so on, but no dice
ungeskriptet has quit [Ping timeout: 480 seconds]
ungeskriptet has joined #sm8250-mainline
ungeskriptet has quit [Ping timeout: 480 seconds]
ungeskriptet has joined #sm8250-mainline
coloneyescolon[m] has joined #sm8250-mainline
<coloneyescolon[m]> katzenmann: cool seeing your work on kebab mainline. I already tried out the new mainline kernel from upstream pmaports, and got it booting to an interactive initramfs debug shell. Curious to see what else you got working. Can you point me to your latest version of your kernel?
<coloneyescolon[m]> ellyqw: which device?
<ellyqw> coloneyescolon[m]: Lynx R1
<coloneyescolon[m]> uuuh.. thats unusual, xd
<coloneyescolon[m]> did you post about it here already? in that case im gonna search for some more context
<ellyqw> nope, but Casey and I wrote pmOS wiki page for the device
<coloneyescolon[m]> I see. Did you get the downstream kernel booting already?
<ellyqw> no, i don't want to bother with google's buildsystem
<ellyqw> https://github.com/ellyq/lynx-mainline/tree/main/dumps - I did get u-boot somewhat working, but it also has issues with serial
<coloneyescolon[m]> well, did you get a successfull boot _ever_?
<ellyqw> only with stock sadly, i currently look at displays showing vendor logo while running a mainline kernel, but I still get nothing on uart or usb
<coloneyescolon[m]> on my device (kebab/oneplus 8t), when using "fastboot boot" to boot, and when the bootloader does not "accept" the kernel given to it, the device is still visible under "fastboot devices"
<coloneyescolon[m]> assuming you even have fastboot
<ellyqw> no, firmware on this thing is completely broken
<coloneyescolon[m]> no fastboot?
<coloneyescolon[m]> oh god
<ellyqw> fastboot is completely broken, not processing any commands
<ellyqw> when Adrianyyy and I hacked on it during GPN, we bricked it so hard i had to restore all LUNs on UFS to bring it back to life
<coloneyescolon[m]> well at least you had a backup xd
<ellyqw> well, that's a given
<coloneyescolon[m]> i really dont know much about the mainlinig process itself, I have only been able to bringup other people's work until now. but I did manage to bring up the downstream kernel on my device and even that was an... (full message at <https://matrix.org/oftc/media/v1/media/download/AasjYT5bmcxdDRc5zLjlN-2f-2PfByLTjaa2zG4nBBxlOr_DLRmTb0d19xZaqrvHQ6ldaKC54FSDYe6SKc5lzqRCeYFKUKrQAG1hdHJpeC5vcmcvQkppSUZHRlZwR0xSaFpCaWhEdFhQVFNW>)
<ellyqw> i mainlined few chromebook SoCs, and now work on u-boot port for them, yet this device had utterly defeated me
<ellyqw> been trying (on and off) to port linux to it for... 6 months already
<coloneyescolon[m]> how are you booting right now? flashing the boot.img via qualcomm debug?
<coloneyescolon[m]> edl or whatever its called
<ellyqw> lemme paste the steps
<ellyqw> 1. `make -j16`
<ellyqw> 2. `mkbootimg --kernel /tmp/lynx-test.gz --cmdline 'console=ttyMSM0,115200n8 earlycon=geni-debug-uart,0x00988000 earlyprintk pd_ignore_unused clk_ignore_unused' --ramdisk /tmp/pmos-export/boot/initramfs --kernel_offset '0x00008000' --pagesize '4096' -o /tmp/lynx-linux.img`
<ellyqw> wait, i missed a step
<coloneyescolon[m]> xd
<ellyqw> 2: `cat arch/arm64/boot/Image.gz arch/arm64/boot/dts/qcom/sm8250-lynx-r1.dtb > /tmp/lynx-test.gz`
<ellyqw> 3. mkbootimg
<ellyqw> 4. `./edl --loader prog_firehose_ddr.elf w boot_a ../../lynx-linux.img; ./edl --loader prog_firehose_ddr.elf reset `
<coloneyescolon[m]> makes sense. did you try extracting just the kernel image from the stock boot.img and putting it into your mkbootimg?
<ellyqw> no, but i extracted devicetree from running firmware, decompiled it, edited to enable UART, built it and used that to boot
<ellyqw> still no uart, it's so frustrating
<ellyqw> s/firmware/kernel
<ellyqw> too much coreboot :D
<coloneyescolon[m]> can you try what I said? at least you will know if your parameters for the boot image are right?
<coloneyescolon[m]> can you try what I said? at least you will know if your parameters for the boot image are right
<ellyqw> sure
<ellyqw> >4096 0x1000 Linux kernel ARM64 image, load offset: 0x80000, image size: 48451584 bytes, little endian, 4k page size,
<ellyqw> i assume i just need to yoink that with dd
<coloneyescolon[m]> the stock boot.img? there is a tool for that
<coloneyescolon[m]> unpackbootimg something like that let me look it up
<ellyqw> unpack_bootimg comes with mkbootimg apparently
<coloneyescolon[m]> alr
<ellyqw> hmm, could it be compression? it looks like stock isn't compressed
<ellyqw> `kernel: Linux kernel ARM64 boot executable Image, little-endian, 4K pages`
<coloneyescolon[m]> i think that does not matter. bootloader should take care of that, should it not?
<coloneyescolon[m]> that could also be your problem, since you are compressing your image which might be unsupported
<ellyqw> yes, but you know... it's xbl :D
<coloneyescolon[m]> xbl?
<ellyqw> qualcomm's cursed edk2 implementation
<coloneyescolon[m]> ah. well since the stock image is not compressed, i would assume that it is capable of booting uncompressed images
<coloneyescolon[m]> as long as unpack_bootimg did not secretly unpack the image without telling us, but I dont think so
<coloneyescolon[m]> *uncompress
<coloneyescolon[m]> just try the image you extracted. german saying: "probieren geht über studieren"
<coloneyescolon[m]> deepl translates it as "the proof of the pudding is in the eating", which I never heard of
<ellyqw> another annoying issue is that EDL keeps detecting it as sahara instead of firehose, no idea why
<coloneyescolon[m]> what is sahara again?
<ellyqw> as for German, meine Deutsch ist scheisse :D
<ellyqw> older edl basically
<coloneyescolon[m]> no gzip import, so no decompressing
<ellyqw> Error: Device Tree blob not found \n Launching fastboot
<ellyqw> ah, i think battery might be dead and that's why it keeps dropping to sahara for whatever reason
<coloneyescolon[m]> unpackbootimg gave you a dtb offset in the log, im sure it unpacked the dtbs as well. mkbootimg also has options to include dtbs and their offsets. I think you should use that instead of appending to the image directly.
<ellyqw> i don't know who designed this image format, but i hope they step on UK power plug
<coloneyescolon[m]> i hope that all of the firmware developers at android, qualcomm and the different device manufacturers step on lego bricks. these things are such overengineered nightmares.
<coloneyescolon[m]> unpack_bootimg might be able to just give you a fitting mkbootimg command back after it runs: https://android.googlesource.com/platform/system/tools/mkbootimg/+/refs/heads/main/unpack_bootimg.py#517
<coloneyescolon[m]> more or less...
<ellyqw> thisline mentions vendor_boot though, which this device doesn't have
<ellyqw> but i guess it's the same
<coloneyescolon[m]> uh. yeah. no idea. no idea why they chose that as an example. but as you said, prly the same just witout the --vendor-boot flag
<ellyqw> hmmm
<ellyqw> lemme flip few things in this dtb to enable serial
<ellyqw> Lynx's engineers gave me full sourcecode and schematics, but refused to share userdebug lol
<coloneyescolon[m]> do you have an usb port? you could plug in via usb to your pc and check via dmesg if anything shows up or not
<coloneyescolon[m]> at least you will know that you are booting alright
<ellyqw> of course, nothing showed up
<coloneyescolon[m]> alr. i hope for you that serial is enabled in the stock linux config
<ellyqw> it is, just that it's disabled in dt
<coloneyescolon[m]> anything new?
<ellyqw> edl being a pita
ungeskriptet has quit [Remote host closed the connection]
katzenmann[m] has joined #sm8250-mainline
<katzenmann[m]> <coloneyescolon[m]> "katzenmann: cool seeing your..." <- I haven't done anything with kebab for a while since the patches for the panel stopped working for me when I rebased on 6.13
<katzenmann[m]> you can try taking the sm8250-mainline kernel with my 3 pull-requests applied and see if the display works for you
<katzenmann[m]> you can leave out the panel pr and just enjoy framebuffer with touchscreen
<katzenmann[m]> for the panel to really work one needs to write a driver for the pixelworks iris 5. It's some kind of processor that does some stuff related to HDR but it's required to drive the display correctly
<katzenmann[m]> The downstream sources are here in the files called iris5: https://github.com/OnePlusOSS/android_kernel_oneplus_sm8250/tree/oneplus/SM8250_Q_10.0/techpack/display/msm/dsi
<coloneyescolon[m]> katzenmann: alright, I will try that. i still have two short questions for you: which UI option did you use with pmbootstrap init, and why did you hardcode sda14 here in the deviceinfo? https://gitlab.postmarketos.org/postmarketOS/pmaports/-/blob/master/device/testing/device-oneplus-kebab/deviceinfo#L37