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

fix(build_multi_image): Use objcopy instead of tr hack


The tr hack we used so far has been painful.  The amount of locale
environment variables we need to set is surely a telling sign of that ...

Replace this with objcopy which can do the same thing, but much easier
and without locale related side effects ;)

Signed-off-by: default avatarRahix <rahix@rahix.de>
parent b79d1f62
No related branches found
No related tags found
1 merge request!401Assorted fixes/cleanups
...@@ -6,8 +6,7 @@ BIN1="$2" ...@@ -6,8 +6,7 @@ BIN1="$2"
BIN2="$3" BIN2="$3"
BINOUT="$4" BINOUT="$4"
dd if=/dev/zero ibs=1k count=448 2>/dev/null | LANG=C LC_CTYPE=C LC_ALL=C LC_COLLATE=C tr "\000" "\377" > "$BINOUT" objcopy -I binary -O binary --pad-to=458752 --gap-fill=255 "${BIN1}" "$BINOUT"
dd if="$BIN1" of="$BINOUT" conv=notrunc 2>/dev/null cat "$BIN2" >>"$BINOUT"
dd if="$BIN2" >> "$BINOUT" 2>/dev/null
"$PYTHON" "$(dirname "$0")/crc_patch.py" "$BINOUT" "$PYTHON" "$(dirname "$0")/crc_patch.py" "$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