All of lore.kernel.org
 help / color / mirror / Atom feed
* u-boot saveenv to redundant fat does not persist env
@ 2021-07-27 14:44 Pierre-Alexis Ciavaldini
  2021-07-28 14:39 ` Tom Rini
  0 siblings, 1 reply; 7+ messages in thread
From: Pierre-Alexis Ciavaldini @ 2021-07-27 14:44 UTC (permalink / raw)
  To: u-boot

Hi,

I'm trying to integrate u-boot in our project that is a custom scripted build without yocto, for use with mender.
The complete discussion can be found here : https://hub.mender.io/t/pi3-usb-boot-support/595/54?u=peac
The problem is that when issuing saveenv in u-boot, it responds with "Saving Environment to FAT... OK" but then using fw_printenv in the booted linux, does not show saved variables.

The system currently boots because i've tricked it by getting the compiled-in env over uart (env print -a) and made a uboot.env using mkenvimage manually to enable fw_printenv to work.
I've noticed that when deleting "/boot/u-boot/uboot.env", u-boot's saveenv does not re-create it, so it seems to me that saveenv does not write uboot.env.
Here's the complete project files : https://git.iostud.io/cosmos/u-boot/-/tree/cosmos
relevant modified files are:
- configs/rpi_4_32b_defconfig
- include/config_mender_defines.h
- include/env_mender.h
- include/configs/rpi.h
- include/env_default.h
- include/config_mender.h

Any help or investigating direction would be greatly appreciated.
Thank you,
Pierre-Alexis Ciavaldini

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: u-boot saveenv to redundant fat does not persist env
  2021-07-27 14:44 u-boot saveenv to redundant fat does not persist env Pierre-Alexis Ciavaldini
@ 2021-07-28 14:39 ` Tom Rini
  2021-07-28 14:41   ` Pierre-Alexis Ciavaldini
  0 siblings, 1 reply; 7+ messages in thread
From: Tom Rini @ 2021-07-28 14:39 UTC (permalink / raw)
  To: Pierre-Alexis Ciavaldini; +Cc: u-boot

[-- Attachment #1: Type: text/plain, Size: 1282 bytes --]

On Tue, Jul 27, 2021 at 04:44:20PM +0200, Pierre-Alexis Ciavaldini wrote:
> Hi,
> 
> I'm trying to integrate u-boot in our project that is a custom scripted build without yocto, for use with mender.
> The complete discussion can be found here : https://hub.mender.io/t/pi3-usb-boot-support/595/54?u=peac
> The problem is that when issuing saveenv in u-boot, it responds with "Saving Environment to FAT... OK" but then using fw_printenv in the booted linux, does not show saved variables.
> 
> The system currently boots because i've tricked it by getting the compiled-in env over uart (env print -a) and made a uboot.env using mkenvimage manually to enable fw_printenv to work.
> I've noticed that when deleting "/boot/u-boot/uboot.env", u-boot's saveenv does not re-create it, so it seems to me that saveenv does not write uboot.env.
> Here's the complete project files : https://git.iostud.io/cosmos/u-boot/-/tree/cosmos
> relevant modified files are:
> - configs/rpi_4_32b_defconfig
> - include/config_mender_defines.h
> - include/env_mender.h
> - include/configs/rpi.h
> - include/env_default.h
> - include/config_mender.h
> 
> Any help or investigating direction would be greatly appreciated.

What does your /etc/fw_env.config file look like?

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: u-boot saveenv to redundant fat does not persist env
  2021-07-28 14:39 ` Tom Rini
@ 2021-07-28 14:41   ` Pierre-Alexis Ciavaldini
  2021-07-28 15:23     ` Tom Rini
  0 siblings, 1 reply; 7+ messages in thread
From: Pierre-Alexis Ciavaldini @ 2021-07-28 14:41 UTC (permalink / raw)
  To: Tom Rini; +Cc: u-boot

Hi Tom,

/etc/fw_env.config has this contents:
/boot/u-boot/uboot.env 0x0000 0x4000
/boot/u-boot/uboot-redund.env 0x0000 0x4000

Thank you,
PA

