Problem setting/getting uboot environment variables in embedded Linux.


I have a Linux build for the Digi ConnectCard i.MX28 Jumpstart device, which is customized with a root user and a second, normal user.

When logged in as root, it is possible to read the uboot environment and set variables too using the Digi uboot environment utility, e.g. to dump the variables “ubootenv -d”.

When logged in as the non-root, normal user, the Digi uboot environment utility does not work. Specifically, it returns the following error, even when trying to inspect/dump the uboot environment.

ubootenv -d

Unable to initialize nvram

It seems as if the problem is permissions related. Is it possible to workaround this without running through “su --command …”. I would like to avoid running things as root as much as possible.

ubootenv uses /dev/mtd[0-9] nodes underneath.

You need to configure the permissions of those nodes so normal users can use the application.

As root:

cd /dev

chmod 666 mtd[0-9]

Hope this helps.

– jviguera

Thanks. The pointer to the relevant MTD nodes was the piece I was missing.