提交 99772ae2 编写于 作者: C Christoph Egger 提交者: Anthony Liguori

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: NChristoph Egger <Christoph.Egger@amd.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 a61d1f67
......@@ -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 ))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册