Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/test-configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,30 @@ jobs:
config-file: ./config/examples/imx8qm-mek.config
make-args: DISK_SDCARD=1 IMX8QM_SCU=0 wolfboot.bin test-app/image_v1_signed.bin

imx8mm_test:
uses: ./.github/workflows/test-build-aarch64.yml
with:
arch: aarch64
# BL33: MMU, eMMC (8-bit HS), signed FIT on FAT32
config-file: ./config/examples/imx8mm-pico.config
make-args: wolfboot.bin test-app/image_v1_signed.bin

imx8mm_ramboot_test:
uses: ./.github/workflows/test-build-aarch64.yml
with:
arch: aarch64
# RAM-boot: loaded and started by U-Boot proper ("go")
config-file: ./config/examples/imx8mm-pico.config
make-args: IMX8MM_BL33=0 wolfboot.bin test-app/image_v1_signed.bin

imx8mm_bl33_ram_test:
uses: ./.github/workflows/test-build-aarch64.yml
with:
arch: aarch64
# BL33: kernel placed in DRAM by SPL, MMU off
config-file: ./config/examples/imx8mm-pico.config
make-args: IMX8MM_BL33=1 DISK_EMMC=0 IMX8MM_MMU=0 wolfboot.bin test-app/image_v1_signed.bin

