OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a61d1f6
)
signrom.sh: portability fix
author
Christoph Egger
<Christoph.Egger@amd.com>
Fri, 17 Jul 2009 13:23:51 +0000
(15:23 +0200)
committer
Anthony Liguori
<aliguori@us.ibm.com>
Wed, 22 Jul 2009 15:58:49 +0000
(10:58 -0500)
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>
pc-bios/optionrom/signrom.sh
patch
|
blob
|
history
diff --git
a/pc-bios/optionrom/signrom.sh
b/pc-bios/optionrom/signrom.sh
index
263ba5f
..
4322811
100755
(executable)
--- 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 ))