[U-Boot] fw_setenv device not accessible

Hi,
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.
Regards Pradeep S
-- View this message in context: http://u-boot.10912.n7.nabble.com/fw-setenv-device-not-accessible-tp166275.h... Sent from the U-Boot mailing list archive at Nabble.com.

Dear pshambhu,
In message 1383039837672-166275.post@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

Hi,
In u-boot i am passing mtdargs in RW mode only. but still i am unable to change the values.Yeah its true that mtd4 device is in READ only mode, but how can i change the access permission of the device, so that i can set/change the u-boot environment variable values from the Linux platform.
please provide me the solution for this ??
Thanks & Regards Pradeep S
-- View this message in context: http://u-boot.10912.n7.nabble.com/fw-setenv-device-not-accessible-tp166275p1... Sent from the U-Boot mailing list archive at Nabble.com.

Dear pshambhu,
In message 1383894946586-167013.post@n7.nabble.com you wrote:
In u-boot i am passing mtdargs in RW mode only. but still i am unable
to change the values.Yeah its true that mtd4 device is in READ only mode, but how can i change the access permission of the device, so that i can set/change the u-boot environment variable values from the Linux platform.
please provide me the solution for this ??
first, this is effectively a Linux issue, so you are mostly off topic here.
Second, it's very difficult to help at all if all you provide is some vague statement without any details like an exact description of what you attempted to do and what the result was - including for example a complete boot log.
So I can only guess... It seems you are trying to pass MTD partition information to Linux by using the mtdargs boot argument, and this doesn't work. Well, perhaps your Linux kernel is not configured to use such information at all? Eventually it takes the informantion from somewhere else, like from the device tree?
Best regards,
Wolfgang Denk
participants (2)
-
pshambhu
-
Wolfgang Denk