Skip to content

Add wolfBoot target for NXP S32G2 (S32G274A GoldBox) - #984

Open
dgarske wants to merge 1 commit into
wolfSSL:masterfrom
dgarske:s32g2_goldbox
Open

dgarske wants to merge 1 commit into
wolfSSL:masterfrom
dgarske:s32g2_goldbox

Conversation

@dgarske

@dgarske dgarske commented Nov 11, 2026

Copy link
Copy Markdown
Member

Description

Adds TARGET=s32g2 for the NXP S32G274A on the S32G-VNP-GLDBOX (RDB2). wolfBoot is the Boot ROM's application image: it runs from SRAM at EL3 in place of U-Boot, brings the SoC up, verifies a signed FIT and enters Linux at EL2.

What it adds

  • hal/s32g2.c, hal/s32g2.h, hal/s32g2.ld - HAL: LINFlexD console, VR5510 watchdog over I2C, clock tree, Ncore, EL3 identity MMU, GICv3, secondary cores on a spin table, QuadSPI NOR driver behind the ext_flash API, device tree fixups
  • hal/s32g2_ddr.c - LPDDR4 controller and PHY bring-up. The board's register tables and the Synopsys PHY training firmware are not in the tree: tools/scripts/s32g2/s32g2-ddr-blob.py packs them from an NXP BSP U-Boot checkout into a blob the build links in
  • config/examples/s32g2-goldbox.config - boot from SD or eMMC with two FIT file slots; s32g2-goldbox-qspi.config - boot from QuadSPI NOR with BOOT/UPDATE partitions in the NOR
  • tools/scripts/s32g2/ - Boot ROM image writer (IVT, DCD, QuadSPI parameter block) and FIT build script
  • docs/Targets.md, CI build jobs for each variant

Touches shared code

  • src/boot_aarch64_start.S, src/boot_aarch64.c - S32G2 blocks only: SRAM ECC initialisation before the first store, EL3 fault vectors, secondary core entry, EL3 to EL2 handoff
  • hal/imx_usdhc_sdhci.c - the shared uSDHC shim now also serves S32G2
  • src/update_disk.c - ALLOW_DOWNGRADE=1 no longer fails to build on an unused variable

Testing

Validated on a GoldBox (S32G274A rev 2.1, RDB2 rev D): Boot ROM boot from SD and from QuadSPI NOR, the signed FIT read from SD (both file slots), eMMC and the NOR BOOT partition, Linux 5.4 (BSP29) to a login prompt with four cores. The ALLOW_DOWNGRADE=1 fix is build-tested only.

…ge, booting a signed FIT from SD, eMMC or QuadSPI NOR
@dgarske dgarske self-assigned this Nov 11, 2026
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.

1 participant