aboutsummaryrefslogtreecommitdiff
path: root/pc-bios
diff options
context:
space:
mode:
authorChristoph Egger <Christoph.Egger@amd.com>2009-07-17 15:23:51 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-07-22 10:58:49 -0500
commit99772ae20895e9c72e15f8bef89c60fadd7eb0da (patch)
treecc4e68c5a77b02ab46727198e45652c58ce67b12 /pc-bios
parenta61d1f6701a4a25428b2d4211c0740cfb7c54e8d (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-xpc-bios/optionrom/signrom.sh5
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 ))