<Forty-Bot>
right, so do something like `env set mtdparts gpmi-nand:4m(boot),8m(kernel),1m(dtb),-(rootfs`
<milkylainen_>
)'
<Forty-Bot>
that too
<wyre>
ok, I guess now is well set
<wyre>
but why is this?
<Forty-Bot>
someone did `env set mtdparts mtdparts=foo` for whatever reason
<wyre>
I mean, mtdparts is a command, I can see it in cli
<wyre>
when I run help
<wyre>
so ... why it's at the same time a variable?
<Forty-Bot>
oh, yeah you can use that to manually define partitions iirc
<Forty-Bot>
but according to jagen it's deprecated
<wyre>
jagen? 🤔
<Forty-Bot>
he's the maintainer of the flash subsystem
<wyre>
also ... I still have the same output when I run mtdparts: 'mtdids not defined, no default present'
<wyre>
oh
<wyre>
then what should I use?
<wyre>
I'd appreciate so much a guide/tutorial/example on how to perform the whole flashing process
<wyre>
because I'd like to flash the nand memory from a tftp using the U-Boot cli
<Forty-Bot>
oh
<Forty-Bot>
it should be mtdids
<Forty-Bot>
or rather
<Forty-Bot>
you need mtdids as well
<wyre>
Forty-Bot, I have not that command
<Forty-Bot>
it's a variable
<wyre>
oh, but I have not defined 🤔
<wyre>
how should I set it?
<Forty-Bot>
uh
<milkylainen_>
wyre: I think you'll have a hard time getting answers to very specific questions like configuration details. That would depend on what you are trying to do.
<wyre>
definitely I'd need a manual/guide on how do this 😥
<Forty-Bot>
I think something like `gpmi-nand=nand0`?
<Forty-Bot>
idk, I only did this for spi flash
<wyre>
milkylainen_, I'm trying to flash the nand from a tftp using the u-boot cli
<Forty-Bot>
wyre: this is undocumented for whatever reason :l
<wyre>
but they are like disks ... 4M, 8M, 1M and 499M
<wyre>
I guess those are for boot, kernel, dtb and rootfs, right?
<wyre>
that's because mtdparts is defined as mtdparts=mtdparts=gpmi-nand:4m(boot),8m(kernel),1m(dtb),-(rootfs) ?
<wyre>
are these blocks mutable?
<wyre>
or they have a fixed size?
mmu_man has joined #u-boot
matthias_bgg has joined #u-boot
<mwalle>
wyre: the manual tells you how to flash it. if you don't care about the current NAND contents, I'd say it is safe to flash from the sdcard system
<mwalle>
because even if something goes wrong, you can reflash it from the sdcard system
lukma has quit [Quit: leaving]
lukma has joined #u-boot
jwillikers has joined #u-boot
LokeshVutla has joined #u-boot
jwillikers has quit [Remote host closed the connection]
Peng_Fan has joined #u-boot
jwillikers has joined #u-boot
torez has joined #u-boot
matthias_bgg has quit [Ping timeout: 246 seconds]
matthias_bgg has joined #u-boot
vagrantc has joined #u-boot
gsz has joined #u-boot
mmu_man has quit [Ping timeout: 246 seconds]
tnovotny_ has quit [Quit: Leaving]
brujah has joined #u-boot
brujah_ has joined #u-boot
gsz has quit [Quit: leaving]
mmu_man has joined #u-boot
brujah has quit [Quit: Leaving]
brujah_ has quit [Quit: Leaving]
mckoan is now known as mckoan|away
<sjg1>
milkylainen_: cyrozap For U-Boot it is CONFIG_I8042_KEYB to disable it
<milkylainen_>
sjg1: tnx. I did find it eventually. Looks like my problem was a combination of things.
<milkylainen_>
16550 uarts enabled (not properly probed, but used later on?) and no usb start because of the configuration being a bit obtuse.
<milkylainen_>
There are some bits in the serial configuration that are... strange from my perspective.
fdanis is now known as fdanis_away
<milkylainen_>
config PREBOOT
<milkylainen_>
string "preboot default value"
<milkylainen_>
depends on USE_PREBOOT && !USE_DEFAULT_ENV_FILE
<milkylainen_>
default "usb start" if USB_KEYBOARD
<milkylainen_>
Seems kinda strange. "You have your own env file, so we need not add preboot"...
<milkylainen_>
Also.
<milkylainen_>
CONFIG_SERIAL_SEARCH_ALL.
<milkylainen_>
If not selected, 16550's get instantiated but never probed?
<milkylainen_>
CONFIG_SERIAL_PROBE_ALL
<milkylainen_>
Rather confusing...
LokeshVutla has quit [Remote host closed the connection]
vagrantc has quit [Quit: leaving]
frieder has quit [Read error: Connection reset by peer]
<milkylainen_>
Do I have to use the pesky "usb start" if I want an usb keyboard to work in U-boot?
akaWolf has quit [Ping timeout: 268 seconds]
crb has quit [Ping timeout: 250 seconds]
crb has joined #u-boot
akaWolf has joined #u-boot
matthias_bgg has quit [Ping timeout: 258 seconds]
crb has quit [Ping timeout: 250 seconds]
<Slimey>
is there a method of testing uboot on hardware before I write it to flash?
agust has quit [Quit: Leaving.]
jwillikers has quit [Remote host closed the connection]
torez has quit [Quit: torez]
<marex>
Slimey: there are many, which SoC / hardware / do you have in mind ?
<marex>
dang, env_get_bootm_size() returns total DRAM size, which fails if your DRAM is in 32bit space and you have two banks with gap between those banks
<marex>
Tartarus: sjg1: ^
<Tartarus>
marex: first thought is isn't that what bootm_size / bootm_low I think it is are supposed to be for?
<marex>
Tartarus: it should likely return the size of the first bank only
<Tartarus>
milkylainen_: Yes, you need usb start to start USB
<marex>
which in most cases is the same as total DRAM size on arm32
<Tartarus>
marex: Not sure about that. Since we have env vars to say what to use/where
<Tartarus>
But I don't have the code in front of me
<marex>
well, DT is relocated to end of start-of-ram + bootm_size
<marex>
the default bootm_size is total size of ram
<marex>
if you have e.g. two split banks, say ... 0x7000_0000..0x8fffffff and 0xb0000000-0xcfffffff , then your DT ends up a bit below 0xafffffff
<marex>
and that's a non-existing memory, right there
<marex>
so I think the safe default should be the first bank, not total DRAM size
<marex>
and yes, it does not match what README says about bootm_size , but then I would argue README should be updated , because it seems a lot of code depends on this area to be continuous
<Tartarus>
Yeah, the code around discontiguous memory needs to be checked a bit
jwillikers has quit [Remote host closed the connection]
<Tartarus>
marex: I looked over the code again, I don't see why the answer for your situation isn't to use bootm_low/bootm_size/bootm_mapsize as needed for your situation. We have those env vars and a function to reference them rather than just gd->ram_* directly to allow for discontig memory, etc.
<Tartarus>
afk dinner
<marex>
Tartarus: because those env vars are overrides, not something you should tweak by default
<marex>
Tartarus: but that's OK, I already have a patch
<sjg1>
marex: Tartarus Re env_get_bootm_size(), it uses just the first bank