Re: imx8mn: bootcount does not increment
Hi Fabio On Thu, May 2, 2024 at 2:45 PM Fabio Estevam wrote: > > Hi Heiko, > > On Fri, Apr 26, 2024 at 12:40 AM Heiko Schocher wrote: > > > No chance for a bootcounter in a register? > > Yes, this is a better approach. I changed it to: > > CONFIG_BOOTCOUNT_LIMIT=y > CONFIG_SYS_BOOTCOUNT_MAGIC=0xB0C4 > CONFIG_SYS_BOOTCOUNT_ADDR=0x30370090 > CONFIG_SYS_BOOTCOUNT_SINGLEWORD=y > > and now bootcount increments. > Maybe you have anyway a bug on the evk when was not incrementing on environment Michael > Thanks, > > Fabio Estevam -- Michael Nazzareno Trimarchi Co-Founder & Chief Executive Officer M. +39 347 913 2170 mich...@amarulasolutions.com __ Amarula Solutions BV Joop Geesinkweg 125, 1114 AB, Amsterdam, NL T. +31 (0)85 111 9172 i...@amarulasolutions.com www.amarulasolutions.com
Re: imx8mn: bootcount does not increment
Hi Heiko, On Fri, Apr 26, 2024 at 12:40 AM Heiko Schocher wrote: > No chance for a bootcounter in a register? Yes, this is a better approach. I changed it to: CONFIG_BOOTCOUNT_LIMIT=y CONFIG_SYS_BOOTCOUNT_MAGIC=0xB0C4 CONFIG_SYS_BOOTCOUNT_ADDR=0x30370090 CONFIG_SYS_BOOTCOUNT_SINGLEWORD=y and now bootcount increments. Thanks, Fabio Estevam
Re: imx8mn: bootcount does not increment
Hello Fabio, On 26.04.24 03:55, Fabio Estevam wrote: Hi, When enabling bootcount on the imx8mm-evk like this: --- a/configs/imx8mm_evk_defconfig +++ b/configs/imx8mm_evk_defconfig @@ -120,3 +120,5 @@ CONFIG_SDP_LOADADDR=0x4040 CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_SPL_USB_SDP_SUPPORT=y CONFIG_IMX_WATCHDOG=y +CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_ENV=y No chance for a bootcounter in a register? It works as expected, and the "bootcount" environment variable gets incremented after a reset. Good! However, if I try the same on an imx8mn_evk, the "bootcount" variable always stays at 1 and never increments. Uff... environment code should be independent from the board... Do you happen to have any idea as to why imx8mn behaves differently in this aspect? saveenv works on the board? Does it use protected Environment? No more ideas ... sorry... bye, Heiko -- DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: h...@denx.de
imx8mn: bootcount does not increment
Hi, When enabling bootcount on the imx8mm-evk like this: --- a/configs/imx8mm_evk_defconfig +++ b/configs/imx8mm_evk_defconfig @@ -120,3 +120,5 @@ CONFIG_SDP_LOADADDR=0x4040 CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_SPL_USB_SDP_SUPPORT=y CONFIG_IMX_WATCHDOG=y +CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_ENV=y It works as expected, and the "bootcount" environment variable gets incremented after a reset. However, if I try the same on an imx8mn_evk, the "bootcount" variable always stays at 1 and never increments. Do you happen to have any idea as to why imx8mn behaves differently in this aspect? Thanks, Fabio Estevam