使用fw_env.config和CONFIG_ENV_OFFSET配置引导加载程序 [英] Configuring the bootloader with `fw_env.config` and `CONFIG_ENV_OFFSET`

查看:353
本文介绍了使用fw_env.config和CONFIG_ENV_OFFSET配置引导加载程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个以前构建的映像,其中 fw_env.config 的内容是(使用u-boot):

I have a previously built image where the content of fw_env.config is (using u-boot):

/dev/mmcblk0 0x400000 0x4000
/dev/mmcblk0 0x800000 0x4000

我是否正确理解这告诉u-boot分区布局?那就是我希望在新图像上也具有的布局.

Do I understand correctly that this tells u-boot the partition layout? That is the layout that I would like to have also on a new image.

我有一个 libubootenv \%.bbappend ,它应该将上面的布局复制到新映像的 fw_env.config 中(即使我没有来点,但尚未测试该方法是否确实有效).还有关于布局的 u-boot 配置参数,可以使用以下方式设置:

I have a libubootenv\%.bbappend which is supposed to copy the layout above into the new image's fw_env.config (even though I didn't come to the point, yet to test if that actually worked). There are also u-boot configuration parameters regarding the layout that can be set using:

CONFIG_ENV_OFFSET
CONFIG_ENV_OFFSET_REDUND

我是否正确理解,这两个( fw_env.config CONFIG_ENV_OFFSET [_REDUND] )定义了相同的东西,并且它们必须匹配?还是引导时一个优先于另一个,因此实际上足以设置u-boot的 CONFIG_ENV_OFFSET ?除此以外,我还不清楚:这些是由bsp或硬件严格定义的,还是可以更改这些变量以实现向后兼容?我要问的原因是,从 warrior dunfell 时,这些值有所不同.这意味着最后一个问题的答案是是的,可以更改它们".对于我来说,这仍然有些棘手,因此,在安装某些系统之前,我想先确认一下.

Do I understand correctly, that these two (fw_env.config and CONFIG_ENV_OFFSET[_REDUND]) define the same thing and that they have to match? Or does one take precendence over the other when booting so it actually is enough to set the u-boot's CONFIG_ENV_OFFSET? What isn't clear to me besides that is: Are these strictly defined by the bsp or hardware or can I change these variables for backwards compatibility? Reason I'm asking is that these values differed when going from warrior to dunfell. That would imply the answer to the last question is 'yes, they can be changed'. This is still a little tricky for me to understand thus, I would like some confirmation before screwing up some systems.

任何对材料进行进一步阅读和研究的提示也非常受欢迎.

Any hints on material for further reading and research is highly welcome too.

推荐答案

感谢yocto IRC频道对社区的热烈支持,我得到了以下答案:

Thanks to the lively community support over at the yocto IRC channel I was provided with the following answer:

两个定义( fw_env.config CONFIG_ENV_OFFSET [_REDUND] )必须匹配.在该代码的最上方应定义CONFIG_ENV_SIZE .可以配置参数,因为它们代表存储介质中的地址.因此,bsp不能严格预测它们.

The two definitions (fw_env.config and CONFIG_ENV_OFFSET[_REDUND]) have to match. On top of that CONFIG_ENV_SIZE should be defined. The parameters can be configured as they represent addresses in the storage medium. Thus, they are not strictly predictated by the bsp.

信用去qschulz.非常感谢!

Credits go to qschulz. Thanks a lot!

这篇关于使用fw_env.config和CONFIG_ENV_OFFSET配置引导加载程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