OE4T / meta-mender-community

Community supported integration layers for Mender on various boards
Apache License 2.0
4 stars 5 forks source link

Issues with tegra nvbootctrl and unexpected slot errors #7

Open dwalkes opened 3 years ago

dwalkes commented 3 years ago

See post at https://hub.mender.io/t/failing-updates-on-tegra-tx2-due-to-issues-with-nvbootctrl/2765 and https://forums.developer.nvidia.com/t/nvbootctrl-get-current-slot-returning-unexpected-slot/156982/2

It appears boot slots are changing in some cases between mender updates for reasons unknown. When the boot slot gets out of sync with u-boot partitions bad things happen.

For TX2 this is a reason to make the mender build use PREFERRED_PROVIDER_virtual/bootloader = "cboot-prebuilt" as default as described at this link. It may not solve the problem completely but I think it will make the resulting situation less of a mess.

For Nano we are stuck with u-boot so we'll need to figure out how to handle this.

manuel-wagesreither commented 3 years ago

Can a switch from cboot+uboot to cboot-prebuilt be done in the field, that is through a mender OTA update? I guess not, but I'm not yet familiar with the details.

dwalkes commented 3 years ago

Can a switch from cboot+uboot to cboot-prebuilt be done in the field, that is through a mender OTA update?

I don't think there will be a way to make this work, at least without some extra logic that writes partitions from a ram disk at boot in a non-brick proof way, because I think the partition layout/content is going to be different and the uboot environment is not going to be used.

We are working on some changes for u-boot support to hopefully help resolve this, will share the proposed changes shortly.

dwalkes commented 3 years ago

See fix for the main issue described here in https://github.com/OE4T/meta-mender-community/pull/8 - we will be working to get this upstreamed to meta-mender-community next, along with some test automation to catch this issue.