disk_boot_confirm_test:
uses: ./.github/workflows/test-build-aarch64.yml
with:
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,11 @@ tools/scripts/cm4/*.bin
tools/scripts/cm4/linux/
tools/scripts/cm4/rauc/

# tools/scripts/imx8mm outputs
/imx8mm_flashbin/
/imx8mm_fit/
/fitImage_*.itb

# TI cl2000 (ARCH=C2000) intermediate assembly listings left in the repo root
/*.asm

Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,11 @@ ifeq ($(TARGET),imx8qm)
MAIN_TARGET:=wolfboot.bin test-app/image_v1_signed.bin
endif

# i.MX 8M Mini runs from DRAM; tools/scripts/imx8mm builds the boot images.
ifeq ($(TARGET),imx8mm)
MAIN_TARGET:=wolfboot.bin test-app/image_v1_signed.bin
endif

# i.MX95 M7 runs from ITCM (loaded by the Linux remoteproc driver); the payload
# lives in DDR at 0x80100000, so there is no contiguous flash image to assemble.
ifeq ($(TARGET),imx95_m7)
Expand Down
9 changes: 9 additions & 0 deletions arch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ ifeq ($(ARCH),AARCH64)
# uSDHC board facts. Here rather than in the config because a command-line
# CFLAGS_EXTRA= would replace the config's, whereas CFLAGS is additive.
ifneq ($(filter 1,$(DISK_SDCARD) $(DISK_EMMC)),)
# uSDHC -> SDHCI shim, shared with imx8mm
OBJS+=hal/imx_usdhc_sdhci.o
# Card detect is lsio_gpio5[22], so PRES_STATE bit 16 never sets.
# SDMA is on: the read is the dominant boot cost and PIO caps it near
# 1.6 MB/s regardless of bus clock. IMX8QM_SDHCI_PIO=1 falls back.
Expand Down Expand Up @@ -357,6 +359,13 @@ ifeq ($(ARCH),AARCH64)
endif
endif

ifeq ($(TARGET),imx8mm)
# uSDHC -> SDHCI shim, shared with imx8qm
ifneq ($(filter 1,$(DISK_SDCARD) $(DISK_EMMC)),)
OBJS+=hal/imx_usdhc_sdhci.o
endif
endif

ifeq ($(TARGET),imx95_a55)
# NXP i.MX95 Cortex-A55 cluster, running as BL33 in AHAB container 2.
# -mstrict-align because this stage runs with the MMU off, so every access
Expand Down
76 changes: 76 additions & 0 deletions config/examples/imx8mm-pico.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# TechNexion PICO-IMX8MM (i.MX 8M Mini). See docs/Targets.md.
ARCH?=AARCH64
TARGET?=imx8mm
SIGN?=RSA4096
HASH?=SHA3
DEBUG?=1
VTOR?=1
SPMATH?=1
IMAGE_HEADER_SIZE?=1024
PKA?=1
WOLFTPM?=0
# Console on UART2. DEBUG_UART=0 also needs -DWOLFBOOT_NO_PRINTF.
DEBUG_UART?=1
# Linux-targeted toolchains: no glibc FORTIFY calls, no PIE
CFLAGS_EXTRA+=-U_FORTIFY_SOURCE -fno-pie
LDFLAGS_EXTRA+=-no-pie
NO_XIP?=1
NO_QNX?=1
WOLFBOOT_SECTOR_SIZE=0x400
WOLFBOOT_NO_PARTITIONS=1
# IMX8MM_BL33=1: started by ATF as BL33, in place of U-Boot proper
# IMX8MM_BL33=0: RAM-boot, loaded to DRAM and started by U-Boot ("go 0x40480000")
IMX8MM_BL33?=1
ifeq ($(IMX8MM_BL33),1)
# BL33 address (U-Boot CONFIG_TEXT_BASE)
WOLFBOOT_LOAD_BASE?=0x40200000
# DISK_EMMC=0: signed kernel placed by SPL
IMX8MM_KERNEL_ADDR?=0x48000000
# 64 MB: up to 0x48000000 from the kernel run address
WOLFBOOT_RAMBOOT_MAX_SIZE?=0x4000000
CFLAGS_EXTRA+=-DIMX8MM_BL33
# Entered with the MMU off
CFLAGS_EXTRA+=-mstrict-align
# Identity MMU + D-cache while loading and verifying
IMX8MM_MMU?=1
ifeq ($(IMX8MM_MMU),1)
CFLAGS_EXTRA+=-DIMX8MM_MMU
endif
# Signed FIT read from eMMC (uSDHC3) p1, FAT32
DISK_EMMC?=1
ifeq ($(DISK_EMMC),1)
CFLAGS_EXTRA+=-DSDHCI_FORCE_CARD_DETECT
# Print the eMMC bus and partitions at boot
CFLAGS_EXTRA+=-DIMX8MM_EMMC_PROBE
# 8-bit, High Speed (50 MHz)
IMX8MM_EMMC_HS?=1
ifeq ($(IMX8MM_EMMC_HS),1)
CFLAGS_EXTRA+=-DSDHCI_EMMC_BUS_WIDTH=8 -DSDHCI_EMMC_HS
endif
DISK_FS?=fat32
CFLAGS_EXTRA+=-DBOOT_PART_A=0 -DBOOT_PART_B=0
CFLAGS_EXTRA+=-DBOOT_FILE_A='"/fitImage_A.itb"'
CFLAGS_EXTRA+=-DBOOT_FILE_B='"/fitImage_B.itb"'
# Whole FIT is read and verified here
WOLFBOOT_LOAD_ADDRESS?=0x48000000
# 64 KB SDMA reads
DISK_BLOCK_SIZE?=65536
CFLAGS_EXTRA+=-DDISK_BLOCK_SIZE=$(DISK_BLOCK_SIZE)
# Keep WOLFBOOT_FS_CACHE_SIZE at 512: larger is read by SDMA into an
# unaligned buffer
endif
else
# RAM-boot load and entry address
WOLFBOOT_LOAD_BASE?=0x40480000
# Signed kernel at +0xC0000 in wolfboot_linux.bin
IMX8MM_KERNEL_ADDR?=0x40540000
# 42 MB: the kernel must end below the DTB at 0x43000000
WOLFBOOT_RAMBOOT_MAX_SIZE?=0x2A00000
endif
CFLAGS_EXTRA+=-DIMX8MM_KERNEL_ADDR=$(IMX8MM_KERNEL_ADDR)
# Kernel run address
WOLFBOOT_LOAD_ADDRESS?=0x44000000
# DTB address
WOLFBOOT_LOAD_DTS_ADDRESS?=0x43000000
# Image read from DRAM (memcpy), RAM boot
EXT_FLASH?=1
Loading
Loading