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

Brian Hutchinson <[email protected]> Mon, 8 Nov 2021 07:51:43 -0500
Newsgroups org.yoctoproject.lists.meta-freescale
Message-ID <CAFZh4h-QK1KE1ayCynazXzjyF27GXL48fwYkwEwZA4oP4RhT6w@mail.gmail.com>
On Mon, Nov 8, 2021 at 3:03 AM Peter Bergin <[email protected]> wrote:

Hi Peter,

Hi Brian,
> On 2021-11-08 05:01, Brian Hutchinson wrote:
>
> Hi,
>
> I'm using u-boot U-Boot 2019.04-4.19.35-1.1.0+g4d377539a1 in
> pre-programmed NOR flash and was using linux-fslc-imx 5.4.114 kernel and
> fw_printenv/fw_setenv were working fine.
>
> After upgrading to linux-fslc-imx 5.10.69, fw_setenv will not change any
> u-boot variable.  fw_printenv looks like it is working ok.  I've verified
> all my .config settings are the same with regard to MTD etc as my older
> 5.4.114 kernel.
>
> Any ideas what could be broken?
>
> One fundamental part of the libubootenv is the file configuration file,
> default /etc/fw_env.config. This file must match what is configured in
> u-boot. If you only have changed kernel I guess this file is untouched?
>
> I don't know what debugging tools you have in the target, but one idea
> could be to use strace with working and non-working setup and compare.
>

My /etc/fw_env.config is correct.  I have my mtd partitions defined in my
.dts and cat /proc/mtd is showing the partitions correctly so I don't see
any problems there.

> I'm using a Dunfell based rootfs for our main system.  I did a hardknott
> build of core-image-base in order to build linux-fslc-imx 5.10.69 and when
> I realized fw_setenv wasn't working with Dunfell rootfs and 5.10.69 kernel,
> I built hardknott core-image-base rootfs with libubootenv package added
> to CORE_IMAGE_EXTRA_INSTALL thinking I'd copy over fw_printenv/fs_setenv
> and libubootenv and that would probably solve my issue ... but it doesn't
> include fw_printenv/fw_setenv (but libubootenv is there) in the rootfs so I
> don't understand what all is going on here.
>
> Been using fw_printenv/fw_setenv since like ... forever and haven't run
> into something like this before that I can remember.
>
> The binaries fw_*env is located in the package libubootenv-bin. Add that
> one to IMAGE_INSTALL and I hope you  get them in your rootfs.
>

Why wouldn't  CORE_IMAGE_EXTRA_INSTALL work to put these in rootfs like
previous builds did?

Thanks,

Brian