Skip to content

Commit 9fa69c1

Browse files
committed
signimage: expand filler blocks for another case found with ...
... show_signature_problem script.
1 parent 2dd5d24 commit 9fa69c1

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

signimage/sign_image

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,9 +455,18 @@ rm -f "$tmp/filler.bin"
455455
touch "$tmp/filler.bin"
456456
if [ -z "$YF_SIGNIMAGE_SKIP_WORKAROUNDS" ]; then
457457
if [ $(( ( copy_blocks + 2 ) % 20 )) -eq 0 ]; then
458-
echo -ne "Repeating first entry as filler ... " 1>&2
458+
echo -ne "Repeating first entry once as filler ... " 1>&2
459459
"$YF_SIGNIMAGE_DD" if="$image_file" of="$tmp/filler.bin" bs=512 count=1 status=none 2>/dev/null
460460
show_ok
461+
elif [ $(( ( copy_blocks + 3 ) % 20 )) -eq 0 ]; then
462+
echo -ne "Repeating first entry two times as filler ... " 1>&2
463+
( "$YF_SIGNIMAGE_DD" if="$image_file" bs=512 count=1 status=none 2>/dev/null;
464+
"$YF_SIGNIMAGE_DD" if="$image_file" bs=512 count=1 status=none 2>/dev/null ) >"$tmp/filler.bin"
465+
show_ok
466+
#
467+
# # Maybe it's not needed anymore? But firmwarecfg stream seems to read with a block size of 4 KB,
468+
# # according to output of strace
469+
#
461470
# elif [ $(( copy_blocks % 8 )) -eq 5 ] || [ $(( copy_blocks % 8 )) -eq 6 ]; then
462471
# # Our signature would nearly fill the last 4K block and another error would get triggered
463472
# # (a tar file without proper EoA blocks is used by AVM, if in last 4K block only 1 or 0

0 commit comments

Comments
 (0)