[U-Boot-Users] Question about CFG_ENV_ADDR during RAMBOOT

Ulf Samuelsson ulf at atmel.com
Wed May 30 01:15:43 CEST 2007


> 
> If you want to do something like this (opinions about usefulnes  will
> probably differ - I'm not going to discuss this here), you don't need
> to  add  special  commands.  You  should  be able to use the existing
> commands, eventually packed into a macro definition.
> 
* It is not a special command, it is a configurable side effect of
  reading/writing to dataflash.

* running mkimage on the host will of course generate the crc check
  but U-boot does not know that they thing you are copying to
  storage is an image so it will not check crc automatically.

  For your recommendation to work, people have to suspect that
  the things stored in flash is bad.
  In my experience, people do not realize that the image is bad, and
  think they have made a mistake when generating the kernel or the root fs
  and spend significant time trying to figure out what the problem
  is and then call me.
  If I generate/check the crc on all writes/reads, then this support
  problem will more or less go away.
  With your proposal, the support problem will remain.

  I can of course generate macros, but again, people will want to do
  their own macros, and they will run into the problem.

  Reducing support, is very important, and is worth the extra code space needed.


>> By doing the crc check when copying from the dataflash to SDRAM
>> you immediately pinpoint the problem.
> 
> I don't understand why your appended CRC word is in  any  way  better
> than  our  embedded  / prepended one, the result of the check will be
> the same in each case. If you need check the  CRC  independetly  from
> the  boot  command,  you  can  always use the "imi" command, or "crc"
> itself.
> 
>> If U-Boot contained a command to write the kernel to dataflash,
>> then this command could check that the image fits into the partition
>> allocated for the kernel, and would report a "kernel too large"
>> warning message.
> 
> This is not an issue of a  special  write  command,  but  of  such  a
> concept of partitions in flash memory which, at the moment, does not
> exist.
> 

The current dataflash drivers divides the flash into partitions.

In my private version, the partitions can have a name, and the address
of the partition is automatically stored in an environment variable
with this name,

It would be fairly easy to implement a command which flashes the kernel/rootfs,
to check that they fit into the named partition.

> 
> Best regards,
> 
> Wolfgang Denk
> 


-- 
Best Regards,
Ulf Samuelsson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ulf.vcf
Type: text/x-vcard
Size: 301 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20070530/f593bffc/attachment.vcf 


More information about the U-Boot mailing list