PetaLinux通过fw_printenv访问u-boot中的环境变量

1、u-boot配置:

 petalinux-config -c u-boot

2、在<plnx-proj-root>/project-spec/meta-user/conf/petalinuxbsp.conf中添加以下内容:

IMAGE_INSTALL_append += "u-boot-fw-utils"

 3、可以通过在u-boot中执行saveenv生成uboot.env文件

 4、修改配置文件/etc/fw_env.config,注意Env. size要与u-boot中的设置保持一致

5、测试fw_printenv,fw_setenv

原文地址:https://www.cnblogs.com/arci/p/12825743.html