public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ulf Samuelsson <ulf@atmel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Question about CFG_ENV_ADDR during RAMBOOT
Date: Thu, 24 May 2007 23:43:26 +0200	[thread overview]
Message-ID: <030501c79e4e$862cf740$0302a8c0@atmel.com> (raw)
In-Reply-To: 20070524211114.D65F9353428@atlas.denx.de

> In message <01f401c79e40$5e938450$0302a8c0@atmel.com> you wrote:
>>
>> Any interface to dataflash would need the following operations:
> 
> Good. We're back on a technical level and can discuss potential
> implementations.
> 
> Let me try to reformulate yur suggestions a bit, trying  tomap  these
> into  my  idea  of  a  possible  interface  (just  as base for future
> discussion):
> 
>> * move from sdram to dataflash (with optional checksum write & byte
>> granularity)
> 
> * Copy from memory to dataflash
> 
>  I see no reason why we should restrict the source of  the  copy  to
>  RAM.  Also,  we should use the term "copy" as "move" to me includes
>  the operation of removing/erasing the source of the data.
> 
>  What exactly do you mean by "checksum write"?  The  currently  used
>  "cp.b" interface doesn't do anything like this either, or does it?
> 

No but a way to common error is that the kernel is too large to fit into
its allocated area and when the file system is written it overwwrites the end
of the kernel.
In my branch, I can set an environment variable crccheck=1
and if set, any cp.b to dataflash will add a checksum at the end.
Any cp.b from dataflash will again compute the checksum
and compare vs the checksum at the end.

Saves me a lot of confusing linux boot errors.

>> * move from dataflash to sdram (with optional checksum check & byte
>> granularity)
> 
> * Copy from dataflash to memory.
> 
>  Same remars as above.
> 
>> * compare dataflash to sdram
> 
> * That would be a two step procedure, like currently used for other
>  storage devices:
> 
>  - Copy from dataflash to memory
>  - compare two memory areas

If I wanted to wear down my fingers by typing a lot of things,
I would have choosen a career as a COBOL programmer.

Your suggestion has the unwanted side effect that you destroy the SDRAM
in the process, and you have to keep in mind where you put intermediate copies.

Since dataflash sectors are 256 kB, and you should avoid putting linux/rootfs
in the same sector as u-boot, code size is of much less importance than
ease of use.

It is very important to reduce typing to a minimum.

Having to do 2-3 commands to do what can be done by one command
and complicating the user experience in the process, is simply not acceptable.

>  No new command needed.
> 
>> * list dataflash contents
> 
>  What exactly do you mean here? Do you have any such function
>  currently?
> 

yes

>> * fill dataflash
> 
> * That would be a two step procedure:
>  - fill memory area (RAM)
>  - copy from memory to dataflash
> 

>  No new command needed.

See above, ease of use, is much more important than code size.

>> * modify dataflash (with byte granularity)
> 
> * That would be a three step procedure:
> 
>  - Copy from dataflash to memory
>  - modify memory
>  - copy from memory to dataflash
> 
>  No new command needed.
> 
>> * erase dataflash (byte and partition)
> 
>  OK.
> 
>> * enable/disable write protection of dataflash partition
> 
>  OK.
> 
>> * print dataflash chip info
> 
>  OK.
> 
>> I see no reason to compare two dataflash areas and to compare two
>> dataflash areas.
> 
> Neither do I, as it boild down to the elementary functions listed
> above: copy to memory and compare in memory.
> 
>> It should be possible to stored the environment in dataflash
> 
> Agreed.
> 
>> It would be good to be able to change the partition information
>> dynamically
>> so you can grow/shrink the linux-kernel size.
> 
> The mtdparts command should support dataflash devices, too.
> 
>> Possibly the pagesize should be migrated into the environment
> 
> What do you mean by that?
> 

The pagesize of the dataflash varies between 264,528,1056 bytes depending on chip.
It might be of interest to know this in a script.

> Best regards,
> 

It should be possible to remove any code accessing parallel flash,
so the memory commands only access SDRAM.
Many boards do not have any parallel flash, and this code will just bloat the binary.

