[U-Boot] 'filesize' env var - making U-Boot command more scriptable?

Tim Harvey tharvey at gateworks.com
Thu Oct 12 16:47:18 UTC 2017


Greetings,

Various U-Boot commands that deal with files/blobs end up setting the
'filesize' env variable to be used for subsequent commands which is
very handy. I haven't found this documented anywhere but a scan of the
code looks like this is done by
ximg/unzip/load/ini/lzmadec/reiser/cramfs/pxe/cbfs/jffs2/zfs/nvedit/zip/bootm_os/dfu_mmc/fs/ubifs/net.

I've seen other commands that allow a usage that will allow specifying
a var name to put a result in.

I've noticed commands such as 'ubi' and 'nand' would benefit from
setting filesize when dealing with volume names and partition names.
I've also noticed how some commands (ie nand) are good about reporting
sizes in hex but others (ie ubi) report them in decimal only making it
difficult for someone to even cut-and-paste sizes to following
commands.

Has there been a desire or proposal to make this more standard or come
up with something different?

Regards,

Tim


More information about the U-Boot mailing list