Re: fw_printenv works but fw_setenv does not after switching to linux-fslc-imx 5.10.69 from linux-fslc-imx 5.4.114

Brian Hutchinson

Hi Peter,

Update below.

On Mon, Nov 8, 2021 at 4:14 PM Peter Bergin <peter@...> wrote:
Hi Brian,

On 2021-11-08 13:55, Brian Hutchinson wrote:
> It does not.  It shows no signs of a problem, returns no errors or
> warnings at all.  It "looks" like it worked normal but does not change
> the u-boot environment variable.
libubootenv in hardknott seems to be 0.3.1. Looked in the libubootenv
repo and found this commit that is added after which indicates that it
could be silent failure of fw_setenv.
I don't have a clue if this helps but just to help you with ideas one
thing could be to test this and see if the function libuboot_set_env
returns error code or not.

Can you write to the memory with some other application than fw_setenv?
No.  Apparently not.  I've compared kernel .config and device tree source from 5.4 series kernel and 5.10 series kernel and I cannot find an explanation for this but the following test fails:

root@imx8mmevk:~# flashcp -v ./imx8mm-evk.dtb /dev/mtd7                                                                                                                                                                                                          
Erasing blocks: 11/11 (100%)
Writing data: 40k/40k (100%)
Verifying data: 10k/40k (24%)File does not seem to match flash data. First mismatch at 0x00000000-0x00002800

I simply tried writing a file to an area of my NOR that I didn't care if it got overwritten.  So it does look like there is a problem with kernel flexspi driver or mtd drivers?



Join to automatically receive all group messages.