Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The image-generation scripts can reject valid bootargs or produce images that overlap memory or exceed runtime limits.
3 open findings
What changed in this PR
Adds NXP i.MX 8M Mini support for BL33 and U-Boot go boot flows.
Changes:
- Adds i.MX8MM HAL, linker layout, configuration, test payload, and CI builds.
- Extends SDHCI with configurable eMMC width and High Speed timing.
- Adds scripts and documentation for producing signed FIT, go, and flash images.
| File | Description |
|---|---|
.github/workflows/test-configs.yml |
Adds three i.MX8MM build variants. |
.gitignore |
Ignores generated i.MX8MM artifacts. |
Makefile |
Defines i.MX8MM build outputs. |
config/examples/imx8mm-pico.config |
Configures PICO-IMX8MM boot modes. |
docs/Targets.md |
Documents setup, booting, and limitations. |
hal/imx8mm.c |
Implements UART, MMU/cache, and uSDHC HAL support. |
hal/imx8mm.h |
Defines i.MX8MM hardware constants. |
hal/imx8mm.ld |
Defines the DRAM memory layout. |
include/sdhci.h |
Adds eMMC High Speed constants. |
src/boot_aarch64.c |
Includes the i.MX8MM platform header. |
src/boot_aarch64_start.S |
Adds i.MX8MM EL2 startup handling. |
src/sdhci.c |
Adds configurable eMMC width and timing. |
test-app/app_imx8mm.c |
Adds a bare-metal boot payload. |
tools/scripts/imx8mm/imx8mm-mkfit.sh |
Builds signed kernel/DTB FIT images. |
tools/scripts/imx8mm/imx8mm-mkflashbin.sh |
Builds BL33 flash images. |
tools/scripts/imx8mm/imx8mm-mkgoimage.sh |
Builds U-Boot go images. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #931
Scan targets checked: wolfboot-src, wolfboot-bugs
Coverage: 2 of 5 in-scope changed file(s) opened by the reviewer; not opened: include/sdhci.h, src/boot_aarch64.c, test-app/app_imx8mm.c
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
Review tier: Lite
9454a4f to
42ebd47
Compare
SDHCI_EMMC_BUS_WIDTH (1/4/8, default 4) and SDHCI_EMMC_HS (CMD6 HS_TIMING, 50 MHz). Defaults are unchanged.
Boots a signed Linux kernel, either loaded into DRAM and started from U-Boot proper (RAM-boot, go) or started by ATF as BL33 reading a signed FIT from eMMC (uSDHC3, FAT32). Includes a test app and CI builds.
Scripts for flash.bin (BL33), the signed FIT and the RAM-boot image.
wolfboot.bin omits the BSS that startup clears.
…_SIZE The limit is read from the build configuration.
|
|
||
| static volatile uint64_t imx8mm_l1_table[512] __attribute__((aligned(4096))); | ||
|
|
||
| static void imx8mm_mmu_enable(void) |
There was a problem hiding this comment.
Some of this might be better as a pure assembly implementation.
There was a problem hiding this comment.
MMU enable and cache range ops implemented in assembly.
|
|
||
| #if defined(DISK_EMMC) && !defined(SDHCI_SDMA_DISABLED) | ||
| /* Cache maintenance by address range for SDMA */ | ||
| static void imx8mm_dcache_range(uintptr_t start, uint32_t sz, int invalidate) |
There was a problem hiding this comment.
MMU enable and cache range ops implemented in assembly
| @@ -0,0 +1,790 @@ | |||
| /* imx8mm.c | |||
There was a problem hiding this comment.
If any code in this file also exists in hal/imx8qm.c consider some consolidation and I can regress on the QuadMax.
There was a problem hiding this comment.
uSDHC shim shared as hal/imx_usdhc_sdhci.c/.h
|
|
||
| /* uSDHC -> SDHCI register shim, taken from hal/imx8qm.c */ | ||
|
|
||
| #ifndef CADENCE_SRS_OFFSET |
There was a problem hiding this comment.
Prefer more of the macros like these in the .h
| #include "hal/imx8mm.h" | ||
|
|
||
| /* UART2 console, already set up by the earlier boot stages */ | ||
| #define UART_REG(off) \ |
There was a problem hiding this comment.
If the imx8mm.c macros are moved to the .h then you won't need this...
| /* Bounded wait for TX FIFO space */ | ||
| #define UART_TX_SPIN_MAX 1000000 | ||
|
|
||
| static void uart_putc(char c) |
There was a problem hiding this comment.
Should leverage implementation from hal/imx8mm.c
| (dtb & 0x3) != 0) { | ||
| uart_puts("(pointer not in DRAM or misaligned)\n"); | ||
| } | ||
| else if (*((volatile uint32_t*)(uintptr_t)dtb) == FDT_MAGIC_LE) { |
There was a problem hiding this comment.
Perhaps if you are wanting to prove the FDT pointer the test-app should link the fdt.c code too and parse it? No really required tho.
There was a problem hiding this comment.
test-app parses the DTB with fdt.c
| @@ -0,0 +1,123 @@ | |||
| #!/usr/bin/env bash | |||
There was a problem hiding this comment.
Duplicating work in tools/scripts/imx8qm/imx8qm-flash.sh. Let's considolidate.
There was a problem hiding this comment.
I didn't find much overlap with imx8qm-flash.sh itself. Similar parts are
(1) the bootargs and /memory DTB edits in mkfit, vs hal_dts_fixup() on imx8qm,
(2) flashing over uuu/SD, which imx8mm only prints instructions for, and
(3) the zero-padding when bundling images (mkramimage vs imx8qm-mkflashbin).
Which did you mean, or is it fine as is?
|
@dgarske |


Adds wolfBoot support for the NXP i.MX 8M Mini, tested on the TechNexion PICO-IMX8MM (PICO-PI baseboard).
Boot modes
IMX8MM_BL33=1): wolfBoot replaces U-Boot proper.BootROM -> U-Boot SPL -> ATF (BL31) -> wolfBoot -> Linux.wolfBoot reads a signed FIT (kernel + DTB) from eMMC p1 (FAT32,
/fitImage_A.itb//fitImage_B.itb), verifies it and boots Linux at EL2.IMX8MM_BL33=0): started from U-Boot proper withgo 0x40480000; the signed kernel is bundled after wolfBoot.Changes
src/sdhci.c: optional eMMC bus width and High Speed timing (SDHCI_EMMC_BUS_WIDTH,SDHCI_EMMC_HS). Defaults unchanged for other targets.hal/imx8mm.*: UART2 console, uSDHC3 eMMC through the SDHCI layer (register shim fromhal/imx8qm.c), identity MMU + D-cache with SDMA cache maintenance in BL33 mode.config/examples/imx8mm-pico.config,test-app/app_imx8mm.c,Makefile(MAIN_TARGET), 3 CI build jobs.tools/scripts/imx8mm/: buildflash.bin(BL33), the signed FIT, and the go image.docs/Targets.md: "NXP i.MX 8M Mini" section.Testing
tn-imx_v2023.04_6.1.55_2.2.0-stableand itsinstall_uboot_imx8.sh.Notes
/memoryandbootargs(U-Boot normally adds them);imx8mm-mkfit.shadds them before signing.