Skip to content

MFGTools from Foundries.io builds fail during board programming - requires --mfgfolder workaround #35

@ajlennon

Description

@ajlennon

Description

Programming boards using MFGTools files downloaded from Foundries.io builds is failing with OP-TEE/SE050 initialization errors. The workaround is to use the --mfgfolder option with manually prepared bootloader files.

Symptoms

When using MFGTools downloaded from Foundries.io builds (via fio-program-board.sh), the board fails during SDP (Serial Download Protocol) programming with the following error:

E/TC: se050: smCom: phPalEse_Init Failed
E/TC: se050: smCom:  Failed to create physical connection with ESE
E/TC: se050: sss: SM_I2CConnect Failed. Status 7012
E/TC:0 0 se050_early_init_default:74 Failed to open the default session
E/TC:0 0 Panic at core/drivers/crypto/se050/session.c:75 <se050_early_init_default>

The bootloader appears to load correctly (hash checks pass), but OP-TEE fails to initialize the SE050 secure element, causing a panic.

Affected Components

  • Script: scripts/fio-program-board.sh
  • Machine: imx8mm-jaguar-sentai (likely affects other machines too)
  • MFGTools files: imx-boot-mfgtool and u-boot-mfgtool.itb from Foundries.io builds

Workaround

Use the --mfgfolder option to specify manually prepared bootloader files:

./scripts/fio-program-board.sh --factory sentai --machine imx8mm-jaguar-sentai --program --mfgfolder /path/to/custom-boot-files 1356

The custom boot files directory should contain:

  • imx-boot-mfgtool
  • u-boot-mfgtool.itb

Root Cause Analysis Needed

  1. MFGTools bootloader compatibility: Are the MFGTools bootloaders from Foundries.io builds compatible with the target hardware configuration?
  2. SE050 initialization: Why does OP-TEE fail to initialize SE050 with build MFGTools but succeed with custom boot files?
  3. Build configuration: Is there a difference in how MFGTools are built vs production bootloaders that affects SE050 support?

Expected Behavior

MFGTools downloaded from Foundries.io builds should work correctly for board programming without requiring manual bootloader files.

Steps to Reproduce

  1. Download target artifacts using fio-program-board.sh:
    ./scripts/fio-program-board.sh --factory sentai --machine imx8mm-jaguar-sentai --program 1356
  2. Put board in download/recovery mode
  3. Connect USB cable
  4. Run programming script
  5. Observe OP-TEE panic during SE050 initialization

Environment

  • Target: 1356 (and likely others)
  • Machine: imx8mm-jaguar-sentai
  • Factory: sentai
  • Script version: 2.0.0

Related

  • This issue affects the reliability of automated board programming workflows
  • Manual intervention required (--mfgfolder) reduces automation benefits
  • May affect production programming processes

Priority

High - Blocks automated board programming workflow, requires manual workaround for each programming session.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions