Tartarus changed the topic of #u-boot to: SOURCE MOVED TO https://source.denx.de/u-boot/u-boot.git / U-Boot v2023.01, v2023.04-rc2 / Merge Window is CLOSED, next branch is OPEN / Release v2023.04 is scheduled for 2023-04-03 / Channel archives at https://libera.irclog.whitequark.org/u-boot
WoC has quit [Remote host closed the connection]
GNUtoo has quit [Ping timeout: 255 seconds]
jeeebz has quit [Ping timeout: 248 seconds]
GNUtoo has joined #u-boot
WoC has joined #u-boot
jybz has joined #u-boot
jybz has quit [Ping timeout: 246 seconds]
naoki has joined #u-boot
jybz has joined #u-boot
naoki has quit [Quit: naoki]
vagrantc has quit [Quit: leaving]
mncheck has quit [Ping timeout: 246 seconds]
hramrach has quit [Ping timeout: 260 seconds]
hramrach has joined #u-boot
apritzel_ has quit [Ping timeout: 246 seconds]
vagrantc has joined #u-boot
jybz has quit [Ping timeout: 255 seconds]
stefanro has joined #u-boot
jybz has joined #u-boot
naoki has joined #u-boot
ccf has quit [Ping timeout: 264 seconds]
hramrach has quit [Ping timeout: 255 seconds]
hramrach has joined #u-boot
camus has quit [Quit: camus]
camus1 has joined #u-boot
camus1 is now known as camus
camus has quit [Ping timeout: 255 seconds]
camus has joined #u-boot
thopiekar has quit [Ping timeout: 255 seconds]
thopiekar has joined #u-boot
mrnuke has quit [Read error: Connection reset by peer]
mrnuke has joined #u-boot
Wouter010067044 has quit [Quit: The Lounge - https://thelounge.chat]
Wouter010067044 has joined #u-boot
vagrantc has quit [Quit: leaving]
advi[1] has joined #u-boot
mmu_man has quit [Ping timeout: 246 seconds]
ikarso has joined #u-boot
apritzel_ has joined #u-boot
teejay_ has quit [Ping timeout: 255 seconds]
goliath has joined #u-boot
goliath has quit [Client Quit]
goliath has joined #u-boot
teejay has joined #u-boot
apritzel_ has quit [Ping timeout: 255 seconds]
mncheck has joined #u-boot
monstr has joined #u-boot
thopiekar has quit [Ping timeout: 268 seconds]
thopiekar has joined #u-boot
mckoan|away is now known as mckoan
marc1 has quit [Ping timeout: 246 seconds]
marc1 has joined #u-boot
teejay has quit [Ping timeout: 255 seconds]
teejay has joined #u-boot
frieder has joined #u-boot
sszy has joined #u-boot
advi[1] has quit [Quit: Client closed]
ccf has joined #u-boot
xcm has joined #u-boot
sakman has quit [Read error: Connection reset by peer]
sakman has joined #u-boot
xcm_ has quit [Read error: Connection reset by peer]
apritzel has joined #u-boot
matthias_bgg has joined #u-boot
Wouter010067044 has quit [Quit: The Lounge - https://thelounge.chat]
Wouter010067044 has joined #u-boot
camus has quit [Ping timeout: 255 seconds]
camus has joined #u-boot
d-s-e has joined #u-boot
naoki has quit [Quit: naoki]
mmu_man has joined #u-boot
matthias_bgg has quit [Ping timeout: 245 seconds]
matthias_bgg has joined #u-boot
Wouter010067044 has quit [Quit: The Lounge - https://thelounge.chat]
Wouter010067044 has joined #u-boot
<d-s-e> I'm trying master after having some problems with v2022.01, now I have no virtio devices anymore. Any ideas?
mckoan is now known as mckoan|away
torez has joined #u-boot
<ccf> lpddr4_set_ctl: channel 0 training pass
<ccf> Finish SDRAM initialization...
<ccf> lpddr4_set_ctl: channel 1 training pass
<ccf> lpddr4_set_rate: change freq to 800MHz 1, 0
<ccf> Missing DTB
<ccf> ... These are the last lines of custom rk3399 board, I cannot get it to boot further (current next). I guess it is the SPL (after TPL) telling "Missing DTB", right?
d-s-e has quit [Ping timeout: 246 seconds]
d-s-e has joined #u-boot
d-s-e has quit [Ping timeout: 255 seconds]
d-s-e has joined #u-boot
<d-s-e> klankermeier
<d-s-e> sorry, ignore that, wrong window.
Net147 has quit [Ping timeout: 255 seconds]
Net147 has joined #u-boot
Net147 has joined #u-boot
Net147 has quit [Changing host]
<marex> qschulz: ^
mmu_man has quit [Ping timeout: 246 seconds]
macromorgan has quit [Quit: Leaving]
mmu_man has joined #u-boot
ikarso has quit [Quit: Connection closed for inactivity]
sauce has quit [Quit: sauce]
redbrain has quit [Read error: Connection reset by peer]
sauce has joined #u-boot
redbrain has joined #u-boot
<ccf> Any ideas how to debug "Missing DTB" on rk3399?
monstr has quit [Remote host closed the connection]
matthias_bgg has quit [Ping timeout: 246 seconds]
hanetzer has quit [Ping timeout: 246 seconds]
hanetzer has joined #u-boot
<marex> ccf: a good start would be to pastebin the entire log, not just random fragment of it
<marex> from power on, until the error
hanetzer has quit [Ping timeout: 255 seconds]
hanetzer has joined #u-boot
<ccf> marex: Here it is: https://zerobin.net/?5d9053b83197c5a6#rHwlot+j0v4C6OSFJpRp1XP/CD1h2tGwYov5Qdbs8pc=
<ccf> marex: as far as I can tell, fdt_check_header() seems to fail in lib/fdtdec.c
ccf has quit [Remote host closed the connection]
ccf has joined #u-boot
<ccf> dtb seems to be missing, so for testing I enabled CONFIG_OF_EMBED and that leads t
<ccf> o build error: make[3]: *** No rule to make target 'tpl/dts/dt-spl.dtb.S', needed by 'tpl/dts/dt-spl.dtb.o'. Stop.
<ccf> any ideas?
d-s-e has quit [Ping timeout: 255 seconds]
sszy has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
d-s-e has joined #u-boot
<d-s-e> After failing with EFI, I tried another approach with a bare u-boot on qemu. Loading and running a script works fine, but now booting the kernel is not working anymore: https://paste.debian.net/hidden/c6401d47/
frieder has quit [Remote host closed the connection]
<d-s-e> Any ideas what's going wrong here?
<Tartarus> d-s-e: I wonder if these days you need to use EFI boot stub really
<Tartarus> marex: I should probably have folded the patch I cc'd you on in with https://patchwork.ozlabs.org/project/uboot/patch/20230216033659.3877684-10-trini@konsulko.com/ as that's where your platform is getting spl_board_init() from to start with
<Tartarus> How do you want to move forward?
<d-s-e> Tartartus: I don't use EFI currently. I tried the same with EFI recently, then booting did work, but running a script did not.
<d-s-e> This was wit v2022.01. On master I couldn't even access a virtio device.
<Tartarus> I thought the virtio thing was fixed
<d-s-e> hm, virtio worked on 2022.01 but not in master for me.
d-s-e has quit [Quit: Konversation terminated!]
zPlus has quit [Quit: quit]
apritzel has quit [Ping timeout: 246 seconds]
advi[1] has joined #u-boot
GNUtoo has quit [Ping timeout: 255 seconds]
GNUtoo has joined #u-boot
naoki has joined #u-boot
thopiekar has quit [Quit: Likely restarting quassel...]
thopiekar has joined #u-boot
naoki has quit [Quit: naoki]
pgreco has quit [Quit: ZNC 1.8.2 - https://znc.in]
pgreco has joined #u-boot
apritzel_ has joined #u-boot
prabhakarlad has quit [Quit: Client closed]
mmu_man has quit [Ping timeout: 255 seconds]
prabhakarlad has joined #u-boot
vagrantc has joined #u-boot
* marex revives
<marex> ccf: seems like SPL is not able to read its control DT
<marex> ccf: see lib/fdtdec.c
<marex> 602 static int fdtdec_prepare_fdt(const void *blob)
<marex> 603 {
<marex> 605 if (spl_phase() <= PHASE_SPL) {
<marex> 604 if (!blob || ((uintptr_t)blob & 3) || fdt_check_header(blob)) {
<marex> 606 puts("Missing DTB\n");
<marex> do s@puts.*@printf("Missing DTB at %x\n", blob);@ and see what's up
<marex> maybe the blob is really missing, or the header is broken
<marex> did it ever work before or is this a new hardware ?
<marex> Tartarus: as long as Marcel is fine with that ... the menlo board does not use CAAM anyway, but uh, where is the CAAM inited in SPL if arch_misc_init() isn't called ?
<sjg1> d-s-e: Are you booting from 64-bit U-Boot to 64-bit Linux? We don't have CI tests for this at present. Which U-Boot board are you building?
<sjg1> xypron: What test suite do you use for U-Boot's UEFI support?
<xypron> sjg1 UEFI SCT
GNUtoo has quit [Remote host closed the connection]
<Tartarus> marex: Right, the CAAM won't be init'd if there's no populated hooks for it. So it should probably get a common one, sigh, as a clean-up
<Tartarus> spl_board_init is kind of a bad name
<marex> Tartarus: so you're introducing a bug there ?
<Tartarus> Not convinced it works today if you just enabled CAAM
<marex> I wonder if all we need to do is set DM_FLAG_PROBE_AFTER_BIND on CAAM driver in SPL somewhere
<Tartarus> As the other platforms that do have a more complex function
<marex> Tartarus: I am convinced it works on downstream board which does use HABv4 authentication AND encryption
mmu_man has joined #u-boot
<marex> the board part is not upstream, the docs are
<Tartarus> Yeah, it really should be moving this over to arch/arm/mach-imx/imx8m/spl.c or soc.c
<marex> at least on mx8mm it should work, and verdin/menlo is mx8mm
<Tartarus> Since while spl_board_init implies board-specific, it rarely is
<marex> Tartarus: it should, but you shouldn't just break something like that
<Tartarus> (and those cases tend to have a further sub-call)
<Tartarus> Fair point
<marex> hold on
<marex> Tartarus: arch/arm/mach-imx/spl.c board_spl_fit_post_load() might be an option
<marex> although that's another can of worms
<marex> but in the end, I think dev_or_flags(dev, DM_FLAG_PROBE_AFTER_BIND); is the way to go
<marex> in some common SPL code in arch/arm/mach-imx/imx8m/
<Tartarus> There's certainly more clean-up a lot of these hooks could take
<sjg1> xypron: Thanks...do you have results for U-Boot somewhere?
<Tartarus> The event framework would be good, but I forget if we can easily do that in SPL too
<Tartarus> Or want to add that there as well
prabhakarlad has quit [Quit: Client closed]
<marex> Tartarus: you dont need event for that, just the flag
<Tartarus> And blah, can't just override spl_board_init for everyone, clashes with other boards like beacon
Wouter010067044 has quit [Quit: The Lounge - https://thelounge.chat]
Wouter010067044 has joined #u-boot
<marex> Tartarus: where is aford when you need him here
<Tartarus> I'll just select ARCH_MISC_INIT for imx8m always, for now
GNUtoo has joined #u-boot
<marex> Tartarus: mind you, arch_misc_init() is not called by anything in SPL except for the board code
<marex> so just enabling ARCH_MISC_INIT wont do it
<Tartarus> Right
<marex> afk food
<Tartarus> It could be better
<Tartarus> I'm just trying to make some progress on "hooks should be selected, not prompted"
<Tartarus> Since you either have the hook or fail to function
<Tartarus> So it's not appropriate to ask
<apalos> sjg1: you can also run the ACS from arm, which is testing boards against EBBR
<apalos> it still uses SCT, but limits the tests to what EBBR describes
<apalos> and that thing checks the TPM code conformance as well wrt to the TCG specs
<apalos> but it does take some time to run on real boards, on qemu it's saner
<apalos> IIRC u-boot is compliant since 2021.04, there have been fixes here and there since then though
<xypron> apalos: SCT runs fastest on the sandbox
<apalos> xypron: sure, but I want to test secure EFI variableson RPMB etc
<apalos> I have a very ugly hacky patch somewhere, emulating an RPMB in software for my own testing
<apalos> perhaps i should try and send that
advi[1] has quit [Quit: Client closed]
<marex> Tartarus: why not turn all the hooks into weak functions and be done with it ?
<Tartarus> Well first, sjg1 would yell about weak functions being ugly :)
<Tartarus> And second, there's already some hooks, I think that make use of weaks, so it's not quite cut and dry
<marex> is that a personal opinion or is there some reason behind that too ?
<marex> Tartarus: I have to say, I am a big fan of the weak functions
<Tartarus> But also also, that would lead to a little bloat each time, even with LTO I don't think many empty functions optimize down to 1
<marex> when done properly, they make it very easy to override parts of the code
<marex> multi-level weak would be nice
<Tartarus> I also like weak functions, when done properly
<Tartarus> I think sjg1 has an issue since they're sometimes to often, not
<marex> Tartarus: arent empty weak functions optimized to nothing when done properly ?
<marex> lets wait for sjg1 input
<Tartarus> marex: If you have weak foo_init_r and real foo_init_r, the weak one is discarded, yes
<Tartarus> If you only have weak foo_init_r (returns 0), we still have that mini function
<Tartarus> and if we also have weak bar_init_r (returns 0), we get that function too, not just a single onee
<marex> Tartarus: err, dont we have LTO to inline the empty function ?
<Tartarus> I don't know that does in all cases, esp for some of these hooks
<marex> have you got an example ?
<Tartarus> I mean, they're entries in static init_fnc_t init_sequence_r[]
<Tartarus> so I don't know that it knows it can do something smart there
<Tartarus> We also aren't yet to the point of globally doing LTO by default
advi[1] has joined #u-boot
<marex> oh those things ... ugh
<marex> Tartarus: well, I wonder ... if those were all converted into a long list of function calls, each of which would be weak and default to empty ...
<marex> like ... int init_sequence_r() { func1(); func2(); ... };
<Tartarus> For the moment, I want to make it harder to incorrectly configure a board
<marex> and each __weak funcN() {} would have weak default implementation ...
<marex> I think that would be very nice to have, since all the Kconfig madness would just go away
<marex> the board/arch/... would just default the appropriate weak functions, no config options needed, problem solved
<marex> I had this in mind for a while in fact
<Tartarus> how far have you gotten with that experiment?
torez has quit [Remote host closed the connection]
<marex> Tartarus: still in my head really
naoki has joined #u-boot
prabhakarlad has joined #u-boot
advi[1] has quit [Quit: Client closed]
prabhakarlad has quit [Quit: Client closed]
<sjg1> apalos: thanks for the details. Yes emulators in U-Boot are good :-) I will reply to your email
<sjg1> marex: Tatarus: I don't like weak functions since it is so hard to figure out what is going on. I end up disassembling U-Boot to try to work it out
<sjg1> I think it is better to use linker lists or drivers, where there is some kind of interface
<sjg1> But otherwise, I think events are good, as it is possible to list them (either outside or inside U-Boot). They are still somewhat 'magic', but more discoverable
<sjg1> Maybe there is a perfect way of doing this sort of thing
<sjg1> But I would like to drop things like the reserve functions in board_f. Also we have EVT_FT_FIXUP as a way to do DT fixups, which currently use weak functions and are a mess IMO
<marex> sjg1: surely that part of weak functions can be solved
<marex> sjg1: e.g. by looking at the map file
<marex> sjg1: it really is no different then greping for Kconfig symbol
<marex> so I am not buying that argument
goliath has quit [Quit: SIGSEGV]
<sjg1> How does the map file help? I don't know which function is being called
<sjg1> With events you can see this easily
<sjg1> It also supports multiple functions, which is often very useful. E.g. see all the ft_board_setup(