OE4T/tegra-demo-distro

L4T R32.5.0: address Nano devkit flash layout change for Mender

madisongh opened this issue · 0 comments

With R32.5.0, the Nano devkit's flash layout has changed to move all of the boot partitions into the QSPI flash. Unfortunately, there is insufficient space in the flash to hold all of those partitions and the expanded U-Boot environment (larger than the L4T default plus having two copies for redundancy) that we currently have configured for Mender on that platform.

I temporarily worked around the issue during 32.5.0 integration by dropping the EKS and BMP partitions (which are described as
"optional" in the XML file) in the Mender custom flash layout for that platform, but it turns out that that has knock-on effects with handing BUP payloads. The BUP generator will include them in the payload (it hard-codes the payload contents rather than using the XML file to determine what should be included), and applying the update will fail due to the missing partitions.

Since meta-mender-tegra doesn't currently support bootloader updates as part of Mender updates on the Nano, it's not going to cause immediate problems, but it should be addressed.

Options:

  1. Reduce the U-Boot environment space for Mender. This should work OK if the space for the redundant environment copies is large enough (need to calculate this).
  2. Patch the l4t_bup_gen.func script to allow optional partitions to be excluded (at least EKS and BMP), and update the bootfiles list for the platform to exclude eks.img and bmp.blob when building Mender images for jetson-nano-devkit.
  3. Patch the bootloader updater script in L4T (and the tegra-boot-tools updater program) to ignore missing partitions for the optional entries, instead of raising an error.

Option 1 is probably the best if the environment will fit. Option 2 is probably more technically correct (particularly if the entry lists could be derived from the XML file contents), but could be a pain to maintain over time. Option 3 is least desirable, as it opens the door for possible incorrect handling of updates (and potentially bricking the device).