<ungeskriptet> Zekiu_[m]: How do you create the boot.img?
<Zekiu_[m]> With "pmbootstrap build --envkernel linux-postmarketos-qcom-sm8250", "pmbootstrap install --disk /dev/sdb (that's my SD card)" "pmbootstrap flasher flash_kernel", before I just tried booting directly with "pmbootstrap flasher boot" but it was finicky, so I switched to flashing the boot.img directly
<ungeskriptet> Zekiu_[m]: Can you run pmbootstrap bootimg_analyze on a stock boot.img and show me the output?
<Zekiu_[m]> I'm not at home right now unfortunately, I'll do that later
ungeskriptet has quit [Quit: The Lounge - https://thelounge.chat]
ungeskriptet has joined #sm8250-mainline
ungeskriptet has quit [Quit: The Lounge - https://thelounge.chat]
ungeskriptet has joined #sm8250-mainline
ungeskriptet has quit []
ungeskriptet has joined #sm8250-mainline
ungeskriptet has quit [Quit: The Lounge - https://thelounge.chat]
ungeskriptet has joined #sm8250-mainline
ungeskriptet has quit []
ungeskriptet has joined #sm8250-mainline
<Zekiu_[m]> <ungeskriptet> "Zekiu_: Can you run pmbootstrap..." <- ```... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/KiOSCubwUJepBTGGBnLhdZWS>)
<ungeskriptet> Zekiu_[m]: Actually, can you send me the boot.img
<Zekiu_[m]> Can I send it here directly? Or via some hosting site like catbox?
<Zekiu_[m]> Sent it here on matrix, don't know if it will show up on irc
ungeskriptet[m] has joined #sm8250-mainline
<ungeskriptet[m]> It's fine
<ungeskriptet> Shows up in IRC too
<ungeskriptet[m]> Zekiu_: This is the boot.img from stock ROM, right?
<ungeskriptet[m]> I'm getting some weird error
<Zekiu_[m]> this is from the latest firmware that's on mirrors.lolinet.com, I flashed the same firmware after I got this phone and everything was working fine
<ungeskriptet[m]> Hm maybe unpack_bootimg is broken on Raspberry Pi OS
<Zekiu_[m]> I installed mkbootimg on my debian vm and also tried the unpack_bootimg command and got this:... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/bpLoFfXTNWIZlaUkBrjPgRZz>)
<ungeskriptet> Zekiu_[m]: Where do you put the dtb? I couldn't find a dtb with binwalk in the stock boot.img
<Zekiu_[m]> Uh, I'm sorry but I don't know what you're talking about. I thought that the dtb gets compiled into the linux kernel? I got the downstream dtb by running a command that's on sm7150 mainline guide on pmos wiki on my device. Should i make the boot.img manually? I was scrolling through the history of this chat room and saw another person that manually generated the boot.img with the mkbootimg command
<Zekiu_[m]> Sorry, I'm not too knowledgeable about this stuff
<ungeskriptet> Zekiu_[m]: The dtb gets compiled while building the Linux kernel into a separate file. (You can check .output/arch/arm64/boot/dts/qcom in your linux sources). You have to append the dtb to the kernel or add it to the boot.img depending on the bootloader
<ungeskriptet> The the isn't built into the kernel by default because not all bootloaders are the same
<ungeskriptet> * The dtb
<ungeskriptet> Zekiu_[m]: You could try using header version 2, maybe it works too
<Zekiu_[m]> I tried running the mkbootimg command to manually create the boot.img but it still reboots instanstly, so I guess either the offsets are wrong (tho i don't know what offsets i should use) or the dts is wrong
<ungeskriptet> Try it like described here
<Zekiu_[m]> Doesn't work, still instantly reboots
<ungeskriptet> Zekiu_[m]: Hmm
<ungeskriptet> Try creating the bootimage manually with different options
<ungeskriptet> Until one works
<ungeskriptet> Not really sure how it's supposed to boot. I don't have any header version 3 devices myself
<Zekiu_[m]> I guess I should change the offsets, right?
<ungeskriptet> Yes, different header versions too
<ungeskriptet> And make sure to append the dtb when using version 0
<ungeskriptet> Other versions may need it too
<Zekiu_[m]> <ungeskriptet> "Zekiu_: Where do you put the dtb..." <- it looks like the dtb is in vendor_boot? if i understand this correctly... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/lOhmduWGLxOeCpznZCabFInx>)
<Zekiu_[m]> now i wonder if it doesn't boot because of the vendor_boot partition, was mainline tested only on "header version 2" devices? maybe that's why it instantly reboots, even when seemingly everything should work