How to change variables in uboot from linux

I would like to change / set variables in uboot from ubuntu/linux.

Welcome to Fenix 1.6.9 Ubuntu 22.04.4 LTS Linux 5.15.119

I tried to use fw_printenv / fw_setenv, but the distro doesn’t have configuration for that. If I copy configuration from old khadas Ubuntu build:

Welcome to Fenix 1.0.7 Ubuntu 20.04.3 LTS Linux 4.9.241

khadas@Khadas:~$ cat /etc/fw_env.config
# Configuration file for fw_(printenv/setenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash.
# Futhermore, if the Flash sector size is ommitted, this value is assumed to
# be the same as the Environment size, which is valid for NOR and SPI-dataflash

# Block device example
/dev/env                0x0             0x10000

it doesn’t work - /dev/env doesn’t exists.

Hi @Benek to add arguments you need to add it in /boot/uEnv.txt

Is any other option to set?

I would like to try settings A/B partition to run linux dystribiution.

In some other board (from nxp) we have number of “current” partition to run during boot.

I think, that in your proposition uboot discovers too late (after decision to use this boot partition)

Hello @Benek

Current system doesn’t support A/B partition, could you tell use for what reson you need to use thie feature?

Yes I know that it doesn’t support, but I want to try myself :slight_smile:

I would like to use yocto-linux with swupdate.

So this is my reason. For old ubuntu / old kernel /dev/env existed and fw_tools worked so I believed that is any option to set env via command :slight_smile: