View Issue Details

IDProjectCategoryView StatusLast Update
0004884UBootU-Bootpublic2021-10-05 10:53
Reporterderksen Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Target Versionfsimx8mm-Y2021.04Fixed in Versionfsimx8mm-Y2021.04 
Summary0004884: Use new MTD partition layout on fsimx8mm, clean up boot srategies
DescriptionUse new MTD partition layout on fsimx8mm, clean up boot srategies

The introduction of the RAUC update mechanism for Linux also brought a
new set of variables for switching between A/B partitions and booting
the system in this case. This is rather complicated and heavily depends
on NAND or (e)MMC configuration of the boot loader. In the future we
want to have NAND *and* eMMC in one U-Boot, so this separation is
The new idea is to have all boot settings in the dot-variables and only
run these variables to switch partitions. So there are _A and _B variants
of each boot strategy. If we further use the new indirect parameter
expansion ${!name} in the hush command line interpreter, we can even
collapse the different A/B selector settings to one single version that
uses computed variable names. This makes things a lot easier.
This modification completely reorganizes the boot strategies.
Changes in include/configs/fsimx8mm.h:
- New NAND flash layout with additional UserDef and Refresh partitions.
- Move UBootEnv in front of the first UBoot. Then keep Slot A partitions
  together and Slot B partitions together. This makes it possible to
  resize the partitions within a group while the other is active. And
  the version with A/B just differs from the normal version wihout A/B
  by inserting the B partitions before TargetFS.
- Move UBoot and UBootEnv to the new NAND position.
- Also have a redundand environment for NAND in the non-update case.
- Define macros for each boot device type: BOOT_FROM_NAND, BOOT_FROM_UBI,
  BOOT_FROM_NFS and generic BOOT_SYSTEM. These macros are defined
  for the RAUC update system and for the normal system.
  CONFIG_EXTRA_ENV_SETTINGS then uses these macros to assemble the
  final list of additional environment variables.
- Break long lines to keep the 80 characters limit.
Changes in board/F+S/common/fs_board_common.[ch]:
- Remove rootfs, kernel, fdt set_rootfs, selector, boot_partition
  and rootfs_partition from struct fs_board_info, they are no
  longer needed with the new boot strategies.
- Depending on whether we boot from eMMC or NAND, set new variables
  bd_kernel, bd_fdt and bd_rootfs with their appropriate boot
- Also set kernel, fdt and rootfs to their defaults.
Changes in board/F+S/fsimx8mm/fsimx8mm.c:
- Remove the rootfs, kernel, fdt, set_rootfs, selector, boot_partition
  and rootfs_partition settings for board_info[], including the different
  macros for the default values. They are no longer needed.
Forum Link


There are no notes attached to this issue.