Repository navigation
Add wolfBoot target for NXP S32G2 (S32G274A GoldBox) #984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dgarske
wants to merge
9
commits into
wolfSSL:master
Choose a base branch
from
dgarske:s32g2_goldbox
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e5b3657
Fix the disk updater build with ALLOW_DOWNGRADE=1
dgarske 2d832e9
Disable _FORTIFY_SOURCE for AArch64 so Linux GNU toolchains do not em…
dgarske 6cd65a1
Build the AArch64 D-cache range routines for targets without the EL2 …
dgarske e78e875
Publish the booted disk slot in the i.MX 8QuadMax device tree fixup
dgarske d33e224
Add fs_map to locate a file range on the media for the disk filesyste…
dgarske d873655
Extend disk boot confirmation to FAT32 and ext4 file slots
dgarske 8287704
Report whether a FIT ramdisk was loaded
dgarske 3f09c38
Add a minimal PSCI 1.1 runtime for firmware that stays resident at EL3
dgarske 0e81e7e
Add NXP S32G2 (S32G274A GoldBox) target: wolfBoot as the Boot ROM ima…
dgarske File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # NXP S32G2 GoldBox (S32G-VNP-GLDBOX, S32G274A-RDB2) - wolfBoot as the Boot | ||
| # ROM's application image booting from the 64 MB QuadSPI NOR, with the A/B | ||
| # image partitions in the same NOR and the signed FIT loaded into DDR. No SD | ||
| # card is needed (DISK_SDCARD=0). | ||
| # | ||
| # NOR layout: wolfBoot at 0 (IVT, ROM QSPI parameters, code), BOOT partition | ||
| # at 1 MB, UPDATE at 17 MB, SWAP sector at 33 MB. | ||
| # tools/scripts/s32g2/s32g2_mkimage.py wolfboot.bin s32g2_qspi_boot.bin --qspi | ||
| # The NOR is written by a programmer build of the SD config | ||
| # (S32G2_QSPI=1 S32G2_QSPI_PROGRAM_FILE=/<file>); the board must be strapped | ||
| # for QuadSPI boot. | ||
| # See docs/Targets.md. | ||
| # | ||
| # Never pass CFLAGS_EXTRA= on the command line - it replaces, not appends. | ||
| ARCH=AARCH64 | ||
| TARGET=s32g2 | ||
| S32G2_QSPI=1 | ||
| SIGN?=ECC384 | ||
| HASH?=SHA384 | ||
| DEBUG?=1 | ||
| DEBUG_UART?=1 | ||
| SPMATH?=1 | ||
| NO_XIP?=1 | ||
| EXT_FLASH?=1 | ||
| # The HAL sets up the GICv3 itself (hal/s32g2.c); skip the generic GICv2 init. | ||
| SKIP_GIC_INIT?=1 | ||
| GZIP?=1 | ||
| DISK_SDCARD?=0 | ||
| # The MX25UW51245G keeps an ECC code for every 16 bytes and each of those | ||
| # units may be programmed once per erase, so the partition state cannot be | ||
| # rewritten in place: keep it as a log of 16-byte records. The log takes the | ||
| # last sector of each partition, and 64 KB sectors give it room for a 16 MB | ||
| # partition (the driver erases them as 4 KB flash sectors). | ||
| NVM_FLASH_JOURNAL?=1 | ||
| WOLFBOOT_SECTOR_SIZE?=0x10000 | ||
| WOLFBOOT_PARTITION_SIZE?=0x1000000 | ||
| WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x100000 | ||
| WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x1100000 | ||
| WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x2100000 | ||
| # Separate DTB partitions are not used (the FIT carries the DTB) but the | ||
| # RAM-boot flow needs them defined; they sit after the swap sector. | ||
| WOLFBOOT_DTS_BOOT_ADDRESS?=0x2110000 | ||
| WOLFBOOT_DTS_UPDATE_ADDRESS?=0x2120000 | ||
|
|
||
| WOLFBOOT_RAMBOOT_MAX_SIZE=0x4000000 | ||
| WOLFBOOT_LOAD_ADDRESS?=0xA0000000 | ||
| WOLFBOOT_LOAD_DTS_ADDRESS?=0xA5000000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # NXP S32G2 GoldBox (S32G-VNP-GLDBOX, S32G274A-RDB2) - wolfBoot as the Boot | ||
| # ROM's application image: copied into SRAM at 0x340A0000 and entered at EL3 | ||
| # with only FIRC running, in place of U-Boot. The signed FIT (kernel + DTB, | ||
| # hal/s32g2.its) is read from a FAT32 partition of the SD card, or of the | ||
| # eMMC with DISK_EMMC=1 DISK_SDCARD=0. | ||
| # | ||
| # The LPDDR4 tables and PHY firmware come from the NXP BSP U-Boot sources: | ||
| # tools/scripts/s32g2/s32g2-ddr-blob.py <nxp-u-boot> s32g2_ddr.bin | ||
| # Wrap wolfboot.bin for the Boot ROM and write it at SD byte offset 0x1000: | ||
| # tools/scripts/s32g2/s32g2_mkimage.py wolfboot.bin s32g2_boot.bin | ||
| # dd if=s32g2_boot.bin of=/dev/sdX bs=512 seek=8 | ||
| # See docs/Targets.md. | ||
| # | ||
| # Never pass CFLAGS_EXTRA= on the command line - it replaces, not appends. | ||
| ARCH=AARCH64 | ||
| TARGET=s32g2 | ||
| SIGN?=ECC384 | ||
| HASH?=SHA384 | ||
| DEBUG?=1 | ||
| DEBUG_UART?=1 | ||
| SPMATH?=1 | ||
| NO_XIP?=1 | ||
| # The HAL sets up the GICv3 itself (hal/s32g2.c); skip the generic GICv2 init. | ||
| SKIP_GIC_INIT?=1 | ||
| WOLFBOOT_SECTOR_SIZE?=0x1000 | ||
| WOLFBOOT_NO_PARTITIONS=1 | ||
| GZIP?=1 | ||
| DISK_SDCARD?=1 | ||
| DISK_FS?=fat32 | ||
|
|
||
| # A/B slots: two files on the third partition (FAT32). The higher version | ||
| # boots. An older version is not used when the newer one fails to verify | ||
| # (anti-rollback), unless built with ALLOW_DOWNGRADE=1. | ||
| # A slot staged by an update is booted once on probation and skipped on the | ||
| # next boot unless the OS confirmed it (docs/compile.md, "Disk boot | ||
| # confirmation"). The state is the last 8 bytes of the slot's file. | ||
| DISK_BOOT_CONFIRM?=1 | ||
| CFLAGS_EXTRA+=-DBOOT_PART_A=2 | ||
| CFLAGS_EXTRA+=-DBOOT_PART_B=2 | ||
| CFLAGS_EXTRA+=-DBOOT_FILE_A='"/fitImage_a.bin"' | ||
| CFLAGS_EXTRA+=-DBOOT_FILE_B='"/fitImage_b.bin"' | ||
|
|
||
| WOLFBOOT_RAMBOOT_MAX_SIZE=0x4000000 | ||
| WOLFBOOT_LOAD_ADDRESS?=0xA0000000 | ||
| WOLFBOOT_LOAD_DTS_ADDRESS?=0xA5000000 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.