Skip to content

Draft: bootscripts: update to work with mx6 boards

Mikhail Vanyulin requested to merge kirkstone-u-boot-env-unification into kirkstone

This a second part of the fix for [746-001456] Unify U-Boot Env for i.MX6 and i.MX8.

It is expected seco-ne/tools/yocto-install!37 (merged) will be accepted.

The essence of this MR is to implement the simplest/minimalistic option:

  • to make i.MX6 boards work with the same u-Boot environment as i.MX8:
  • while keeping it bootable with pure FNGBoot.

Herewith this might not be a cleanest solution and can be treated as PoC until more experience will be gained (remaining parts of the solution will be completed).

The current MRs consists of:

  1. Added the same environment variables, which are used in boot.cfg for i.MX8, to the i.MX6 version of boot.cfg. As a result "boot.cfg" now holds information for both FNGBoot and U-Boot, but at the moment none of them is able to use information specific to other part (FNGBoot can't use variables for U-Boot and vise versa). But it does not lead to any problems:

    • "env import" in U-Boot is able to successfully parse commands for FNGBoot from boot.cfg without generating any error. As a result, an additional "exec" variable appears in U-Boot env, but it does not affect the the boot process at all;
    • FNGBoot is not able to reach U-Boot env part at all, as it will executes Linux kernel before that. And in case if FNGBoot parse these variables, they won`t work, because they are not known to FNGBoot.
  2. Updated "boot.scr" to also search for "bootB.cfg" if "boot.cfg" was not found. This is needed to make installation on partition B for i.MX6 boards work - we rename "boot.cfg" to "bootB.cfg" (which is needed for FNGBoot). For more details refer to seco-ne/tools/yocto-install!37 (merged)

  3. Updated "boot.scr" with proper bootX command for i.MX6.

Note: TODO: boot.scr is probably missing custom commands for gfxml2dto, which were inserted into i.MX6 environment. This needs to be rechecked.

As an alternative to this straight-forward solution, we can also try to implement a following logic instead:

  • add one more file to boot partition (e.g. boot.cfg.env) which will hold U-Boot environment for import;
  • update boot.scr for i.MX6 to use this file;
  • but it will additionally require the rework and testing of "yocto-install" scripts, which may take some time.
Edited by Mikhail Vanyulin

Merge request reports