<FergusL>
re: rg351 u-boot on sdcard Okay, that's interesting: unless I'm too tired to read my terminal, I just got to that point: I used the building and image assembly script provided by odroid (and used in other custom firmwares) *except* for u-boot.bin which is the one I built from v2022.04 mainline instead of from odroid's tree (or any fork) and boom,
<FergusL>
booted my rg351m, no CS to 3v3 hack, it went straight to the u-boot console, and `version` confirmed it's indeed 2022.04
<FergusL>
https://github.com/hardkernel/u-boot/blob/odroidgoA-v2017.09/make.sh#L849 basically I just commented this line and changed a rkbin command for it to use the one I used before (just to factor out as much as possible of their workflow, to narrow down on the cause of an booting to the sdcard's u-boot without the spi chip hack)
WoC has quit [Read error: Connection reset by peer]
guillaume_g has joined #u-boot
Gravis has quit [Ping timeout: 260 seconds]
Gravis has joined #u-boot
ldevulder has joined #u-boot
thopiekar_ has joined #u-boot
thopiekar has quit [Ping timeout: 265 seconds]
<Kwiboo>
FergusL: the spi nor in your device probably contains rk miniloader (and not u-boot SPL) that will look for uboot.img and trust.img created by rk imageloader/trust_merger tool, see boot flow 1 at https://opensource.rock-chips.com/wiki_Boot_option
thopiekar_ has quit [Ping timeout: 246 seconds]
thopiekar has joined #u-boot
<Kwiboo>
you can probably run something like "../rkbin/tools/loaderimage --pack --uboot u-boot-dtb.bin uboot.img <CONFIG_TEXT_BASE>" to generate a uboot.img and dd that to secor 0x4000 (16384) of sd-card
<Kwiboo>
possible that you also need to build and dd a trust.img at 0x8000 using rkbin
<Kwiboo>
the rockchip-u-boot.bin will contain u-boot.itb at 0x4000, seen in boot flow 2, so miniloader in spi nor will not understand that format and insted loads uboot.img from spi nor instead of from your sd-card
<Kwiboo>
should be 0x6000 (24576) and not 0x8000 for trust.img
<Kwiboo>
running "tools/trust_merger --ignore-bl32 RKTRUST/RK3326TRUST.ini" in rkbin repo should generate a trust.img without bl32/optee
<FergusL>
before going ahead with your suggestion I did a little bit of grepping on the rk binaries using the strings I see in the early stage debut (using uart speed of 1500000) to find out, and confirm, where they come from exactly
<FergusL>
the only match I get grepping the date in the first message is in a file called "rk3326_header_miniloader_spiboot.img" , in the original hardkernel uboot tree for OGA
<FergusL>
that would seem to confirm that it's indeed miniloader in the spi flash
<FergusL>
Kwiboo awesome! that was it. Just had to match the bl31 version with that in the SPI flash, which makes sense
<FergusL>
and for some reason the official rkbin repo only has history for a few versions
<FergusL>
so grabbed rk3326_bl31_v1.14.elf, modified the RKTRUST ini file to use it instead, then trust_merger as you typed it, dd'ed and voila
<FergusL>
macromorgan fyi, the last little bits of informations above got me to get the rg351m to boot sdcard uboot just fine. Since it's clearly not specific to my device, it should work the same on the oga
<macromorgan>
I'll be brutally honest, I'm not sure why you'd use the rockchip miniloader since mainline everything works. The one possible exception would be if you are trying to use Optee.
<macromorgan>
even then it's possible to get Optee to work on mainline, I just haven't figured out the right incantation to do so yet...
<macromorgan>
sorry, missed the part above about the miniloader on your SPI chip and whatnot
<macromorgan>
either way, you can also flash mainline U-Boot to the SPI chip, though it might clash with the custom firmware that's using the older U-Boot
<macromorgan>
I tend to forget that not everyone develops on these devices, some people actually want to play games :-p
mmu_man has joined #u-boot
<FergusL>
haha yeah, I agree but I find it beneficial, if not important, to document a way to use mainline as much as possible and not have to touch any of the hardware. Arguably though, resorting to the rk tools and the binaries in their repo, (and worst even, having to dig old .bin not officially published anymore) is not really mainline anymore... but
<FergusL>
hey, that's cool
guillaume_g has quit [Quit: Konversation terminated!]
<FergusL>
Kwiboo how does it sound to you that there is indeed a need to match compatible versions (which aren't documented afaik) for trust_merger?
<FergusL>
I'm talking about the versions of miniloader and bl31 binaries
mmu_man has quit [Ping timeout: 268 seconds]
<marex>
macromorgan: you mean to use it for Game Console Cornucopia and co. ?
mmu_man has joined #u-boot
torez has quit [Quit: torez]
<Tartarus>
marex: Hummm, I _think_ I have a HW now fails with your series. Network test failed twice now. Starting a just that board sanity check and then bisect
<Tartarus>
marex: Yeah, configs/j721e_evm_a72_defconfig fails now with your series
<Tartarus>
k3-navss-ringacc ringacc@2b800000: Ring Accelerator probed rings:286, gp-rings[96,20] sci-dev-i
<Tartarus>
ethernet@46000000port@1 Waiting for PHY auto negotiation to complete....... done
<Tartarus>
BOOTP broadcast 1
<Tartarus>
... repeats until out of broadcast attempts, fails
<Tartarus>
bisect run going now
berte has quit [Quit: restart]
berte has joined #u-boot
<Tartarus>
marex: Ah, well, bisect _almost_ done and I think this falls in to the hole of things NishanthMenon is working on getting un-stuck, device trees in U-Boot out of sync with Linux
<Tartarus>
NishanthMenon: Assuming I'm right here, I'm just going to disable ethernet on j721e_evm now, and it can get re-enabled when you're able to get the device trees re-synced with Linux, yes?
vagrantc has joined #u-boot
<Tartarus>
NishanthMenon: Or should I leave it enabled and build but not functions, and just tell my setup to skip network tests?
<Tartarus>
marex, NishanthMenon: Yup, "net: phy: Synchronize PHY interface modes with Linux" breaks network on j721e as I bet the u-boot dts has the wrong PHY mode/info somewhere here and was fixed in Linux
slobodan has quit [Remote host closed the connection]
jaganteki has joined #u-boot
slobodan has joined #u-boot
ldevulder has quit [Quit: Leaving]
slobodan has quit [Remote host closed the connection]
slobodan has joined #u-boot
<NishanthMenon>
Tartarus: yes please.
<Tartarus>
OK, updated my scripts to just skip network tests
slobodan has quit [Remote host closed the connection]
<NishanthMenon>
Tartarus: thanks
slobodan has joined #u-boot
mixfix41 has quit [Ping timeout: 265 seconds]
slobodan_ has joined #u-boot
slobodan_ has quit [Remote host closed the connection]
slobodan_ has joined #u-boot
slobodan has quit [Ping timeout: 248 seconds]
slobodan_ has quit [Ping timeout: 265 seconds]
<marex>
Tartarus: errrr, well, what should I do here ?
<marex>
Tartarus: wait for NishanthMenon with a fix or drop a patch ?
alan_o has quit [Remote host closed the connection]
alan_o has joined #u-boot
slobodan has joined #u-boot
<Tartarus>
marex: You're good, applied & pushed
stefanro has quit [Ping timeout: 265 seconds]
stefanro has joined #u-boot
<sjg1_>
Tartarus: In the bootstd series the statement at the end is wrong. It also affect boards which currently have no boot command. I suppose you know that but thought I should mention it. I can redo that patch
<Tartarus>
sjg1_: Well, lemme fire off this other email I just finished
persmule has quit [Remote host closed the connection]