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

Best Regards Ulf Samuelsson
Atmel Nordic AB Visit: Kavalleriv?gen 24, 174 58 Sundbyberg Mail: Box 2033 174 52 Sundbyberg SWEDEN mail:ulf@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

On Wed, May 30, 2007 at 01:34:19PM +0200, Ulf Samuelsson wrote:
=> 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.
Hmm, does it mean that you do not want to share dataflash partitioning between U-Boot nad Linux?
The partion use is:
- AT91 bootstrap.
- U-boot environment
- U-boot image.
- Kernel image
- Root FS.
The sum of 1+2+3 is always 256kB due to df sector size. The only programmable value is the kernel size.
There are constrains I'd like to see implemented some generic way as well...
Nothing is ever written to the dataflash to indicate partion info and nothing is passed to Linux except rootfs start adress in bootargs.
Partitioning is stored inside U-Boot environment. In case this is written into dataflash, the above will not be true. Also Linux will share this partition map, but can be told to not do so and also some partitions can be read-only for Linux.
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?
It will definitely work for me the way I'm used to use it. I do not know what is "the right way" in your mind, but I will try to answer your questions as well as I can do.
(all my boards are using redundand environment which can be read and written also from Linux - for firmware upgrading purposes)
Best regards, ladis

In message tRKYbCxtg4wg.vWbVtGHk@mailout.dof.se you wrote:
=> 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.
Please see for example http://www.denx.de/wiki/view/DULG/BootTimeConfigurationOfMTDPartitions, and look up the section about "mtdparts" in CHANGELOG-before-U-Boot-1.1.5
Can someone confirm that mtdparts is the right way to go?
I hereby confirm that it is the right way to go, as it is the way that is supported in the public U-Boot tree, and that shall be used to provide partition information for MTD devices in Linux.
Best regards,
Wolfgang Denk

In message tRKYbCxtg4wg.vWbVtGHk@mailout.dof.se you wrote:
=> 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.
Please see for example http://www.denx.de/wiki/view/DULG/BootTimeConfigurationOfMTDPartitions, and look up the section about "mtdparts" in CHANGELOG-before-U-Boot-1.1.5
OK, seems reasonable to use mtdparts, except that I think it would be useful to be able to supply arguments in an incremental way so you can build up your partition table using multiple mtdparts commands.
Also, I am not sure that mtdparts know about 1056 byte pages. Maybe "k" could mean 1056 for dataflash parts?
Best Regards Ulf Samuelsson

In message 019201c7a2ef$47e4aa00$0302a8c0@atmel.com you wrote:
Also, I am not sure that mtdparts know about 1056 byte pages. Maybe "k" could mean 1056 for dataflash parts?
mtdparts is supposed to be 100% compatible with the MTD commandline processing in Linux. How is commandline configuration for dataflash implemented there?
Best regards,
Wolfgang Denk
participants (3)
-
Ladislav Michl
-
Ulf Samuelsson
-
Wolfgang Denk