-
Notifications
You must be signed in to change notification settings - Fork 138
Scatter/gather ELF files according to segments paddr
#562
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
9510360
AI WIP
bigbrett 4f6921d
WIP: first stab at elf loading impl
bigbrett 7caf579
formatting
bigbrett fb6ca43
WIP: structure is there, but some major issues. See WOLFBOOT-ELF-LOAD…
bigbrett e7cd340
Moved elf parsing/scattering to elf.c, WIP sim
danielinux 1109194
ELF_SCATTERED: added sha check (WIP)
danielinux d9104ec
Fix scatter-gather ELF
danielinux 50725b3
Added example config files for sim, sim32 + ELF sg
danielinux 386a172
Fix regressions detected by github workflows
danielinux d142426
Fixed 'backup disabled' case without ELF_SCATTERED
danielinux 9d7084c
fixed misleading comment
danielinux 9c3e862
Some of the fixes requested during review:
danielinux ea0b4fb
Added missing files + cosmetics as per review
danielinux 5f8b79a
Added test for scattered ELF + validation via sim
danielinux c841113
Fixed warnings in test build
danielinux 71f2424
Reviewers requests
danielinux 11b8a68
Removed elf32bit build test
danielinux 02c2152
Attempt to update renode base images
danielinux e7f151d
Fixed: unused variable
danielinux 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| name: Test for scattered elf validation | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ 'master', 'main', 'release/**' ] | ||
| pull_request: | ||
| branches: [ '*' ] | ||
|
|
||
| jobs: | ||
| elf_scattered_test: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: true | ||
|
|
||
| - name: make clean | ||
| run: | | ||
| make keysclean | ||
|
|
||
| - name: Select config | ||
| run: | | ||
| cp config/examples/sim.config .config | ||
|
|
||
| - name: Build tools | ||
| run: | | ||
| make -C tools/keytools && make -C tools/bin-assemble | ||
|
|
||
| - name: Build wolfboot.elf | ||
| run: | | ||
| make clean && make test-sim-internal-flash-with-update ELF=1 ELF_SCATTERED=1 | ||
|
|
||
| - name: Run bootloader with no arguments | ||
| run: | | ||
| ./wolfboot.elf |
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
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
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,28 @@ | ||
| ARCH=sim | ||
| TARGET=sim | ||
| SIGN?=ED25519 | ||
| HASH?=SHA256 | ||
| WOLFBOOT_SMALL_STACK?=0 | ||
| SPI_FLASH=0 | ||
| DEBUG=1 | ||
| ELF_SCATTERED=1 | ||
| ELF=1 | ||
|
|
||
|
|
||
| # sizes should be multiple of system page size | ||
| WOLFBOOT_PARTITION_SIZE=0x40000 | ||
| WOLFBOOT_SECTOR_SIZE=0x1000 | ||
| WOLFBOOT_PARTITION_BOOT_ADDRESS=0x80000 | ||
| # if on external flash, it should be multiple of system page size | ||
|
|
||
| # Address from 0x100000 to 0x1FFFFF is reserved for ELF_SCATTERED | ||
|
|
||
| WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x200000 | ||
| WOLFBOOT_PARTITION_SWAP_ADDRESS=0x280000 | ||
|
|
||
|
|
||
| # required for keytools | ||
| WOLFBOOT_FIXED_PARTITIONS=1 | ||
|
|
||
| # For debugging XMALLOC/XFREE | ||
| #CFLAGS_EXTRA+=-DWOLFBOOT_DEBUG_MALLOC | ||
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,24 @@ | ||
| ARCH=sim | ||
| TARGET=sim | ||
| SIGN?=ECC256 | ||
| HASH?=SHA256 | ||
| WOLFBOOT_SMALL_STACK?=0 | ||
| SPI_FLASH=0 | ||
| DEBUG=1 | ||
| FORCE_32BIT=1 | ||
| ELF=1 | ||
| ELF_SCATTERED=1 | ||
|
|
||
| # sizes should be multiple of system page size | ||
| WOLFBOOT_PARTITION_SIZE=0x40000 | ||
| WOLFBOOT_SECTOR_SIZE=0x1000 | ||
| WOLFBOOT_PARTITION_BOOT_ADDRESS=0x80000 | ||
| # if on external flash, it should be multiple of system page size | ||
| WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x100000 | ||
| WOLFBOOT_PARTITION_SWAP_ADDRESS=0x180000 | ||
|
|
||
| # required for keytools | ||
| WOLFBOOT_FIXED_PARTITIONS=1 | ||
|
|
||
| # For debugging XMALLOC/XFREE | ||
| #CFLAGS_EXTRA+=-DWOLFBOOT_DEBUG_MALLOC |
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
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.