Bug 2230475

Summary: fw_printenv and fw_setenv unusable after installation
Product: [Fedora] Fedora Reporter: Alec Leamas <leamas.alec>
Component: uboot-toolsAssignee: Peter Robinson <pbrobinson>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: dan, dennis, jean, jordan, nrevo, ole.d, pbrobinson, pwhalen
Target Milestone: ---   
Target Release: ---   
Hardware: aarch64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alec Leamas 2023-08-09 14:44:25 UTC
After installing uboot-tools on F38/RPi-4 fw_printenv and fw_setenv fails and are unusable, see below.


Reproducible: Always

Steps to Reproduce:
1.Install uboot-tools on RPi-4/F38
2.Run fw_printenv or fw_setenv

Actual Results:  
Error message like "Cannot find file /etc/fw_env.config"

Expected Results:  
Well...

On my RPi-4, problem can be worked around by manually installing /etc/fw_env.config with contents like 

/boot/efi/uboot.env 0x000 0x4000

More context:  https://groups.google.com/a/lists.mender.io/g/mender/c/_i2-SQ_IDdk/m/DS3T5UjvBAAJ

Comment 1 Alec Leamas 2023-08-11 12:35:53 UTC
I bit sketchy, that was. Here is an example session after moving  /etc/fw_env.config -> fw_env.config.bak

$ sudo fw_printenv bootdelay
Cannot parse config file '/etc/fw_env.config': No such file or directory
Failed to find NVMEM device
$ sudo mv /etc/fw_env.config.bak  /etc/fw_env.config
$ sudo fw_printenv bootdelay
bootdelay=-2
$