• In progress
  • U-Boot, Myon II

    Since Trizeps VIII Mini and Myon II are software compatible, the same bootloader may be used for both modules.

    http://gitlab.keith-koep.com/imx/uboot-imx
    http://gitlab.keith-koep.com/imx/imx-mkimage

    U-Boot based on NXP 4.14.98_2.0.0_ga

    ssh://git@git.seco.com:seco-ne/3rd-party/kuk/uboot-imx-kuk.git
    https://git.seco.com/seco-ne/3rd-party/kuk/uboot-imx-kuk.git

    kuk_imx_v2018.03_4.14.98_2.0.0_ga

    imx_mkimage based on NXP imx_4.14.98_2.0.0_ga

    ssh://git@git.seco.com:seco-ne/3rd-party/kuk/imx-mkimage-kuk.git
    https://git.seco.com/seco-ne/3rd-party/kuk/imx-mkimage-kuk.git

    kuk_imx_4.14.98_2.0.0_ga

    Previous Versions:

    U-Boot

    imx_mkimage

    Notes

    U-Boot

    imx_mkimage

    Notes

    kuk_imx_v2020.04

    kuk_imx_4.14.98_2.0.0_ga

    Use for Android 11. (Development Status)

    kuk_imx_v2019.04_5.4.3_2.0.0

    kuk_imx_4.14.98_2.0.0_ga

    Use for all current OS, except Android 11

    kuk_imx_v2018.03_4.14.98_2.0.0_ga

    kuk_imx_4.14.98_2.0.0_ga

    Not compatible with Linux 5.4 and later

    U-Boot Binaries

    Myon II

    Date

    Changelog

    Download

    Date

    Changelog

    Download

    06.04.2021

    -

    mn2_uboot_20210406.bin

    How to Make U-Boot for Myon II

    This is only a quick-reference on how to build the U-Boot bootloader including Seco specific changes.
    For details please view the NXP i.MX8M Mini documentation.

    Get the source code of U-Boot and imx_mkimage tool from git repository:

    $ mkdir uboot $ cd uboot ~/uboot$ git clone https://git.seco.com/seco-ne/3rd-party/kuk/imx-mkimage-kuk.git -b kuk_imx_4.14.98_2.0.0_ga ~/uboot$ mv imx-mkimage-kuk/ imx-mkimage/ ~/uboot$ git clone https://git.seco.com/seco-ne/3rd-party/kuk/uboot-imx-kuk.git -b kuk_imx_v2019.04_5.4.3_2.0.0

    Setup Cross-Build environment (View Software-Development-Kit on how to install.):

    $ . /opt/fsl-imx-fb/4.14-sumo/environment-setup-aarch64-poky-linux

    Build U-Boot from source Code:

    ~/uboot/uboot-imx$ make clean ~/uboot/uboot-imx$ make myon2_defconfig ~/uboot/uboot-imx$ make all

    This will generate the SPL, U-Boot and device-tree binary.
    Note that this minimal device-tree binary will only be used by U-Boot and is not intended for use by the Linux kernel!
    After these binaries have been created, they must be packed together with other components to form the bootloader:
    SCU-Firmware: This NXP firmware is loaded into the Cortex-M4 (SCU: System Controller Unit).
    ATF-Firmware: The SCU will load the ARM trusted firmware.
    SPL / U-Boot: The ATF will load the primary loader, which will initialize the LPDDR4 and load U-Boot.

    Which will create

    If you run

    this will build the bootloader and run uuu to download the bootloader to the module.

    Update Bootloader using UUU

    To deploy software to Myon II, you may use the NXP Universal Update Utility (UUU).
    Steps needed:

    Update Bootloader on Myon II running Linux

    Copy bootloader (flash.bin) to a filesystem accessible by Linux.

    This will:

    • clear U-Boot environment-area,

    • disable read-only access to the boot partition,

    • write flash.bin to offset 33k and

    • reenable read-only access.

    How to enter Bootloader Command Console

    To enter the bootloader command console attach a serial cable to the first COM-port ( P2_TXD/RXD pins: J70-69,J70-71) with 115k2 Baud, 8N1.
    Press any key while the device is powering up.
    The output should look something like this:

    Device-Tree

    The Linux-kernel will use a Device-Tree-Binary file (.dtb) to determine how the Trizeps module is used in a system (i.e. which drivers to load).
    How the device-tree is generated might depend on the used kernel-version and it is recommended to view the articles to the respective OS in this wiki.
    For Linux 4.14 the device-tree files can be found at:

    When building the Linux-kernel .dts source-files are converted to .dtb binary files.

    kuk-myon2

    Basic Device-Tree for the Myon II module itself, which is included by all other Device-Tree baseboard files

    kuk-myon2-ipanm7

    Myon II in i-PAN M7 panel

    kuk-myon2-conxm-hdmi

    Myon II in ConXM baseboard using HDMI-output

    When you open the u-boot command prompt and output the environment, you can determine which device-tree is used:

    To change this you can i.e. call:

    'env save' will store this setting for subsequent boots.

    Hints on using U-Boot

    Enter USB Serial Download Mode

    The USB Serial Download Mode (manufacturing mode) is a mode by which the i.MX8M Mini processor loads its internal ROM-firmware instead of the bootloader stored in eMMC.
    It will use the USB1 port to enumerate as HID-device on a connected PC.
    In this mode the NXP Universal Update Utility (UUU) can be used to deploy software.

    USB Serial Download Mode is entered by setting pin J70-40 BOOT_MODE_0 to VDD_IO on boot.
    On i-PAN M7 CoverLens and ConXM (formerly: dragonBase) this can be achieved by setting a switch.

    Notes on eMMC Boot Partition

    Whereas SD-cards got memory organized in one user-space, eMMC have two additional boot-spaces.
    The spaces are often referred to as partitions. But this might be confusing, since they are not the typical partition, one would create through a partition-table/master-boot-record.
    A boot-space can overlay the first megabytes of normal user-space. After the bootloader got booted, it will fade-out the boot-space and so prevent any subsequent operating-system to be able to mess with the bootloader.
    When using eMMC it needs to be decided, wether to use the boot-space or the user-space for the bootloader.
    Following commands may be used to switch between the different modes (this is kept after power-cycle):

    When using different tools for updating the flash-content, a situation may arise, where the bootloader is written into the „wrong“ partition – the flash-space, which is not used for booting.

    If you use

    to view the default-script used by uuu, you should note the line

    , which will configure the eMMC to use the boot-space after it has completed the update. If you want to use the user-space simply call

    after running uuu or run uuu with a custom-script.