On Jul 28 2021, at 4:39 pm, Tom Rini <trini@konsulko.com> wrote:
> On Tue, Jul 27, 2021 at 04:44:20PM +0200, Pierre-Alexis Ciavaldini wrote:
> > Hi,
> >
> > I'm trying to integrate u-boot in our project that is a custom scripted build without yocto, for use with mender.
> > The complete discussion can be found here : https://hub.mender.io/t/pi3-usb-boot-support/595/54?u=peac
> > The problem is that when issuing saveenv in u-boot, it responds with "Saving Environment to FAT... OK" but then using fw_printenv in the booted linux, does not show saved variables.
> >
> > The system currently boots because i've tricked it by getting the compiled-in env over uart (env print -a) and made a uboot.env using mkenvimage manually to enable fw_printenv to work.
> > I've noticed that when deleting "/boot/u-boot/uboot.env", u-boot's saveenv does not re-create it, so it seems to me that saveenv does not write uboot.env.
> > Here's the complete project files : https://git.iostud.io/cosmos/u-boot/-/tree/cosmos
> > relevant modified files are:
> > - configs/rpi_4_32b_defconfig
> > - include/config_mender_defines.h
> > - include/env_mender.h
> > - include/configs/rpi.h
> > - include/env_default.h
> > - include/config_mender.h
> >
> > Any help or investigating direction would be greatly appreciated.
>
> What does your /etc/fw_env.config file look like?
> --
> Tom
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: u-boot saveenv to redundant fat does not persist env
  2021-07-28 14:41   ` Pierre-Alexis Ciavaldini
@ 2021-07-28 15:23     ` Tom Rini
  2021-07-28 15:25       ` Pierre-Alexis Ciavaldini
  0 siblings, 1 reply; 7+ messages in thread
From: Tom Rini @ 2021-07-28 15:23 UTC (permalink / raw)
  To: Pierre-Alexis Ciavaldini; +Cc: u-boot

[-- Attachment #1: Type: text/plain, Size: 1919 bytes --]

On Wed, Jul 28, 2021 at 04:41:56PM +0200, Pierre-Alexis Ciavaldini wrote:

> Hi Tom,
> 
> /etc/fw_env.config has this contents:
> /boot/u-boot/uboot.env 0x0000 0x4000
> /boot/u-boot/uboot-redund.env 0x0000 0x4000

And what if you turn off redundant environment support?  Mender does
strongly recommend that, but you can just turn it off.  Does that get
you working environment from file and fw_setenv/fw_printenv working?

> 
> Thank you,
> PA
> 
> On Jul 28 2021, at 4:39 pm, Tom Rini <trini@konsulko.com> wrote:
> > On Tue, Jul 27, 2021 at 04:44:20PM +0200, Pierre-Alexis Ciavaldini wrote:
> > > Hi,
> > >
> > > I'm trying to integrate u-boot in our project that is a custom scripted build without yocto, for use with mender.
> > > The complete discussion can be found here : https://hub.mender.io/t/pi3-usb-boot-support/595/54?u=peac
> > > The problem is that when issuing saveenv in u-boot, it responds with "Saving Environment to FAT... OK" but then using fw_printenv in the booted linux, does not show saved variables.
> > >
> > > The system currently boots because i've tricked it by getting the compiled-in env over uart (env print -a) and made a uboot.env using mkenvimage manually to enable fw_printenv to work.
> > > I've noticed that when deleting "/boot/u-boot/uboot.env", u-boot's saveenv does not re-create it, so it seems to me that saveenv does not write uboot.env.
> > > Here's the complete project files : https://git.iostud.io/cosmos/u-boot/-/tree/cosmos
> > > relevant modified files are:
> > > - configs/rpi_4_32b_defconfig
> > > - include/config_mender_defines.h
> > > - include/env_mender.h
> > > - include/configs/rpi.h
> > > - include/env_default.h
> > > - include/config_mender.h
> > >
> > > Any help or investigating direction would be greatly appreciated.
> >
> > What does your /etc/fw_env.config file look like?
> > --
> > Tom
> >
> 

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: u-boot saveenv to redundant fat does not persist env
  2021-07-28 15:23     ` Tom Rini
@ 2021-07-28 15:25       ` Pierre-Alexis Ciavaldini
  2021-07-28 15:32         ` Tom Rini
  0 siblings, 1 reply; 7+ messages in thread
From: Pierre-Alexis Ciavaldini @ 2021-07-28 15:25 UTC (permalink / raw)
  To: Tom Rini; +Cc: u-boot

Hi,

