Tartarus changed the topic of #u-boot to: SOURCE MOVED TO https://source.denx.de/u-boot/u-boot.git / U-Boot v2021.07 is OUT / Merge Window is OPEN until 26 July 2021 / Release v2021.10 is scheduled for 04 October 2021 / http://www.denx.de/wiki/U-Boot / Channel archives at https://libera.irclog.whitequark.org/u-boot
jwillikers has quit [Remote host closed the connection]
mmu_man has quit [Ping timeout: 268 seconds]
vagrantc has quit [Quit: leaving]
jwillikers has joined #u-boot
birkoff has quit [Quit: ZNC 1.8.2 - https://znc.in]
LeSpocky has quit [Ping timeout: 265 seconds]
LeSpocky has joined #u-boot
alpernebbi has quit [Ping timeout: 252 seconds]
alpernebbi has joined #u-boot
jwillikers has quit [Remote host closed the connection]
birkoff has joined #u-boot
birkoff is now known as Guest2026
sakman has quit [Remote host closed the connection]
sakman has joined #u-boot
mranostaj has quit [Remote host closed the connection]
mranostaj has joined #u-boot
fdanis_away is now known as fdanis
guillaume_g has joined #u-boot
agust has joined #u-boot
frieder has joined #u-boot
eduardas has joined #u-boot
mckoan|away is now known as mckoan
sszy has joined #u-boot
matthias_bgg has joined #u-boot
mmu_man has joined #u-boot
monstr has joined #u-boot
mckoan is now known as mckoan|away
tre has joined #u-boot
alpernebbi has quit [Ping timeout: 268 seconds]
alpernebbi has joined #u-boot
___nick___ has joined #u-boot
tre has quit [Ping timeout: 240 seconds]
___nick___ has quit [Quit: No Ping reply in 180 seconds.]
___nick___ has joined #u-boot
tre has joined #u-boot
indy has quit [Ping timeout: 245 seconds]
indy has joined #u-boot
jwillikers has joined #u-boot
___nick___ has quit [Quit: No Ping reply in 180 seconds.]
zibolo has joined #u-boot
___nick___ has joined #u-boot
monstr has quit [Ping timeout: 240 seconds]
<zibolo> Hi everyone! I'm trying to boot a Xilinix UltraZed+ cortex A53 with u-boot from eMMC. Such device needs the so called u-boot-spl (equivalent to xilinx's FSBL) which also loads the "PMU firmware" on a separate microcontroller. Now, when I run u-boot-spl it fails with "PMU Firmware device not found - Enable it" which is kinda confusing. Is it the PMU device which is not found? Or the firmware?
<zibolo> Looking at this piece of source https://patchwork.ozlabs.org/project/uboot/patch/e225eca968d46be4e9751d6bf9510b4f7bf8ddc8.1583308698.git.michal.simek@xilinx.com/ it seems that is the device itself which is not found. But how u-boot-spl try to find such device? It looks up in u-boot device tree?
PatDelaunay has joined #u-boot
monstr has joined #u-boot
matthias_bgg has quit [Read error: Connection reset by peer]
sicelo has quit [Ping timeout: 245 seconds]
pgreco has quit [Ping timeout: 265 seconds]
pgreco has joined #u-boot
matthias_bgg has joined #u-boot
tre has quit [Remote host closed the connection]
sicelo has joined #u-boot
sicelo has joined #u-boot
<LeSpocky> when I put the environment in a UBI volume, should that be static or dynamic?
frieder has quit [Remote host closed the connection]
monstr has quit [Remote host closed the connection]
<mrnuke> Tartarus: yes
<Forty-Bot> zibolo: yes, you should have a node in your device tree
<Forty-Bot> there could also be a problem probing the device
<Forty-Bot> try adding `#define DEBUG` at the top of drivers/firmware/firmware-zynqmp.c
* mrnuke sometimes wishes he could just #undef BUG
eduardas has quit [Quit: Konversation terminated!]
<zibolo> Forty-Bot: Thanks! In my dts I have a zynqmp_power and pmu nodes, so I'll try to recompile with #define DEBUG and hope to see something
<zibolo> Forty-Bot: should it print more info in the serial console?
akaWolf has quit [Ping timeout: 268 seconds]
<zibolo> Forty-Bot: Even with `#define DEBUG` I do not have any further debug info in the serial console :'( I'll try something else tomorrow. Thanks for the help!
guillaume_g has quit [Quit: Konversation terminated!]
sszy has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<marex> mrnuke: crud, mp1 fails to boot from SF
fdanis is now known as fdanis_away
<marex> Tartarus: we should change CONFIG_SF_DEFAULT_MODE to 0x0, this has been popping up on board updates left and right for me, the 0x3 default is bogus
<Tartarus> marex: OK. Are platforms that do 0x3 today going to break when they're switched to 0x0 instead?
<Tartarus> Er, to be clearer
<Tartarus> Are platforms that do 0x3 today and that actually is correct and functional ...
<marex> Tartarus: er ... I can tell you that NXP iMX, SoCFPGA, Xilinx, Renesas and STM32MP1 fail with 0x3 and should be 0x0
<marex> so ... which are 0x3 and are correct ?
<marex> oh and those rockchips are also broken with 0x3 and should be 0x0
<Tartarus> So nothing was ever doing that right before, OK
<Tartarus> Please put all that in a commit message and post :)
<marex> Tartarus: I think the Kconfig conversion really screwed this one up, yes
<marex> it picked one, should have picked the other, than then nobody noticed for a while because ... errr ...
<marex> ...
<Tartarus> I'm pretty sure it picked what everyone was setting before
<marex> it was half and half , no ?
<marex> except 0x3 is real odd
<marex> it is CPOL and CPHA, for boot flash that is rare, because even bootroms arent that screwed up to demand this
<marex> oh, heh ... the conversion was done by ST and it breaks STM32MP1 ... hmmmmmmmmmmmmmmmmmmmmmmmm
<Tartarus> Yeah, so this is why I say it never worked right
<Tartarus> Your e2e95e5e25421fbef499e21bf94a5339701f9a99 exposes the problem
<marex> I might have excepted that ST might have tested booting from SPI NOR before sending out that patch at least on their own platform
<Tartarus> But the conversion in 14453fbfadc2f98ca35d6033140466c7a4b4947a shows:
<marex> I always step into some sort of brown matter, sigh
<Tartarus> Which is why the default of 3 was sane.
<Tartarus> Er
<marex> I see like 10 boards which set SPI_MODE_3
<marex> and I see ton of boards which default to 0
<Tartarus> Yes, because the rest used the default mode
<Tartarus> Which evaluates out to '3', and was defined as SPI_MODE_3
<marex> which for a whole lot of them makes no sense, that's why a larger part overwrote that in the config, and a few failed to do so
<marex> I wonder why was it default to 3 in the first place, that is odd
<Tartarus> That may be some interesting archeaology
<marex> 88e34e5ff76bffa7d56b1d04e0bd2627ee5b584d jeeze
<marex> cesspool diving sounds more like it
<marex> so it was 0, and then it because 3
<marex> *became
<Tartarus> I don't see it changing the default?
<marex> no, it was only 3 for SF by default
<Tartarus> Just moving from cmd/.. to include/spi.h
<Tartarus> poking..
<mrnuke> marex: what's the deal with SF again?
<Tartarus> Yeah, prior to the commit, CONFIG_SF_DEFAULT_MODE didn't have a default anywhere else.
<marex> we did
<marex> it was 3 in cmd_sf ever since
<Tartarus> Right, I'm saying it was default 3 in common/cmd_sf.c before that commit
<marex> but that makes no sense for most systems
<Tartarus> and default 3 in spi.h after
<Tartarus> but usage wasn't changed
<Tartarus> it was referenced in common/cmd_sf.c and drivers/dfu/dfu_sf.c
<Tartarus> and defined in board config.h files
<marex> of course, we never really configured it because of the bug fixed in e2e95e5e25421fbef499e21bf94a5339701f9a99
<marex> ugh
<Tartarus> Yes, e2e95e5e is exposing or doing something.
<marex> so lets fix it
<Tartarus> Yes, what's the right fix?
<marex> flip it to 0 so it works for everyone and deal with systems which need it set to 3 (which ones, really?)
<Tartarus> I'd like some more explanation on how 3 is the wrong default mode and it was just never ever detected as a problem until e2e995e5e
<marex> because no bootrom I know of ever uses other mode than 0
<marex> it looks like the mode 3 might have been needed for some historic atmel dataflash ?
<Tartarus> microblaze and km_arm also set it to 3
<marex> those might need to be fixed up
<marex> km_arm is what, socfpga, no ?
<marex> that one is 0
<Tartarus> no
<marex> if I wasnt fixing one socfpga up this morning, I wouldn't be going on about it
<marex> Tartarus: then what, imx6 ?
<Tartarus> It's km_kirkwood
<marex> oh, hmmmmmm
<marex> Tartarus: I dont think I have one of those, I might have to ask stefanro (?)
<Tartarus> But, I'm still not sure. I guess the question to answer is, back then, who built common/cmd_sf.c and used the default
<Tartarus> Lets see..
<marex> atmel
redbrain has joined #u-boot
<Tartarus> OK, almost firing off a world build to see who set what...
<Tartarus> OK, fired off, about 15min on the laptop
<marex> Tartarus: well, I was just trying to boot the kernel and could not do it
<marex> Tartarus: seems fitImage with crc32 is broken in 2021.10-rc3, well ... that's my default boot case
<marex> hum
<marex> mrnuke: reverting 92055e138f2873034e2dfd7e1308e30c9bbef3b1 and 0b905e25813a0b4e368730a147dadc7f55150edc fixes my problem
<Tartarus> Unrelated to, or related to, the crc32 fix posted this morning?
<marex> could be related to it
<Tartarus> ok, SF_DEFAULT_MODE build done
<Tartarus> lets see
<Tartarus> good number of default=3
<marex> likely also good number of them which should be 0
<Tartarus> Good question
<marex> I will send out the patch and CC various people
<Tartarus> Do you have sh7785lcr still? That's one.
<Tartarus> Well, hold on
<Tartarus> Another one is am335x_* which I have one of, right here
<Tartarus> firing it up
<marex> Tartarus: ugh ...
<marex> Tartarus: am335x is likely 0
<marex> superH ... the one I have only boots from parallel NOR, 7785 is likely dead
<Tartarus> Well, it's gonna start out as annoying since I have to flip some DIP switches
<Tartarus> zynq_zc770_xm010 handy? :)
<Tartarus> No monstr atm, bah
<Tartarus> Ah, dra7xx is another board with speed=3 and that doesn't require DIP switches
<marex> Tartarus: he seems to be participating in some odd not-working activity
<marex> Tartarus: I think he also sometimes calls it free time
<Tartarus> OK, so 3 is the right mode for this platform, even
<marex> Tartarus: just wait until tomorrow morning , he might have the zc702
<Tartarus> At least with a manual probe and read
<marex> Tartarus: for zynq ?
<marex> unlikely
<Tartarus> for dra7xx_evm
<marex> for TI ?
<marex> are you sure ?
<Tartarus> probably all of the TI ones, yes
<Tartarus> How else do you want me to test?
<marex> Tartarus: well, if datasheet says so, so be it
<marex> usually if the mode is wrong, you will see flakiness
<marex> Tartarus: oh, validate the data you read back
<marex> read wont fail, the data might be corrupted
<Tartarus> repeated read/crc32s match
<Tartarus> Don't want to mess with whatever the heck is on there atm
<Tartarus> Lets see what's used most in platforms right now too
<Tartarus> None of this rockchip stuff for example was upstream at the time
<mrnuke> marex: So what exactly are the symptoms? crc32 not found? crc32 returns wrong value?
<Tartarus> But didn't fix it portably
PatDelaunay has quit [Quit: Client closed]
<marex> Verifying Hash Integrity ... crc32 error!
<marex> Bad hash value for 'hash-1' hash node in 'kernel-1' image node
<marex> ERROR: can't get kernel image!
<marex> Bad Data Hash
<marex> mrnuke: ^
<marex> mrnuke: seems like ST couldn;t watch my ranting about ST any longer
matthias_bgg has quit [Ping timeout: 268 seconds]
<mrnuke> Tartarus, marex: What the frog? Byte order issue. I specifically remember testing for that on my stm32mp1
<Tartarus> marex: I honestly wonder if a handful of platforms just didn't test SPI flash much and just accepted the default and/or forum users/etc documented using 0 while probing
<Tartarus> xilinx does have "sf probe 0 0 0 0" in scripts, but almost nothing else does
<mrnuke> marex: would this fix things for you: https://paste.centos.org/view/a3dd8ed1 ?
<marex> Tartarus: doh
<marex> Tartarus: it is likely something along those lines, it is also rather hard to notice the breakage between mode 0 and 3
<marex> unless you run the SF fast enough, you wont notice the problems
<marex> default SPI NOR frequency is conveniently 1 MHz ;-)
<Tartarus> Yeah, I think switching the global default to 0 is wrong.
<Tartarus> But updating the default to be 0 for some platforms as you've tested would be good.
<Tartarus> Also, uh..
<Tartarus> configs/socfpga_agilex_defconfig:CONFIG_SF_DEFAULT_MODE=0x2003
<Tartarus> Wat?
<marex> what the f..k is that
<marex> well, non-legacy socfpga, I think that's some quad-spi mode setting oddity
<marex> I sent out an RFC patch, so lets see
<Tartarus> I'll follow-up with some more details then for the ML
<marex> Tartarus: lets also push others to check their SPI NORs
akaWolf has joined #u-boot
<Tartarus> mrnuke: Any further ideas about that crc32 report?
<mrnuke> Tartarus: did removing the superfluous byteswap that I reported to marex fix it?
<Tartarus> mrnuke: I haven't replicated it personally
<marex> mrnuke: it happens on stm32mp1 ;-)
<mrnuke> <mrnuke> marex: would this fix things for you: https://paste.centos.org/view/a3dd8ed1 ?
<marex> mrnuke: I can't test right now, working on something else
<marex> mrnuke: you probably want to write a test for this too ... like sjg1 keeps telling everyone
<mrnuke> marex: same here. Working on something wildly different. Just skimming the IRC for when my people need me
<mrnuke> marex, Tartarus: BTW, is it usually this busy a few weeks before release?
<Tartarus> mrnuke: not usually
<mrnuke> Tartarus: the bright side is that we know what the issues are before the release is published
<marex> yep, we have a bootloader which doesn't boot ... :)
<Tartarus> Well hey, I can make this fail too
<Tartarus> So, lets see
<marex> Tartarus: we need a test for this (TM)
<Tartarus> Well actually, I need to see why the tests didn't catch this...
<Tartarus> mrnuke: OK, submit that as a real patch, Tested-by: Tom Rini <trini@konsulko.com>
<Tartarus> iminfo shows fail w/o, pass with
<marex> Tartarus: that really needs a test
<Tartarus> marex: Yes, I'm looking at the tests now...
<Tartarus> It's not obvious why the tests don't fail
<marex> I was also looking for another quote about needing a revert or a solution soon or something along those lines, I knew someone used it recently and it was rather nasty entitled spit, but I can't find it
<marex> oh well
<Tartarus> For example, but maybe because it doesn't do crc32 on that image
<marex> Tartarus: image is fitImage or image is entry in the image section of fitImage ?
<Tartarus> marex: OK, I'm being a bit multi-threaded here, sorry.
<Tartarus> On an old random fitImage I have, with that patch applied:
<Tartarus> ## Checking hash(es) for FIT Image at 82000000 ...
<Tartarus> Hash(es) for Image 1 (fdt@1): crc32+
<Tartarus> Hash(es) for Image 0 (kernel@1): md5+ sha1+
<Tartarus> At the end of iminfo $loadaddr
<Tartarus> And without that patch, hashes fail.
<Tartarus> What I pastebin'd above is from the EFI FIT test we already have.
<mrnuke> Tartarus: "Hash(es) for Image 1 (fdt@1): crc32+" before or after my centos.paste fix?
<Tartarus> mrnuke: After
<Tartarus> Before the hashes were invalid
<mrnuke> Tartarus: okay. Thank you
redbrain has quit [Ping timeout: 252 seconds]
<Tartarus> Now, on the host, so sandbox, we don't fail.
<Tartarus> We didn't have checksums, but that was an easy fix, but now I see the checksums are seemingly fine, on host.
<Tartarus> Lets fire off EFI FIT tests, which are not sandbox-only
<Tartarus> and qemu, where the file will be remade
sbach has quit [Read error: Connection reset by peer]
<Tartarus> OK, lets see if i can make CI fail now, like it should
sbach has joined #u-boot
<mrnuke> Tartarus: Does testing show CRC problem happening on big endian hosts too? I'm writing the commit message BTW. Should have patch up on ML soon
<marex> hm ... dang ... seems like ever since we grew spi-nor-core, MTDIDS for all SPI NORs are completely broken
<Tartarus> mrnuke: I lack one to easily test on
qastokes has joined #u-boot
<mrnuke> Tartarus: the hardest part in making a patch is writing a convincing and explanatory commit message. Up on ML
___nick___ has quit [Ping timeout: 252 seconds]
qastokes has quit [Quit: qastokes]
qastokes has joined #u-boot
<Tartarus> OK, fun, https://source.denx.de/u-boot/u-boot/-/jobs/322096 shows them running.
qastokes has quit [Quit: qastokes]
<Tartarus> https://source.denx.de/u-boot/u-boot/-/jobs/322095 too, to cover 32 and 64 bit targets
<Tartarus> (32bit arm is where I can test pass/fail)
<Tartarus> mrnuke: That code is shared between host/target, yes? So bad crc32 calc on host tools means bad crc32 calc also on target, so both would still match, yes?
<Tartarus> So we would need an exiting FIT image to catch this, which is how I can make it fail on my HW, that fitImage I have is random old garbage
qastokes has joined #u-boot
agust has quit [Quit: Leaving.]
qastokes has quit [Quit: qastokes]
qastokes has joined #u-boot