The calls to grep in the script do not find the byte sequences in a UTF-8 locale as the zImage file gets treated as a text file in the current locale. A workaround is to run the script in the C (or POSIX) locale. A fix is to prepend LANG=C to the grep commands in the script.
Thank you for the feedback @ian-abbott! If you have a suggestion on how to incorporate this fix, please provide it via a pull request, or replying to this thread with a patch.
The calls to
grep
in the script do not find the byte sequences in a UTF-8 locale as the zImage file gets treated as a text file in the current locale. A workaround is to run the script in theC
(orPOSIX
) locale. A fix is to prependLANG=C
to thegrep
commands in the script.