Skip to content
Advertisement

modifying u-boot environment in kernel init

I’m trying to modify a u-boot env arg within the kernel code. 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

Advertisement

Answer

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.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement