From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7441C433EF for ; Tue, 9 Nov 2021 14:07:10 +0000 (UTC) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by mx.groups.io with SMTP id smtpd.web08.12514.1636466829483592600 for ; Tue, 09 Nov 2021 06:07:09 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OeI/MOWK; spf=pass (domain: gmail.com, ip: 209.85.128.48, mailfrom: b.hutchman@gmail.com) Received: by mail-wm1-f48.google.com with SMTP id g191-20020a1c9dc8000000b0032fbf912885so2330414wme.4 for ; Tue, 09 Nov 2021 06:07:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=H1AR8vR4AbPY6kKTB1gJ/Y2xX8yVRkCJOS6sYAyzMQg=; b=OeI/MOWK9i8lmnZe3FfGYnD0EJwUlw7QTeINHSDy4TBez/Em/M+3T8lxClO1O5ydQG hDfd58CFSLvw8jPxPvNl5q9cK9BNhjc3HMbenQ8hyoK7UpBbDZKDqfYvqHvY7yy2T1xF bw0OGyHbs4QJ+GdMWZ/Dd4HOr+4wuH8f6Vu8abgBGcOimVCeERqOthI286iwKnNzJy1Q mmOxxPw3qQ2gBpRkB3sJMEJHxM8H0ONWW+Zk0GTiOZGnkqwN9z7KHzcOCKV+ksOZx4DM suyKZ2m74u83GvDzKGpKeWva08a7cn56xg6taMKYnk+P1yTv9wVBWhtkbfprAuiYLtTe d3Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=H1AR8vR4AbPY6kKTB1gJ/Y2xX8yVRkCJOS6sYAyzMQg=; b=gGyV6+iEHU64Z5d/tPOjN23Y+9ESc3g0cLxhqdA1F5Lk3BD6G44EbZSK4Nz3li9Oub 2Ew6Vibf9udNgOxPrZB5Zjs+SsO+bx77D49uyrDLM9gzLXy1mK1qsgPXk+AjxHouTOwA 91qDviHqRlmHQ7mN9BqulXwjkXD6bwDcUFtkXNGpNEs5/C5/UBMymVBduK5+xeU84m8y WaxhOwKSCTmsbSLVCAPooZfN0KCleKHUynBmaE2h3rIaUJ2lkRplIQ00P5TPxnLWVBPQ hBHyTEanAMg7G5pQJdvkgnM2B3q8fNzzDFop4Ud80flwn/Z1JM/1Hz+OHeAeckFCK52u A9rg== X-Gm-Message-State: AOAM530s/jJkqMkbzdXOJnAYbHkwylAq3KUxgxEWIW7E9mvXWYagJZbN Qph6B2VmmggNr97ayZN3hDCgtFsLcWHUGfRronCoXRKyHCA= X-Google-Smtp-Source: ABdhPJxHEfkh5AijE0oRiv/JZ4A/EpnJD8PCISYnQrEmq+eRySlT55x7LDyqXfbVfNnj9rj7UYIogWHhFhJU/Jq3dsY= X-Received: by 2002:a05:600c:2dc1:: with SMTP id e1mr7437339wmh.170.1636466827895; Tue, 09 Nov 2021 06:07:07 -0800 (PST) MIME-Version: 1.0 References: <5bf7fb5e-cdfd-81b0-cbbb-6b958b909fce@berginkonsult.se> In-Reply-To: <5bf7fb5e-cdfd-81b0-cbbb-6b958b909fce@berginkonsult.se> From: Brian Hutchinson Date: Tue, 9 Nov 2021 09:06:56 -0500 Message-ID: Subject: Re: [meta-freescale] fw_printenv works but fw_setenv does not after switching to linux-fslc-imx 5.10.69 from linux-fslc-imx 5.4.114 To: Peter Bergin Cc: meta-freescale@lists.yoctoproject.org Content-Type: multipart/alternative; boundary="000000000000f6a89605d05b9f70" List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 09 Nov 2021 14:07:10 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-freescale/message/24788 --000000000000f6a89605d05b9f70 Content-Type: text/plain; charset="UTF-8" Hi Peter, Update below. On Mon, Nov 8, 2021 at 4:14 PM Peter Bergin 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. > > https://github.com/sbabic/libubootenv/commit/42f919e29c7b5e86a25877a9c492017e62f8827c > 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? Regards, Brian --000000000000f6a89605d05b9f70 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Peter,

Update below.
<= /div>
O= n Mon, Nov 8, 2021 at 4:14 PM Peter Bergin <peter@berginkonsult.se> wrote:
Hi Brian,

On 2021-11-08 13:55, Brian Hutchinson wrote:
> It does not.=C2=A0 It shows no signs of a problem, returns no errors o= r
> warnings at all.=C2=A0 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.
https://github.= com/sbabic/libubootenv/commit/42f919e29c7b5e86a25877a9c492017e62f8827c =
I don't have a clue if this helps but just to help you with ideas one <= br> 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?
=C2=A0
No.=C2=A0 Apparently not.=C2=A0 I'v= e 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 follo= wing test fails:

ro= ot@imx8mmevk:~# flashcp -v ./imx8mm-evk.dtb /dev/mtd7 =C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
Eras= ing blocks: 11/11 (100%)
Writing data: 40k/40k (100%)
Verifying data: 10k/40k (24%)File does not seem to match flash data. Fi= rst mismatch at 0x00000000-0x00002800

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

Regards,

Brian
=
--000000000000f6a89605d05b9f70--