On Thu, Jan 28, 2021 at 9:28 PM Brian Hutchinson via lists.yoctoproject.org wrote: > >> Update ... feeling like I'm losing my mind now. >> >> fw_env.config must be sensitive to spaces or tabs or something. >> >> I messed around with it some more and it magically started working with >> my imx8mm-evk board with fw_env.config containing: >> >> /dev/mmcblk1 0x400000 0x1000 >> >> I don't know why that didn't work before ... I tried all kinds of things >> to get this to work and really can't explain why it just started working. >> To test, I used fw_setenv to set a variable and rebooted and stopped in >> u-boot and did printenv and sure enough the variable I set is there. >> >> Regards, >> >> Brian >> > > So I think I figured out what was going on. I flashed sdcard with fresh > Yocto build. Apparently the default u-boot environment is in ram and not > in the eMMC until you stop in u-boot and do a saveenv ... then when you > boot into Linux fw_printenv works. Prior to doing that, fw_printenv will > return the error I previously mentioned. > > Hopefully this will help the next person thinking they are losing their > mind messing with creating a fw_env.config file. > > Regards, > > Brian > > Reviving this issue again ... I noticed that I had to make my own fw_env.config file and copy it to etc. in a read/write rootfs for quick testing ... there is no fw_env.config sample provided by libubootenv that is placed in rootfs under /etc. I'm now generating a squashfs can can't do that hack so need to do it in recipe and looking at the recipes ... not 100% sure how to go about it. But shouldn't libubootenv put a example fw_env.config in /etc? I mean it won't work like it's supposed to without one. Regards, Brian