2 # Copyright (C) 2009 yajin (yajin@vm-kernel.org)
4 # pad the BIOS image of gdium to 512K bytes
7 # gdium_bios_pad.sh <original_bios_image> <output_bios_image> <output_bios_size>
11 if [ ! -r "$1" ]; then
12 echo "Usage: $0 <original_bios_image> <output_bios_image> <output_bios_size>"
16 original_bios_image
=$1
19 bios_kbs
=$
[$bios_image_len/1024]
23 echo $bios_image_name" exist.Delete it first!"
24 rm -rf $bios_image_name
27 echo -en \\0377\\0377\\0377\\0377\\0377\\0377\\0377\\0377 > .8b
30 cat .32b
.32b
.32b
.32b
>.128b
31 cat .128b
.128b
.128b
.128b
>.512b
32 cat .512b
.512b
>.1024b
35 while [ $i -lt $bios_kbs ]
37 cat .1024b
>>$bios_image_name
41 dd if=$original_bios_image of
=$bios_image_name conv
=notrunc seek
=0
42 rm .8b
.16b
.32b
.128b
.512b
.1024b