> Wolfgang Denk
> 
> -- 


Best Regards
Ulf Samuelsson

  reply	other threads:[~2007-05-24 21:43 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-16 19:58 [U-Boot-Users] Question about CFG_ENV_ADDR during RAMBOOT Timur Tabi
2007-05-22 20:36 ` Timur Tabi
2007-05-22 20:53   ` Jerry Van Baren
2007-05-22 21:04     ` Wolfgang Denk
2007-05-22 21:07       ` Timur Tabi
2007-05-23  0:15         ` Wolfgang Denk
2007-05-23 15:58           ` Timur Tabi
2007-05-22 21:26       ` Jerry Van Baren
2007-05-22 21:20     ` Andy Fleming
2007-05-22 21:22       ` Timur Tabi
2007-05-23  0:17         ` Wolfgang Denk
2007-05-23 14:56           ` Timur Tabi
2007-05-22 21:00   ` Wolfgang Denk
2007-05-22 21:30     ` Andy Fleming
2007-05-23 10:04     ` Ladislav Michl
2007-05-23 10:48       ` Ulf Samuelsson
2007-05-23 11:39         ` Ladislav Michl
2007-05-23 12:52           ` Ulf Samuelsson
2007-05-23 13:57             ` Wolfgang Denk
2007-05-23 16:19               ` Ulf Samuelsson
2007-05-24 12:10                 ` Ladislav Michl
2007-05-24 13:03                   ` Wolfgang Denk
2007-05-24 13:34                     ` Ladislav Michl
2007-05-24 19:08                   ` Ulf Samuelsson
2007-05-24 21:11                     ` Wolfgang Denk
2007-05-24 21:43                       ` Ulf Samuelsson [this message]
2007-05-24 23:46                         ` Wolfgang Denk
2007-05-25  5:37                         ` Stefan Roese
2007-05-25  8:50                           ` Ladislav Michl
2007-05-23 12:59           ` Ulf Samuelsson
2007-05-23 13:25             ` Ladislav Michl
2007-05-23 16:05               ` Ulf Samuelsson
2007-05-24 12:29                 ` Ladislav Michl
2007-05-24 18:34                   ` Ulf Samuelsson
2007-05-24 18:35                   ` Ulf Samuelsson
2007-05-23 12:59         ` Wolfgang Denk
2007-05-23 15:44           ` Ulf Samuelsson
2007-05-23 18:08             ` Wolfgang Denk
2007-05-24  9:14             ` Ladislav Michl
2007-05-25  9:06               ` Ladislav Michl
  -- strict thread matches above, loose matches on Subject: below --
2007-05-26 10:53 Ulf Samuelsson
2007-05-26 13:15 ` Wolfgang Denk
2007-05-28 11:37 ` Ladislav Michl
2007-05-28 14:08   ` Ulf Samuelsson
2007-05-28 15:39     ` Ladislav Michl
2007-05-28 16:16       ` Håvard Skinnemoen
2007-05-28 16:56         ` Ulf Samuelsson
2007-05-28 19:39           ` Ladislav Michl
2007-05-29  0:10             ` Wolfgang Denk
2007-05-29 22:13               ` Ulf Samuelsson
2007-05-29 22:46                 ` Wolfgang Denk
2007-05-29 23:15                   ` Ulf Samuelsson
2007-05-29 23:39                     ` Wolfgang Denk
2007-05-30  0:46                       ` Ulf Samuelsson
2007-05-30  6:57                         ` Wolfgang Denk
2007-05-30 10:52                           ` Ladislav Michl
2007-05-30 13:43                             ` Wolfgang Denk
2007-05-30 18:11                               ` Ulf Samuelsson
2007-05-30 11:34 Ulf Samuelsson
2007-05-30 12:16 ` Ladislav Michl
2007-05-30 13:47 ` Wolfgang Denk
2007-05-30 18:23   ` Ulf Samuelsson
2007-05-30 23:19     ` Wolfgang Denk

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='030501c79e4e$862cf740$0302a8c0@atmel.com' \
    --to=ulf@atmel.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