Tartarus changed the topic of #u-boot to: SOURCE MOVED TO https://source.denx.de/u-boot/u-boot.git / U-Boot v2025.04, v2025.07-rc1 are OUT / Merge Window is CLOSED, next branch is CLOSED / Release v2025.07 is scheduled for 07 July 2025 / Channel archives at https://libera.irclog.whitequark.org/u-boot
davlefou has quit [Ping timeout: 276 seconds]
davlefou_ has quit [Ping timeout: 276 seconds]
matthewcroughan7 has joined #u-boot
matthewcroughan7 has quit [Write error: Connection reset by peer]
davlefou has joined #u-boot
davlefou_ has joined #u-boot
Hypfer6 has quit [Ping timeout: 260 seconds]
<marex> matthewcroughan: maybe the timer does start from 0 when the SoC powers ON ?
<marex> you can always try and dump the timer, then trigger soft reset, dump the timer again after reset and see if the timer did reset or only incremented by some meaningful value
<marex> in either case, you could use that timer to figure out what is taking long, right ?
<clever> marex: i also think the timer starts at 0
Hypfer6 has joined #u-boot
<marex> clever: it may or may not survive reset though
<clever> i'm pretty sure timer_get_boot_us() is just converting the timer to usec and printing it, and the numbers are basically the same for every test matthewcroughan did
<marex> clever: I am pretty sure you could confirm or refute this hypothesis by checking the sources ... you can also directly read the timer registers ...
<clever> arch/arm/cpu/armv8/generic_timer.c:ulong timer_get_boot_us(void)
<clever> yeah, its just reading cntpct_el0 and doing some fixed-point math to scale it
<clever> matthewcroughan: i need to go get some sleep, we can continue things later
<matthewcroughan> zzz
<matthewcroughan> thanks :#
mmu_man has quit [Ping timeout: 272 seconds]
jclsn has quit [Ping timeout: 272 seconds]
dhruvag2000 has joined #u-boot
jclsn has joined #u-boot
KREYREN_ has joined #u-boot
umbramalison has joined #u-boot
umbramalison_alt has quit [Ping timeout: 244 seconds]
LeSpocky has quit [Ping timeout: 248 seconds]
LeSpocky has joined #u-boot
persmule has joined #u-boot
matthewcroughan has quit [Ping timeout: 240 seconds]
kevery has joined #u-boot
dhruvag2000 has quit [Quit: Connection closed for inactivity]
clamor has joined #u-boot
clamor has quit [Ping timeout: 252 seconds]
clamor has joined #u-boot
monstr has joined #u-boot
monstr has quit [Ping timeout: 252 seconds]
goliath has joined #u-boot
frieder has joined #u-boot
<sjg1> Tartarus: Oh, sorry, yes. Fixed now. I need to move it to a proper directory instead of my devel one
mckoan|away is now known as mckoan
enok has joined #u-boot
prabhakalad has quit [Ping timeout: 244 seconds]
prabhakalad has joined #u-boot
swiftgeek has quit [Read error: Connection reset by peer]
mmu_man has joined #u-boot
enok has quit [Ping timeout: 252 seconds]
jmasson has left #u-boot [#u-boot]
sszy has joined #u-boot
derRichard has quit [Quit: Lost terminal]
mmu_man has quit [Ping timeout: 265 seconds]
<f_> \o clever :)
prabhakalad has quit [Quit: Konversation terminated!]
enok has joined #u-boot
prabhakalad has joined #u-boot
dhruvag2000 has joined #u-boot
enok has quit [Ping timeout: 252 seconds]
wooosaiiii has quit [Remote host closed the connection]
wooosaiiii has joined #u-boot
enok has joined #u-boot
wooosaiiii has quit [Remote host closed the connection]
wooosaiiii has joined #u-boot
mmu_man has joined #u-boot
clamor has quit [Read error: Connection reset by peer]
clamor has joined #u-boot
enok71 has joined #u-boot
enok has quit [Read error: Connection reset by peer]
enok has joined #u-boot
enok71 has quit [Ping timeout: 244 seconds]
swiftgeek has joined #u-boot
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #u-boot
KREYREN_ has quit [Ping timeout: 264 seconds]
haritz has joined #u-boot
haritz has joined #u-boot
frieder has quit [Quit: Leaving]
<clever> f_: *waves*
enok has quit [Ping timeout: 252 seconds]
enok has joined #u-boot
zsoltiv__ has quit [Ping timeout: 272 seconds]
monstr has joined #u-boot
jmasson has joined #u-boot
dhruvag2000 has quit [Quit: Connection closed for inactivity]
enok has quit [Ping timeout: 252 seconds]
<Kwiboo> matthewcroughan: clever: your bootstage report for TPL (dram init) and SPL looks as expected for a rk3588, around 200ms for TPL and similar for SPL, what board/defconfig are you using? with generic-rk3588_defconfig on my rock-5b u-boot proper take around 680ms to cli: see https://gist.github.com/Kwiboo/60247e79caf2e73e567535d8a233ff44
<Kwiboo> with uart pinctrl skipped in u-boot pre-reloc phase (https://patchwork.ozlabs.org/patch/1968958/), boot time is reduced by around 150ms, fdt_parent_offset() and bind/probe of pinctrl is very timeconsuming tasks in pre-reloc phase, try using similar debug printing to see what probe/bind is taking time during your boot
<Kwiboo> for optimal boot time you should look into using falcon boot, i.e. boot linux directly from SPL (after TF-A) and fully skip U-Boot proper
jmasson has left #u-boot [#u-boot]
enok has joined #u-boot
zsoltiv_ has joined #u-boot
Stalevar has quit [Read error: Connection reset by peer]
enok has quit [Quit: enok]
enok has joined #u-boot
enok has quit [Read error: Connection reset by peer]
Stalevar has joined #u-boot
KREYREN_ has joined #u-boot
naoki has quit [Quit: naoki]
KREYREN_ has quit [Ping timeout: 264 seconds]
<Tartarus> Sigh, coverity scan no longer emails the details on a new scan, just an HTML mail with the numbers, it looks like
wooosaiiii has quit [Remote host closed the connection]
KREYREN_ has joined #u-boot
wooosaiiii has joined #u-boot
frieder has joined #u-boot
wooosaiiii has quit [Remote host closed the connection]
wooosaiiii has joined #u-boot
Net147_ has quit [Quit: Quit]
Net147 has joined #u-boot
Net147 has quit [Changing host]
Net147 has joined #u-boot
<Tartarus> And I really wish we had an email'able report, there's two places in the video damage series that swap {x,y},{height,width} but the rest of the code does not, so maybe it's intentional and just not glaringly obvious from the comments
<apalos> agraf: is still in the channel Tartarus perhaps he remembers ;)
<Tartarus> Maybe :)
<Tartarus> And, looks like I need to maybe try out the report generator tools and start with the tutorial, sigh
goliath has quit [Quit: SIGSEGV]
matthewcroughan has joined #u-boot
<matthewcroughan> Kwiboo: I'm using a radxa-cm5 which doesn't actually have a proper dts in u-boot yet, which I was going to try to help with at some point when I have the things I wanted to get done with this board, done
<matthewcroughan> though I think naoki (who I see sometimes join the channel) might already have a dts for this board that isn't published yet
<matthewcroughan> either way I'm using the rock-5c-rk3588s_defconfig modified to turn as much as possible off, and I keep trying to find more to turn off, though your messages are enlightening
<matthewcroughan> This defconfig/dts is enough to get the SOC working with a single USB type-c
<matthewcroughan> I wanted to try falcon mode, but I didn't get anywhere with it. I enabled falcon mode with `CONFIG_SPL_OS_BOOT` enabled, I got the message in SPL "SPL: Please implement spl_start_uboot() for your board". So I did, and then this message went away, but u-boot proper still starts running.
<matthewcroughan> I tried putting the implementation both in arch/arm/mach-rockchip/spl.c and arch/arm/mach-rockchip/spl_common.c, both places avoid the error message suggesting to implement it, but u-boot proper still continues
<marex> matthewcroughan: did you return 0 in spl_start_uboot() ?
<marex> or did you return 1 ?
<marex> look at common/spl/spl*c for the details of OS_BOOT
<matthewcroughan> I returned 0
<matthewcroughan> int spl_start_uboot(void) { return 0; }
KREYREN_ has quit [Remote host closed the connection]
KREYREN_ has joined #u-boot
<matthewcroughan> Ah, "If a valid uImage is not found at the defined location, U-Boot will be booted instead." maybe that's what I'm running into
KREYREN_ has quit [Ping timeout: 264 seconds]
dsimic has quit [Ping timeout: 252 seconds]
dsimic has joined #u-boot
matthewcroughan has quit [Ping timeout: 240 seconds]
matthewcroughan has joined #u-boot
<matthewcroughan> In order to use SPL I need to produce a fit image right?
<marex> matthewcroughan: not necessarily, but it is the recommended format to bundle multiple components together
goliath has joined #u-boot
<matthewcroughan> marex ah, when I try to use spl export on traditional components individually, it tells me it's not in a suitable format for bootm
<matthewcroughan> Like this https://termbin.com/qwz3
<matthewcroughan> that's suitable for booti though
mmu_man has quit [Ping timeout: 265 seconds]
slobodan has quit [Remote host closed the connection]
slobodan has joined #u-boot
mmu_man has joined #u-boot
matthewcroughan has quit [Quit: Client closed]
mtoy has quit [Ping timeout: 240 seconds]
mtoy has joined #u-boot
<cambrian_invader> IMO falcon mode is not particularly useful
<cambrian_invader> it has too many special cases for me...
sszy has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
vagrantc has joined #u-boot
mckoan is now known as mckoan|away
<marex> cambrian_invader: I do use it to start SPL -> OpTeeOS -> Linux to minimize the amount of stuff that runs in EL3 (PL2)
<marex> cambrian_invader: it is a production deployment thing, not a general purpose thing
<cambrian_invader> yeah, but IMO it should really just be an add-on to the regular SPL boot flow
<cambrian_invader> e.g. just to set things up for linux
<cambrian_invader> right now it has a separate set of configs and loading mechanisms
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #u-boot
<marex> cambrian_invader: it ... doesn't ?
<cambrian_invader> sure it does
<cambrian_invader> take e.g. spi
enok has joined #u-boot
<cambrian_invader> completely separate spi_load_image_os function
<cambrian_invader> with its own set of configs determining where to load the kernel from
dima1 has joined #u-boot
dima1 has left #u-boot [#u-boot]
matthewcroughan has joined #u-boot
<matthewcroughan> fit images are really interesting
<matthewcroughan> looking into making one now so that I can use falcon mode
<matthewcroughan> falcon mode is cool because it has a cool name, so I'm going to try to use it just because the name is cool
<matthewcroughan> naming of things is important, see?
<matthewcroughan> U-Boot proper sounds awful, you should call it "Mission Mode" or something cool like ABL does
<cambrian_invader> u-boot 2112: rise of efi
<Tartarus> Naming is one of the hardest problems in computer science ;)
enok has quit [Ping timeout: 252 seconds]
blackbox has joined #u-boot
blackbox is now known as Utsav
monstr has quit [Remote host closed the connection]
goliath has quit [Ping timeout: 268 seconds]
wooosaiiii has quit [Remote host closed the connection]
matthewcroughan has quit [Quit: Client closed]
wooosaiiii has joined #u-boot
Utsav has quit [Ping timeout: 268 seconds]
blackbox has joined #u-boot
goliath has joined #u-boot
blackbox has quit [Ping timeout: 272 seconds]
matthewcroughan has joined #u-boot
<matthewcroughan> marex: perhaps you know how to set the include path of mkimage?
<matthewcroughan> I was expecting incdir to get replaced by a preprocessor or something
matthewcroughan has quit [Quit: Client closed]
blackbox has joined #u-boot
matthewcroughan has joined #u-boot
frieder has quit [Remote host closed the connection]
<f_> come on u-boot can't be worse than what I came up with so far for other things :p
clamor has quit [Ping timeout: 265 seconds]
blackbox has quit [Ping timeout: 276 seconds]
blackbox has joined #u-boot
<matthewcroughan> I'm pretty close to getting falcon mode working, but I'm not sure what to do now that I have spl export working
<matthewcroughan> https://termbin.com/sdh0
<matthewcroughan> do I have to store the results of `spl export` persistently somewhere? if so how do I do that, it's not in the doc
<matthewcroughan> Does SPL actually support using MMC?
goliath has quit [Quit: SIGSEGV]
blackbox has quit [Ping timeout: 245 seconds]
<cambrian_invader> yes
blackbox has joined #u-boot
<matthewcroughan> Can anyone tell me if my understanding of falcon mode is correct
enok has joined #u-boot
<matthewcroughan> My understanding so far is that all I have to do is get `spl export` to write to MMC (or any persistent location), and then inform SPL about this, so that it `bootm`s it on the next boot?
slobodan has quit [Read error: Connection reset by peer]
slobodan has joined #u-boot
darkxst_ has quit [Quit: ZNC 1.9.0+deb2build3 - https://znc.in]
darkxst_ has joined #u-boot
<matthewcroughan> Where does `spl export` even write to?
<matthewcroughan> "The spl export command does not write to a storage media. The user is responsible to transfer the gathered information (assembled ATAGS list or prepared FDT) from temporary storage in RAM into persistent storage after each run of spl export." says the docs, but where does it export to in memory?
ja_02 has quit [Read error: Connection reset by peer]
ja_02 has joined #u-boot
jfsimon1981 has joined #u-boot
ja_02 has quit [Ping timeout: 244 seconds]
blackbox has quit [Read error: Connection reset by peer]
rvalue- has joined #u-boot
blackbox has joined #u-boot
rvalue has quit [Ping timeout: 252 seconds]
rvalue- is now known as rvalue
flygoat has quit [Quit: The Lounge - https://thelounge.chat]
flygoat has joined #u-boot
<marex> matthewcroughan: CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR if you are loading from raw offset
<marex> that is where it loads kernel from
Poltawer has joined #u-boot
Poltawer has quit [Quit: WeeChat 4.6.2]
jfsimon1981 has quit [Remote host closed the connection]
<matthewcroughan> marex: so when I do `spl export` successfully, it's putting the "falcon image" where?
<matthewcroughan> I need to `mmc write` whatever `spl export` is doing to the MMC right/
<matthewcroughan> I notice that `spl export` modifies the env, and defines `initrd_start` and end, and fdtaddr/fdtargsaddr
<clever> matthewcroughan: thats because its doing most of bootm, loading the kernel/initrd/dtb, and patching the dtb
<clever> everything except running linux
<matthewcroughan> "It is equivalent to go through "bootm" step-by-step until device tree fixup is
<matthewcroughan> done."
<matthewcroughan> What is not explained is the next part, where it says "to save this image to SD/eMMC at the location pointed by macro CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR"
mmu_man has quit [Ping timeout: 260 seconds]
mmu_man has joined #u-boot
enok has quit [Ping timeout: 248 seconds]
blackbox has quit [Ping timeout: 272 seconds]
enok has joined #u-boot
<matthewcroughan> Can someone tell me what "OS File" means? https://github.com/u-boot/u-boot/blob/master/common/spl/Kconfig#L1193-L1195
<matthewcroughan> Is "OS File" a kernel, or is it the device-tree?
<matthewcroughan> all spl export seems to do is make a patched device-tree, so does that mean SPL is capable of loading the kernel directly?
<Tartarus> kernel
<Tartarus> and yes, spl export patches up the dtb
<Tartarus> because OS_BOOT just loads stuff to memory and runs
blackbox has joined #u-boot
<matthewcroughan> is there a way to do what spl export does but outside of u-boot and the device itself?
<Tartarus> I mean, if you write the dts to include everything and compile it to a dtb, that's that.
ja_02 has joined #u-boot
<matthewcroughan> Tartarus: so is it a good summary to say that the difference between SPL and Proper is 1. More hardware init, 2. device-tree patching
<matthewcroughan> And that SPL can boot the kernel provided it has the DT/Kernel/Initrd/Cmdline just like anything else
<Tartarus> I mean, there's a lot of features in "proper" not in SPL
<matthewcroughan> Yes, but specifically all SPL needs to boot the kernel is DT/Image/Initrd
<Tartarus> But yes, SPL_OS aka Falcon mode can be configured to just boot the OS directly
<matthewcroughan> the only difference is that you pass this in via U-Boot config at compile time, instead of in scripts at runtime
<Tartarus> An extreme simplification, yeah
<matthewcroughan> The thing that has distracted me for so long is what spl export is doing. Which as far as I can tell is just getting that patched device-tree
<matthewcroughan> which then has to be extracted after this one-time operation, stored to persistent storage with `mmc write`
blackbox has quit [Ping timeout: 252 seconds]
<Tartarus> Yeah, that's basically it
<Tartarus> Since, and especially for older device trees, some run-time fixups were expected / required
enok has quit [Ping timeout: 248 seconds]
<Tartarus> ie in arm32 land tons of boards don't set their memory size and have U-Boot set that at run time
<Tartarus> But also, command line
blackbox has joined #u-boot
blackbox has quit [Ping timeout: 265 seconds]
tlwoerner has joined #u-boot
blackbox has joined #u-boot
blackbox has quit [Ping timeout: 252 seconds]
mmu_man has quit [Ping timeout: 272 seconds]
mmu_man has joined #u-boot
vagrantc has quit [Quit: leaving]