简体   繁体   English

在 kernel init 中修改 u-boot 环境

[英]modifying u-boot environment in kernel init

I'm trying to modify a u-boot env arg within the kernel code.我正在尝试修改 kernel 代码中的 u-boot env arg。 I've found boot_command_line var in main.c and setup.c , which contains an arg, so that made me think it is possible, however, I coudn't find where this var is being updated with the u-boot env arg value, or how to get a different arg and then write it back我在main.csetup.c中找到boot_command_line var,其中包含一个 arg,所以这让我觉得这是可能的,但是,我找不到这个 arg 值在哪里更新,或者如何获取不同的 arg 然后将其写回

This is the wrong approach.这是错误的做法。 There are user-space tools to access the U-Boot environment, fw_printenv and fw_setenv and that's how you access the environment outside of U-Boot.有用户空间工具可以访问 U-Boot 环境, fw_printenvfw_setenv ,这就是您访问 U-Boot 外部环境的方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM