[U-Boot] fw_setenv device not accessible

Wolfgang Denk wd at denx.de
Tue Oct 29 11:51:24 CET 2013


Dear pshambhu,

In message <1383039837672-166275.post at n7.nabble.com> you wrote:
>  
>     I am unable to change the u-boot environment variables from the Linux
> environment using fw_setenv and fw_printenv. 
> I am able to list out the variables from the particular partition, but i am
> unable to change the variable value using fw_setenv.
> 
> [Linux promp]# fw_setenv Status 0
> Can't open /dev/mtd4: Permission denied
> Error: can't write fw_env to flash
> 
> i tried to change the permission of /dev/mtd4 as well, but i am getting the
> same problem.

Obviously partition mtd4 is mapped as read-only.  You need read-write
mode instead.  This has nothing to do with the permissions on the
/dev/mtd4 special file, but with the mapping of the MTD device in the
device tree or the mtdargs boot argument or however you pass that
information to Linux on your system.

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
A Perl script is correct if it's halfway readable and  gets  the  job
done before your boss fires you.
                       - L. Wall & R. L. Schwartz, _Programming Perl_


More information about the U-Boot mailing list