[U-Boot-Users] Delete all env vars except read onlys

Wolfgang Denk wd at denx.de
Tue Feb 12 23:38:06 CET 2008


In message <200802120944.42632.matthias.fuchs at esd-electronics.com> you wrote:
> 
> I am wondering if there is a way to delete all environment variables
> but not the readonly ones. The common way to delete all variables
> is to make the environment CRC invalid an do a reset. After reset
> a saveenv saves a default environment. 
> 
> What I want to do is to delete all variables (preferable from an autoscr script)
> but not the vendor variables like serial# and eth?addr.
> 
> Wildcards in the setenv parameters would solve this issue, 
> but chars like '*' or '?' are valid chars for environment variables.
> 
> Any idea?

There is no direct way; you may write a small standalone application...

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
Extended Epstein-Heisenberg Principle: In an R & D orbit, only  2  of
the  existing 3 parameters can be defined simultaneously. The parame-
ters are: task, time and resources ($).




More information about the U-Boot mailing list