public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Question about CFG_ENV_ADDR during RAMBOOT
@ 2007-05-26 10:53 Ulf Samuelsson
  2007-05-26 13:15 ` Wolfgang Denk
  2007-05-28 11:37 ` Ladislav Michl
  0 siblings, 2 replies; 63+ messages in thread
From: Ulf Samuelsson @ 2007-05-26 10:53 UTC (permalink / raw)
  To: u-boot


> We also have board with NAND FLASH only and the number of those boards will 
> grow in the near future. The NAND command interface of course need a little 
> more typing, but I always configure a few environment variables to update the 
> images in the NAND FLASH. Something like:
> 
> => setenv nload 'tftp 200000 board/u-boot.bin'
> => setenv nupdate 'nand erase 0 40000;nand write 200000 0 40000'
> => setenv nupd 'run nload nupdate'

Yes, yes :-) Here I agree with Wolfgand and Stefan. U-Boot should
provide commands which reflect principle of device without any
abstraction. Knowing principle means usually less bad surprises coming
out from some hidden abstraction implementation details. That's good for
power users.

=> OK, then tell me how
   to compare a 6 MB
   file in flash with a 6MB
   file in SDRAM when
   your SDRAM is 8 MB.

   We are *not* running on
   PC's.

   There is nothing that stops
   "power users" from copying
   from dataflash to SDRAM 
   and then doing a compare.
   Power Users are limited
   by implementations which
   waste enormous resources.

   I would have more respects
   for exhibited views if writes
   to parallel flash is removed
   from cp.b...
   Parallel flash is clearly not
   "memory" for write 
    purposes, only for read
    purposes.
    Its existence in cp.b will 
    force endless #ifdefs
    or support for parallel flash
    will have to remain and
   bloat code.
 
    You could then argue that 
    support for parallel flash 
    should be removed from
    all commands to remove
    inconsistencies...

   I do not think this will
   happen because it is
   *useful* and because
   this affects boards which
   people that makes 
   decisions works with
   this. They do not work
   with dataflash and do
   not care about people
   that wants this.

   I think that consistency
   in argumentation is a
   reasonable demand.
   
  

   * BYTE WRITE

   Why should you waste
   time on copying dataflash
   to SDRAM when you can 
   do operations inside the
   internal SRAM.

   It is not desirable to transfer
   20,000 bits between CPU
   and dataflash when 100-200
   are sufficient.
   Personally I would like 
   everyone that did not 
   bother to read and under
   stand the AT45 dataflash 
   datasheets to do so before
   sending comments about  
   how the internal 
   implementation should look
   like.


Best Regards
Ulf Samuelsson

^ permalink raw reply	[flat|nested] 63+ messages in thread
* [U-Boot-Users] Question about CFG_ENV_ADDR during RAMBOOT
@ 2007-05-30 11:34 Ulf Samuelsson
  2007-05-30 12:16 ` Ladislav Michl
  2007-05-30 13:47 ` Wolfgang Denk
  0 siblings, 2 replies; 63+ messages in thread
From: Ulf Samuelsson @ 2007-05-30 11:34 UTC (permalink / raw)
  To: u-boot

Best Regards
Ulf Samuelsson

Atmel Nordic AB
Visit: Kavalleriv?gen 24, 
       174 58 Sundbyberg
Mail: Box 2033
       174 52 Sundbyberg
SWEDEN
mail:ulf at atmel.com
Tel: +46 706 224457
________________ Sidrubrik f?r svar ________________ ?rende:	Re: [U-Boot-Users] Question about CFG_ENV_ADDR during RAMBOOT F?rfattare: Ladislav Michl <ladis@linux-mips.org> Datum:		2007 maj 30:e 10:54 
On Wed, May 30, 2007 at 08:57:50AM +0200, Wolfgang Denk wrote:
> In message <465CC968.6090801@atmel.com> you wrote:
> > The dataflash partitioning scheme is static, which is a disadvantage, but
> > If I fix anything, I probably make the partition sizes a configurable item
> > in my buildroot and generate the warning there, if the kernel size is non compliant.
> 
> If you fix anything, then please by making  it  compatible  with  the
> poublic  U-Boot  source  tree,i. e. by using the mtdparts command for
> this purpose.

Here it might be usefull to avoid modifications of certain partition
sizes. For example partition containing environment shouldn't be
modified, because code which read it from U-Boot has size and offset
hardcoded, therefore modifying it will result to bad surprise...

=> We also need to understand if we are talking
about the same thing.
I have this feeling that
mtdparts exist to divide
the rootfs into several
areas while the dataflash
partioning is there purely
for U-boot purposes.

The partion use is:
1) AT91 bootstrap.
2) U-boot environment
3) U-boot image.
4) Kernel image
5) Root FS.

The sum of 1+2+3 is
always 256kB due to
df sector size.
The only programmable value
is the kernel size.

Nothing is ever written to
the dataflash to indicate
partion info and nothing
is passed to Linux 
except rootfs start adress in
bootargs.

The df partion is just for setttins protection
and (in my 1 year+ old patch)
sets a few environment
variables to contain the
start adress of kernel &
rootfs.



Can someone confirm that
mtdparts is the right way
to go?

Best Regards
Ulf Samuelsson


Best Regards
Ulf Samuelsson


Best Regards
Ulf Samuelsson

^ permalink raw reply	[flat|nested] 63+ messages in thread
* [U-Boot-Users] Question about CFG_ENV_ADDR during RAMBOOT
@ 2007-05-16 19:58 Timur Tabi
  2007-05-22 20:36 ` Timur Tabi
  0 siblings, 1 reply; 63+ messages in thread
From: Timur Tabi @ 2007-05-16 19:58 UTC (permalink / raw)
  To: u-boot

On a lot of boards, if CFG_RAMBOOT is defined, the following code is compiled:

   #define CFG_ENV_ADDR		(CFG_MONITOR_BASE - 0x1000)
   #define CFG_ENV_SIZE		0x2000

This means that the environment is stored 0x1000 bytes before the start of u-boot.bin. 
Doesn't that mean that if the environment is larger than 0x1000 bytes, that it will 
overwrite the beginning of u-boot.bin whenever someone does a saveenv?

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply	[flat|nested] 63+ messages in thread

end of thread, other threads:[~2007-05-30 23:19 UTC | newest]

Thread overview: 63+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-26 10:53 [U-Boot-Users] Question about CFG_ENV_ADDR during RAMBOOT 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
  -- strict thread matches above, loose matches on Subject: below --
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
2007-05-16 19:58 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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox