How to generate fw_printenv and fw_setenv

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to generate fw_printenv and fw_setenv

4,138件の閲覧回数
lalabhaidesai
Contributor I

Hello,

I am using i.MX6UL processor, I want to read and set the u-boot variables from the user space, so by exploring this I came to know that it is possible using fw_printenv and fw_setenv. But I don't know how to generate it. I have gone through query posted at https://community.nxp.com/thread/331484 and followed the steps but facing some compilation error as shown below,

"In file included from tools/env/fw_env.h:13:0,
|                  from tools/env/fw_env_main.c:37:
| include/config.h:7:22: fatal error: configs/.h: No such file or directory
| compilation terminated.
| make[1]: *** [tools/env/fw_env_main.o] Error 1
| make[1]: *** Waiting for unfinished jobs....
| In file included from tools/env/fw_env.h:13:0,
|                  from tools/env/fw_env.c:34:
| include/config.h:7:22: fatal error: configs/.h: No such file or directory
| compilation terminated.
| make[1]: *** [tools/env/fw_env.o] Error 1
| make: *** [env] Error 2
| WARNING: exit code 1 from a shell command.
| ERROR: oe_runmake failed
| ERROR: Function failed: do_compile (log file is located at /home/cpu49/argon/fsl-release-bsp1/X11/tmp/work/imx6ulnxpuiopb-poky-linux-gnueabi/u-boot-fw-utils/v2015.07+gitAUTOINC+33711bdd4a-r0/temp/log.do_compile.22596)
ERROR: Task 308 (/home/cpu49/argon/fsl-release-bsp1/sources/poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2015.07.bb, do_compile) failed with exit code '1'

So please help me how I can access the boot loader environment variables to user space.

Thanks in advance.

Regards,

Lalabhai

ラベル(3)
0 件の賞賛
返信
5 返答(返信)

2,580件の閲覧回数
m_c
Senior Contributor I

mike@avnet:~$ source /opt/fsl-imx-xwayland/4.9.88-2.0.0/environment-setup-cortexa9hf-neon-poky-linux-gnueabi
mike@avnet:~$ export ARCH=arm
mike@avnet:~$ cd imx-yocto-bsp/build-*/tmp/work/imx*/u-boot-imx/*/git
mike@avnet:~/imx-yocto-bsp/build-xwayland/tmp/work/imx6qsabresd-poky-linux-gnueabi/u-boot-imx/2017.03-r0/git$ sed -i "s,\$(CC),${CC}," tools/env/Makefile
mike@avnet:~/imx-yocto-bsp/build-xwayland/tmp/work/imx6qsabresd-poky-linux-gnueabi/u-boot-imx/2017.03-r0/git$ make clean
CLEAN tools/env
mike@avnet:~/imx-yocto-bsp/build-xwayland/tmp/work/imx6qsabresd-poky-linux-gnueabi/u-boot-imx/2017.03-r0/git$ make env
HOSTCC scripts/basic/fixdep
LD tools/env/built-in.o
HOSTCC tools/env/aes.o
HOSTCC tools/env/crc32.o
HOSTCC tools/env/ctype.o
HOSTCC tools/env/env_attr.o
HOSTCC tools/env/env_flags.o
HOSTCC tools/env/fw_env.o
HOSTCC tools/env/linux_string.o
AR tools/env/lib.a
HOSTCC tools/env/fw_env_main.o
HOSTLD tools/env/fw_printenv
STRIP tools/env/fw_printenv
mike@avnet:~/imx-yocto-bsp/build-xwayland/tmp/work/imx6qsabresd-poky-linux-gnueabi/u-boot-imx/2017.03-r0/git$ file tools/env/fw_printenv
tools/env/fw_printenv: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=f44e70ad745d3a154ab90159be32d0c6682f353c, stripped

0 件の賞賛
返信

2,580件の閲覧回数
alexkuo
Contributor I

Hey! Now I face the same problem. So anyone can help us?  

0 件の賞賛
返信

2,580件の閲覧回数
lalabhaidesai
Contributor I

Hello gusarambula,

I have added IMAGE_INSTALL_append = “ u-boot-fw-utils“ in conf/local.conf file, but facing problem during building the image.

i have received the errors as shown below when i gives the "bitbake core-image-base" command,

ERROR: oe_runmake failed
ERROR: Function failed: do_compile (log file is located at /home/cpu49/argon/fsl-release-bsp1/X11/tmp/work/imx6ulnxpuiopb-poky-linux-gnueabi/u-boot-fw-utils/v2015.07+gitAUTOINC+33711bdd4a-r0/temp/log.do_compile.13240)
ERROR: Logfile of failure stored in: /home/cpu49/argon/fsl-release-bsp1/X11/tmp/work/imx6ulnxpuiopb-poky-linux-gnueabi/u-boot-fw-utils/v2015.07+gitAUTOINC+33711bdd4a-r0/temp/log.do_compile.13240

ERROR: Task 308 (/home/cpu49/argon/fsl-release-bsp1/sources/poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2015.07.bb, do_compile) failed with exit code '1'

I don't know how to resolve this errors.

Please help me as soon as possible.

Thanks in advance.

Regards,

Lalabhai

0 件の賞賛
返信

2,580件の閲覧回数
lalabhaidesai
Contributor I

Hello gusarambula,

Waiting for your reply.

Regards,

Lalabhai

0 件の賞賛
返信

2,580件の閲覧回数
gusarambula
NXP TechSupport
NXP TechSupport

Hello Lalabhai,

The steps on the thread you follow are not for the i.MX6UL so some steps are not applicable.

You should be able to add the uboot utils by using the following line on the conf/local.conf file:

IMAGE_INSTALL_append = “ u-boot-fw-utils“

And then baking your image.

I hope this helps,

Regards,

0 件の賞賛
返信