Port-powerpc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: awk problem
Andreas, Frederick, thank you for your reply.
We should fix the script.
diff -u -r1.1 walnut-mkimg.sh
--- walnut-mkimg.sh 9 Dec 2002 12:15:50 -0000 1.1
+++ walnut-mkimg.sh 25 Mar 2004 15:07:16 -0000
@@ -19,15 +19,16 @@
${OBJCOPY} -O binary ${kernel} ${kernel}.bin.$$
size=`/bin/ls -l ${kernel}.bin.$$ | awk '{ printf "%d", ( $5 + 511 ) / 512 }'`
+# printf "\x00\x52\x50\x4f" > ${output}
+printf "\000\122\120\117" > ${output}
printf "%d\n%d\n0\n%d\n0\n0\n0\n" $start $size $start |
- awk 'BEGIN { printf "\x00\x52\x50\x4f" }
- {
+ awk '{
printf "%c", $0 / 256 / 256 / 256 ;
printf "%c", $0 / 256 / 256 ;
printf "%c", $0 / 256 ;
printf "%c", $0 ;
}
- ' > ${output}
+ ' >> ${output}
cat ${kernel}.bin.$$ >> ${output}
Home |
Main Index |
Thread Index |
Old Index