From: stefano babic <stefano.babic@babic.homelinux.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Handle environment variables like commands
Date: Mon, 20 Oct 2008 09:50:55 +0200 [thread overview]
Message-ID: <48FC385F.6090506@babic.homelinux.org> (raw)
In-Reply-To: <20081019120515.361E6832E43A@gemini.denx.de>
Wolfgang Denk wrote:
>
> The idea of the extension is that something like
>
> => bootm ${kernel} ${fdt} ${ramdisk}
>
> will still work.
>
> Unfortunately, it doesn't, as we have no way to pass the arguments to
> the (substituted) command to the commands run in the executed script.
yes, that is true ;(. Arguments are not passed to the underlying script.
> One idea to solve this problem would be to introduce positional
> parameters, similar to how it's being done in the shell. In the
> script, we could then refer to the original command args using "$1",
> "$2", ... so the example above would look like that:
>
> => setenv bootm 'echo Run bootm command; builtin bootm $1 $2 $3"
Ok, I understand. We need the same behavior as in the real shell to
perform this.
> I have to admit that I didn't spend much thought on this yet, so all
> feedback or sugggestions of alternative / better ideas is
> welcome.
I admit I have no better ideas...with positional parameters we can start
even some complex scripts. I take a look how to implement them, if there
are no other suggestions.
Best regards,
Stefano Babic
--
stefano <stefano.babic@babic.homelinux.org>
GPG Key: 0x55814DDE
Fingerprint 4E85 2A66 4CBA 497A 2A7B D3BF 5973 F216 5581 4DDE
next prev parent reply other threads:[~2008-10-20 7:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-15 13:56 [U-Boot] [PATCH] Handle environment variables like commands Stefano Babic
2008-10-19 12:05 ` Wolfgang Denk
2008-10-20 7:50 ` stefano babic [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-10-15 10:09 Stefano Babic
2008-10-15 10:45 ` Petri Lehtinen
2008-10-15 11:01 ` Wolfgang Denk
2008-10-15 12:01 ` stefano babic
2008-10-15 12:25 ` Wolfgang Denk
2008-10-15 10:57 ` Wolfgang Denk
2008-10-15 11:56 ` stefano babic
2008-10-15 12:26 ` Wolfgang Denk
2008-10-15 12:09 ` Joakim Tjernlund
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=48FC385F.6090506@babic.homelinux.org \
--to=stefano.babic@babic.homelinux.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.