[U-Boot-Users] Reading memory into environment variable

Detlev Zundel dzu at denx.de
Fri Jul 4 16:36:16 CEST 2008


Hi Martin,

> I wish to read the kernel command line parameters in from a disk file
> located e.g. on a FAT file system. My current idea is to implement it
> like this:
>
> 1. Read disk file into RAM
> 2. Implement custom "mem2env" command to read memory into environment
> variable, with destination variable as ${bootargs}
>
> As far as I can see, I am not reinventing any wheels by doing this, but
> does anyone know a better way?

I've seen the dbox guys doing something similar, although IIRC that
solution wasn't quite generic and was hacked into board specific code.

Thinking about it some more, if you can use mkimage somewhere in
userspace, you could create a script file, load that to ram and execute
it.  This is very generic and not limited to setting environment
variables.

Thinking about that some more, maybe we could teach "autoscr" also to
run commands from a memory address without it being wrapped with
mkimage.  This is also very generic but prone to errors...

Cheers
  Detlev

-- 
0x2B | ~0x2B
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de




More information about the U-Boot mailing list