Home/Support/Support Forum/Problem setting/getting uboot environment variables in embedded Linux.
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Problem setting/getting uboot environment variables in embedded Linux.

0 votes

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.
asked Nov 23, 2015 in Linux by jfmonaco New to the Community (15 points)

Please log in or register to answer this question.

1 Answer

0 votes
Best answer
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
answered Nov 24, 2015 by jviguera Community Contributor (138 points)
selected Nov 24, 2015 by jfmonaco
Thanks. The pointer to the relevant MTD nodes was the piece I was missing.