From 99772ae20895e9c72e15f8bef89c60fadd7eb0da Mon Sep 17 00:00:00 2001 From: Christoph Egger Date: Fri, 17 Jul 2009 15:23:51 +0200 Subject: 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 Signed-off-by: Anthony Liguori --- pc-bios/optionrom/signrom.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pc-bios/optionrom') 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 )) -- cgit v1.2.3