ChanServ changed the topic of #linux-rockchip to: Rockchip development discussion
<CounterPillow> Thanks
<naoki> Kwiboo: it works if CONFIG_OF_LIBFDT_OVERLAY is not enabled
<naoki> it works with latest rkbin
<Kwiboo> I have mostly used rk3568_bl31_v1.36.elf and ddr bin from https://gitlab.com/rk3588_linux/rk/rkbin/-/tree/linux-5.10-gen-rkr3.5
<Kwiboo> it just cleans up some Kconfig that should not be needed, work-in-progress for v2 of the external/rockchip-tpl series
<CounterPillow> Hmmm, still no luck. I think I'll wait until some of this stuff has settled into upstream to work on it further.
<Kwiboo> I have been using the evb-rk3568 config for my rk356x testing so far, and only cared to see if sd+emmc works, I just want u-boot to load linux :-)
<naoki> Kwiboo: did you try CONFIG_OF_LIBFDT_OVERLAY=y?
<CounterPillow> I assume that means they didn't try that :P
<naoki> I want to try few more things, but my build PC was crashed some minutes ago...
kevery has joined #linux-rockchip
<Kwiboo> I can now confirm that I was able to start linux on my rock-3a+c with CONFIG_OF_LIBFDT_OVERLAY=y and CONFIG_TOOLS_FIT_SIGNATURE=y
<CounterPillow> Nice, thanks. I will look into this branch tomorrow
<naoki> thanks, I'll try it after my machine is repaired...
kevery has quit [Ping timeout: 248 seconds]
stikonas has quit [Ping timeout: 252 seconds]
Tenkawa has quit [Quit: Was I really ever here?]
chewitt has quit [Ping timeout: 248 seconds]
chewitt has joined #linux-rockchip
Tenkawa has joined #linux-rockchip
anarsoul|2 has joined #linux-rockchip
paulk-bis has joined #linux-rockchip
Net147 has quit [Read error: Connection reset by peer]
Net147 has joined #linux-rockchip
Net147 has quit [Changing host]
Net147 has joined #linux-rockchip
paulk has quit [*.net *.split]
a1batross has quit [*.net *.split]
anarsoul has quit [*.net *.split]
jelly has quit [*.net *.split]
jelly has joined #linux-rockchip
a1batross has joined #linux-rockchip
Tenkawa has quit [Quit: Was I really ever here?]
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #linux-rockchip
alpernebbi has quit [Quit: alpernebbi]
alpernebbi has joined #linux-rockchip
naoki has quit [Quit: naoki]
naoki has joined #linux-rockchip
vagrantc has joined #linux-rockchip
ldevulder_ has joined #linux-rockchip
ldevulder has quit [Ping timeout: 248 seconds]
vagrantc has quit [Quit: leaving]
ldevulder_ has quit [Remote host closed the connection]
ldevulder has joined #linux-rockchip
naoki has quit [Quit: naoki]
rtp_ is now known as rtp
Net147 has quit [Quit: Quit]
Net147 has joined #linux-rockchip
Net147 has quit [Changing host]
Net147 has joined #linux-rockchip
chewitt has quit [Quit: Zzz..]
chewitt has joined #linux-rockchip
clarity has quit [Ping timeout: 248 seconds]
clarity has joined #linux-rockchip
chewitt has quit [Quit: Zzz..]
psydroid has quit [Quit: Bridge terminating on SIGTERM]
vulpes2[m] has quit [Quit: Bridge terminating on SIGTERM]
LinuxHackerman has quit [Quit: Bridge terminating on SIGTERM]
shoragan[m] has quit [Quit: Bridge terminating on SIGTERM]
samueldr has quit [Quit: Bridge terminating on SIGTERM]
wiizzard has quit [Quit: Bridge terminating on SIGTERM]
amstan1 has quit [Quit: Bridge terminating on SIGTERM]
arne-b[m] has quit [Quit: Bridge terminating on SIGTERM]
matthias_bgg has quit [Read error: Connection reset by peer]
amstan has joined #linux-rockchip
matthias_bgg has joined #linux-rockchip
samueldr has joined #linux-rockchip
psydroid has joined #linux-rockchip
shoragan[m] has joined #linux-rockchip
LinuxHackerman has joined #linux-rockchip
vulpes2[m] has joined #linux-rockchip
wiizzard has joined #linux-rockchip
arne-b[m] has joined #linux-rockchip
epoll has quit [Ping timeout: 246 seconds]
naoki has joined #linux-rockchip
epoll has joined #linux-rockchip
naoki has quit [Quit: naoki]
arne-b[m] has quit [Ping timeout: 252 seconds]
vulpes2[m] has quit [Ping timeout: 248 seconds]
LinuxHackerman has quit [Ping timeout: 248 seconds]
amstan has quit [Ping timeout: 252 seconds]
samueldr has quit [Ping timeout: 246 seconds]
wiizzard has quit [Ping timeout: 252 seconds]
psydroid has quit [Ping timeout: 252 seconds]
shoragan[m] has quit [Ping timeout: 252 seconds]
matthias_bgg has quit [Ping timeout: 252 seconds]
arne-b[m] has joined #linux-rockchip
wiizzard has joined #linux-rockchip
shoragan[m] has joined #linux-rockchip
LinuxHackerman has joined #linux-rockchip
<CounterPillow> Interesting, with my own dtb Kwiboo's branch fails booting with fdt overlays just like mine, but with evb it works
vulpes2[m] has joined #linux-rockchip
samueldr has joined #linux-rockchip
psydroid has joined #linux-rockchip
<Kwiboo> CounterPillow: so dtb is the issue? maybe SPL also need to filter out assign-clock related props?
<Kwiboo> CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
amstan has joined #linux-rockchip
chewitt has joined #linux-rockchip
Tenkawa has joined #linux-rockchip
<CounterPillow> My current hypothesis is that turning on overlays makes u-boot compile the dts with node names, which increases the size of the dts, which stomps on something else
<CounterPillow> But I'll try the remove props
<CounterPillow> hmmm, remove props didn't work. something weird is going on. I wish I knew where exactly it was hanging but I don't have an expensive debug probe
<CounterPillow> hmmm, u-boot.itb isn't much larger with overlay support (929280 vs. 908288 bytes), so I don't think my hypothesis holds any water
<Kwiboo> you can allways add "#debug LOG_DEBUG" to include/log.h and see lots and lots of debug messages on your serial console
<Kwiboo> #define LOG_DEBUG
<CounterPillow> .itb of size 923648 works, one of size 928256 doesn't work. Time to throw out stuff to find the precise change that triggers it and then see if it's specific to that node or just the size
<Kwiboo> it could be some size limit/memory overlap, lookin at the fdt_addr_r=0x0a100000 and ramdisk_addr_r=0x0a200000, possible other ranges only are 1MiB until they overlap?
<CounterPillow> 927744 doesn't work, 926208 doesn't work. Getting closer...
<CounterPillow> 925696 doesn't work, 924672 doesn't work, 924160 doesn't work, 923136 works as expected, 923648 works as expected with a different set of nodes, so it seems to really just be the size
<CounterPillow> There seems to be a fdt_size_r used in like 3 places, but I don't see where that is actually read
<CounterPillow> and increasing it with changing the ranges so they wouldn't overlap didn't work :(
naoki has joined #linux-rockchip
<naoki> interesting...
<CounterPillow> can't seem to find the right config value to set fdt size
<naoki> rk3399 works with large .itb
<CounterPillow> Here's what I get with LOG_DEBUG https://gist.github.com/CounterPillow/3f81dab5146e5907021195c6b3fda283
<Kwiboo> CounterPillow: could you try with CONFIG_SPL_FIT_SIGNATURE=y, I wrote TOOLS earlier but should have been SPL, then SPL will verify hash of the data loaded from the FIT
<CounterPillow> Will try, thanks for the hint
<CounterPillow> Do I need to somehow also generate a hash?
<CounterPillow> Selecting default config 'rk3566-soquartz-blade.dtb'
<CounterPillow> ## Checking hash(es) for config config-1 ... fit_config_verify_required_keys: No signature node found: FDT_ERR_NOTFOUND
<CounterPillow> OK
<Kwiboo> hash should be added by the mkimage call, but not for the config, that is only added with full signing
<CounterPillow> it hangs at the same point, so if hash verification failing triggers a board reset it's not happening
<Kwiboo> okay, then is is probably passing the hash test on rest or the loadables, it probably prinst sha256 +OK mixed with the rest of the debug text
<CounterPillow> Yeah, I see some sha256 +OK in the output
<CounterPillow> so I guess my hypothesis of this being related to the size is wrong then, unless something other than SPL is running into issues
<CounterPillow> CONFIG_SPL_LOAD_FIT_ADDRESS is 0x0, is that bad?
<Kwiboo> at least reading the external data into dst= is not a problem, strange issue, your u-boot seems to be ~700kb (size=ad030) and dtb ~68kb (size=10d00), does not seem to overlap with other addresses
<CounterPillow> the last message is that it's jumping to 0xa00000, which is the text base. I guess if something overwrote what's there then that could be an issue but it's apparently not the dtb doing it from what I gather
<Kwiboo> SPL_LOAD_FIT_ADDRESS seem to be used for loading FIT from ram, so should not be used here
<CounterPillow> Alright
<CounterPillow> I'll try CONFIG_SPL_FIT_FULL_CHECK to see if that shows anything interesting
<Kwiboo> exactly, u-boot proper is loaded to 0xa00000, fdt directly after that, and atf to 0x40000 and some sram locations, SPL is read in by bootrom to 0x0
<CounterPillow> oh god what if my SPL is simply too chonky? But then jumping to atf wouldn't succeed
<Kwiboo> SPL is usually pretty small, and it can be up to ~256kb, only job of SPL is to read FIT from storage, load content to dram, then jump to atf/u-boot proper
<CounterPillow> ok with the full check enabled it just bootloops, interesting!
<CounterPillow> the reason for the reset seems unrelated, but interesting https://gist.github.com/CounterPillow/c267caafa9cad7e1fecca818e273d47b
<CounterPillow> Let me get rid of my assigned-clock nonsense that only exists because I felt like I needed it to make sd cards work
<Kwiboo> SPL should not need to set any clocks, it can to speed up loading FIT
<Kwiboo> does not look like atf starts, I see "DDR Version V1.13", there is 1.15 and what aft-bl31 are you using?
<CounterPillow> though I observed the same with the 1.35 and the 1.15 ram init
<Kwiboo> and just redusing size of dts/dtb makes it work?
<CounterPillow> yeah
<CounterPillow> too bad we can't debug this atf since it's a binary :/
naoki has quit [Ping timeout: 260 seconds]
chewitt has quit [Quit: Zzz..]
naoki has joined #linux-rockchip
chewitt has joined #linux-rockchip
naoki has quit [Quit: naoki]
naoki has joined #linux-rockchip
crabbedhaloablut has quit [Quit: No Ping reply in 180 seconds.]
crabbedhaloablut has joined #linux-rockchip
<CounterPillow> Is there a way to list the parts of a fit image and where they will get loaded?
<CounterPillow> okay, ./tools/dumpimage -l
naoki has quit [Quit: naoki]
stikonas has joined #linux-rockchip
vagrantc has joined #linux-rockchip
<CounterPillow> Does atf consume the dtb somehow? If so maybe there's a limit of 0xfa00 or something in there.
Rathann has joined #linux-rockchip
vagrantc has quit [Quit: leaving]
naoki has joined #linux-rockchip
<naoki> fdt is small in fit. is there any way to compress u-boot part?
<naoki> try to reduce u-boot size...
Rathann has quit [Ping timeout: 252 seconds]
<naoki> hmm... only size of dtb is important...?
<CounterPillow> fdt size of 62072 doesn't work, 61968 works
<CounterPillow> Yeah, only size seems the problem. I removed the same nodes as I did in the last step but on a full dts and that didn't work.
<naoki> now 61944, u-boot works, but vendor kernel panic ;)
<naoki> btw I think -@ is not needed for dtb in fit, it reduces size very much
<naoki> hm. full dtb without -@ for radxa-e25 and radxa-cm3-sodimm-io are small enough. it boots fine
<naoki> oh? vendor kernel panic on e25, not panic on cm3-sodimm-io...
<naoki> mainline kernel works fine on both