Skip to content

Add NXP QorIQ support using wolfIP to test-app#800

Draft
dgarske wants to merge 5 commits into
wolfSSL:masterfrom
dgarske:nxp_t2080_wolfip
Draft

Add NXP QorIQ support using wolfIP to test-app#800
dgarske wants to merge 5 commits into
wolfSSL:masterfrom
dgarske:nxp_t2080_wolfip

Conversation

@dgarske

@dgarske dgarske commented Jun 16, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an optional wolfIP-based network test path to the wolfBoot test-app, targeting NXP QorIQ (FMan) and LS1028A (ENETC) platforms to validate link/PHY bring-up, DHCP, and optionally TFTP fetch or a TCP throughput server.

Changes:

  • Introduces wolfip_tftp_test glue (DHCP bring-up + optional TFTP RRQ / speed test) and hooks it into NXP test-app entrypoints when enabled.
  • Extends test-app/Makefile to optionally build/link wolfIP sources (and TFTP client) with target-specific port selection and flags.
  • Documents usage via updated NXP example config files.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
test-app/wolfip_tftp_test.h Declares the optional wolfIP test entrypoint for the test-app.
test-app/wolfip_tftp_test.c Implements DHCP bring-up plus optional TFTP fetch and TCP speed-test modes for NXP ports.
test-app/Makefile Adds optional wolfIP build integration, object rules, and target-based port selection.
test-app/app_nxp_t2080.c Calls the wolfIP test when ENABLE_WOLFIP is enabled.
test-app/app_nxp_t1040.c Calls the wolfIP test when ENABLE_WOLFIP is enabled.
test-app/app_nxp_t1024.c Calls the wolfIP test when ENABLE_WOLFIP is enabled.
test-app/app_nxp_ls1028a.c Switches to HAL-provided UART and calls the wolfIP test when enabled.
config/examples/nxp-t2080.config Documents how to enable/configure wolfIP testing for T2080.
config/examples/nxp-t1040.config Documents how to enable/configure wolfIP testing for T1040.
config/examples/nxp-t1024.config Documents how to enable/configure wolfIP testing for T1024.
config/examples/nxp-ls1028a.config Documents how to enable/configure wolfIP testing for LS1028A (incl. DDR/partition sizing notes).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test-app/wolfip_tftp_test.c Outdated
Comment on lines +203 to +206
if ((uint32_t)offset + len > TFTP_RAM_MAX) {
c->overflow = 1;
return -1;
}
Comment on lines +279 to +282
if (wolftftp_client_start_rrq(&client, &srv, TFTP_FILENAME) != 0) {
wolfBoot_printf("TFTP: start_rrq failed\r\n");
return -1;
}
Comment on lines +309 to +313
if (client.state != WOLFTFTP_CLIENT_COMPLETE) {
wolfBoot_printf("TFTP: FAILED (state=%d status=%d)\r\n",
client.state, client.last_status);
return -1;
}
Comment on lines +314 to +317
if (g_tftp.overflow) {
wolfBoot_printf("TFTP: file exceeds %u byte RAM buffer\r\n", TFTP_RAM_MAX);
return -1;
}
Comment thread test-app/wolfip_tftp_test.c Outdated
Comment on lines +318 to +320
wolfBoot_printf("TFTP: got %u bytes, checksum 0x%x\r\n",
(unsigned)g_tftp.len, (unsigned)g_tftp.sum);
return 0;
Comment thread test-app/Makefile
Comment on lines +1125 to +1128
ifeq ($(ENABLE_WOLFIP),1)
# Select the wolfIP ethernet port by target: LS1028A (AArch64) uses the
# ENETC port; the QorIQ PowerPC parts use the FMan port.
ifeq ($(TARGET),nxp_ls1028a)
dgarske added 5 commits June 22, 2026 10:32
wolfBoot_ramboot() rejected any load address below _end (dst < _end), which
assumes wolfBoot sits at the bottom of RAM with images loaded above it. The
T1040/T1024 two-stage boot relocates wolfBoot near the 2GB DDR top, so a valid
low load address (e.g. 0x100000) was wrongly rejected. Use a full interval-
overlap test of [dst, dst+hdr+img_size] against wolfBoot's [_start_text, _end]
so it is correct for wolfBoot at either end of RAM.
Port-agnostic DHCP / TFTP-fetch / TCP-throughput test (wolfip_tftp_test.c),
selected per board via the Makefile WOLFIP_PORT logic. Includes an optional
-DWOLFIP_PHY_SCAN MDIO bus scan to identify the cabled PHY on multi-port boards.
Board-aware FMAN_FW_ADDR (CW VPX3-152 0xFFE60000 vs RDB/NAII 0xEFF00000) with a
NOR bounds guard so a wrong address fails gracefully instead of machine-checking.
The guard compares via the offset from the flash base so the upper bound does
not overflow uintptr_t on the CW's 256 MB NOR at 0xF0000000. wolfIP test-app
hook + config. Hardware-verified: CW VPX3-152 (DTSEC1 SGMII) and NAII 68PPC2
(DTSEC3 RGMII, PHY addr 0).
wolfIP test-app hooks + configs for the T1024/T1040 two-stage boot. T1040D4RDB
hardware-verified (ETH0 = DTSEC4 RGMII, Realtek RTL8211 PHY addr 4; DHCP PASS).
t1040_flash.cmm: drop the hard RCW override (fails on a board with a valid NOR
RCW) for a plain SYStem.Up; absolute paths.

Also fix hal_flash_write() buffered-program loop (Fenrir 6125): the per-word
data store used the sector-relative index i instead of offset+i, programming
every page back at the sector start and corrupting writes whose destination is
not sector-aligned. Matches the offset-based addressing used everywhere else in
the routine and the corrected nxp_t2080.c.
wolfIP test-app hook + config for the LS1028A ENETC port (AArch64 LE).
@dgarske dgarske force-pushed the nxp_t2080_wolfip branch from 789c91f to a71a549 Compare June 22, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants