lanefu changed the topic of #armbian-rockchip to: Armbian - Linux for ARM development boards | Rockchip SoC | www.armbian.com | This channel is relayed to the equivalent Discord channel | this channel is logged
<DC-IRC> [Discord] <lanefu> yeah it's part of armbian-ramlog service
DC-IRC has quit [Remote host closed the connection]
DC-IRC has joined #armbian-rockchip
<DC-IRC> [Discord] <Narga> Update on my endeavours on getting the Nanopi CM3588 working:
<DC-IRC> [Discord] <Narga> 1) I spent a lot of time to understand how to flash the board directly to emmc with Rkdevtool by connection to it via USB cable. I got the Armbian image for the NanoPc-T6 to boot, but with that image lots of hardware features like HDMI aren't working (I didn't test NVMe)
<DC-IRC> [Discord] <Narga> 2) I tried building armbian using the kernel sources from Friendlyelec, using @lanefu 's example https://github.com/lanefu/armbian-userpatches-example-indiedroid-nova/
<DC-IRC> [Discord] <Narga> After fixing some build errors that were causes by the Armbian builder, there was another error in the middle of the kernel compiling which I don't think I am able to debug and solve.
<DC-IRC> [Discord] <Narga> 3) I compared the device tree files from Friendlyelec CM3588 to the mainline DT files from NanoPc-T6 and, after countless tries and changes to my custom cm3588 dts file, managed to get *something* to compile without errors. But unfortunately, this image doesn't boot.
<DC-IRC> [Discord] <Narga> Thanks for your help so far!
<DC-IRC> [Discord] <Narga> I think it's now getting to a point though where I'm feeling burnt out trying and trying, after spending many hours on this. Since I want my board to work at some point, to be able to tinker on the OS/software level, I'll just use the default Debian imge from Friendlyelec, maybe convert it to Dietpi since I believe Dietpi removes all packages it doesn't need .
<DC-IRC> [Discord] <Narga> I did see a forum thread where other users are trying to get the CM3588 to work. So I might get back to it at some point πŸ™‚
<DC-IRC> [Discord] <Narga> I believe you @lanefu were asking, I found some resources on device trees which I found at least somewhat beginner friendly:
<DC-IRC> [Discord] <igorpec> There is a switch BUILD_MINIMAL=yes, that comes with "nothing".
<DC-IRC> [Discord] <igorpec> which is lighter and comes without any dietpi bloatware
<DC-IRC> [Discord] <Narga> Thanks! I used this option after a while, even though it was not 100% clear to me what exactly it does. I just used it to try to minimize build time on my machine. The kernel building is using some caching and build very quickly if I change only a dts file for example. But the image takes a loooooong time to build.
<DC-IRC> [Discord] <Narga> BUILD_MINIMAL doesn't help though if I can't build a working image though πŸ˜… Dietpi has a script which converts a stock debian installation to dietpi by removing lots of stuff I believe
<DC-IRC> [Discord] <Narga> I haven't used Dietpi much so far though. It does seem very slim and not bloaty at all though.
<DC-IRC> [Discord] <Narga> They have a comparison of stock debian vs armbian vs debian on their homepage. But they didn't compare it with Armbian BUILD_MINIMAL I think
<DC-IRC> [Discord] <igorpec> they are cheating that data, sadly
<DC-IRC> [Discord] <igorpec> dietpi downloads image from someone and brand it as dietpi. they provide some scripts to deal with this and that ... and thats about it
<DC-IRC> [Discord] <igorpec> default image from FriendlyElec is terrible and with dietpi "optimisation", trash only gets additional / different smell. No real advantages. If you can't build image from sources, it should raise alarms. Some real work needs to be invested ...
<DC-IRC> [Discord] <Narga> Thanks for the heads-up! On both Dietpi and Friendlyelec.
<DC-IRC> [Discord] <Narga> Are there any resources/threads on those issues? I'd love to read or hear more about the "dietpi problems" and why the stock Friendlyelec Debian images are terrible, so I can build my own opinions on those matters πŸ˜„
<DC-IRC> [Discord] <Narga> How are they cheating their comparison data?
<DC-IRC> [Discord] <igorpec> dietpi script is more or less a one man show. Code was not reviewed, it should be obvious that comparison is made by amateurs, also comparing server images with their minimal, not minimal vs. minimal, their htop is hacked to appear lighter, most of changes brings no value, changing ramlog into dietpi-ramlog, log into dietpi-log ...
<DC-IRC> [Discord] <igorpec> just look for development history, also for FriendlyElec Debian ... how they made this. If you can find it
<DC-IRC> [Discord] <igorpec> if you want to understand more, invest some time. I don't care what you run on your computer πŸ˜‰
<DC-IRC> [Discord] <Narga> Thanks for the insights πŸ‘
<DC-IRC> [Discord] <Narga> I'll have a look into how dietpi as well as Friendlyelec Debian images are made. And of course, this takes time πŸ˜„
<DC-IRC> [Discord] <igorpec> its a complete waste of time ... but yeah, if you need confirmation.
<DC-IRC> [Discord] <igorpec> problems you have are not on that level anyway ...
<DC-IRC> [Discord] <Narga> Well if you tell me that Friendlyelecs images are terrible and someone later or I myself ask why didn't I simply go for their easy to flash stock image, I'd like to have arguments myself πŸ˜„ Otherwise I'd basically just tell them "something I heard from someone else" which is seldomly a good approach in discussions πŸ˜… Hope you understand πŸ™‚
<DC-IRC> [Discord] <Narga> Maybe I'll just build an Armbian NanoPc-T6 image since this at least boots and try to modify/extend its device tree file in such a way to get things like HDMI, USB and NVMe working.
<DC-IRC> [Discord] <Narga> And maybe I should get a UART thing/device for debugging
<DC-IRC> [Discord] <igorpec> This is just a tip. Use it or ignore.
<DC-IRC> [Discord] <igorpec> remember, this is free software ... free tip
<DC-IRC> [Discord] <Narga> Of course, I am not demanding anything from anyone πŸ˜„ Sorry if there is any misunderstanding.
<DC-IRC> [Discord] <Narga> I am just curious.
<DC-IRC> [Discord] <Narga> And I'm trying to get a new device working to, hopefully in the end, be able to contribute. But I realize I don't have the knowledge to get this working in a reasonable amount of time. By the time I'd get this working, the cm3588 has probably been integrated in the mainline kernel by someone else, lol
<DC-IRC> [Discord] <Narga> Of course, I am not demanding anything from anyone πŸ˜„ Sorry if there is any misunderstanding.
<DC-IRC> [Discord] <Narga> I am just curious.
<DC-IRC> [Discord] <Narga> And I'm trying to get a new device working to, hopefully in the end, be able to contribute. But I realize I don't have the knowledge to get this working in a reasonable amount of time. By the time I'd get this working, the cm3588 has probably been integrated in the mainline kernel by someone way more knowledge in that topic, lol
<DC-IRC> [Discord] <igorpec> another tip. armbian is maintaining different CM https://www.armbian.com/bananapicm4io/
<DC-IRC> [Discord] <Narga> Sorry, but I don't understand. How is this correlated? This Bananpi seems to be based on another CPU while the Nanopi CM3588 uses a Rockchip πŸ€”
<DC-IRC> [Discord] <igorpec> yes, its different cpu
<DC-IRC> [Discord] <igorpec> its just a proposal. if you want to use rather that hardware
<DC-IRC> [Discord] <igorpec> one engineering hour is more then this hw costs ... so
<DC-IRC> [Discord] <igorpec> must go -- l8r
<DC-IRC> [Discord] <Narga> Ah I see. Sure, there are many different SBCs out there. But there are very specific reasons I chose the Friendlyelec CM3588 NAS:
<DC-IRC> [Discord] <Narga> It has 4 NVMe storage slots, 16GB RAM, 2.5G Ethernet, passive cooling and a powerful CPU. This makes it perfect for a very low energy consumption 24/7 SSD-NAS device which also has good power to run software and containers.
<DC-IRC> [Discord] <Narga> It's awesome!
<DC-IRC> [Discord] <Narga> The specs are here: https://wiki.friendlyelec.com/wiki/index.php/CM3588
<DC-IRC> [Discord] <igorpec> Most expensive is support, not features.
<DC-IRC> [Discord] <igorpec> Why you don't run that? πŸ™‚
<DC-IRC> [Discord] <igorpec> Check forums for helios64
<DC-IRC> [Discord] <shivansps> the mainline status for rk3588 in collabora marks panthor as ready/sent except for the rockpi 5a for some reason, this could mean panthor is just about to be merged?
<DC-IRC> [Discord] <mecoblock> You should be able to use legacy kernel with Friendlyelec's CM3588 devicetree as I know. Have you tried that?
<DC-IRC> [Discord] <mecoblock> You should be able to use legacy kernel with Friendlyelec's CM3588 devicetree as far as I know. Have you tried that?
<DC-IRC> [Discord] <mecoblock> Their naming scheme with the revisions is the worst but whatever
<DC-IRC> [Discord] <Narga> This is what I have tried in my custom config file for the cm3588 based on the example from @lanefu
<DC-IRC> [Discord] <Narga> Or do you mean by simply setting KERNEL_TARGET=legacy instead of edge without pointing to the Friendlyelec repo?
<DC-IRC> [Discord] <Narga> Yeah I know, their naming scheme is bad lol
<DC-IRC> [Discord] <Narga> I did use this dts file and stripped lots of stuff out that caused errors when compiling. I used it with edge kernel though.
<DC-IRC> [Discord] <Narga> It does compile, but does not boot
<DC-IRC> [Discord] <mecoblock> Try legacy or friendlyelec's kernel with that DTS. Edge HDMI and stuff isn't fully upstreamed afaik
<DC-IRC> [Discord] <mecoblock> Mainline and BSP device tree aren't as compatible I think
<DC-IRC> [Discord] <Narga> I don't think legacy mainline kernel will work when I just use this dts file since it depends on a lot of custom Rockchip stuff and .h files that are not in the default Linux kernel.
<DC-IRC> [Discord] <mecoblock> legacy isn't mainline
<DC-IRC> [Discord] <Narga> As seen here
<DC-IRC> [Discord] <Narga> Oh... Hmm in that case I'll have to check it out
<DC-IRC> [Discord] <mecoblock> Legacy is armbians Rockchip kernel https://github.com/armbian/linux-rockchip
<DC-IRC> [Discord] <mecoblock> Until Collabora's RK3588 efforts are done this is your best resource combined with the correct dts
<DC-IRC> [Discord] <Narga> Thanks a lot! I'll give it a try πŸ‘
<DC-IRC> [Discord] <mecoblock> Looking forward to your update, if it works maybe it can be added to the device list
<DC-IRC> [Discord] <mecoblock> That NAS board really is nice hardware with lacking (good) software for now.
<DC-IRC> [Discord] <Narga> Agreed. But I'm sure that will change over time πŸ™‚
<DC-IRC> [Discord] <Narga> I compiled the legacy, but I don't think my custom dts file was included in the build. At least when I open the built image, in 0.bootfs.img/dtb/rockchip/ I can't see it. Maybe I put it in the wrong spot?
<DC-IRC> [Discord] <Narga> Before when trying to compile it with the edge kernel, I put my dts files in
<DC-IRC> [Discord] <Narga> patch/kernel/rockchip-rk3588-edge/dt/
<DC-IRC> [Discord] <Narga> Now for the legacy kernel I put it into
<DC-IRC> [Discord] <Narga> patch/kernel/rk35xx-legacy/dt/
<DC-IRC> [Discord] <Narga> (I had to create this folder though since it didn't exist by default)
<DC-IRC> [Discord] <Narga> Is this the wrong folder?
<DC-IRC> [Discord] <Narga> I used this folder since I found this KERNELPATCHDIR in the family config for rockchip-rk3588.conf
<DC-IRC> [Discord] <Narga> Ah I think I need to add "general-add-overlay-support.patch" πŸ’‘
<DC-IRC> [Discord] <mecoblock> I feel like you’re doing too much here since legacy is already in the builder. But someone like @amazingfate probably knows better how to use Build with legacy Kernel and a custom dts
<DC-IRC> [Discord] <Narga> Ah no, I am dumb. The magic file was "0000.patching_config.yaml". Now the dts files are getting included I believe.
<DC-IRC> [Discord] <Narga> However, now the compilation fails with an error though πŸ˜‚
<DC-IRC> [Discord] <Narga> I ignored this file at first since at the top it says
<DC-IRC> [Discord] <Narga> "just some info stuff, not used by the patching scripts" πŸ™ƒ
<DC-IRC> [Discord] <mecoblock> well what’s the error, do you have warnings as error on ?
<DC-IRC> [Discord] <Narga> https://paste.armbian.com/asojivasab
<DC-IRC> [Discord] <Narga> I didn't change any warnings I believe. I'm just using the compile.sh script
<DC-IRC> [Discord] <viraniac> Yes, that is a but. Let me raise a PR for the same
<DC-IRC> [Discord] <viraniac> Yes, that is a bug. Let me raise a PR for the same
<DC-IRC> [Discord] <Narga> Oooohhhhh! I would've probably spent hours trying to figure out what I'm doing wrong...
<DC-IRC> [Discord] <Narga> Thank you!
<DC-IRC> [Discord] <viraniac> https://github.com/armbian/build/pull/6238
<DC-IRC> [Discord] <viraniac> I have handled the error with the git command. There is another error in your build
<DC-IRC> [Discord] <viraniac> Starting at line 618: There are some dtb compilation failure. Not sure if that arch/arm64/boot/dts/rockchip/px30-evb-ddr3-lvds-v10.dts file belongs to armbian or not
<DC-IRC> [Discord] <viraniac> Someone from rockchip team can comment on that
<DC-IRC> [Discord] <Narga> Ah, I have seen this error when I tried compiling with GitHub Actions. But in my local build, this was not an issue for me.
<DC-IRC> [Discord] <viraniac> Create a patch removing px30-evb-ddr3-lvds-v10.dtb from arch/arm64/boot/dts/rockchip/Makefile. It would compile fine afterwards
<DC-IRC> [Discord] <Narga> Huh, thanks for pointing this out! I did not see those error before, since I didn't think it would continue this far after an error.
<DC-IRC> [Discord] <Narga> I'll figure out how to do that, thanks for your tip! πŸ˜„
<DC-IRC> [Discord] <Narga> Okay after some testing and trying, this issue seems much deeper. Simply removing the one file didn't do much since it broke lots of dependencies and stuff.
<DC-IRC> [Discord] <Narga> Then I tried building a legacy image for Nanopi-R6S. This is failing as well: https://paste.armbian.com/evipidowus
<DC-IRC> [Discord] <Narga> Can someone confirm that building with
<DC-IRC> [Discord] <Narga> BRANCH=legacy
<DC-IRC> [Discord] <Narga> and
<DC-IRC> [Discord] <Narga> BOARD=nanopi-r6s
<DC-IRC> [Discord] <Narga> Is broken?
<DC-IRC> [Discord] <Narga> Or is it just my local repo?
<DC-IRC> [Discord] <Narga> Update: Figured it out!
<DC-IRC> [Discord] <Narga> 0000.patching_config.yaml is not compatible with legacy rockchip kernel πŸ™ƒ
<DC-IRC> [Discord] <Narga> Guess I'll have to work with patches instead of dts files. Much more cumbersome πŸ˜…
<DC-IRC> [Discord] <Narga> Props to whoever came up with the patching_config, so much easier than patches πŸ‘