mmind00 changed the topic of #linux-rockchip to: Rockchip development discussion | public log at https://libera.irclog.whitequark.org/linux-rockchip
stikonas has quit [Quit: Konversation terminated!]
mps has quit [Ping timeout: 268 seconds]
Daanct12 has joined #linux-rockchip
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 246 seconds]
kevery1 is now known as kevery
alpernebbi has quit [Ping timeout: 264 seconds]
alpernebbi has joined #linux-rockchip
naoki has quit [Quit: naoki]
mps has joined #linux-rockchip
naoki has joined #linux-rockchip
franoosh has joined #linux-rockchip
erg_ has joined #linux-rockchip
franoosh has quit [Ping timeout: 264 seconds]
raster has joined #linux-rockchip
ldevulder has joined #linux-rockchip
eballetbo has joined #linux-rockchip
erg_ has quit [Changing host]
erg_ has joined #linux-rockchip
naoki has quit [Remote host closed the connection]
naoki has joined #linux-rockchip
UndrWater_ has quit [Excess Flood]
UndrWater has joined #linux-rockchip
UndrWater has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
stikonas has joined #linux-rockchip
UndrWater has joined #linux-rockchip
stikonas has quit [Quit: Konversation terminated!]
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 255 seconds]
kevery1 is now known as kevery
UndrWater has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
UndrWater has joined #linux-rockchip
Livio has joined #linux-rockchip
raster has quit [Quit: Gettin' stinky!]
<mort> so how can I get meta-rockchip's u-boot-rockchip to produce trust.img
<qschulz> mort: community-maintained or Rockchip's meta-rockchip?
<mort> qschulz: rockchip's, I need their kernel patches for HDMI to work
<qschulz> mort: absolutely unrelated :)
<qschulz> mort: you could use the community-maintained one and have your own recipes in your own layer
<mort> that's true
<qschulz> that's what we do for example
<mort> I should try that out actually
<qschulz> so, no idea sorry. I'm pretty sure that upstream U-Boot doesn't support trust.img creation
<mort> yeah so I need u-boot-rockchip as well
<qschulz> and community-maintained meta-rockchip supports upstream u-boot only
<mort> hm but that might not be a problem if u-boot-rockchip is what fails to boot if trust.img is missing
<qschulz> mort: do you **really** need Rockchip's U-Boot?
<qschulz> You could mix upstream U-Boot and Rockchip's kernel for example (we do this)
<mort> I assumed that there was a good reason for Rockchip to provide their own u-boot
<mort> but that might have been completely wrong
<mort> how is it with idblock.img? Can you just omit both idblock and trust?
<mort> I assume idblock.img is also a rockchipism and not part of upstream u-boot
<qschulz> mort: the good reason is probably laziness ;)
<qschulz> or so much technical debt that they cannot update anymore
<qschulz> mort: what exactly do you need? also, which board/SoC
warpme has joined #linux-rockchip
raster has joined #linux-rockchip
<mort> qschulz: it's a FriendlyElec NanoPi R6C, with an rk3588
<mort> What I need of note is working HDMI output and GPU drivers I guess
<qschulz> mort: don't need those in U-Boot I assume :)
<mort> Oh from a u-boot perspective I literally just need something which puts the dtb and kernel in RAM and jumps to the kernel entry point
Daanct12 has quit [Quit: WeeChat 4.3.2]
<mort> And handles whatever else the SoC needs to be done before the kernel starts
<qschulz> not merged yet, but should be in time for 2024.10
<qschulz> you could probably rebase on top of 2024.07 in our own tree
<qschulz> should be released in about 2-3 weeks
<qschulz> it's possible not everything will work though, for example we discovered recently that with upstream U-Boot you couldn't get DSI working on downstream or upstream kernel
<qschulz> it was patched, but maybe something similar isn't working for HDMI as well
<mort> qschulz: rk3588 HDMI patches are here: https://lkml.org/lkml/2024/6/1/214
mort has quit [Read error: Connection reset by peer]
mort has joined #linux-rockchip
Livio has quit [Ping timeout: 252 seconds]
<mort> huh my IRC client crashed/restarted, weird
<mort> anyway, AFAIK that HDMI patch set is not merged yet so there is no upstream HDMI support. I want to try to get that working so that I can try the panthor GPU drivers, but first I think I wanna try to get Rockchip's official stuff working
Daanct12 has joined #linux-rockchip
<qschulz> mort: what I meant to say is that with Rockchip's kernel but upstream U-Boot we didn't have DSI working
<qschulz> until we patched U-Boot
<qschulz> and I'm saying that MAYBE something similar could happen for HDMI
<mort> aha
<mort> though apparently upstream u-boot doesn't even generate.a uboot.img so I still have some figuring out to do
<qschulz> so, try and see for yourself but there may be a bit more work than just using vanilla upstream U-Boot for this to work
<qschulz> mort: follow the instructions
Daanct12 has quit [Quit: WeeChat 4.3.2]
<mort> which instructions
<mort> oh, I thought you meant instructions for getting the yocto recipe to generate uboot.img
<qschulz> mort: in short, you should be able to write u-boot-rockchip.bin to offset 64 (32KB) on your MMC
<qschulz> there seems to be a chapter for generating uboot.img
<qschulz> but I have never used those, u-boot-rockchip.bin and u-boot-rockchip-spi.bin for our boards
<mort> and trust.img interestingly
<mort> anyway those instructions naturally don't tell you how to get the yocto recipe to get u-boot to generate a uboot.img or u-boot-rockchip.bin or u-boot-rockchip-spi.bin or anything else
<qschulz> mort: start small, build stuff manually, flash at the proper offset, then integrate it into Yocto
Livio has joined #linux-rockchip
<naoki> btw is "partitions=" PARTS_DEFAULT really correct? is there anyone who use it?
<naoki> ^u-boot env
<qschulz> I don't use it, bootflow which is now the standard boot method for Rockchip IIRC doesn't use this
<mort> so I tried to add DEPENDS += "u-boot" to my image recipe, I have never seen other image recipes do this and I assumed that PREFERRED_PROVIDER_virtual/bootloader="u-boot" would take care of that but apparently not. Regardless, compiling u-boot with the evb-rk3588 defconfig complains that a TPL binary is missing... I feel it's easier to "just" use
<mort> u-boot-rockchip
<naoki> define BL31 and ROCKCHIP_TPL, written in doc
<mort> yeah but that requires modifying the u-boot recipe and I really really don't wanna have to deal with that right now
<qschulz> mort: all I can tell you is that Rockchip's U-Boot is REALLY painful to work with
<qschulz> and considering the current support in upstream U-Boot for RK3588, I think it's really worth it to spend a bit of time to get it to work on your board
<qschulz> especially since there are already patches available to support it
<mort> my experience is that the current support in upstream anything for rk3588 is pretty terrible
<qschulz> mort: have you tested upstream U-Boot yet?
<mort> only insofar as the aforementioned build errors due to the missing TPL binary
<qschulz> mort: you didn't follow the instructions, cannot complain that it doesn't work ;)
<naoki> export BL31=../rkbin/bin/rk35/rk3588_bl31_v1.33.elf
<naoki> export ROCKCHIP_TPL=../rkbin/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.09.bin
<naoki> make evb-rk3588_defconfig
<naoki> make CROSS_COMPILE=aarch64-linux-gnu-
<naoki> easy
<mort> qschulz: there are no instructions for the u-boot recipe, and if they were it would be: set PREFERRED_PROVIDER_virtual/bootloader to "u-boot" and maybe add u-boot to DEPENDS
<qschulz> mort: 1) I gave you the link to the u-boot docs that explain how to compile it manually
<qschulz> 2) I told you to start small and ignore Yocto for now
<qschulz> 3) I have you a link to how this is done in community maintained meta-rockchip
<qschulz> not wanting to use upstream is fine, but don't say it doesn't work when you haven't even used it
<naoki> btw, TF-A master want aarch64-none-eabi-gcc, I don't know easy way to prepare it on ubuntu 24.04 userland :( I don't want to make toolchains from source...
Livio has quit [Ping timeout: 268 seconds]
<naoki> LLVM can be used for TF-A, but I got error, I gave up to try TF-A master branch (lts branch is fine)
<naoki> should be fine. not tried yet
<naoki> plat/rockchip/rk3399/drivers/dram/dram_spec_timing.c:781:11: error: explicitly assigning value of variable of type 'uint32_t' (aka 'unsigned int') to itself [-Werror,-Wself-assign]
<naoki> 781 | twr_tmp = twr_tmp;
<naoki> | ~~~~~~~ ^ ~~~~~~~
<naoki> lol
<mort> there is very little in this world I hate more than -Werror
<mort> naoki: but you may be able to change build options to disable -Werror somehow
<qschulz> naoki: what's new in upstream TF-A that requires aarch64-none-eabi-gcc?
<naoki> qschulz: sorry, I don't know. I'm just an user...
<naoki> ah, sorry, aarch64-none-elf-gcc
<naoki> anyway, it will be easy to install LLVM on ubuntu userland ;)
psydroid2 has joined #linux-rockchip
naoki1 has joined #linux-rockchip
erg__ has joined #linux-rockchip
naoki1 has quit [Client Quit]
naoki1 has joined #linux-rockchip
<naoki1> oh llvm/clang found an error in u-boot for rk3588...
naoki has quit [*.net *.split]
erg_ has quit [*.net *.split]
psydroid has quit [*.net *.split]
qschulz has quit [*.net *.split]
manawyrm has quit [*.net *.split]
Danct12 has quit [*.net *.split]
naoki1 is now known as naoki
psydroid has joined #linux-rockchip
qschulz has joined #linux-rockchip
manawyrm has joined #linux-rockchip
Danct12 has joined #linux-rockchip
dsimic has quit [Ping timeout: 268 seconds]
dsimic has joined #linux-rockchip
<naoki> hmm
<naoki> building u-boot with clang -> error at last, binman cannot find some symbol
erg__ has quit [Remote host closed the connection]
franoosh has joined #linux-rockchip
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<naoki> I should not try llvm for such a critical part ;)
erg_ has joined #linux-rockchip
franoosh has quit [Ping timeout: 268 seconds]
qschulz has quit [*.net *.split]
manawyrm has quit [*.net *.split]
Danct12 has quit [*.net *.split]
manawyrm has joined #linux-rockchip
qschulz has joined #linux-rockchip
Danct12 has joined #linux-rockchip
<Kwiboo> mort: if you are lazy I have github actions workflows at https://github.com/Kwiboo/u-boot-build, see the rk3588-generic artifact at e.g. https://github.com/Kwiboo/u-boot-build/actions/runs/9052597073, should be in good state to load and boot linux from emmc/sd-card on most rk3588 boards
<naoki> I don't understand what is this ;)
crabbedhaloablut has quit []
crabbedhaloablut has joined #linux-rockchip
Stat_headcrabed has joined #linux-rockchip
warpme has joined #linux-rockchip
Stat_headcrabed has quit [Quit: Stat_headcrabed]
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
warpme has joined #linux-rockchip
psydroid2 has quit [Remote host closed the connection]
psydroid2 has joined #linux-rockchip
erg__ has joined #linux-rockchip
erg_ has quit [Ping timeout: 246 seconds]
Livio has joined #linux-rockchip
Livio has quit [Ping timeout: 255 seconds]
Stat_headcrabed has joined #linux-rockchip
raster has quit [Quit: Gettin' stinky!]
Stat_headcrabed has quit [Quit: Stat_headcrabed]
Helenah has quit [Ping timeout: 240 seconds]
Livio has joined #linux-rockchip
stikonas has joined #linux-rockchip
Stat_headcrabed has joined #linux-rockchip
ldevulder has quit [Quit: Leaving]
Stat_headcrabed has quit [Quit: Stat_headcrabed]
naoki has quit [Quit: naoki]
Livio has quit [Ping timeout: 264 seconds]
Livio has joined #linux-rockchip
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
psydroid2 has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
naoki has joined #linux-rockchip
<naoki> oh I see... in u-boot, there are problems only if HOSTCC=clang...
<naoki> just CC=clang works...
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 255 seconds]
kevery1 is now known as kevery
Helenah has joined #linux-rockchip
System_Error has quit [Remote host closed the connection]
stikonas has quit [Remote host closed the connection]
stikonas has joined #linux-rockchip
System_Error has joined #linux-rockchip
erg__ has quit [Remote host closed the connection]
System_Error has quit [Remote host closed the connection]
System_Error has joined #linux-rockchip
<naoki> mmm, "make foo-bar_defconfig with clang" doesn't work... confusing :(
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 264 seconds]
kevery1 is now known as kevery
Livio has quit [Ping timeout: 252 seconds]
stikonas has quit [Quit: Konversation terminated!]