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: Rahix's avatarRahix <rahix@rahix.de>
parent b79d1f62
......@@ -6,8 +6,7 @@ BIN1="$2"
BIN2="$3"
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"
dd if="$BIN1" of="$BINOUT" conv=notrunc 2>/dev/null
dd if="$BIN2" >> "$BINOUT" 2>/dev/null
objcopy -I binary -O binary --pad-to=458752 --gap-fill=255 "${BIN1}" "$BINOUT"
cat "$BIN2" >>"$BINOUT"
"$PYTHON" "$(dirname "$0")/crc_patch.py" "$BINOUT"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment