From: Jerry Van Baren <gerald.vanbaren@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] outline of bootm script
Date: Wed, 06 Aug 2008 16:39:30 -0400 [thread overview]
Message-ID: <489A0C02.4000108@ge.com> (raw)
In-Reply-To: <6130E31C-5845-4DCF-A24C-4436DA575808@kernel.crashing.org>
Kumar Gala wrote:
>
> On Aug 6, 2008, at 2:55 PM, Jerry Van Baren wrote:
[snip]
>> Having said that, I was thinking and would advocate pushing
>> functionality out of bootm and into other commands, as appropriate.
>> As an example, bootm doesn't need to do *any* fdt stuff, the "fdt"
>> built-in has all the capability we need (or should).
>
> except for locating the fdt at the right location and dealing w/initrd
> (but that could possibly be fixed).
>
>> The same may be also true about load_os and load_initrd - they are
>> copy-with-(optional)-
>> decompression operations (we may need additional commands for these).
>>
>> Philosophy: bootm should do only bootm stuff. It (probably) should
>> not do any image stuff (find/copy/decompress/verify). It (probably)
>> should not do any fdt stuff (board fixup, other?). Etc...
>
> This DOES NOT WORK... sorry I'm trying to make progress on this and I'm
> not getting suggestions on a solutions just gripes about what I'm
> suggesting.
>
> The problem with breaking things up is that you HAVE to disable
> interrupts and USB before you can reasonable load the OS image. Are we
> could to add a command for each "prereq". How does a user know if they
> need to "disable_caches" on their board or not?
Understood, there are some things that inherently must be done in bootm.
That is why it is a philosophy and not a rule. ;-)
> Also there is logic in the bootm that knows how to layout the images
> based on the constraints of memory. Let use an example (assume OS image
> will be loaded at 0):
>
> bootm 1000000 - fff00000
>
> we load to 0, the resulting size is 1234151 bytes. So we set "filesize"
> to 0x12D4E7. Since the fdt is in flash we have to copy it to memory.
>
> So what address do we copy it to? 0x12D4E7? No because we have to be
> 8-byte aligned. So 0x12D4F0? No because we have to ensure space for the
> kernel .bss. So we have to encode all that logic in the script? That's
> just asking for pain.
>
> - k
I agree with you, ideally the script would be just a sequence of
cmd && cmd && cmd && cmd
with no conditionals other than, if a cmd failed, it aborts the sequence
(I'm assuming the last "cmd" would be where the point of no return is
embedded: copying the image over the interrupt vectors, etc.).
My thoughts are that addresses would be handled by setting env variables
initially and/or as a side effect of a cmd (yeah, side effects are
yucky) and what is currently hard-coded as conditionals in the code
would be re-scripted as /n/ scripts, where /n/ is some subset of the
permutations of however many conditionals the current bootm has.
We will have to see how it plays out in reality...
gvb
next prev parent reply other threads:[~2008-08-06 20:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-05 14:35 [U-Boot-Users] outline of bootm script Kumar Gala
2008-08-06 2:33 ` Jerry Van Baren
2008-08-06 19:15 ` Kumar Gala
2008-08-06 19:41 ` Wolfgang Denk
2008-08-06 20:05 ` Kumar Gala
2008-08-06 20:26 ` Wolfgang Denk
2008-08-06 20:33 ` Kumar Gala
2008-08-06 19:55 ` Jerry Van Baren
2008-08-06 20:19 ` Kumar Gala
2008-08-06 20:36 ` Wolfgang Denk
2008-08-06 20:45 ` Kumar Gala
2008-08-06 21:15 ` Wolfgang Denk
2008-08-06 21:37 ` Kumar Gala
2008-08-06 22:00 ` Wolfgang Denk
2008-08-06 22:09 ` [U-Boot-Users] bootm -- load_os inputs/outputs Kumar Gala
2008-08-06 20:39 ` Jerry Van Baren [this message]
2008-08-06 20:21 ` [U-Boot-Users] outline of bootm script Wolfgang Denk
2008-08-06 20:29 ` Jerry Van Baren
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=489A0C02.4000108@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