From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Reading memory into environment variable
Date: Fri, 04 Jul 2008 16:36:16 +0200 [thread overview]
Message-ID: <m2skupu36n.fsf@ohwell.denx.de> (raw)
In-Reply-To: <1215165809.22831.1261837119@webmail.messagingengine.com> (mcj's message of "Fri, 04 Jul 2008 11:03:29 +0100")
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
next prev parent reply other threads:[~2008-07-04 14:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-04 10:03 [U-Boot-Users] Reading memory into environment variable mcj00_rubbish at f-m.fm
2008-07-04 14:36 ` Detlev Zundel [this message]
2008-07-04 14:51 ` Alessandro Rubini
2008-07-04 15:39 ` mcj00_rubbish at f-m.fm
2008-07-04 17:02 ` Alessandro Rubini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2skupu36n.fsf@ohwell.denx.de \
--to=dzu@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox