[U-Boot] U-boot Config Parameters on Compact Flash

Dach Miroslaw miroslaw.dach at psi.ch
Thu Jan 20 16:42:04 CET 2011


Dear Wolfgang,

Thank you again for your hints.

>Then #define CONFIG_ENV_IS_NOWHERE
>
>> What would be than your suggestion 
>> to access (read/write) u-boot (parameters) environ variables?
>
>Reserve some space (like a tiny partition) somewhere on your CF card;
>say 32 sectors for 16 kB environment data.
>Use ide read combined with env import to load the envrionment from CF
>card, and use env export combined with ide write to write it back if
>needed.

Please let me write what I understood from your idea. Please correct me if I am wrong.

In the include config file I should say 
#define CONFIG_ENV_IS_NOWHERE
meaning take the default environ configuration is built in the u-boot itself.

Next, when the u-boot is booted the environment variables should be imported from Compact Flash.
This is done in two steps:
1. ide read   (read the u-boot config from Compact Flash to RAM ?)
2. env import (import u-boot config from RAM to u-boot?)

Could you please give me more hints which CONFIG macros should/could be used for the above mentioned steps.
Is there any command to import/export u-boot config.
So far I was using saveenv to export/save u-boot config into Flash? 

Best Regards

Mirek

Dear "Dach Miroslaw",

In message <1B4F8000449511488D1A640DD6DECA350392A609 at MAILBOX0A.psi.ch> you wrote:
> 
> >What do you mean my "u-boot parameters"?
> 
> To be clear I mean u-boot parameters the environment variables which are
> denied for example:
> CFG_ENV_IS_IN_FLASH 
> or
> CFG_ENV_IS_IN_EEPROM

CFG_* ? You code must be _extremely_ old.  Update!


> My new board does not have Flash nor EEPROM. It has only Compact Flash.

Then #define CONFIG_ENV_IS_NOWHERE

> What would be than your suggestion 
> to access (read/write) u-boot (parameters) environ variables?

Reserve some space (like a tiny partition) somewhere on your CF card;
say 32 sectors for 16 kB environment data.
Use ide read combined with env import to load the envrionment from CF
card, and use env export combined with ide write to write it back if
needed.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
After a time, you may find that "having" is not so pleasing a thing,
after all, as "wanting."  It is not logical, but it is often true.
	-- Spock, "Amok Time", stardate 3372.7



More information about the U-Boot mailing list