krzk changed the topic of #linux-exynos to: Samsung S3C24xx and S3C64xx planned deprecation and removal (see LKML) | Linux Samsung SoC Exynos | https://exynos.wiki.kernel.org | This channel is logged: https://libera.irclog.whitequark.org/linux-exynos
mszyprow has joined #linux-exynos
knuxify has joined #linux-exynos
<knuxify> i'm trying to re-add support for the exynos 4212, any large changes since... (checks notes)... circa 2017 i should be aware of? :p
psydroid has joined #linux-exynos
<knuxify> more seriously though - i'm attempting to mainline my galaxy tab 3 8.0, which uses the exynos 4212, but i'm currently stuck - i've managed to get the system to boot and show logs via uart, but it seems to experience mysterious crashes when it loads the initramfs
<knuxify> here's the log from one of those crashes: https://pastebin.com/4XKXkZVr
<knuxify> i've reverted all the exynos 4212 removal commits i could find, but that didn't fix anything. i'm mostly just wondering if this could be related to something more common in the exynos4212 or if the fault's somewhere within my dts etc. my understanding of the platform is still quite primitive
<knuxify> (the reason why i say "mysterious crashes" is because the crash reason differs on every boot - sometimes it throws "BUG: FP instruction issued in kernel mode with FP unit disabled", sometimes it's "Unable to handle kernel NULL pointer dereference at virtual address 0000000" and sometimes it prints nothing at all - but what the crashes that print something have in common is that they all seem to error out during initramfs unpacking)
<knuxify> could entirely be an issue with how i make my boot.img - although the values match up with downstream, so i'm not sure what exactly it could be - but i don't think it is, especially given that if it was just trying to load an empty chunk of memory it'd say that it couldn't find the initramfs, not crash with kernel panics
<knuxify> (ok, if it didn't have anything to boot from, it *would* panic, but not crash!)
tobiasjakobi has joined #linux-exynos
tobiasjakobi has quit [Remote host closed the connection]
mszyprow^home has joined #linux-exynos
mszyprow has quit [Ping timeout: 256 seconds]
chewitt has quit [Quit: Zzz..]
<krzk> knuxify: ugh, Exynos4212 you say... it's possible to bring it back but won't be easy. First, please start with v5.16, not with next. Second, several mach-exynos parts were moved to drivers/soc/samsung. You need to adjust your reverts to apply to new path and new drivers.
<krzk> Third, dts files are being refactored significantly in last 4 years. exynos4.dtsi changed, thus you need to modify exynos4212.dtsi in similar way how 4210 and 4412 were.
<krzk> I see you try 5.15, so ignore my first comment about 5.16. 5.15 is good.
<krzk> You should use earlycon in cmdline. You can also try init=/bin/sh to avoid bring-up of several optional modules and drivers.
<krzk> knuxify: The NULL pointer stacktrace could point you to place of failure (there is a chance). Other errors look like you have there more serious problem, maybe cache controller is not properly configured (although it is brought up), maybe CPU or bus frequencies are wrong, although it seems cpufreq was not yet configured when the erro happened.
<krzk> knuxify: did you read the comment related to that FP error ? To try CONFIG_DEBUG_ATOMIC_SLEEP?
<krzk> knuxify: be sure also that sizes of kernel/ramdisk/dtb are not too big for your u-boot loading addresses/ranges.
<krzk> You build your kernel with hard-float compiler, so be sure that you actually build it correctly... In general this will be difficult to debug because you run it under Android which does a lot of its own weirdness. Everything we debug is only regular Linux. So regular GCC (Debian, Ubuntu, gnueabi, not hard-float), exynos defconfig (plus eventually debugging options) and regular Linux OS (or boot to
<krzk> /bin/sh).
<krzk> If you want to debug Android stuff - no clue. It's never good to solve two problems at the same time...
<knuxify> i'm not using android, that's just the parameters the bootloader (s-boot 4.0 in this case) provides - this is running pure linux (with build tools/toolchain and initramfs postmarketOS to be exact)
<knuxify> *from postmarketOS
<knuxify> anyways, i'll try what you mentioned, and go over the code more carefully - thanks for the tips
<knuxify> alright, cleaned up my changes and rebased against v5.16: https://github.com/knuxify/tab3-8.0-mainline/tree/exynos4212-reintroduce
<knuxify> (not including my tab3 dts - that's wip and pushed here: https://github.com/knuxify/tab3-8.0-mainline/tree/v5.16-exynos)
<knuxify> unfortunately, the issues persist regardless
<knuxify> in any case, the fp error is rare; i usually get "Unable to handle kernel NULL pointer dereference at virtual address 00000000" and such. here's a different log, this time with a more recent build: https://pastebin.com/1AKBYwWh
<knuxify> (few changes of note - i disabled initramfs support for this test run altogether, hoping i'd be able to skip it (which didn't help at all). also temporarily commented out all the s5m8769 stuff in my dts)
<knuxify> i did some grepping around the kernel source to find any 4412-specific stuff that might've needed to be applied to the 4212, but couldn't find anything, and the few things i found (like line 199/200 in arch/arm/mach-exynos/platsmp.c) don't seem to fix my issues
mszyprow^home has quit [Ping timeout: 250 seconds]
knuxify has quit [Remote host closed the connection]
mszyprow^home has joined #linux-exynos
March-123 has joined #linux-exynos
mszyprow^home has quit [Ping timeout: 268 seconds]
March-123 has quit [Ping timeout: 256 seconds]