-
Notifications
You must be signed in to change notification settings - Fork 161
Expand file tree
/
Copy pathcm4_sdcard.config
More file actions
60 lines (60 loc) · 2.42 KB
/
Copy pathcm4_sdcard.config
File metadata and controls
60 lines (60 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Raspberry Pi CM4 (BCM2711) - eMMC/SD A/B disk boot.
#
# Boots from the BCM2711 EMMC2 controller (Arasan SDHCI @ 0xFE340000), which
# drives the onboard eMMC (eMMC variants) or the microSD (CM4 Lite). wolfBoot
# reads GPT A/B image partitions via update_disk.c and boots the highest valid
# version with rollback.
#
# The EMMC2 glue in hal/cm4.c is hardware-validated on the onboard eMMC
# (see cm4_emmc.config). The microSD path uses the same driver but needs a CM4
# Lite - an eMMC module disables the carrier's microSD slot. Use
# SDHCI_FORCE_CARD_DETECT for media with no routed card-detect line.
#
# For wolfCrypt FIPS 140-3, build with FIPS=1 pointing at a FIPS / FIPS-ready
# wolfSSL tree. The FIPS module uses portable-C crypto, so NO_ARM_ASM is
# required. Entropy comes from the BCM2711 RNG200 hardware TRNG (hal/cm4.c).
# See docs/FIPS.md for the in-core hash-seal procedure (done on-target). e.g.:
# make FIPS=1 WOLFBOOT_LIB_WOLFSSL=../wolfssl-5.9.2-gplv3-fips-ready NO_ARM_ASM=1
#FIPS?=1
#WOLFBOOT_LIB_WOLFSSL?=../wolfssl-5.9.2-gplv3-fips-ready
#NO_ARM_ASM?=1
ARCH?=AARCH64
TARGET?=cm4
SIGN?=ECC384
HASH?=SHA384
IMAGE_HEADER_SIZE?=1024
DEBUG?=0
DEBUG_UART?=1
DISK_SDCARD?=1
DISK_EMMC?=0
CFLAGS_EXTRA+=-DSDHCI_FORCE_CARD_DETECT
# Force PIO: the BCM2711 EMMC2 SDMA path is unvalidated and hal/cm4.c provides no
# DMA cache-maintenance hooks, while the disk configs run with the D-cache on
# (CM4_USE_MMU), so SDMA could hash/verify stale DDR. Matches cm4_emmc.config.
CFLAGS_EXTRA+=-DSDHCI_SDMA_DISABLED
# Opt into the Arasan EMMC2 between-block BRR clear for multi-block PIO reads.
# The CM4 microSD path runs the same EMMC2 block as the eMMC path (which gets
# this via DISK_EMMC); other DISK_SDCARD targets do not need it (src/sdhci.c).
CFLAGS_EXTRA+=-DSDHCI_PIO_BRR_CLEAR
# Opt into the bounded multi-block write settle-wait: the BCM2711 EMMC2 does not
# raise TC until CMD12, so cap the pre-CMD12 wait (src/sdhci.c) instead of
# spinning forever; completion is then re-confirmed via CMD13.
CFLAGS_EXTRA+=-DSDHCI_WRITE_SETTLE_SPINS=1000000U
EXT_FLASH?=0
NO_XIP=1
NO_QNX?=1
ELF?=1
VTOR?=1
SPMATH?=1
PKA?=0
WOLFTPM?=0
WOLFBOOT_NO_PARTITIONS=1
CFLAGS_EXTRA+=-DBOOT_PART_A=1
CFLAGS_EXTRA+=-DBOOT_PART_B=2
CFLAGS_EXTRA+=-DDISK_BLOCK_SIZE=0x80000
WOLFBOOT_LOAD_ADDRESS?=0x10000000
WOLFBOOT_RAMBOOT_MAX_SIZE=0x2BC00000
WOLFBOOT_LOAD_DTS_ADDRESS?=0x08000000
WOLFBOOT_PARTITION_BOOT_ADDRESS=0x80200000
WOLFBOOT_PARTITION_SIZE=0x4000000
WOLFBOOT_SECTOR_SIZE=0x1000