When I did, mender complained about it :
include/config_mender.h:41:3: error: #error CONFIG_SYS_REDUNDAND_ENVIRONMENT is required for Mender to work. Make sure that: 1) All the instructions at https:
41 | # error CONFIG_SYS_REDUNDAND_ENVIRONMENT is required for Mender to work. Make sure that: 1) All the instructions at https://docs.mender.io/system-updates-yocto-project/board-integration/bootloader-support/u-boot have been followed. 2) All required layers are included in bblayers.conf, including any board specific layers such as meta-mender-<board>. Check also https://docs.mender.io/troubleshoot/yocto-project-build for Known Issues when upgrading.

I guess I could disable the check, but even so I'm not sure it would work as uboot.env does not get written ?
Thank you,
PA

On Jul 28 2021, at 5:23 pm, Tom Rini <trini@konsulko.com> wrote:
> On Wed, Jul 28, 2021 at 04:41:56PM +0200, Pierre-Alexis Ciavaldini wrote:
>
> > Hi Tom,
> >
> > /etc/fw_env.config has this contents:
> > /boot/u-boot/uboot.env 0x0000 0x4000
> > /boot/u-boot/uboot-redund.env 0x0000 0x4000
>
> And what if you turn off redundant environment support? Mender does
> strongly recommend that, but you can just turn it off. Does that get
> you working environment from file and fw_setenv/fw_printenv working?
>
> >
> > Thank you,
> > PA
> >
> > On Jul 28 2021, at 4:39 pm, Tom Rini <trini@konsulko.com> wrote:
> > > On Tue, Jul 27, 2021 at 04:44:20PM +0200, Pierre-Alexis Ciavaldini wrote:
> > > > Hi,
> > > >
> > > > I'm trying to integrate u-boot in our project that is a custom scripted build without yocto, for use with mender.
> > > > The complete discussion can be found here : https://hub.mender.io/t/pi3-usb-boot-support/595/54?u=peac
> > > > The problem is that when issuing saveenv in u-boot, it responds with "Saving Environment to FAT... OK" but then using fw_printenv in the booted linux, does not show saved variables.
> > > >
> > > > The system currently boots because i've tricked it by getting the compiled-in env over uart (env print -a) and made a uboot.env using mkenvimage manually to enable fw_printenv to work.
> > > > I've noticed that when deleting "/boot/u-boot/uboot.env", u-boot's saveenv does not re-create it, so it seems to me that saveenv does not write uboot.env.
> > > > Here's the complete project files : https://git.iostud.io/cosmos/u-boot/-/tree/cosmos
> > > > relevant modified files are:
> > > > - configs/rpi_4_32b_defconfig
> > > > - include/config_mender_defines.h
> > > > - include/env_mender.h
> > > > - include/configs/rpi.h
> > > > - include/env_default.h
> > > > - include/config_mender.h
> > > >
> > > > Any help or investigating direction would be greatly appreciated.
> > >
> > > What does your /etc/fw_env.config file look like?
> > > --
> > > Tom
> > >
> >
>
> --
> Tom
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: u-boot saveenv to redundant fat does not persist env
  2021-07-28 15:25       ` Pierre-Alexis Ciavaldini
@ 2021-07-28 15:32         ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2021-07-28 15:32 UTC (permalink / raw)
  To: Pierre-Alexis Ciavaldini; +Cc: u-boot

[-- Attachment #1: Type: text/plain, Size: 3166 bytes --]

On Wed, Jul 28, 2021 at 05:25:48PM +0200, Pierre-Alexis Ciavaldini wrote:

> Hi,
> 
> When I did, mender complained about it :
> include/config_mender.h:41:3: error: #error CONFIG_SYS_REDUNDAND_ENVIRONMENT is required for Mender to work. Make sure that: 1) All the instructions at https:
> 41 | # error CONFIG_SYS_REDUNDAND_ENVIRONMENT is required for Mender to work. Make sure that: 1) All the instructions at https://docs.mender.io/system-updates-yocto-project/board-integration/bootloader-support/u-boot have been followed. 2) All required layers are included in bblayers.conf, including any board specific layers such as meta-mender-<board>. Check also https://docs.mender.io/troubleshoot/yocto-project-build for Known Issues when upgrading.
> 
> I guess I could disable the check, but even so I'm not sure it would work as uboot.env does not get written ?

Yes, you should disable that check.  Then you can debug the fw_printenv
issue by itself.

> Thank you,
> PA
> 
> On Jul 28 2021, at 5:23 pm, Tom Rini <trini@konsulko.com> wrote:
> > On Wed, Jul 28, 2021 at 04:41:56PM +0200, Pierre-Alexis Ciavaldini wrote:
> >
> > > Hi Tom,
> > >
> > > /etc/fw_env.config has this contents:
> > > /boot/u-boot/uboot.env 0x0000 0x4000
> > > /boot/u-boot/uboot-redund.env 0x0000 0x4000
> >
> > And what if you turn off redundant environment support? Mender does
> > strongly recommend that, but you can just turn it off. Does that get
> > you working environment from file and fw_setenv/fw_printenv working?
> >
> > >
> > > Thank you,
> > > PA
> > >
> > > On Jul 28 2021, at 4:39 pm, Tom Rini <trini@konsulko.com> wrote:
> > > > On Tue, Jul 27, 2021 at 04:44:20PM +0200, Pierre-Alexis Ciavaldini wrote:
> > > > > Hi,
> > > > >
> > > > > I'm trying to integrate u-boot in our project that is a custom scripted build without yocto, for use with mender.
> > > > > The complete discussion can be found here : https://hub.mender.io/t/pi3-usb-boot-support/595/54?u=peac
> > > > > The problem is that when issuing saveenv in u-boot, it responds with "Saving Environment to FAT... OK" but then using fw_printenv in the booted linux, does not show saved variables.
> > > > >
> > > > > The system currently boots because i've tricked it by getting the compiled-in env over uart (env print -a) and made a uboot.env using mkenvimage manually to enable fw_printenv to work.
> > > > > I've noticed that when deleting "/boot/u-boot/uboot.env", u-boot's saveenv does not re-create it, so it seems to me that saveenv does not write uboot.env.
> > > > > Here's the complete project files : https://git.iostud.io/cosmos/u-boot/-/tree/cosmos
> > > > > relevant modified files are:
> > > > > - configs/rpi_4_32b_defconfig
> > > > > - include/config_mender_defines.h
> > > > > - include/env_mender.h
> > > > > - include/configs/rpi.h
> > > > > - include/env_default.h
> > > > > - include/config_mender.h
> > > > >
> > > > > Any help or investigating direction would be greatly appreciated.
> > > >
> > > > What does your /etc/fw_env.config file look like?
> > > > --
> > > > Tom
> > > >
> > >
> >
> > --
> > Tom
> >
> 

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* u-boot saveenv to redundant fat does not persist env
@ 2021-07-16 12:01 Pierre-Alexis Ciavaldini
  0 siblings, 0 replies; 7+ messages in thread
From: Pierre-Alexis Ciavaldini @ 2021-07-16 12:01 UTC (permalink / raw)
  To: u-boot

Hi,

I'm trying to integrate u-boot in our project that is a custom scripted build without yocto, for use with mender.
The complete discussion can be found here : https://hub.mender.io/t/pi3-usb-boot-support/595/54?u=peac
The issue is that when issuing saveenv in u-boot, it responds with "Saving Environment to FAT... OK" but then using fw_printenv in the booted linux, does not show saved variables.
The system currently boots because i've tricked it by getting the compiled-in env over uart (env print -a) and made a uboot.env using mkenvimage manually to enable fw_printenv to work.
I've noticed that when deleting "/boot/u-boot/uboot.env", u-boot's saveenv does not re-create it, so it seems to me that saveenv does not write uboot.env.
Here's the complete project files : https://git.iostud.io/cosmos/u-boot/-/tree/cosmos
relevant modified files are:
- configs/rpi_4_32b_defconfig
- include/config_mender_defines.h
- include/env_mender.h
- include/configs/rpi.h
- include/env_default.h
- include/config_mender.h

Any help or investigating direction would be greatly appreciated.
Thank you

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-07-28 23:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-27 14:44 u-boot saveenv to redundant fat does not persist env Pierre-Alexis Ciavaldini
2021-07-28 14:39 ` Tom Rini
2021-07-28 14:41   ` Pierre-Alexis Ciavaldini
2021-07-28 15:23     ` Tom Rini
2021-07-28 15:25       ` Pierre-Alexis Ciavaldini
2021-07-28 15:32         ` Tom Rini
  -- strict thread matches above, loose matches on Subject: below --
2021-07-16 12:01 Pierre-Alexis Ciavaldini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.