-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check that building the eboot.c block generates the same binary as the verison checked into the repo. Catches the case where a library or eboot.c file is changed, but an updated eboot.elf isn't included in a PR. Can't do simple binary diff of the ELFs because paths and compile times will change, so dump the two sections we care about.
- Loading branch information
1 parent
1ff927d
commit 2ae56db
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 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,21 @@ | ||
#!/bin/bash | ||
|
||
READELF="$TRAVIS_BUILD_DIR/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-readelf" | ||
|
||
set -ev | ||
|
||
cd $TRAVIS_BUILD_DIR/tools | ||
python3 get.py -q | ||
|
||
cd $TRAVIS_BUILD_DIR/bootloaders/eboot | ||
|
||
"$READELF" -x .data -x .text eboot.elf > git.txt | ||
make clean | ||
make | ||
"$READELF" -x .data -x .text eboot.elf > build.txt | ||
diff git.txt build.txt | ||
if [ $? -ne 0 ]; then | ||
echo ERROR: eboot.elf in repo does not match output from compile. | ||
echo ERROR: Need to rebuild and check in updated eboot from repo. | ||
exit 1 | ||
fi |