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
Daanct12 has joined #msm8937-mainline
<WoeyJonkers[m]> hello, is this kernel far enough along that i'm able to use it for porting an MSM8917 device?
<Danct12[m]> maybe
<Danct12[m]> i haven't tested 8917 because i have none of the 8917 devices
<Danct12[m]> and also i'm currently taking a break waiting for the new redmi 4x touch screen :P
<Danct12[m]> i'll be back next week
<Danct12[m]> msm8917 should be in a better shape than 8937 now as it only has one cluster
<Danct12[m]> <WoeyJonkers[m]> "hello, is this kernel far enough..." <- BTW, check if the android kernel is 64-bit, if it's not then you're out of luck for now
<Danct12[m]> as we only support qcom running on 64-bit mode
Daanct12 has quit [Quit: WeeChat 4.1.2]
f_ has quit [Ping timeout: 480 seconds]
f_ has joined #msm8937-mainline
<WoeyJonkers[m]> you mean the one it was shipped with? 32-bit
<WoeyJonkers[m]> does that mean i'm screwed
<WoeyJonkers[m]> screwed as in not able to use this kernel, there's stil a lineageos port i can use instead, i was just hoping to get my hands on that shiny new 6.6 kernel
<WoeyJonkers[m]> s/stil/still/
<barni2000[m]> which device is it?
<WoeyJonkers[m]> samsung-gta2swifi
<Danct12[m]> WoeyJonkers[m]: do you have the kernel file for it? you can unpack the boot.img and run `file` on zImage
<barni2000[m]> btw msm8917 is working but enabling usb is a pain
<Danct12[m]> arch/arm/configs/gta2swifi_sea_open_defconfig
<barni2000[m]> maybe this samsung with muic could works
<barni2000[m]> s/works/work/
<Danct12[m]> rip
<barni2000[m]> afaik lk2nd will be needed
<Danct12[m]> see what's after arch/? :P
<Danct12[m]> it's arm not arm64
<barni2000[m]> it is just idiotic 3.18
<barni2000[m]> they have symlinking the dts befor 4.9
<barni2000[m]> * they have been symlinking the
<barni2000[m]> * they have been symlinking the dts before 4.9
<Danct12[m]> yeah, but the kernel is built for arm32
<Danct12[m]> i am not sure if it can boot arm64 but worth a try
<Danct12[m]> BTW, lk2nd is arm32
<Danct12[m]> minecrell[m]: do you think it's possible? you seem to know a lot about msm8916 samsung ^
<Sid_key[m]> Danct12[m]: That doesn't matter
<Sid_key[m]> It would still boot ig
<Sid_key[m]> Tiare (Redmi Go) shipped with arm kernel
<minecrell[m]> There is a check in lk2nd which tells you if booting arm64 is possible. I would strongly expect any 8917 can do it because only ancient Android 4.4 firmware on 8916 can't
<Sid_key[m]> But boots fine 64 bit
<Sid_key[m]> Even samsung shipped with arm boot arm64
<Sid_key[m]> Sid_key[m]: Even more
<Sid_key[m]> Redmi Go has tz with 64 bit pg support for cb21
<Sid_key[m]> While M/N fw devices doesn't have that
<Sid_key[m]> Sid_key[m]: whole mi8937 except riva, tiare
<Sid_key[m]> Sid_key[m]: Rolex can use riva tz tho
<Danct12[m]> minecrell[m]: ah okay, i guess that doesn't apply here then
<Sid_key[m]> whole mi8937 except riva, tiare
<Sid_key[m]> * In reply to @sid-key:matrix.org
<Sid_key[m]> Rolex can use riva tz tho, so can have that support too
<WoeyJonkers[m]> <Danct12[m]> "do you have the kernel file..." <- zImage: Linux kernel ARM boot executable zImage (little-endian)
<Danct12[m]> WoeyJonkers[m]: read above
<Danct12[m]> tl;dr just do it
<WoeyJonkers[m]> ok thanks i will try that later today
<Danct12[m]> i would recommend start porting lk2nd first since this will be a hard dependency
<Danct12[m]> for anyone else here wondering why this will be a hard dependency, this is because lk2nd can parse bootloader cmdline and modify the device tree when needed - e.g. different display model
<Danct12[m]> there are many devices with the same qcom,board-id and it's also a good idea to unify them, so we only need one boot.img for all devices with the same id
<Danct12[m]> * there are many devices with the same qcom,board-id and it's also a good idea to unify them, so we only need one lk2nd build for all devices with the same id
<barni2000[m]> and what about same display names?
<barni2000[m]> whit different panels
<barni2000[m]> btw we have one build with multiple dtb it contains every device
<barni2000[m]> i think you mean unified in one dt
<Danct12[m]> <barni2000[m]> "and what about same display..." <- as in?
<Danct12[m]> if bootloader says qcom,mdss_dsi_nt35596_1080p_video then it's gonna be this panel
<barni2000[m]> Danct12[m]: in every device what using this compatible string
<barni2000[m]> * compatible string?
<Danct12[m]> this was just an example ^
<barni2000[m]> i just say it should be investegated
<barni2000[m]> btw qcom-board-id could contain more ids afaik so we could unify almost every device what don't need device specific quirks
<barni2000[m]> but it depends on the devices' bootloader
<WoeyJonkers[m]> <Danct12[m]> "i would recommend start porting..." <- so... hypothetically, if i had no idea what i was doing... how would i go about doing that
<barni2000[m]> you need to create a minimal dt for your device
<barni2000[m]> replace msm-id and board-id
<barni2000[m]> i am using msm8916-mainline/lk2nd experimental-tmp4 branch but fine to use msm89x7-mainline/lk2nd also
<M0xCAFEBABE[m]> barni2000[m]: and i'm using msm8953-mainline/lk2nd xd
<M0xCAFEBABE[m]> have been used on more than 10 devices
<M0xCAFEBABE[m]> * than 10 msm8937 family devices
<barni2000[m]> i am using that for my msm8953 devices
<barni2000[m]> and for motorola-montana
<barni2000[m]> but msm8953 devices will be moved to msm8916-mainline/lk2nd in the future we are waiting for the stable release
<barni2000[m]> experimnetal-tmp4 supports extlinux config
<M0xCAFEBABE[m]> barni2000[m]: nice, which CAF tag is it based on btw?
<barni2000[m]> good question, idk but it supports a lot of new soc
<barni2000[m]> it based on thish commit
<barni2000[m]> next step should be rebase on mainline littlekernel (i am just kidding)
<Danct12[m]> mainline linux is overrated
<Danct12[m]> mainline lk is the way
<Danct12[m]> /s
<hacker420[m]> <barni2000[m]> "and for motorola-montana" <- oh nice
<barni2000[m]> <hacker420[m]> "oh nice" <- montana has issues with other lk2nds what about cedric?
<hacker420[m]> what issuews
<WoeyJonkers[m]> <barni2000[m]> "replace msm-id and board-id..." <- i did that and tried building but I'm stuck on the following errors, did I configure it wrong or something... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/rBwGJfAMBxkgpVMpYphZAFRw>)
<barni2000[m]> lk2nd-msm8952
<barni2000[m]> what lk2nd do you use?
<barni2000[m]> s/what/which/
<WoeyJonkers[m]> the msm8916-mainline/lk2nd experimental-tmp4 branch you mentioned earlier
<WoeyJonkers[m]> should i go back and try the 89x7 one again
<barni2000[m]> you should place your dt in the lk2nd/device/dts/msm8952
<WoeyJonkers[m]> ahh
<WoeyJonkers[m]> ok
<barni2000[m]> and edit rules.mk there
<WoeyJonkers[m]> i apologize for my incompetence lol
<barni2000[m]> np
<WoeyJonkers[m]> there is no msm8952 folder, should i make one or try using a different folder
<barni2000[m]> wait a minute
<WoeyJonkers[m]> what
<barni2000[m]> add this as an extrenal remote https://github.com/msm89x7-mainline/lk2nd.git
<barni2000[m]> and cherry-pick this commit 49670b36c73c4cbb6eba26707b434f44de354670
<barni2000[m]> or you could create msm8952 folder based on this https://github.com/msm89x7-mainline/lk2nd/commit/49670b36c73c4cbb6eba26707b434f44de354670
<barni2000[m]> ok sorry for do this more complex than it is
<barni2000[m]> so make a new folder place your dt there and make an rules.mk
<barni2000[m]> after you should build lk2nd-msm8952
<WoeyJonkers[m]> still same errors
<WoeyJonkers[m]> there's probably something extremely simple and obvious that i'm missing and i just somehow can't figure it out
<barni2000[m]> yes one -
<barni2000[m]> make TOOLCHAIN_PREFIX=arm-none-eabi- -j4 lk2nd-msm8952
<barni2000[m]> it missing after eabi
<WoeyJonkers[m]> <WoeyJonkers[m]> "still same errors" <- ^
<WoeyJonkers[m]> is it this?
<WoeyJonkers[m]> missing MEMBASE or MEMSIZE variable, please set in target rules.mk
<WoeyJonkers[m]> ok i tried building for something that was already there and i still got those errors, maybe if i just start from the beginning, re-clone everything, and go through it again maybe then it will build
<WoeyJonkers[m]> AHAHAHAHAHAHAHAAA
<WoeyJonkers[m]> YUP
<WoeyJonkers[m]> ok well i still got an error but it was after it already compiled a bunch of stuff
<WoeyJonkers[m]> oh wait no i told it to build for the one that was already there again
<WoeyJonkers[m]> ah same error never mind
<WoeyJonkers[m]> WoeyJonkers[m]: > <@woeyjonkers:matrix.org> ```lk2nd/boot/extlinux.c: In function 'parse_conf':... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/WOQOMhWSiRXDyhhjMTWwKiNn>)
<barni2000[m]> try to build lk2nd-msm8916
<WoeyJonkers[m]> same thing
<barni2000[m]> what is your gcc version?
<WoeyJonkers[m]> gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
<barni2000[m]> arm-none-eabi-gcc?
<WoeyJonkers[m]> oh
<WoeyJonkers[m]> rm-none-eabi-gcc (15:10.3-2021.07-4) 10.3.1 20210621 (release)
<WoeyJonkers[m]> s/rm/`arm/, s//`/
<barni2000[m]> is your prefix fine gcc-arm-none-eabi-?
<WoeyJonkers[m]> ?
<barni2000[m]> <WoeyJonkers[m]> "i did that and tried building..." <- > <@woeyjonkers:matrix.org> i did that and tried building but I'm stuck on the following errors, did I configure it wrong or something... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/GPFryEtOWBAoWAfZqIyCekgS>)
<barni2000[m]> make TOOLCHAIN_PREFIX=gcc-arm-none-eabi lk2nd-msm8917
<WoeyJonkers[m]> no it's just arm-none-eabi
<WoeyJonkers[m]> i changed that earlier
<barni2000[m]> ok than maybe you should try to update your gcc
<barni2000[m]> i have 13.2.0
<WoeyJonkers[m]> what, has it been updated in the last 2 and a half years? lol
<barni2000[m]> maybe some parameters changed
<WoeyJonkers[m]> why tf is apt using a 2 year old version
<WoeyJonkers[m]> i knew it was a little behind but wow
<barni2000[m]> because you are using LTS distro
<WoeyJonkers[m]> so 23.10 would probably be newer
<barni2000[m]> yes
<WoeyJonkers[m]> i see
<barni2000[m]> but you can use envkernel