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 12:11:28 -0400 [thread overview]
Message-ID: <48987BB0.3090405@ge.com> (raw)
In-Reply-To: <7223F0AC-1967-46D0-9A03-89D80AAEF380@kernel.crashing.org>
Kumar Gala wrote:
>
> On Aug 5, 2008, at 8:36 AM, Jerry Van Baren wrote:
>
>> Kumar Gala wrote:
>>> On Aug 5, 2008, at 5:19 AM, Wolfgang Denk wrote:
[snip]
>>>> 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.
>
> As I look at this more and more I think trying to re-encode the control
> flow of the bootm command in a script is just insane. There are too
> many special cases we have to deal with that we'd just being moving from
> C code into the script.
My assumption is that a given board/config/user will likely be using
exactly one of the n!/k!(n-k)! possibilities implemented in the current
"bootm" (I don't know what n and k are, but n is pretty large and k is
hard to determine :-O). I figure, in the worst case, a given user may
want two or three possibilities.
By selecting from a (smallish) set of "simple" bootX scripts, I'm
speculating that each script will not need conditional logic other than
"&&" to bail out if an error occurs. I'm also suspicious that replacing
"bootm" with a simplified "bootm" with a (single) "bootm" script isn't
going to be workable (as you contend - script complexity)... the
solution I would propose if that happens is to maintain "bootm" as is as
a backwards compatible CONFIG_ option and create a new "bootsimple" (or
some such) command that is what bootm would have been if we had hush
scripting (and prescience[1]) a few years ago.
> Unless there is some believed simplification I'm missing I don't think
> going through all this effort produces anything that is significantly
> better.
To make an omelet, you have to break some eggs. :-) I see Wolfgang
illustrated the current complexity with a list of bootm hack^H^H^H^H
customizations in a separate message.
> My needs are meet with the simple ft_env_setup() call out. Beyond that
> trying to rework bootm for legacy images, CONFIG_FIT, booting w/dts,
> boot w/o dts, linux, *bsd, vxworks, etc just seems like a lot of work
> w/o any real benefit.
That is the practical approach for now, but that is also how we got to
here - incrementally adding complexity to bootm.
Best regards,
gvb
[1]
<http://en.wikipedia.org/wiki/Minor_characters_from_The_Hitchhiker%27s_Guide_to_the_Galaxy#Gogrilla_Mincefriend>
next prev parent reply other threads:[~2008-08-05 16:11 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
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 [this message]
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=48987BB0.3090405@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