diff options
author | Christoph Egger <Christoph.Egger@amd.com> | 2009-07-17 15:23:51 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-07-22 15:41:02 -0500 |
commit | 96046435baa8f43f247d2fb22222ca44e35a7f9f (patch) | |
tree | 643ea21fca8d1d6e62e69c96cc8dfd83c3372fbd /pc-bios | |
parent | ca95814efb88e29a5c33824b7dd1b3218ca22b9d (diff) |
signrom.sh: portability fix
Attached patch makes signrom.sh working on NetBSD.
The output of the 'od' command leads to a syntax error
which breaks the build.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'pc-bios')
-rwxr-xr-x | pc-bios/optionrom/signrom.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pc-bios/optionrom/signrom.sh b/pc-bios/optionrom/signrom.sh index 263ba5ffc9..4322811372 100755 --- a/pc-bios/optionrom/signrom.sh +++ b/pc-bios/optionrom/signrom.sh @@ -31,9 +31,10 @@ x=`dd if="$1" bs=1 count=1 skip=2 2>/dev/null | od -t u1 -A n` size=$(( $x * 512 - 1 )) # now get the checksum -for i in `od -A n -t u1 -v "$1"`; do +nums=`od -A n -t u1 -v "$1"` +for i in ${nums}; do # add each byte's value to sum - sum=$(( $sum + $i )) + sum=`expr $sum + $i` done sum=$(( $sum % 256 )) |