From: Jerry Van Baren <gerald.vanbaren@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] simplify bootm command
Date: Tue, 05 Aug 2008 09:36:33 -0400 [thread overview]
Message-ID: <48985761.5010800@ge.com> (raw)
In-Reply-To: <8984D781-CA40-4CF4-886C-D2A4D87FBA17@kernel.crashing.org>
Kumar Gala wrote:
> On Aug 5, 2008, at 5:19 AM, Wolfgang Denk wrote:
[snip]
>> One idea that has been spinning in my mind for some time is to make
>> the "run" command to execute the content of an environment variable
>> optional. Instead, we could try and handle environment variable names
>> similar to command names, i. e. instead of typing "run foo; run bar"
>> you could just write "foo; bar" (I woull probably still keep the
>> "run" command around to allow for the implicit error handling as used
>> in "run foo bar" without forcing the user to use the hush shell to
>> get the equivalent "foo && bar").
[snip]
>> With such an implementation, we could move the FDT handling into a
>> command sequence stored in a "bootm" environment variable, and the
>> last part of this variable would be "builtin bootm" to run the real
>> (simplified) command.
>>
>> What do you think?
>
> While this is a cleaner implementation of what I've implemented w/
> ft_env_setup() it still doesn't completely solve my problem. We'd
> need to have a command to deal with image loading separate from bootm
> since the 'fdt' processing that does occur today is in the middle of
> the bootm flow.
>
> bootm:
> 1. verify and uncompress kernel image
> 2. relocate fdt (if needed)
> 3. ft_board_setup()
> 4. verify and uncompress ramdisk
> 5. update initrd info in device tree
> 6. jump to kernel
>
> I don't see how we can accomplish the same steps w/o breaking bootm
> down into a set of builtin commands to handle the various steps and
> providing enough information between the steps to accomplish the next
> step.
Yes, that is Wolfgang's (and my) proposal: rationalize the built-in
"bootm" to do just #6. Steps 1-5 already exist as built-in commands or
commands could be created almost trivially to invoke the existing code.
The current "bootm" behavior would then be emulated by a bootm script
chaining them together. All the different "bootm" behaviors would then
be in the script (customizable by the user) rather than being
hard-compiled into the actual bootm built-in command.
Rather than using the C preprocessor (and deductions based on
parameters) to select the "appropriate" bootm behavior, an appropriate
script would be used (there would be quite a few possible scripts,
depending on _which_ "bootm" behavior is needed for a specific
board/config). (Despite just having "dissed" cpp bootm behavior
generation, I'm thinking that we would want to use the cpp to generate a
default script that would emulate the current bootm behavior.)
Best regards,
gvb
next prev parent reply other threads:[~2008-08-05 13:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-05 3:51 [U-Boot-Users] simplify bootm command Kumar Gala
2008-08-05 10:02 ` Jerry Van Baren
2008-08-05 10:19 ` Wolfgang Denk
2008-08-05 10:38 ` Jerry Van Baren
2008-08-05 11:05 ` Wolfgang Denk
2008-08-05 11:16 ` Albert ARIBAUD
2008-08-05 13:01 ` Wolfgang Denk
2008-08-05 13:45 ` Albert ARIBAUD
2008-08-05 12:15 ` Jerry Van Baren
2008-08-05 13:59 ` Detlev Zundel
2008-08-05 12:56 ` Kumar Gala
2008-08-05 13:36 ` Jerry Van Baren [this message]
2008-08-05 13:59 ` Kumar Gala
2008-08-05 14:08 ` Wolfgang Denk
2008-08-05 14:32 ` [U-Boot-Users] simplify bootm command -- deprecated or removing functionality? Kumar Gala
2008-08-05 14:45 ` Wolfgang Denk
2008-08-05 14:48 ` Kumar Gala
2008-08-05 15:05 ` [U-Boot-Users] simplify bootm command Kumar Gala
2008-08-05 16:11 ` Jerry Van Baren
2008-08-05 16:27 ` Kumar Gala
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=48985761.5010800@ge.com \
--to=gerald.vanbaren@ge.com \
--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