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-rc1 / Merge Window is CLOSED / Release v2023.04 is scheduled for 2023-04-03 / Channel archives at https://libera.irclog.whitequark.org/u-boot
mckoan|away has quit [Read error: Connection reset by peer]
mckoan|away has joined #u-boot
goliath has quit [Quit: SIGSEGV]
akaWolf has quit [Ping timeout: 268 seconds]
<hays> on modern u-boot is there a difference i need to take into account if i flash to emmc or sdcard?
<hays> ive verified the board checks emmc, then microsd
<hays> but ive flashed an image to it and i get no boot
<Tartarus> depends on what the soc expects / wants and where
<hays> this is an odroid n2l and i've built u-boot with the defconfig
qschulz has quit [Read error: Connection reset by peer]
qschulz has joined #u-boot
<Tartarus> OK, well, dig out the SoC manual for that chip and see where on eMMC exactly it looks for what, to boot
<Tartarus> Or if someone else has done the hard part and written the instructions
<Tartarus> It is not always just like SD cards
akaWolf has joined #u-boot
mmu_man has quit [Ping timeout: 248 seconds]
akaWolf has quit [Ping timeout: 248 seconds]
<hays> what is the difference between u-boot.bin.sd.bin and u-boot.bin, or u-boot.usb.bl2 or .tpl
<hays> yeah ive been reading it
<hays> it is curious. i think its assuming an sd card? it has a strange dd instruction
<hays> using u-boot.bin.sd.bin which is one of 4? files the LibreElec utility creates
flyback has quit [Remote host closed the connection]
flyback has joined #u-boot
akaWolf has joined #u-boot
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<hays> dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
<hays> dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444
<hays> ^^ These instructions are super weird.
akaWolf has quit [Ping timeout: 260 seconds]
___nick___ has joined #u-boot
___nick___ has quit [Client Quit]
akaWolf has joined #u-boot
___nick___ has joined #u-boot
akaWolf has quit [Ping timeout: 248 seconds]
akaWolf has joined #u-boot
thopiekar_ has quit [Ping timeout: 248 seconds]
thopiekar has joined #u-boot
<urja> sounds like those avoid overwriting the partition table part of of the card
flyback has quit [Remote host closed the connection]
flyback has joined #u-boot
persmule has quit [Remote host closed the connection]
persmule has joined #u-boot
Wouter01006704 has quit [Quit: The Lounge - https://thelounge.chat]
Wouter01006704 has joined #u-boot
naoki has quit [Quit: naoki]
persmule has quit [Ping timeout: 255 seconds]
persmule has joined #u-boot
GNUtoo has quit [Ping timeout: 255 seconds]
GNUtoo has joined #u-boot
naoki has joined #u-boot
ikarso has joined #u-boot
persmule has quit [Remote host closed the connection]
persmule has joined #u-boot
Wouter01006704 has quit [Quit: The Lounge - https://thelounge.chat]
Wouter01006704 has joined #u-boot
persmule has quit [Remote host closed the connection]
persmule has joined #u-boot
naoki has quit [Quit: naoki]
<hays> urja: ahh interesting
goliath has joined #u-boot
akaWolf has quit [Read error: Connection reset by peer]
akaWolf has joined #u-boot
xroumegue has quit [Ping timeout: 252 seconds]
jpsollie has joined #u-boot
<jpsollie> hello everyone, can anybody please help me making u-boot report a bit more (no matter how, being serial console or network, I don't care):
<jpsollie> I have a nanopi R2s where linux claimed 'ATF needs an update"
<jpsollie> so I updated u-boot, compiled a new ATF and wrote the image to SD card
<jpsollie> but stupid as I was, I forgot to backup the old image
<jpsollie> and right now, U-boot hangs after "U-Boot TPL 2023.04-rc1-00209-gf8f47e6ff2-dirty (Feb 07 2023 - 15:28:58)"
<jpsollie> even with logging and console etc turned on, nothing is reported
<jpsollie> any idea why logging / console doesn't print what's actually going wrong?
akaWolf has quit [Ping timeout: 252 seconds]
mckoan|away is now known as mckoan
naoki has joined #u-boot
<jpsollie> https://pastebin.com/ntyhwiRs <-- here's my config file
xroumegue has joined #u-boot
frieder has joined #u-boot
goliath has quit [Quit: SIGSEGV]
niska has quit [Quit: Leaving]
wyre has quit [Quit: ZNC 1.8.2 - https://znc.in]
wyre has joined #u-boot
ldevulder has quit [Quit: Leaving]
ldevulder has joined #u-boot
goliath has joined #u-boot
niska has joined #u-boot
akaWolf has joined #u-boot
akaWolf has quit [Read error: Connection reset by peer]
akaWolf has joined #u-boot
akaWolf has quit [Ping timeout: 248 seconds]
akaWolf has joined #u-boot
sszy has joined #u-boot
naoki has quit [Quit: naoki]
apritzel has joined #u-boot
akaWolf has quit [Ping timeout: 248 seconds]
Leopold has joined #u-boot
rburkholder has quit [Remote host closed the connection]
frieder has quit [Remote host closed the connection]
frieder has joined #u-boot
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #u-boot
umbramalison_alt has quit [Quit: %So long and thanks for all the fish%]
umbramalison has joined #u-boot
Leopold has quit [Remote host closed the connection]
Leopold has joined #u-boot
akaWolf has joined #u-boot
Leopold has quit [Ping timeout: 260 seconds]
akaWolf has quit [Ping timeout: 248 seconds]
akaWolf has joined #u-boot
mmu_man has joined #u-boot
torez has joined #u-boot
akaWolf has quit [Ping timeout: 248 seconds]
akaWolf has joined #u-boot
Wouter01006704 has quit [Quit: The Lounge - https://thelounge.chat]
Wouter01006704 has joined #u-boot
akaWolf has quit [Ping timeout: 248 seconds]
matthias_bgg has joined #u-boot
mmu_man has quit [Ping timeout: 265 seconds]
<sjg1> jpsollie: Can't see the pastbin...but anyone, you could try adding '#define LOG_DEBUG' to the top of common/spl/spl.c - one question is whether it is dying in TPL , or getting to SPL. You can also bisect it
<mps> alpernebbi: would you tell a little more about you message posted last night, about cros-ec spi problem
<mps> any hint could be useful
akaWolf has joined #u-boot
akaWolf has quit [Ping timeout: 248 seconds]
akaWolf has joined #u-boot
<hays> Ok, I've tried a bunch of iterations to flash u-boot on my odroid-N2L and nothing is working
<hays> I have followed the following steps (1) clone repo from master (2) make odroid-n2l_defconfig (3) clone the libreelec utilities and run the script (4) flash uboot.bin.sd.bin with the "hole"
<hays> CROSS_COMPILE=aarch64-none-elf- <--- is this different from aarch64-linux-gnu?
ikarso has quit [Quit: Connection closed for inactivity]
<Forty-Bot> hays: it's different; in particular the calling convention (elf vs gnu) and the environment (libc) (none vs linux)
<Forty-Bot> but for U-Boot it typically doesn't matter
persmule has quit [Ping timeout: 255 seconds]
persmule has joined #u-boot
<hays> Forty-Bot: looking at the build instructions it specifies -elf so maybe I should look for that cross compiiler? (since Im having problems?)
<Forty-Bot> it doesn't matter as long as you're consistent
<hays> bleargh
goliath has quit [Quit: SIGSEGV]
hanetzer has quit [Ping timeout: 255 seconds]
hanetzer has joined #u-boot
teejay has joined #u-boot
hanetzer has quit [Ping timeout: 268 seconds]
rburkholder has joined #u-boot
hanetzer has joined #u-boot
sakman_ has joined #u-boot
goliath has joined #u-boot
<alpernebbi> mps: sorry if that was cryptic, I mean https://source.denx.de/u-boot/u-boot/-/commit/69007976
naoki has joined #u-boot
sakman_ has quit [Client Quit]
sakman_ has joined #u-boot
sakman has quit [Ping timeout: 246 seconds]
<alpernebbi> it's sending a EC_CMD_GET_NEXT_EVENT that peach-pi doesn't support, and falls back to older methods if it gets EC_RES_INVALID_COMMAND
sakman_ is now known as sakman
<alpernebbi> your irc log says `cros_ec_command: Returned status 1`, where EC_RES_INVALID_COMMAND is also 1
<alpernebbi> but in the end I guess that printf() should be a debug() or support other EC_RES_* in include/ec_commands.h
frieder has quit [Ping timeout: 252 seconds]
mckoan is now known as mckoan|away
<sjg1> alpernebbi: Ah, yes OK in that case it should be a debug
<sjg1> or log_debug() perhaps
vagrantc has joined #u-boot
naoki has quit [Quit: naoki]
<mps> alpernebbi: ah good, now understand
<jpsollie> sjg1: any idea how I could bisect it?
<jpsollie> and why adding it to the top of spl? is this a typo? or intentional?
mmu_man has joined #u-boot
<Forty-Bot> needs to be at the top so it is defined before common.h is included
<jpsollie> yes, but why spl? shouldn't it be at the top of tpl?
<Forty-Bot> yes
<Forty-Bot> but spl is also good
<jpsollie> because?
<Forty-Bot> tpl isn't very chatty, and it could be failing after TPL starts SPL but before SPL prints its banner
<jpsollie> aha
<jpsollie> ok, I'll try that
<jpsollie> is it possible there's an issue when the system moves from early debug uart stage to really "initialized" serial port?
<Forty-Bot> yes; you can try enabling the debug uart if you think that is the case
<jpsollie> that's what I meant: the early debug uart option is marked, so is it possible it is initializing the serial port and the uart2 doesn't recover from re-initialization?
<Forty-Bot> generally, debug uart doesn't do any initialization, however your board can always be doing its own init
<Forty-Bot> read your serial driver
<jpsollie> "Error: SPL image is too large (size 0xa000 than 0x7000)" --> looks like I got some trimming to do with LOG_DEBUG enabled :)
<Forty-Bot> try enabling LTO if you haven't
<Forty-Bot> and try just enabling debug for spl.c
<Forty-Bot> since that is a lot fewer prints
<jpsollie> does LTO work with GCC these days?
<Forty-Bot> yes
<Tartarus> Blah
mmu_man has quit [Ping timeout: 260 seconds]
<Tartarus> test/lib/lmb.c has I think all of the ut_asserteq call arguments backwards
<Tartarus> And I only notice / care since fixing my mistake, then changing the default from 8 to 16 is failing in non-obvious ways
<Tartarus> Not just because the test is hard-coded to 8
<Tartarus> debug prints to the rescue, heh
<Tartarus> Yup, there we go, OK
mmu_man has joined #u-boot
<jpsollie> /usr/lib/gcc/aarch64-unknown-linux-gnu/12.2.0/../../../../aarch64-unknown-linux-gnu/bin/ar: /usr/lib/gcc/aarch64-unknown-linux-gnu/12.2.0/../../../../aarch64-unknown-linux-gnu/bin/ar: cannot execute binary file <--looks like GCC doesn't like LTO ... something I can do about it? or some fat objects which usually aren't that important so I can strip them?
<Tartarus> Your toolchain installation is broken, jpsollie
<Tartarus> We have a number of targets in CI that are aarch64 and default to LTO, using the kernel.org gcc
<Tartarus> Or if not your toolchain, do a realclean and try again
<Tartarus> as you might be mixing objects
apritzel has quit [Ping timeout: 248 seconds]
sszy has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<rfs613> it seems quite common to call dcache_enable() in a board-specific enable_caches() function. When i try that on my armv7 board, it hangs the board.
<rfs613> however if I skip the call in enable_caches(), I can get to the u-boot prompt, and from there I can turn on dcache successfully via cmd/cache.c (which calls dcache_enable())
<rfs613> any idea why it would fail when called from enable_caches()?
<Tartarus> sjg1: Can you check what I did for the tests please?
<Tartarus> rfs613: What do you mean? That's not the common case for ARM/RISC-V
<Tartarus> common/board_r.c calls enable_caches() there
<rfs613> Tartarus: right, with enable_caches() typically containing a call to dcache_enable()
<rfs613> i'm seeing a hang if I put in that call to dcache_enable()
<rfs613> and yet if I call dcache_enable after reaching u-boot prompt, it seems to work fine (and memory tests run faster, so it seems to really be enabling the cache)
<rfs613> I'm sure it is something I've botched up... just can't quite put my finger on what it might be
<Tartarus> What SoC are you on?
<Tartarus> This, generally, should be done already
<Tartarus> So I am a tad confused
<rfs613> Tartarus: it's the RZ/N1 which I am trying to bring upstream
<rfs613> to clarify my original question, I wrote "board-specific enabe_caches()" but I should have said arch- or subarch-specific.
<Tartarus> And that's not settting CONFIG_RCAR_GEN3 ?
<Tartarus> I keep getting back to this since my first guess is trying to re-enable already enabled caches might go badly
<Tartarus> Dunno if marex has any ideas here
<rfs613> Tartarus: it's not RCAR architecture, despite the somewhat similar name.
<Tartarus> Ah
prabhakarlad has quit [Quit: Client closed]
<rfs613> that was from a while, back, I have commented out the call to dcache_enable()
<jpsollie> Tartarus: make distclean didn't help
<rfs613> trying to sort that out properly now... will chat with marex next time
<jpsollie> the toolchain is for gentoo cross compiling, and in the build system -flto is no issue
<Tartarus> jpsollie: Then something is wrong with your toolchain? the kernel.org one works fine for a number of platforms, maybe use buildman to fetch a copy
<jpsollie> do you think so?
<jpsollie> any way I can check that aside from recompiling gcc from scratch?
<Tartarus> I mean, grab one of the pre-builts from kernel.org and use that
<Tartarus> If that works, there's something odd with your toolchain
<Tartarus> and not the code base/etc
<jpsollie> spl_early_init
<jpsollie> alloc space exhausted
<jpsollie> this is what a defconfig prints
<jpsollie> after the TPL banner
<jpsollie> i recreated the defconfig and enabled all possible console / logging / etc
<jpsollie> and the DEBUG define in spl.c
<Tartarus> jpsollie: OK, sorry, lemme re-read everything from the top, again
<jpsollie> nono, this is what I got with a new build
<jpsollie> not with the one 5 hours ago
<Tartarus> OK, so, the root problem you have is that nanopi-r2s-rk3328_defconfig isn't booting on top of tree right now
<Tartarus> TPL starts, then you get no output
<jpsollie> U-Boot TPL 2023.04-rc1-00209-gf8f47e6ff2-dirty (Feb 08 2023 - 20:42:28)
<jpsollie> spl_early_init
<jpsollie> alloc space exhausted
<jpsollie> that's what's printed at cold boot
<Tartarus> Yeah
<Tartarus> So, I see commits that imply v2022.03 and/or v2022.07 might work
<jpsollie> why?
<Tartarus> I'd: git bisect start, git bisect bad f8f47e6ff2, git checkout v2022.03, see if that boots
<Tartarus> There's 743ce226bdd8c897fc5ba386e2267074d09c356e which changes that platform, specifically, so I assume someone tested mainline around then
<Tartarus> That commit is v2022.07-rc5-43-g743ce226bdd8 even
<Tartarus> So maybe done against v2022.03 to start with
<jpsollie> ok
goliath has quit [Quit: SIGSEGV]
prabhakarlad has joined #u-boot
<sjg1> Tartarus: re tests, do you mean the lmb thing?
<Tartarus> sjg1: yes, that
torez has quit [Quit: torez]
<sjg1> Ah OK, done :-)
Wouter01006704 has quit [Quit: The Lounge - https://thelounge.chat]
Wouter01006704 has joined #u-boot
teejay has quit [Ping timeout: 246 seconds]
teejay has joined #u-boot
Leopold has joined #u-boot
___nick___ has quit [Ping timeout: 252 seconds]
ikarso has joined #u-boot
naoki has joined #u-boot
vagrantc has quit [Quit: leaving]
naoki has quit [Quit: naoki]
naoki has joined #u-boot
flyback has quit [Remote host closed the connection]
flyback has joined #u-boot
flyback has quit [Read error: Connection reset by peer]
flyback has joined #u-boot
___nick___ has joined #u-boot
ikarso has quit [Quit: Connection closed for inactivity]
mmu_man has quit [Ping timeout: 268 seconds]