-
Notifications
You must be signed in to change notification settings - Fork 37
Add Agilex 5 FCS and wolfBoot integration #177
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
aidangarske
wants to merge
5
commits into
wolfSSL:master
Choose a base branch
from
aidangarske:agilex5-wolfboot-support
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
5 commits
Select commit
Hold shift + click to select a range
774b1c2
Add Altera Agilex 5 SDM support via libfcs and alterafcs PACKAGECONFIG
aidangarske 622fc8f
Add Agilex 5 wolfBoot Yocto integration
aidangarske 5e77290
Document Agilex 5 virtual provisioning and pin port revision
aidangarske 2164828
Address Agilex 5 integration review feedback
aidangarske bdaaf3b
Move Agilex 5 wks to files/wic to satisfy OE-core sanity check
aidangarske 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # short-description: Agilex 5 SD image with wolfBoot A/B partitions | ||
| # long-description: Keeps the Altera FAT boot partition, initializes both | ||
| # wolfBoot raw firmware slots, and places the Linux root filesystem in p4. | ||
|
|
||
| part --source bootimg-partition --ondisk mmcblk --fstype=vfat --mkfs-extraopts "-F 32" --label boot --active --align 1024 --fixed-size 128M --system-id b | ||
| # WOLFBOOT_IMAGE_VERSION is supplied by the Kas/image configuration so an | ||
| # update version cannot silently leave the A/B slots at version 1. | ||
| part --source rawcopy --sourceparams="file=image_v${WOLFBOOT_IMAGE_VERSION}_signed.bin" --ondisk mmcblk --fstype=none --align 1024 --fixed-size 200M | ||
| part --source rawcopy --sourceparams="file=image_v${WOLFBOOT_IMAGE_VERSION}_signed.bin" --ondisk mmcblk --fstype=none --align 1024 --fixed-size 200M | ||
| # Keep the rootfs cap: the Agilex SD contract reserves exactly 1.5 GiB for p4 | ||
| # and the resulting WIC geometry is part of the documented deployment flow. | ||
| part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 1024 --fixed-size 1500M | ||
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,48 @@ | ||
| # Use wolfBoot as BL33 in the SoCFPGA TF-A FIT when explicitly enabled. | ||
| # | ||
| # The Altera BSP still builds U-Boot SPL so DDR, clocks, pinmux and the SD | ||
| # controller are initialized by the supported platform first stage. Only the | ||
| # U-Boot-proper blob in u-boot.itb is replaced. TF-A BL31 and the board DTB | ||
| # remain in their existing FIT nodes. | ||
|
|
||
| WOLFBOOT_ENABLE ??= "0" | ||
|
|
||
| python __anonymous() { | ||
| if (d.getVar('WOLFBOOT_ENABLE') or '') != '1': | ||
| return | ||
|
|
||
| d.appendVar('DEPENDS', ' wolfboot') | ||
| depends = d.getVarFlag('do_compile', 'depends') or '' | ||
| d.setVarFlag('do_compile', 'depends', | ||
| depends + ' wolfboot:do_deploy') | ||
| } | ||
|
|
||
| do_compile:prepend() { | ||
| if [ "${WOLFBOOT_ENABLE}" = "1" ]; then | ||
| fit_dtsi="${S}/arch/arm/dts/socfpga_soc64_fit-u-boot.dtsi" | ||
| if [ ! -f "$fit_dtsi" ]; then | ||
| bbfatal "SoCFPGA FIT description not found: $fit_dtsi" | ||
| fi | ||
|
|
||
| # Keep the source tree pristine. The backup/trap covers both normal | ||
| # completion and compile failures, including workdirs reused from | ||
| # sstate, while still letting U-Boot's normal FIT build consume the | ||
| # generated description. | ||
| fit_dtsi_backup="${B}/socfpga_soc64_fit-u-boot.dtsi.orig" | ||
| install -m 0644 "$fit_dtsi" "$fit_dtsi_backup" | ||
| trap 'install -m 0644 "$fit_dtsi_backup" "$fit_dtsi"; rm -f "$fit_dtsi_backup"' EXIT | ||
| sed -i \ | ||
| -e 's/description = "U-Boot SoC64";/description = "wolfBoot secure boot";/' \ | ||
| -e 's/filename = "u-boot-nodtb.bin";/filename = "wolfboot.bin";/' \ | ||
| "$fit_dtsi" | ||
| wolfboot_payload="${DEPLOY_DIR_IMAGE}/wolfboot.bin" | ||
| if [ ! -f "$wolfboot_payload" ]; then | ||
| bbfatal "wolfBoot BL33 payload not found: $wolfboot_payload" | ||
| fi | ||
|
|
||
| install -m 0644 "$wolfboot_payload" "${S}/wolfboot.bin" | ||
| install -d "${B}/${UBOOT_DEFCONFIG}" | ||
| install -m 0644 "$wolfboot_payload" \ | ||
| "${B}/${UBOOT_DEFCONFIG}/wolfboot.bin" | ||
| fi | ||
| } |
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,25 @@ | ||
| # wolfBoot's Agilex 5 FIT loader accepts an uncompressed kernel image. The | ||
| # GSRD kernel append creates Image.lzma unconditionally even though the machine | ||
| # configuration requests FIT_KERNEL_COMP_ALG = "none". Rebuild only the FIT | ||
| # payload after the GSRD deploy task when wolfBoot is enabled. | ||
|
|
||
| do_deploy:append() { | ||
| if [ "${WOLFBOOT_ENABLE}" = "1" ]; then | ||
| fit_its="${B}/fit_${MACHINE_STRIP}_kernel.its" | ||
| if [ "${FPGA_CORE_PGM_ENABLE}" != "1" ]; then | ||
| fit_its="${B}/fit_${MACHINE_STRIP}_kernel_no_rbf.its" | ||
| fi | ||
|
|
||
| if [ -f "${LINUXDEPLOYDIR}/Image" ] && [ -f "$fit_its" ]; then | ||
| cp "${LINUXDEPLOYDIR}/Image" "${B}/Image" | ||
| sed -i \ | ||
| -e 's#Image\.lzma#Image#g' \ | ||
| -e 's/compression = "lzma"/compression = "none"/g' \ | ||
| "$fit_its" | ||
| (cd "${B}" && mkimage -f "$(basename "$fit_its")" "${B}/kernel.itb") | ||
| install -m 0644 "${B}/kernel.itb" "${DEPLOYDIR}/kernel.itb" | ||
|
aidangarske marked this conversation as resolved.
|
||
| else | ||
| bbfatal "wolfBoot FIT rebuild requires ${LINUXDEPLOYDIR}/Image and $fit_its" | ||
| fi | ||
| fi | ||
| } | ||
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
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.