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
13 changes: 11 additions & 2 deletions arch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,11 @@ ifeq ($(ARCH),AARCH64)
ifeq ($(TARGET),nxp_ls1028a)
ARCH_FLAGS=-mcpu=cortex-a72+crypto -march=armv8-a+crypto -mtune=cortex-a72
CFLAGS+=$(ARCH_FLAGS) -DCORTEX_A72

# ZynqMP RVBAR (0xFD5C0040) does not exist on LS1028A -- the store faults
# pre-UART. Its reset vector comes from the boot ROM (DCFG BOOTLOCPTR).
CFLAGS+=-DSKIP_RVBAR=1
# MMU on (boot_aarch64_start.S LS1028A table): DDR Normal cacheable -- required
# for coherency with the ENETC coherent DMA (SICAR=0x27276767); CCSR/BAR Device.
CFLAGS +=-ffunction-sections -fdata-sections
LDFLAGS+=-Wl,--gc-sections

Expand Down Expand Up @@ -967,11 +971,16 @@ ifeq ($(ARCH),PPC)
endif

ifneq ($(NO_ASM),1)
# Use the SHA256 and SP math all assembly accelerations
# Use the SHA256/SHA512 and SP math assembly accelerations.
# (wolfSSL PR 10767 added the SHA-512 PPC32 asm transform referenced by
# sha512.c; --gc-sections prunes it when sha512.o is not linked, e.g. ED25519.)
CFLAGS+=-DWOLFSSL_SP_PPC
CFLAGS+=-DWOLFSSL_PPC32_ASM -DWOLFSSL_PPC32_ASM_INLINE
#CFLAGS+=-DWOLFSSL_PPC32_ASM_SMALL
MATH_OBJS+=$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/ppc32/ppc32-sha256-asm_c.o
# Add the SHA-512 PPC32 asm object only if its source is present (wildcard):
# PR 10767 provides it; older checkouts fall back to C sha512.
MATH_OBJS+=$(patsubst %.c,%.o,$(wildcard $(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/ppc32/ppc32-sha512-asm_c.c))
endif
endif

Expand Down
28 changes: 28 additions & 0 deletions config/examples/nxp-ls1028a.config
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,31 @@ WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x20080000
WOLFBOOT_LOAD_DTS_ADDRESS?=0x80000000
WOLFBOOT_DTS_BOOT_ADDRESS?=0x20F00000
WOLFBOOT_DTS_UPDATE_ADDRESS?=0x20F00000

# -----------------------------------------------------------------------------
# wolfIP network test in the test-app (optional)
# -----------------------------------------------------------------------------
# Compiles wolfIP + the NXP ENETC ethernet port into the test-app and runs a
# board-side network test (the Makefile auto-selects nxp_enetc for
# TARGET=nxp_ls1028a). ENETC is a PCIe integrated-endpoint MAC over ECAM
# (AArch64 LE, no byte-swap); runs MMU-on with cacheable DDR (required for
# coherent ENETC DMA), so the driver does explicit cache maintenance.
#
# wolfIP does not fit the default 256KB OCRAM load region: load the app into
# DDR and enlarge the boot partition (override the flash layout below).
#ENABLE_WOLFIP=1
#WOLFBOOT_LIB_WOLFIP=../lib/wolfip
#WOLFBOOT_PARTITION_SIZE=0x100000
#WOLFBOOT_PARTITION_BOOT_ADDRESS=0x20100000
#WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x20300000
#WOLFBOOT_PARTITION_SWAP_ADDRESS=0x20500000
# Load (and run) the app from DDR rather than OCRAM:
#WOLFBOOT_LOAD_ADDRESS=0x80100000
# PHY interface default is port0 SGMII (nxp_enetc_board.h); RGMII boards set 0:
#CFLAGS_EXTRA+=-DNXP_ENETC_IF_SGMII=0
# Test mode (neither flag = acquire a DHCP lease and stop):
# WOLFBOOT_TEST_TFTP=1 RRQ a file from a host tftpd, report size+checksum
# (set CFLAGS_EXTRA TFTP_EXPECT_SIZE/TFTP_EXPECT_SUM to verify)
# WOLFIP_SPEED_TEST=1 TCP throughput server on port 9 (drive with nc/dd/pv)
#WOLFBOOT_TEST_TFTP=1
#WOLFIP_SPEED_TEST=1
23 changes: 23 additions & 0 deletions config/examples/nxp-t1024.config
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,26 @@ WOLFBOOT_LOAD_DTS_ADDRESS?=0x7F100000

# Load to RAM before hash and verify
CFLAGS_EXTRA+=-DWOLFBOOT_USE_RAMBOOT

# -----------------------------------------------------------------------------
# wolfIP network test in the test-app (optional)
# -----------------------------------------------------------------------------
# Compiles wolfIP + the NXP QorIQ FMan ethernet port (mEMAC/MDIO, FM1@DTSEC1)
# into the test-app and runs a board-side network test. The T1024 (e5500)
# reuses the same nxp_fman driver as the T2080/T1040; default CCSRBAR is the
# reset value 0xFE000000 (no BOARD_CW_VPX3152 relocate). Build the app FLAT and
# 32-bit (ELF=0) at a low load address (the elf32 load path is unused). wolfIP
# objects are built -fno-plt -D_FORTIFY_SOURCE=0 (no PLT/GOT runtime fixup).
# Point WOLFBOOT_LIB_WOLFIP at a wolfIP checkout (or add it as lib/wolfip).
#ENABLE_WOLFIP=1
#WOLFBOOT_LIB_WOLFIP=../lib/wolfip
#ELF=0
#WOLFBOOT_LOAD_ADDRESS=0x100000
# PHY interface default is FM1@DTSEC1 SGMII (nxp_fman_board.h); RGMII set 0:
#CFLAGS_EXTRA+=-DNXP_FMAN_IF_SGMII=0
# Test mode (neither flag = acquire a DHCP lease and stop):
# WOLFBOOT_TEST_TFTP=1 RRQ a file from a host tftpd, report size+checksum
# (set CFLAGS_EXTRA TFTP_EXPECT_SIZE/TFTP_EXPECT_SUM to verify)
# WOLFIP_SPEED_TEST=1 TCP throughput server on port 9 (drive with nc/dd/pv)
#WOLFBOOT_TEST_TFTP=1
#WOLFIP_SPEED_TEST=1
33 changes: 33 additions & 0 deletions config/examples/nxp-t1040.config
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,36 @@ WOLFBOOT_LOAD_DTS_ADDRESS?=0x7F100000

# Load to RAM before hash and verify
CFLAGS_EXTRA+=-DWOLFBOOT_USE_RAMBOOT

# -----------------------------------------------------------------------------
# wolfIP network test in the test-app (optional)
# -----------------------------------------------------------------------------
# Compiles wolfIP + the NXP QorIQ FMan ethernet port (mEMAC/MDIO, FM1@DTSEC1)
# into the test-app and runs a board-side network test. The T1040 (e5500)
# reuses the same nxp_fman driver as the T2080; default CCSRBAR is the reset
# value 0xFE000000 (no BOARD_CW_VPX3152 relocate). Build the app FLAT and
# 32-bit (ELF=0) at a low load address (the elf32 load path is unused). wolfIP
# objects are built -fno-plt -D_FORTIFY_SOURCE=0 (no PLT/GOT runtime fixup).
# Point WOLFBOOT_LIB_WOLFIP at a wolfIP checkout (or add it as lib/wolfip).
#ENABLE_WOLFIP=1
#WOLFBOOT_LIB_WOLFIP=../lib/wolfip
#ELF=0
#WOLFBOOT_LOAD_ADDRESS=0x100000
# PHY wiring. nxp_fman default is FM1@DTSEC1 SGMII, PHY probed at addr 0x2.
# On the T1040D4RDB the cabled front port "ETH0" is FM1@DTSEC4 (ethernet@e6000),
# RGMII, Realtek RTL8211 PHY (id 0x001CC915) at MDIO addr 4 -- hardware-verified
# (DHCP lease, WOLFIP_TEST: PASS). DTSEC1/2 are fixed-link to the on-board L2
# switch (no PHY). Uncomment for the RDB ETH0 port:
#CFLAGS_EXTRA+=-DNXP_FMAN_MEMAC_IDX=4
#CFLAGS_EXTRA+=-DNXP_FMAN_IF_SGMII=0
#CFLAGS_EXTRA+=-DNXP_FMAN_PHY_ADDR=4
# To find the cabled port on a different board, enable the MDIO bus scan: it
# prints ID1/ID2/BSR for every address after init; the one with link=UP (BSR
# bit 2) is the wired port. Diagnostic only.
#CFLAGS_EXTRA+=-DWOLFIP_PHY_SCAN
# Test mode (neither flag = acquire a DHCP lease and stop):
# WOLFBOOT_TEST_TFTP=1 RRQ a file from a host tftpd, report size+checksum
# (set CFLAGS_EXTRA TFTP_EXPECT_SIZE/TFTP_EXPECT_SUM to verify)
# WOLFIP_SPEED_TEST=1 TCP throughput server on port 9 (drive with nc/dd/pv)
#WOLFBOOT_TEST_TFTP=1
#WOLFIP_SPEED_TEST=1
49 changes: 45 additions & 4 deletions config/examples/nxp-t2080.config
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,22 @@ WOLFBOOT_ORIGIN?=0xEFFE0000
# wolfBoot partition size (custom)
BOOTLOADER_PARTITION_SIZE=0x20000

# The region [0xEFF00000, 0xEFFE0000) below wolfBoot is reserved for the FMan
# microcode (FMAN_FW_ADDR=0xEFF00000, the U-Boot-standard slot). The partitions
# below sit under it so a BOOT-partition erase/update never touches the ucode.

# Application Partition Size
WOLFBOOT_PARTITION_SIZE?=0x100000
# Location in Flash for Application Partition
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0xEFEE0000
# Location in Flash for Application Partition (top = 0xEFF00000, below the ucode)
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0xEFE00000
# Load Partition to RAM Address
WOLFBOOT_LOAD_ADDRESS?=0x19000

# Location in Flash for Update Partition
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0xEFDE0000
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0xEFD00000

# Location of temporary sector used during updates
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0xEFDD0000
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0xEFCF0000

# DTS (Device Tree)
WOLFBOOT_DTS_BOOT_ADDRESS?=0xE8040000
Expand Down Expand Up @@ -124,3 +128,40 @@ WOLFBOOT_LOAD_DTS_ADDRESS?=0x200000
# wolfCrypt Test and Benchmark (requires larger partition size)
#WOLFCRYPT_TEST?=1
#WOLFCRYPT_BENCHMARK?=1

# -----------------------------------------------------------------------------
# wolfIP network test in the test-app (optional)
# -----------------------------------------------------------------------------
# Compiles wolfIP + the NXP QorIQ FMan ethernet port (mEMAC/MDIO/SGMII,
# FM1@DTSEC1) into the test-app and runs a board-side network test. Build the
# app FLAT and 32-bit (ELF=0, OS_64BIT=0) at a low load address (the elf32 load
# path and 64-bit RTOS handoff are unused). wolfIP objects are built -fno-plt
# -D_FORTIFY_SOURCE=0 (no PLT/GOT runtime fixup). Point WOLFBOOT_LIB_WOLFIP at
# a wolfIP checkout (or add it as lib/wolfip).
#ENABLE_WOLFIP=1
#WOLFBOOT_LIB_WOLFIP=../lib/wolfip
# Build FLAT + 32-bit at a low load address (as above; siblings t1040/t1024 too):
#ELF=0
#OS_64BIT=0
#WOLFBOOT_LOAD_ADDRESS=0x100000
# Test mode (neither flag = acquire a DHCP lease and stop):
# WOLFBOOT_TEST_TFTP=1 RRQ a file from a host tftpd, report size+checksum
# (set CFLAGS_EXTRA TFTP_EXPECT_SIZE/TFTP_EXPECT_SUM to verify)
# WOLFIP_SPEED_TEST=1 TCP throughput server on port 9 (drive with nc/dd/pv)
#WOLFBOOT_TEST_TFTP=1
#WOLFIP_SPEED_TEST=1
#
# Per-board wolfIP ethernet wiring (defaults above are CW VPX3-152 / RDB =
# FM1@DTSEC1, SGMII, PHY probed at addr 0x2). Override per the board device
# tree if the wired port differs:
#
# NAII 68PPC2 (hardware-verified): PRIME port is FM1@DTSEC3 = RGMII, Marvell
# PHY at MDIO addr 0 (68ppc2.dts ethernet@e4000: "rgmii-id", ethernet-phy@0
# reg <0>). The MDIO scan would otherwise grab DTSEC4's PHY at addr 1, so set
# the address explicitly:
#CFLAGS_EXTRA+=-DNXP_FMAN_MEMAC_IDX=3
#CFLAGS_EXTRA+=-DNXP_FMAN_IF_SGMII=0
#CFLAGS_EXTRA+=-DNXP_FMAN_PHY_ADDR=0
#
# NAII NOR is dual-bank with only the top 128KB boot sector common to both
# banks; flash the ucode/app with the boot-bank select in its runtime state.
Loading
Loading