Project

General

Profile

Managing the u-boot environemt, uEnv.txt and fw_setenv

Added by Nathan Wright 6 months ago

Hello,

It appears that support for u-boot environment has been limited to uEnv.txt. We are trying to use swupdate project which wants to use the u-boot/userspace fw_setenv/fw_printenv utilities to swap which rootfs get used. What is your recommendation for manipulating u-boot environment settings from user space?

Thanks,
Nathan


Replies (5)

RE: Managing the u-boot environemt, uEnv.txt and fw_setenv - Added by Joshua Bourgeot 6 months ago

Hi Nathan,

TI has removed this functionality in the new 9 sdk, see here. The swupdate project has a handler for updating the uEnv.txt file, would you be able to use that?

Note, it should be possible to re-enable the u-boot environment by changing it's build config. However I believe using the uEnv.txt file approach would be easier.

Best,
Joshua Bourgeot

RE: Managing the u-boot environemt, uEnv.txt and fw_setenv - Added by Nathan Wright 6 months ago

Turns out I don't think is what I am looking for. That is for delivering a uEnv file via a swu file, and optionally not overwriting some environment settings.

To manage partition swapping from an update, swupdate wants to have a shared environment to exchange state between the user space service and the boot loader.

It looks like the project only has methods for interacting with that environment using the binary format.

ti has turned that off :(

So I guess we are going to exchange state by editing the uEnv.txt file ourselves.

RE: Managing the u-boot environemt, uEnv.txt and fw_setenv - Added by Jonathan Cormier 6 months ago

Turns out I don't think is what I am looking for. That is for delivering a uEnv file via a swu file, and optionally not overwriting some environment settings.

Ah sorry didn't notice that.

This page describes an interface and how to create your own custom bootloader uEnv version. It shouldn't be too complicated and the project might be willing to accept your addition.
https://sbabic.github.io/swupdate/bootloader_interface.html

RE: Managing the u-boot environemt, uEnv.txt and fw_setenv - Added by Nathan Wright 6 months ago

We are testing simply placing a hook in to bootcmd via the uboot menuconfig, between load environment and booting.

Then we will just have that hook defined in our uEnv for now. It will do the work of partition selection.

Thanks!

    (1-5/5)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)