Skip to content

Draft: U-Boot 2022.07 for Kontron i.MX8MM boards to sync with upstream

See follow-up MR at: !20 (merged)

This adds pending upstream patches for the Kontron i.MX8MM boards to the v2022.07 branch.
There's also one patch for the custom environment that is currently not planned to be upstreamed. It tries to replicate the support for SWUpdate A/B boot scheme from the develop-2020.01-ktn branch in order to stay compatible.

This intends to cover the requirements in https://git.kontron-electronics.de/sw/ked/plan/plan-yocto/-/issues/943#note_29986.

CC: @Maximilian

Todo:

  • Test A/B boot from SPI NOR and eMMC with SWUpdate
  • Test on non-OSM and OSM boards
  • Update with feedback from mailing list
  • Create MR for required changes in meta-ktn-imx (sw/yocto/meta-ktn-imx!35 (merged))
    • Remove unused 2021.07 recipes
    • Switch to 2022.07
  • Optional: Test standard distro boot
  • Find a way to have a single environment for standard distro boot and SWUpdate A/B boot
  • Update to v2022.10

Incompatible Changes (v2020.01-ktn)

  • SPI NOR Layout:
    • One partition for SPL + U-Boot, U-Boot now generates single flash.bin file for both.
    • Move environment to end of NOR flash, otherwise the U-Boot binary might collide with the env when it gets bigger.
  • MMC Layout:
    • Offset of U-Boot proper is defined by bootloader (binman config) and is now 0x300 (512 bytes sectors) instead of 0x800.
      This is now a default used by other i.MX8MM boards. The SPI NOR offset (CONFIG_SYS_SPI_U_BOOT_OFFS) was adjusted to match this layout. Therefore flash.bin can be used for MMC and SPI NOR.

Changes from version 1 to 2

  • Add backported patches to shrink SPL binary size
  • Enable SPI NOR loading in SPL which was accidentally dropped upstream
  • Add SPI NOR partition layout to devicetree
  • Add simple netboot to environment
  • Fix environment scripts for A/B boot
  • Remove custom board_boot_order() workaround
  • Add MTD command
  • Increase U-Boot shell max line length (CONFIG_SYS_CBSIZE)

Changes from version 2 to 3

  • Rebase on current develop-v2022.07-ktn-imx with backported patches already merged (!18 (merged))
Edited by Frieder Schrempf

Merge request reports