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
<hays> does a command "mmc dev 1" give a failure code and could I write a loop to try it until it succeeds
<marex> it does
<marex> mmc dev 1 || echo "failure $?"
<hays> also I found: until mmc dev 1; do sleep 1; done; ...
<hays> dirty dirty hack :)
<marex> but ... why ?
<hays> trying to get around what appears to be a bug I can't sort out
<marex> mmc dev either fails if no card present, or should init the card first time
<marex> did you try current u-boot/master ?
<hays> yeah i've been back and forth with narmstrong
<marex> ok, I'll leave it to narmstrong then
<hays> urg. it didn't work
<hays> well it works most of the time maybe
<hays> actually. this isn't going to work for people without emmc. dang
hanetzer has quit [Ping timeout: 252 seconds]
<marex> er, fix the driver and then use distro boot command to iterate over various boot devices
<marex> ttyl
hanetzer has joined #u-boot
drewfustini has left #u-boot [#u-boot]
mmu_man has quit [Ping timeout: 256 seconds]
hanetzer has quit [Ping timeout: 248 seconds]
hanetzer has joined #u-boot
thopiekar has quit [Ping timeout: 260 seconds]
thopiekar has joined #u-boot
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #u-boot
___nick___ has quit [Client Quit]
___nick___ has joined #u-boot
Leopold_ has joined #u-boot
Leopold has quit [Ping timeout: 255 seconds]
thopiekar has quit [Ping timeout: 264 seconds]
thopiekar has joined #u-boot
Leopold_ has quit [Remote host closed the connection]
<hays> marex: yeah that's what I ended up doing--we had the same idea
<hays> until false; do run distro_bootcmd; sleep 5; done
mncheck has quit [Ping timeout: 265 seconds]
stipa_ has joined #u-boot
stipa has quit [Read error: Connection reset by peer]
stipa_ is now known as stipa
Wouter010067044 has quit [Quit: The Lounge - https://thelounge.chat]
Wouter010067044 has joined #u-boot
ikarso has joined #u-boot
Leopold has joined #u-boot
akaWolf has joined #u-boot
akaWolf has quit [Ping timeout: 260 seconds]
akaWolf has joined #u-boot
akaWolf has quit [Ping timeout: 246 seconds]
akaWolf has joined #u-boot
goliath has joined #u-boot
akaWolf has quit [Ping timeout: 260 seconds]
akaWolf has joined #u-boot
Leopold has quit [Ping timeout: 248 seconds]
mmu_man has joined #u-boot
akaWolf has quit [Ping timeout: 246 seconds]
monstr has joined #u-boot
mckoan|away is now known as mckoan
mncheck has joined #u-boot
<jpsollie> Tartarus: for the rk3328 platform: if I use the tag v2022.07, this is what I get:
<jpsollie> U-Boot TPL 2022.07-dirty (Feb 10 2023 - 08:58:05)
<jpsollie> data training error
<jpsollie> row errordata training error
<jpsollie> do I need to search further? or is this enough? I simply used the v2022.04 config file and added the defaults in make oldconfig
sszy has joined #u-boot
Wouter010067044 has quit [Quit: The Lounge - https://thelounge.chat]
Wouter010067044 has joined #u-boot
flyback has quit [Ping timeout: 252 seconds]
flyback has joined #u-boot
mmu_man has quit [Ping timeout: 246 seconds]
apritzel has joined #u-boot
camus1 has joined #u-boot
camus has quit [Ping timeout: 265 seconds]
camus1 is now known as camus
mmu_man has joined #u-boot
app-test has joined #u-boot
prabhakarlad has joined #u-boot
app-test has quit [Client Quit]
<Kwiboo> jpsollie: dram init fails on rk3328 with v2023.04-rc1 after https://source.denx.de/u-boot/u-boot/-/commit/5ab30c3176bfda282d8e350c41d9731214eac582, the change from 30 to 35 broke something
<jpsollie> Kwiboo: I know, but the data training error is of 2022.07
<jpsollie> 2022.04 is ok
akaWolf has joined #u-boot
naoki has quit [Quit: naoki]
<Kwiboo> ahh, I only tested if TPL could continue to next stage, since my rk3328 got stuck in TPL, did not look at anything related to training error :)
akaWolf has quit [Ping timeout: 248 seconds]
<jpsollie> yeah, in 2023.4-rc1, I got the "out of memory" error
<jpsollie> so it's also something related to memory
<jpsollie> but not completely the same
thopiekar has quit [Ping timeout: 260 seconds]
mmu_man has quit [Ping timeout: 246 seconds]
thopiekar has joined #u-boot
akaWolf has joined #u-boot
zibolo has joined #u-boot
akaWolf has quit [Ping timeout: 248 seconds]
<qschulz> how does one debug a size increase between compiler output for the same source?
<qschulz> my TPL is too big when built with Yocto's gcc 11.3 but not with Fedora's gcc 12.2
<qschulz> 288 bytes difference ~3% size increase
clarity has quit [Ping timeout: 268 seconds]
clarity has joined #u-boot
clarity has quit [Ping timeout: 260 seconds]
clarity has joined #u-boot
camus has quit [Quit: camus]
<qschulz> mmmm I downloaded a gcc 11.3.0 toolchain and there's no size increase... let's go down the rabbit hole of flags......
akaWolf has joined #u-boot
<marex> qschulz: LTO ?
<jpsollie> maybe no_inline?
<marex> qschulz: look at objdump/readelf, binman also has some size change tracking functionality
<qschulz> marex: 2019.10 version, definitely not using binman :)
<marex> qschulz: buildman ... sorry
<marex> qschulz: I confused my men
akaWolf has quit [Ping timeout: 268 seconds]
akaWolf has joined #u-boot
ldevulder has quit [Remote host closed the connection]
ldevulder has joined #u-boot
akaWolf has quit [Ping timeout: 255 seconds]
akaWolf has joined #u-boot
mmu_man has joined #u-boot
mmu_man has quit [Ping timeout: 265 seconds]
<Forty-Bot> jpsollie: try bloatometer from Linux
<marex> Forty-Bot: wow
<Forty-Bot> err, I guess I should have pinged qschulz ?
mncheck has quit [Remote host closed the connection]
mncheck has joined #u-boot
Wouter010067044 has quit [Quit: The Lounge - https://thelounge.chat]
Wouter010067044 has joined #u-boot
<sjg1> qschulz: marex Forty-Bot: You can use 'buildman -sB' to see function bloat by commit - https://u-boot.readthedocs.io/en/latest/build/buildman.html#checking-image-sizes
<sjg1> You have to do the building step first, then use '-s' to check it
<Forty-Bot> I like bloatometer for one-offs since it is easier to set up
<Tartarus> But, that's a lot harder to do when the change is "changed compiler" not "changed code"
<Tartarus> qschulz: I'd go and take the u-boot-spl.map from both compilers, and do some reg'ing to get something you can use diff to compare with
<sjg1> Tartarus: Er, yes, in fact it isn't supported. Neither is checking bloat between random commits, which would be a nice feature (e.g. to compare releases)
<Tartarus> Well, you can kinda do random commits with --step 0, but, it's not going to be as interesting as you might think, just because every commit changes things a little, just about
<Tartarus> --step 0 -b v2022.07..v2023.01 or so, works
<sjg1> Tartarus: Ah OK, just for two releases, yes. If there are boards that don't get touched for a few releases, it could be useful
<Tartarus> sjg1: There's global changes all the time
<Tartarus> I size check 95% of the PRs I get :)
<Tartarus> (maybe a bit higher)
<sjg1> Tartarus: Yes I know :-)
<jpsollie> arch/arm/lib/crt0_64.S:85: Error: constant expression expected at operand 2 -- `ldr x0,=((CONFIG_SYS_INIT_RAM_ADDR+CONFIG_SYS_INIT_RAM_SIZE-480))' <-- anyone who knows where those missing variables in my config file might be?
<jpsollie> it looks like " ldr x0, =(SYS_INIT_SP_ADDR)" gets expanded, but it should go through it a second time ... is this a wrong ordering of includes?
prabhakarlad has quit [Quit: Client closed]
<Tartarus> grep around for them without the CONFIG prefix
<Tartarus> they might have been renamed to CFG
rburkholder has quit [Remote host closed the connection]
akaWolf has quit [Ping timeout: 268 seconds]
f_ has joined #u-boot
<f_> Hi all.
<f_> I'm having problems compiling U-Boot v2020.07
<f_> LD u-boot
<f_> /usr/bin/ld.bfd: read-only segment has dynamic relocations
<f_> make: *** [Makefile:1755: u-boot] Error 1
<f_> /usr/bin/ld.bfd: warning: u-boot has a LOAD segment with RWX permissions
<f_> Does anyone know what's the problem?
<f_> It went pretty smoothly until that point.
<marex> add --no-warn-rwx-segments to LDFLAGS
<marex> toolchain is too new, that's the problem
<f_> Yeah. That's not the problem. The second message ld prints to the screen appears to be the problem though.
<f_> I did try adding that to LDFLAGS and I still got the same error, just without the warning.
<marex> is that stock 2020.07 or some vendor downstream fork ?
<Tartarus> Is that clang?
<f_> Stock v2020.07 with a patch on top.
<f_> (Just changes a defconfig)
<marex> does it work with current mainline ?
<f_> What works with mainline?
<marex> i.e. u-boot/master
<Tartarus> searching current tree git log for "dynamic relocations" shows a few things that might be needed
akaWolf has joined #u-boot
<marex> well, git bisect should tell you where it went wrong then ?
<marex> should be like 10 steps
<f_> I'm stuck with v2020.07 because HDMI and ethernet broke on newer versions on my board.
<f_> I would love if someone has a solution to that though.
<marex> once you find the commit fix, you can backport it
<f_> marex: What's ...strange is the fact that it compiles fine on my computer, but it doesn't work in the alpine chroot.
<f_> (this is pmbootstrap BTW. I'm porting a device to postmarketOS)
<marex> git bisect start u-boot/master v2020.07 .... build, if fail "git bisect good" , if pass "git bisect bad" , repeat until you reach the commit
<f_> Sure.
<marex> yes, the bisect good/bad is reversed in this case
<marex> I think you can even script it, and let it run for a bit
mmu_man has joined #u-boot
<f_> marex: As said before, it works fine on my computer, but when building with `pmbootstrap` (which builds in an alpine chroot) it fails.
<f_> https://bin.vitali64.duckdns.org/63e6537d <- This is on my computer
<f_> Maybe it's a toolchain that's way too new?
akaWolf has quit [Ping timeout: 252 seconds]
<f_> The version that's on my system is v12.2.0
<marex> f_: I ran into this kind of crud when building ATF, it was toolchain too new
<marex> there I either inhibited errors or used the LDFLAG above
<f_> marex: Yeah.
<f_> But.
<marex> f_: but if it works with newer U-Boot fine, use git bisect and find the fix
<f_> The LDFLAG is just suppressing the warning.
<f_> marex: It compiles with v2020.07 on my host.
<f_> marex: * v2020.07 compiles on my host.
akaWolf has joined #u-boot
<marex> f_: different compiler or linker version, right ?
<f_> I guess.
<marex> use ld --version
<f_> postmarketOS recently updated the toolchain so I assume that's the case.
<marex> most likely
<f_> On my host:
<f_> git[(HEAD detached at v2020.07)] ~thelinuxmacbook:u-boot -mksh$ ld --version
<f_> GNU ld (GNU Binutils) 2.40
<marex> is that the cross compiler LD ?
<f_> ¯\_(ツ)_/¯
<f_> Good catch. I forgot.
<f_> git[(HEAD detached at v2020.07)] ~thelinuxmacbook:u-boot -mksh$ aarch64-linux-gnu-ld --version
<f_> GNU ld (GNU Binutils) 2.39
<f_> # ld.bfd --version
<f_> GNU ld (GNU Binutils) 2.40
<f_> ^ on chroot
<f_> Yeah I guess that's not right.
<marex> $(CROSS_COMPILE)ld
<marex> $(CROSS_COMPILE)ld --version
<f_> marex: Doesn't exist
<marex> $(CROSS_COMPILE)ld.bfd --version
<f_> Doesn't exist either.
<f_> I think I know why now.
<marex> {} ?
<broonie> f_ Are you building on an M1 Mac by any chance?
<f_> It doesn't seem to use the cross ld...
<f_> broonie: Nope. Despite the user name I'm using a HP EliteBook from 2011.
<f_> I just happen to have used a (late 2006) macbook before, and just put the ssd on this laptop instead.
<f_> And it runs Artix, BTW.
SARA-MARKTING has joined #u-boot
<f_> marex: Oh well...
<f_> # uname -a
<f_> Linux flaptop 6.1.6-artix1-1 #1 SMP PREEMPT_DYNAMIC Thu, 19 Jan 2023 21:37:40 +0000 aarch64 Linux
<f_> ^ Still on the chroot.
<marex> f_: so ... what does bisect indicate ?
<marex> f_: btw which target is this ?
<f_> marex: It's a TV box.
<f_> That's what the patch is for.
<f_> marex: I didn't run bisect. I think I found the issue.
<f_> # /usr/aarch64-alpine-linux-musl/bin/ld.bfd
<f_> /usr/aarch64-alpine-linux-musl/bin/ld.bfd: no input files
<f_> /usr/bin/ld.bfd: no input files
<f_> # ld.bfd
<f_> That explains a lot...
SARA-MARKTING has quit [Quit: Client closed]
<marex> $ ld.bfd
<marex> ld.bfd: no input files
<marex> how so ?
<f_> marex: Look at the path.
<f_> One's located at /usr/aarch64-alpine-linux-musl/bin/ld.bfd, while the other is located at /usr/bin/ld.bfd
<marex> what about it ? its cross toolchain LD
<marex> if you are cross-compiling U-Boot, then you need to use the cross LD
<f_> Yes I know.
<f_> But it used /usr/bin/ld.bfd
<f_> LD u-boot
<f_> /usr/aarch64-alpine-linux-musl/bin/ld.bfd: warning: u-boot has a LOAD segment with RWX permissions
<f_> /usr/aarch64-alpine-linux-musl/bin/ld.bfd: read-only segment has dynamic relocations
<f_> ...
<marex> use make V=1
<marex> that would print you the commands used
<marex> can you try the bisect ?
<f_> marex: Sure.
<f_> One sec.
persmule has quit [Remote host closed the connection]
prabhakarlad has joined #u-boot
persmule has joined #u-boot
<jpsollie> can I, in any way, smoothen the path to a MMC device when linux boots from it?
<jpsollie> bootwait often hangs indefinitely
<jpsollie> I guess frequent reset of MMC controller + tuning to UHS does this
ikarso has quit [Quit: Connection closed for inactivity]
torez has joined #u-boot
<f_> marex: I guess I'm just going to try getting mainline u-boot to work at this point...
<f_> Or get an older toolchain.
<marex> f_: so what does bisect tell you ? :)
<marex> f_: what's the problem with upstream ?
<f_> marex: Well. It boots, at least.
<f_> But HDMI and ethernet are all broken.
<f_> HDMI doesn't work in U-Boot itself.
<f_> (Works when linux loads)
<f_> And ethernet is completly broken.
monstr has quit [Remote host closed the connection]
<marex> f_: what does git bisect say ?
<marex> you did mention it used to work, so ...
<f_> I said it works on my host but not on the chroot.
<marex> HDMI and ethernet ?
<f_> Oh wait. I thought you talked about compiling...
<marex> both seem like good candidates for bisect
<f_> I'd prefer running master instead of maintaining an almost 4 years old U-Boot version.
<f_> """
<f_> The static ethernet link type config code is no more needed because now handled by
<f_> Well....
<f_> the meson8b glue driver, delete it.
<f_> """
<f_> That could explain why ethernet doesn't work.
<marex> narmstrong: ^
<marex> narmstrong: isn't amlogic your thing ?
<f_> Well....
<f_> That also could mean my kernel configuration is broken.
<narmstrong> it is
<f_> It says that's handled by the meson8b glue driver, which does suggest I forgot to enable some stuff in the config.
<narmstrong> we have a channel for that :-p
<f_> narmstrong: Sure. :P
zibolo has quit [Ping timeout: 248 seconds]
<f_> I guess a lot has changed since 2020 in the configuration side of things..
<narmstrong> f_: yes we moved all the ethernet to DM
<f_> Sure.
ikarso has joined #u-boot
<rfs613> marex: if you have a few minutes to spare, I had a question the other day that I wanted to run by you.
<rfs613> it is related to enabling dcache on RZ/N1
<marex> rfs613: knee-deep in the ethernet, but ask ...
<rfs613> marex: when I call dcache_enable() as part of enable_caches(), it hands the board boot
<rfs613> howewver if I boot withotu that, and then call dcache_enable() manually via the dcache command at u-boot promot, it works
<rfs613> (and memory benchmark speed changes drastically, so it is making a differnce)
<rfs613> was wonderng if you have some idea why it would hang if done earlier during the boot sequence.
<rfs613> (this is not urgent, we can chat about it another time)
<marex> arch/arm/mach-rmobile/memmap-gen3.c:static struct mm_region gen3_mem_map[GEN3_NR_REGIONS] = {
<marex> arch/arm/mach-rmobile/memmap-gen3.c:struct mm_region *mem_map = gen3_mem_map;
<marex> look around the memory map, make sure the MMU tables are set correctly
<marex> oh, is that CA7 ?
<rfs613> yes, it's not rmobile
<marex> technically, everything is mach-rmobile
<marex> because legacy
<marex> rfs613: so same question -- are you MMU tables set correctly ?
<marex> arch/arm/cpu/armv7/cache_v7.c that's part of it
<rfs613> marex: will have a look.. but the odd bit to me is that dcache_enable() seems to work (and do the right thing) if called later in the u-boot boot.
<marex> arch/arm/lib/cache-cp15.c that is the other one iirc
<marex> rfs613: well, could it be the mmu tables are set up by then ?
<marex> there is another odd thing to it, hold on
<marex> arch/arm/lib/cache.c arm_reserve_mmu()
<marex> make sure that is called before you enable the dcache
<marex> make sure tlb_addr is set correctly
<rfs613> ok, thanks, that gives me two good things to take a look at
<marex> oh ... are you enabling dcache before reloc ?
<Tartarus> sjg1: Oh, as I skim the subject lines again, I wonder if a few more of the def_bool n patches couldn't be avoided by just moving the Makefile lines to existing hunks of "don't build these directories for xPL_BUILD being set"
<rfs613> marex: possibly... I haven't looked at it in a while (other than to confirm the issue still exists after rebasing my patches to lastest master)
<marex> rfs613: why are these patches not in mainline btw ?
<rfs613> got sidetracked with other work as usual, but aiming for a new round of those patches soonish.
<marex> rfs613: ok, thanks
<rfs613> marex: thanks for the suggestions, much appreciated
SARA-MARKTING has joined #u-boot
mmu_man has quit [Ping timeout: 260 seconds]
SARA-MARKTING has left #u-boot [#u-boot]
<sjg1> Tartarus: Is that what you would prefer? My hope was that all of the xPL ifdefs in the Makefiles would go away
<Tartarus> sjg1: I didn't see that being handled in your split config series?
<Tartarus> Did you end up rewriting drivers/Makefile and I just missed it?
<Tartarus> sjg1: Unrelated, is https://patchwork.ozlabs.org/project/uboot/list//?series=336747 ready or were you going to v2 it for some reason?
mmu_man has joined #u-boot
goliath has quit [Quit: SIGSEGV]
akaWolf has quit [Ping timeout: 268 seconds]
<qschulz> bloat-o-meter returns 236B increase for tpl/drivers/ram/rockchip/built-in.o
<qschulz> a function that returns literally only returns 0 is 12B vs 8B depending on the gcc used...
mckoan is now known as mckoan|away
Kwiboo has quit [Quit: .]
<qschulz> though it does take a pointer to a struct
<qschulz> which is a common pattern for most increasing symbols
Kwiboo has joined #u-boot
Kwiboo has quit [Client Quit]
Kwiboo has joined #u-boot
vagrantc has joined #u-boot
<sjg1> Tartarus: No I did not look at ifdef cleanups in Makefiles. I wanted to, but decided there was enough going on already
<sjg1> Tartarus: The trace stuff is ready, but let me know if it needs a rebase
<Tartarus> ok, I'll test out the trace stuff next, almost done with my current branch test
pgreco has quit [Ping timeout: 252 seconds]
apritzel has quit [Ping timeout: 264 seconds]
pgreco has joined #u-boot
pgreco has quit [Ping timeout: 248 seconds]
naoki has joined #u-boot
pgreco has joined #u-boot
goliath has joined #u-boot
mmu_man has quit [Ping timeout: 252 seconds]
Leopold has joined #u-boot
<sjg1> Tartarus: OK
mmu_man has joined #u-boot
Leopold has quit [Ping timeout: 248 seconds]
Leopold has joined #u-boot
sszy has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
goliath has quit [Quit: SIGSEGV]
naoki has quit [Quit: naoki]
naoki has joined #u-boot
naoki has quit [Client Quit]
naoki has joined #u-boot
goliath has joined #u-boot
naoki has quit [Quit: naoki]
ikarso has quit [Quit: Connection closed for inactivity]
Leopold has quit [Ping timeout: 248 seconds]
Wouter010067044 has quit [Quit: The Lounge - https://thelounge.chat]
Wouter010067044 has joined #u-boot
Leopold has joined #u-boot
torez has quit [Quit: torez]
Leopold has quit [Ping timeout: 255 seconds]
___nick___ has quit [Ping timeout: 268 seconds]
<carndt> where is u-boot-users mailing list today?
<rfs613> carndt: still at u-boot@lists.denx.de ... and active as of 5 minutes ago...
f_ has quit [Ping timeout: 264 seconds]
ikarso has joined #u-boot
rburkholder has joined #u-boot
mncheck has quit [Ping timeout: 246 seconds]
naoki has joined #u-boot
thopiekar has quit [Ping timeout: 252 seconds]
thopiekar has joined #u-boot
mmu_man has quit [Ping timeout: 252 seconds]
mmu_man has joined #u-boot
jtf has quit [Ping timeout: 252 seconds]
vagrantc has quit [Quit: leaving]
ikarso has quit [Quit: Connection closed for inactivity]