public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Greg Ungerer <gerg@moreton.com.au>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] add OpenGear CM4008 board support
Date: Tue, 24 May 2005 20:23:37 +1000	[thread overview]
Message-ID: <429300A9.9050202@moreton.com.au> (raw)
In-Reply-To: <20050524090051.4F212C1512@atlas.denx.de>

Hi Wolfgang,

I guess we have a mismatch here somewhere, lets try and straiten this out.


Wolfgang Denk wrote:
>>To get the filesystem size you have to look at the first few
>>words when you get it in memory. Once you figure out the filesystem
>>type (since there is only a couple of interresting types that
>>can work here you only need to check for the magic number header)
>>you know how to determine its size.
> 
> 
> Did you read my proposal of using a multifile image?

Yes, I read it. I don't currently see how it solves the problem.


>>You don't know where the kernel starts until you have a look in the
>>header of the filesystem. If it is CRAMfs or ROMfs (or that type of
> 
> 
> I understand this problem., It results from an unadept choice of your
> image layout - put the kernel first, and the problems  just  go  away
> :-)

I geuss I disagree. We see a different problem. I see u-boot doesn't
support an established image format. You see that it does (well I think
that is what you are saying?).

I don't want to neccessarily turn this into a discussion about the
merits of the format. I want this to be a discussion about how to go
about best supporting it.


>>>I think it is not a good idea to use header-less kernel images - most
>>>projects I've seen were happy enough to be able to  find  outr  which
>>>image is installed in flash and if it's corrupted or not. YMMV.
>>
>>Some people want that, some don't. There is a pretty big installed
>>base of configurations that don't use headers.
> 
> 
> Well, the only disadvantage you  get  from  having  a  header  is  an
> additional  64  bytes  (or  68  +  4  * number of images in case of a
> multi-image file). More memory is saved by NOT  adding  special  boot
> code for headerless images.

The size of the header is not important.


>>>"tftp ..." followed by using $filesize seems not too  complicated  to
>>>me.
>>
>>As I pointed out that does not work, it is not filesize you want.
> 
> 
> It does work. I use it all the time. You just have to use tftp  twice
> - once for the filesystem and a second time for the kernel :-)

Hmm, ok, you didn't say that earlier. Seems like an awful
kludge to have to load it twice - don't you think?


>>This method is in common use. The snapgear guys have been
>>doing it for years. They would have a pretty large installed
>>base (though that is not relevant to this discussion).
> 
> 
> Well, I cannot prevent anybody from not reading the documentation  or
> from  doing  non-standard  things.  I don't consider it my problem if
> Snapgear comes up with a solution that ignores the existing  standard
> methods and creates their own proprietary solutions or problems.

This isn't about reading documentation. And I suspect this method
predates u-boot anyway. When you say standard you really mean
u-boots own methods don't you?  Does any other boot loader support
the same format headers?  (I actually don't know the answer to
this, thus I am genuinely asking the question).


> Quote:
> 
> "UNIX was not designed to stop you from doing stupid things,  because
> that would also stop you from doing clever things."       - Doug Gwyn

Yes, illustrates my point really...
For one, u-boot has no mechanism for generating arm boot tags for
anything other than its own defined kernel format.


> But I will try to enforce some  design  principles  on  the  official
> U-Boot tree, and one of these is to avoid duplication of code.

Certainly. I have no issue with that. Never have.


> Don't use "a pretty large installed base" as an argument - it doesn't
> count. You could have discussed your design here on the mailing  list
> BEFORE implementing your own proprietary stuff.

That makes no sense, I want to use u-boot with an existing format.
No point asking years later what would be a good load format.


>>It is not a question of tolerating anything, it is about
>>finding a solution that is acceptable to you for something
>>that u-boot cannot currently do.
> 
> 
> Did you *read* me previous message? Why do you continue to ignore  my
> proposal of using a multifile image instead? I really don't see where
> exactly your problem is.

Ok, this is where I guess I don't understand your argument.

How can I take a multi-part image, and in Linux do

     erase /dev/mtd1
     cat imagefile > /dev/mtd1
     mount /dev/mtdblock1 /mnt

If there is any header then that is not directly mountable as
a filesystem.

You would need additional tool support to do this, and this
either goes in Linux or u-boot.


[snip a lot of stuff that all goes back to the above question]
>>2. you need to determine the kernel start address so you can
>>    run it (irrespective of whether it is in flash or network
>>    loaded into RAM
> 
> 
> You created this problem  yourself.  It  results  from  your  unadept
> design.

Sorry, just don't agree. Unadept design. It works very well
for its intended purpose. Just not with u-boot as it is.

Regards
Greg

  reply	other threads:[~2005-05-24 10:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-17 13:53 [U-Boot-Users] [PATCH] add OpenGear CM4008 board support Greg Ungerer
2005-05-17 14:25 ` Wolfgang Denk
2005-05-19 14:30   ` Greg Ungerer
2005-05-19 22:47     ` Wolfgang Denk
2005-05-20 14:09       ` Greg Ungerer
2006-03-12  0:24         ` Wolfgang Denk
2005-05-20 14:15       ` Greg Ungerer
2005-05-20 14:45         ` Wolfgang Denk
2005-05-23  1:32           ` Greg Ungerer
2005-05-23  8:48             ` Wolfgang Denk
2005-05-24  6:42               ` Greg Ungerer
2005-05-24  9:00                 ` Wolfgang Denk
2005-05-24 10:23                   ` Greg Ungerer [this message]
2005-05-24 11:15                     ` Wolfgang Denk
2005-05-24 13:12                       ` Greg Ungerer
2005-05-24 13:52                         ` Wolfgang Denk
2005-05-25  0:35                           ` Greg Ungerer

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=429300A9.9050202@moreton.com.au \
    --to=gerg@moreton.com.au \
    --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