我在android 9.0.0_2.0.0以及Yocto L4.14.98_2.2.0环境下编译fw_printenv 和 fw_setenv时一直报错,请问有解决方案吗?log如下:
~/i.MX-L4.9.88-2.0.0-Yocto/imx-yocto-bsp/build-xwayland-imx8mqevk/tmp/work/imx8mqevk-poky-linux/u-boot-imx/2018.03-r0/git$ make envtools
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config.h
UPD include/config.h
CFG u-boot.cfg
GEN include/autoconf.mk
GEN include/autoconf.mk.dep
CFG spl/u-boot.cfg
GEN spl/include/autoconf.mk
CHK include/config/uboot.release
UPD include/config/uboot.release
CHK include/generated/version_autogenerated.h
UPD include/generated/version_autogenerated.h
CHK include/generated/timestamp_autogenerated.h
UPD include/generated/timestamp_autogenerated.h
LD tools/env/built-in.o
HOSTCC tools/env/crc32.o
In file included from tools/env/crc32.c:1:0:
tools/env/../../lib/crc32.c:12:10: fatal error: arpa/inet.h: No such file or directory
#include <arpa/inet.h>
^~~~~~~~~~~~~
compilation terminated.
scripts/Makefile.host:116: recipe for target 'tools/env/crc32.o' failed
make[1]: *** [tools/env/crc32.o] Error 1
Makefile:1504: recipe for target 'envtools' failed
make: *** [envtools] Error 2
Hello @wang12zhe ,
Create a new case for your question, please!
And our MPU team will take it, and discuss it with you.
I am in charge of WiFi/BT , not support MPU directly.
Regards,
weidong
Hi Pan,
你可以从网上得到很多类似的同行的经验,比如:
https://blog.csdn.net/leochen_career/article/details/81027309
你之所以编译出错,原因就是makefile中的编译器路径配置不对。
编译这个东西,建议你在linux里编译,先按照linux doc中的一个porting guide 文档描述的standalone模式,把工具链从yocto里导出来。u-boot、kernel代码都整理到一个目录里。当能够用单机模式编译u-boot和内核成功时,单机环境就好用了。
这时候,你再开始编译你的fw_printenv和fw_setenv. 参考上面链接里的经验,编译一下。
或者Yocto里直接编译,我刚刚测试过:
---------------------------
# cd imx-release-bsp
# gedit .build/conf/local.conf
add the line:
IMAGE_INSTALL_append += " u-boot-fw-utils" # a space character must be used before "u-boot-fw-utils".
save and exit.
# source setup-environment build
# bitbake u-boot-fw-utils -c compile
# bitbake u-boot-fw-utils -c install
Then succeeded.
-------------------------
Have a nice day!
BR,
Weidong
@weidong_sun 在IMX8QXP上测试,这样操作能 fw_printenv and fw_setenv但 不能用,进入uboot源码编译的却能用,
但怎么自动打包到文件系统能