mmind00 changed the topic of #linux-rockchip to: Rockchip development discussion | public log at https://libera.irclog.whitequark.org/linux-rockchip
alpernebbi has quit [Ping timeout: 245 seconds]
alpernebbi has joined #linux-rockchip
_whitelogger has joined #linux-rockchip
npcomp has quit [Ping timeout: 245 seconds]
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 252 seconds]
kevery1 is now known as kevery
hexdump0815 has quit [Ping timeout: 265 seconds]
hexdump0815 has joined #linux-rockchip
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 248 seconds]
kevery1 is now known as kevery
gnuiyl has quit [Quit: Leaving]
gnuiyl has joined #linux-rockchip
naoki has joined #linux-rockchip
<user21> I got it running again based on the armbian build and put the patch files into the `userpatches` folder
<user21> compiled mesa with flags, running the test now and still getting the `Couldn't open kernel device`
<user21> is the .ko file I need to load manually ? and what is the file it tries to look for ?
<user21> did you succeed in getting this tested on 5b ?
<user21> I think mu patches are not applied, see last comment in this post https://forum.armbian.com/topic/28677-how-to-apply-my-own-kernel-patch/
System_Error has quit [Remote host closed the connection]
System_Error has joined #linux-rockchip
System_Error has quit [Remote host closed the connection]
<a3f> qschulz, If /soc/aliases were to be like /aliases, it wouldn't help, yes. But the idea is that /soc/aliases would have the same numbering as used in the SoC reference manual instead. Board-level aliases would go into /aliases then
System_Error has joined #linux-rockchip
<a3f> barebox uses /chosen/barebox,bootsource-mmcX and so on properties for that. I would try to upstream this as /chosen/aliases/ when your /chosen/bootsource goes in
stikonas has joined #linux-rockchip
raster has joined #linux-rockchip
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 252 seconds]
kevery1 is now known as kevery
stikonas has quit [Quit: Konversation terminated!]
franoosh has joined #linux-rockchip
ldevulder has joined #linux-rockchip
<CounterPillow> <user21> did you succeed in getting this tested on 5b ? <-- yes
<CounterPillow> user21: you should be seeing a device node in /dev/accel/
<CounterPillow> You do not need to manually load the driver
<CounterPillow> what you do need to do however is build with it, so make sure CONFIG_DRM_ACCEL=y and CONFIG_DRM_ACCEL_ROCKET=y are set
<CounterPillow> (or =m for the latter)
<qschulz> a3f: I assume s;/chosen/aliases;/soc/aliases; is what you meant?
<qschulz> but thanks, makes sense. We should be using that for the gpio controller for example, which slightly depends on boot order if no alias is provided
<qschulz> and one can imagine the GPIO numbering scheme is different on pin headers used by a board compared to the one in the SoC datasheet
naoki has quit [Quit: naoki]
valpackett has joined #linux-rockchip
<user21> @CounterPillow: what was the kernel version the patches were applied to ?
<CounterPillow> our rockchip-devel branch, but any recent kernel version will work.
<user21> ok
<Ermine> Does mainline kernel have any limitations on number of partitions on MMC storage on RK3588s ?
<user21> I got a conflict on last two commits on 6.14.5 nothing major, fixable
<CounterPillow> Ermine: I doubt the mmc controller is even aware of partitions aside from the two hardware boot partitions. If you're having issues, it's probably because you formatted your flash storage as MBR, and not GPT.
<CounterPillow> Unless you're trying to keep compatibility with MS-DOS, MBR should probably not be used.
<Ermine> Well, we see only 6 partitions here, though u-boot lists all 7
erg_ has joined #linux-rockchip
erg_ has quit [Remote host closed the connection]
franoosh has quit [Remote host closed the connection]
valpackett has quit [Ping timeout: 248 seconds]
franoosh has joined #linux-rockchip
System_Error has quit [Remote host closed the connection]
franoosh has quit [Remote host closed the connection]
System_Error has joined #linux-rockchip
dsimic has quit [Ping timeout: 265 seconds]
dsimic has joined #linux-rockchip
ldevulder has quit [Quit: Leaving]
<user21> @CounterPillow I've applied the patches, created a new image, booted but I don't see the /dev/accel
<CounterPillow> user21: yes but did you enable both the driver and the DRM_ACCEL framework in your kernel config
<user21> normally this is part of the patches
<user21> but I see it is as module not built-in
<user21> let me find what to load manually
<CounterPillow> that's fine, but that patch is just the defconfig
<CounterPillow> you don't need to load manually
<user21> ah
<CounterPillow> the config you build the kernel with needs to have it
<user21> I see
<CounterPillow> defconfig is just applied if you `make defconfig` and may differ from what you actually do
<user21> I see, looking where to trigger this for the armbian based builds
raster has quit [Quit: Gettin' stinky!]
stikonas has joined #linux-rockchip
ungeskriptet has quit [Ping timeout: 260 seconds]
ungeskriptet has joined #linux-rockchip
<a3f> qschulz, yes, /chosen/aliases -> /soc/aliases.
<user21> ok so now that I have activated the right kernel config with the "CONFIG_DRM_ACCEL=y and CONFIG_DRM_ACCEL_ROCKET=y" turns out the kernel patches are not working for 6.14.5 because "drm_sched_init_args" is defined in "/drm/gpu_scheduler.h" from 6.15 and up
<user21> this breaks the compilation
franoosh has joined #linux-rockchip
<CounterPillow> Oh, or rather
<CounterPillow> you should drop it
<CounterPillow> 6.14 looks to still be using the old API then
<user21> oh I see, good catch thank you
<user21> trying
<user21> dropped that patch, recompiled everything, booted the image but I still don't see the /dev/accel
<user21> the kernel .config was having the CONFIG_DRM_ACCEL=y and CONFIG_DRM_ACCEL_ROCKET=y and CONFIG_DRM=y
<CounterPillow> anything in /sys/kernel/debug/devices_deferred?
<user21> the file is there but it is empty
<CounterPillow> okay, so no deferred devices, that's good
<CounterPillow> sudo dmesg | grep -i rocket
<user21> empty
<CounterPillow> You do not need to manually load any kernel module
<CounterPillow> so
<CounterPillow> if it's not loading, it means you're not using the right DT
<user21> crap
<user21> need to review
<CounterPillow> you can try installing device-tree-compiler and then running `dtc -I fs /sys/firmware/devicetree/base` to see the currently loaded device tree, look for any nodes with rknn in the compatible. If they're missing, that means you're not using the right DT
valpackett has joined #linux-rockchip
<user21> thank you! trying now
franoosh has quit [Ping timeout: 268 seconds]
<user21> there are some lines but not alot, worried this is just armbuild stuff
<user21> and the actual chages to dts seems are applied but get overlayed by something else from armbian build
<user21> compatible = "rockchip,rk3588-rknn-core\0rockchip,rknn-core";
<CounterPillow> is status = "okay" in that node?
<user21> status = "disabled";
<user21> compatible = "rockchip,rk3588-rknn-core-top\0rockchip,rknn-core-top";
<user21> status = "disabled";
<user21> compatible = "rockchip,rk3588-rknn-core\0rockchip,rknn-core";
<user21> status = "disabled";
<user21> rknn_core_2 = "/npu-core@fdad0000";
<user21> rknn_mmu_1 = "/iommu@fdac9000";
<user21> rknn_core_top = "/npu-core@fdab0000";
<user21> rknn_core_1 = "/npu-core@fdac0000";
<CounterPillow> Okay, so the changes of the base DT are in there but the device specific ones that enable those aren't.
<user21> rknn_mmu_2 = "/iommu@fdad9000";
<user21> ok so suspicion is that my patches are getting overriden by some build step
<CounterPillow> The problem likely is that you're not using the rock-5b device tree. The changes should translate to the 5b plus one quite similarly as that 5b enablement commit already does though
<CounterPillow> (though if it is a 5bp device tree then whatever random patch for it armbian ships is likely completely detached from mainline since sre only recently submitted one to mainline that he wrote himself)
<user21> and the build command is like this "./compile.sh BOARD=orangepi5-plus BRANCH=edge BUILD_DESKTOP=no BUILD_MINIMAL=yes KERNEL_CONFIGURE=no RELEASE=bookworm KERNELBRANCH='branch:v6.14.5'"
<user21> all the patches go into "userpatches/kernel/archive/rockchip64-6.14"
<CounterPillow> that doesn't tell me much since I don't use armbian and have no interest in ever touching it ;)
<user21> ah, ok, no problem, what do you use ? I don't care to be honest, armbian was a way to abstract out a build framework and generate an .img file that get flushed to a SSD
<user21> if there is a better system I'm in
<user21> I need kernel 16.4.5+ with patches and the right device tree, then boot it
<CounterPillow> at work we generate our images using debos
<CounterPillow> debos just handles the image generation, to make a kernel package with the right patches applied you can just fork debian's kernel package (or make your own) and add the patches there. Or you can forego all of that and just `make bindeb-pkg` in the kernel tree and throw the resulting debs (confusingly in ..) into it, if it has to be a quick and dirty job
<user21> is there a guide that I can try this quickly
jmabsd has joined #linux-rockchip
<user21> something like
<user21> git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git ~/linux-stable
<user21> cd ~/linux-stable
<user21> git switch v6.14.5
<user21> git am *.patch
<user21> cd ~/debos
<user21> ./debos build --linux-src=~/linux-stable
<user21> then get an image I can dd to ssd or sdcard
<jmabsd> user21: no idea sorry, best of luck.
<CounterPillow> no, debos is a bit more up-front setup to make a description of the steps you want to build your image
stikonas has quit [Remote host closed the connection]
<jmabsd> By the way, regarding the Radxa Rock5B - RK3588  "SPL" vs "SPI" terminology, as discussed in this forum thread https://forum.radxa.com/t/flash-spi-and-spl-on-rock5b-questions-caveat-spl-is-never-flashed/26800/
<jmabsd> I still feel Radxa's installation docs page, and this forum thread, are a bit unclear.
<jmabsd> Actually did Yuntian write a post to get some other guy Peter Wang and some "Nasca" to have a look?
<jmabsd> I think the answer is: "SPI is an u-boot image, and it also contains SPL which is RockChip's early boot code.
<jmabsd> The SPI file is flashed to the SPI flash chip on the Rock5B PCB, which is used as boot medium by the Rock5B.
<jmabsd> Meanwhile, the SPL file is only used in advanced debugging, to make the Rock5B actually boot when in MaskROM mode and connected to a host computer via USB. Here, the host computer will send the SPL file via USB to the Rock5B, to cause it to enter a normal boot procedure."
<jmabsd> Well maybe it's clear enough now.
jmabsd has left #linux-rockchip [#linux-rockchip]
<user21> nice
<user21> quick update on my effort: indeed I got the wrong device tree, retrying a new compile and tracing it down