Tartarus changed the topic of #u-boot to: SOURCE MOVED TO https://source.denx.de/u-boot/u-boot.git / U-Boot v2025.01 is OUT / Merge Window is OPEN, next branch is CLOSED / Release v2025.04 is scheduled for 07 April 2025 / Channel archives at https://libera.irclog.whitequark.org/u-boot
mmu_man has joined #u-boot
Daanct12 has quit [Quit: WeeChat 4.4.4]
saulosilva has joined #u-boot
Daanct12 has joined #u-boot
mmu_man has quit [Ping timeout: 244 seconds]
mmu_man has joined #u-boot
lucascastro has joined #u-boot
<lucascastro> Hello, I just doing some studying on u-boot. When I load/make *defconfig, i.e Bananapi_M2_Ultra_defconfig
<lucascastro> SYS_LOAD_ADDR is written to config but I can't recognize where its comes from.
<lucascastro> Does someone can tell me about this?
<Tartarus> Well, it's a Kconfig option
<Tartarus> $ git grep config\ SYS_LOAD_ADDR
<Tartarus> Kconfig:config SYS_LOAD_ADDR
<lucascastro> I had run rgre
<lucascastro> rgrep, but the bpim2u write 0x42000000, I can't find where the 0x42000000 came from, and I'm trying to find it on R40 manual but i'm guess it's calculated somehow.
<Tartarus> Yes, that's the default for all sunxi platforms
<Tartarus> And likely came out of some ref manual or another
<lucascastro> got it .
<lucascastro> it's already defined on Kconfig
saulosilva has quit [Quit: Client closed]
saulosilva has joined #u-boot
zibolo has quit [Ping timeout: 244 seconds]
zibolo has joined #u-boot
saulosilva has quit [Quit: Client closed]
goliath has quit [Quit: SIGSEGV]
ikarso has quit [Quit: Connection closed for inactivity]
baltazar has quit [Ping timeout: 264 seconds]
baltazar has joined #u-boot
jclsn has quit [Ping timeout: 272 seconds]
jclsn has joined #u-boot
lucascastro has quit [Ping timeout: 252 seconds]
persmule has quit [Remote host closed the connection]
vagrantc has quit [Quit: leaving]
mmu_man has quit [Ping timeout: 246 seconds]
mmu_man has joined #u-boot
mmu_man has quit [Ping timeout: 265 seconds]
sally has quit [Quit: sally]
sally has joined #u-boot
mmu_man has joined #u-boot
mmu_man has quit [Ping timeout: 265 seconds]
tec4 has quit [Quit: bye!]
tec4 has joined #u-boot
rvalue has quit [Ping timeout: 252 seconds]
rvalue has joined #u-boot
jfsimon1981_c has joined #u-boot
naoki has quit [Ping timeout: 246 seconds]
naoki has joined #u-boot
naoki has quit [Ping timeout: 260 seconds]
jfsimon1981_c has quit [Remote host closed the connection]
jfsimon1981_c has joined #u-boot
rvalue has quit [Ping timeout: 248 seconds]
dsimic has quit [Ping timeout: 244 seconds]
dsimic has joined #u-boot
rvalue has joined #u-boot
gsz has joined #u-boot
naoki has joined #u-boot
goliath has joined #u-boot
eballetbo has quit [Quit: Connection closed for inactivity]
pbsds37 has joined #u-boot
pbsds3 has quit [Ping timeout: 260 seconds]
pbsds37 is now known as pbsds3
pbsds3 has quit [Ping timeout: 246 seconds]
gsz has quit [Ping timeout: 245 seconds]
naoki has quit [Quit: naoki]
teejay has joined #u-boot
Daanct12 has quit [Quit: WeeChat 4.4.4]
mmu_man has joined #u-boot
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #u-boot
<marex> cambrian_invader: hey, do you recall why https://git.openembedded.org/openembedded-core/commit/?id=5e12dc911d0c541f43aa6d0c046fb87e8b7c1f7e adds the KERNEL_PN dependency into uboot-sign.bbclass ?
persmule has joined #u-boot
<Forty-Bot> marex: note [1] ?
<SlimeyX> make help
<SlimeyX> Makefile:40: *** missing separator. Stop.
<SlimeyX> whats that about
<marex> Forty-Bot: I found a dependency loop in there :(
<Forty-Bot> marex: what's the loop?
<marex> Forty-Bot: basically if UBOOT_ENV is set , then kernel-fitimage bbclass do_install depends on u-boot do_populate_sysroot (depends on u-boot do_install) because it needs to bundle the env into the fitImage , but u_boot do_uboot_assemble_fitimage has to run before u-boot do_install and depends on kernel do_install to deploy the kernel fitImage so it can be used as input for signing
<marex> Forty-Bot: (does what I wrote make sense?)
leah has quit [Ping timeout: 265 seconds]
<marex> Forty-Bot: I can think of ways to resolve it, but they all include breaking changes, sigh
leah has joined #u-boot
pivi has quit [Remote host closed the connection]
<Forty-Bot> marex: sure, that makes sense
<Forty-Bot> marex: but I think you can just do the thing I suggested in the note
<Forty-Bot> tbh idk what the point of the UBOOT_ENV stuff is; if I want to change the U-Boot environment, I just modify the default environment in the source
pivi has joined #u-boot
<marex> Forty-Bot: UBOOT_ENV scripts embedded in fitImage , useful when you want to extend U-Boot env during e.g. an update , the script in the fitImage can be signed too
<marex> Forty-Bot: maybe uboot-sign.bbclass should generate/use empty fitImage instead ?
<Forty-Bot> I guess, but you don't have to put it in the same FIT
<Forty-Bot> like, when I added dm-verity support (which I should get around to upstreaming at some point...) I just created a separate script that gets sourced during the boot process
<Forty-Bot> anyway, to be specific, yes you should generate an empty fitImage with the same structure as normal but with no data
<marex> Forty-Bot: I dont even need the same structure, all I need is the config node, no ?
<Forty-Bot> you need the whole thing for stuff like kernel_sign_keyname etc.
<Forty-Bot> since images can be individually signed to permit mix and match attacks :)
<marex> Forty-Bot: not for the uboot-sign.bbclass , right ?
<marex> Forty-Bot: that mkimage ... -r fitImage is a throw-away fitImage, isn't it ?
<Forty-Bot> to be clear; I suggest adding a assemble_dummy_fitimage task to kernel-fitimage that creates a FIT with no data (and therefore doesn't need to depend on u-boot:do_populate_sysroot)
<Forty-Bot> and then depending on that instead of assemble_fitimage in uboot-sign
<marex> Forty-Bot: but uboot-sign does not depend on kernel-fitimage assemble_fitimage , it depends on KERNEL_PN (really should depend on KERNEL_PN do_populate_sysroot I guess)
<Forty-Bot> yes
<marex> Forty-Bot: but ... I don't realy get this, the mkimage in uboot-sign bbclass generates a throwaway fitImage with the -r parameter, doesn't it ?
<marex> so why not pass in empty fitImage ?
<Forty-Bot> no, it consumes a throwaway fitimage
ikarso has joined #u-boot
<Forty-Bot> and yes, you can, but the whole point is that the keys embedded in u-boot's FIT are determined by the keys used in the dummy FIT
<Forty-Bot> so the dummy has to have the same structure as the real thing, in order to ensure the correct keys are embedded
<marex> Forty-Bot: doesn't that mkimage ... -r generate only a /signature node in the fitImage
<marex> ?
<Forty-Bot> -K also embeds the keys into u-boot's dtb
<marex> Forty-Bot: sigh ... right ... thanks
<marex> Forty-Bot: but this still won't help us break the dependency loop
<Forty-Bot> why not?
<marex> the kernel recipe would have to run all the way until do_populate_sysroot to make ${STAGING_DIR_HOST}/sysroot-only/fitImage available to the u-boot recipe, right ?
<Forty-Bot> hm; maybe we can make that happen earlier?
<marex> Forty-Bot: if I could start putting stuff into sysroot earlier, then I would put the env into sysroot earlier
<Forty-Bot> alternatively, you can separate out the kernel variables into a kernel-config bbclass like what is done for u-boot
<Forty-Bot> and then include that from u-boot to create the dummy recipe there
<marex> this is not a kernel variables problem , this is a dependency ordering problem , really
<Forty-Bot> well the only thing we really need is the knowlege of what keys we want to sign the kernel with
<marex> I am thinking of rebuilding the u-boot env file using mkimage in kernel-fitimage.bbclass , that would be easy too
<marex> but I cannot access that env file because it is in u-boot recipe
<rfs613> SlimeyX: in case you haven't figured it out yet... you likely have spaces instead of tabs on line 40 of the Makefile
<SlimeyX> this is a fresh clone from git 2025.01 final
<rfs613> SlimeyX: seems fine here. What version of make are you using?
<SlimeyX> GNU Make 4.4.1
<SlimeyX> Built for x86_64-pc-linux-gnu
<rfs613> hmm.. should be new enough... did you get the source from git using a tag, or using a tarball? (just trying to figure out what's different).
<marex> remove the undefine on like 40 in Makefile and see if the rest works ?
<SlimeyX> from git
<rfs613> yeah i guess commenting out line 40 (or deleting it) would be worth a try...
<rfs613> but the error ('mising separator') does not really make sense on that line
<rfs613> so maybe the its line 40 of a different Makefile?
slobodan has joined #u-boot
<rfs613> SlimeyX: ^^^
<SlimeyX> weird i rebooted the box and error is gone, wtf
<SlimeyX> under my #defin e config extra env settings if i remove "protect on $ubootaddr +$filesize && " will that allow me to save the settings and they will stick
gachikuku has quit [Remote host closed the connection]
gachikuku_ has joined #u-boot
gachikuku_ has quit [Remote host closed the connection]
gachikuku__ has joined #u-boot
gachikuku__ is now known as gachikuku
yann-kaelig has joined #u-boot
<rfs613> SlimeyX: might try running memtest86 to see if there's any problems with the RAM on that machine? Or the disk misbehaving?
<rfs613> SlimeyX: as for "protect on", that *might* let you save settings, but there are several possible ways of "blocking" the save/restore of environment.
<rfs613> it's hard to say which one(s) are in play on your particular board/configuration
<rfs613> the "protect on" works on flash devices which offer a feature of write-protecting some or all of the blocks of the flash.
<rfs613> some flash chips retain the protection setting even across power cycle, so in such case, just removing "protect on" would not unlock the flash.
<rfs613> note that ""protect on $ubootaddr +$filesize" is probably trying to protect u-boot binary, so that you don't accidentally erase it, and then cannot boot.
<SlimeyX> ah
<rfs613> the environment is typically stored in a different area of the flash, so you can modify it, without affecting u-boot code itself
<rfs613> seems to be a wifi access point, and seems to be supported by dd-wrt
<rfs613> https://wikidevi.wi-cat.ru/Adtran_Bluesocket_BSAP-3040 shows the stock boot messages
<SlimeyX> heh yeah i posted the logs ;)
<rfs613> can see the message "Erasing SPI flash...Writing to SPI flash...done" which suggests it is probably doing "env save" (or "saveenv") during the boot
<rfs613> are you able to reach the u-boot command prompt?
<SlimeyX> yeah it has a bootkey set which is b100:
gsz has joined #u-boot
<rfs613> okay, so I guess you are able to do 'setenv', but not 'env save' to make the change persistent?
<rfs613> oh i just found your post of the default environment
<rfs613> (I don't seem to see the "protect on" anywhere in there...)
mmu_man has quit [Ping timeout: 252 seconds]
<rfs613> also you got the mtd partition layout.. so looks like the first 1MB is for u-boot (binary code), and the next 64kB is for the u-boot environment
<SlimeyX> yeah i want to modify all that at some point
<rfs613> does the userspace happen to include fw_printenv by any change?
<rfs613> *chance
naoki has joined #u-boot
mmu_man has joined #u-boot
<SlimeyX> yes, i think a userspace app was changing things back to "defaults"
<rfs613> certainly possible... but in that case, best option would be to track down that userspace and "fix" it.
<SlimeyX> nah im going to run openwrt on it instead of the yocto build they put on, without a license and a controller to connect it to its just a heavy ass brick
<rfs613> with lots of antennas ;-)
lucascastro has joined #u-boot
<SlimeyX> [ 0.000000] Linux version 5.15.85 (briang@briang-optiplex9020) (powerpc64-openwrt-linux-musl-gcc (OpenWrt GCC 11.3.0 r21563-9ed1830bdc) 11.3.0, GNU ld (GNU Binutils) 2.37) #0 SMP Tue Dec 27 18:10:05 2022
<SlimeyX> [ 0.000000] Using CoreNet Generic machine description
<SlimeyX> heh messed with this a while back, couldnt figure out the radios :\ but i can replace them with 4x4 ax cards instead of the qcom 9990 or whatevers are installed
<SlimeyX> and neither network card works gotta to see why that is also
joeskb7 has quit [Ping timeout: 252 seconds]
slobodan has quit [Quit: Leaving]
yann-kaelig has quit []
joeskb7 has joined #u-boot
gsz has quit [Ping timeout: 260 seconds]
mmu_man has quit [Ping timeout: 252 seconds]
mmu_man has joined #u-boot
Knogle has joined #u-boot
Knogle has quit [Client Quit]
sally has quit [Quit: sally]
sally has joined #u-boot