Skip to content
Snippets Groups Projects
Commit b9ebcd15 authored by rahix's avatar rahix
Browse files

fix(build_multi_image): Add size check for epicardium binary


The linker should already catch this case and error out early but just
to be absolutely sure, add a second check here so we don't get an
unexpectedly large epicardium binary which would overlap into pycardium
storage.

Signed-off-by: default avatarRahix <rahix@rahix.de>
parent 65eb59b4
No related branches found
No related tags found
1 merge request!401Assorted fixes/cleanups
Pipeline #4712 passed
......@@ -6,6 +6,11 @@ BIN1="$2"
BIN2="$3"
BINOUT="$4"
if [ "$(stat -c "%s" "${BIN1}")" -gt 458752 ]; then
echo "$0: ${BIN1} is too big to fit!" >&2
exit 1
fi
objcopy -I binary -O binary --pad-to=458752 --gap-fill=255 "${BIN1}" "$BINOUT"
cat "$BIN2" >>"$BINOUT"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment