3 # Set up environment at fisrt.
4 export BUILD_DIR
=$WORKSPACE/Build
/DuetPkg
/DEBUG_UNIXGCC
5 export BASETOOLS_DIR
=$WORKSPACE/Conf
/BaseToolsSource
/Source
/C
/bin
7 export PROCESS_MARK
=TRUE
16 echo "Usage: CreateBootDisk [usb|floppy|ide] MediaPath DevicePath [FAT12|FAT16|FAT32]"
17 echo "e.g. : CreateBootDisk floppy /media/floppy0 /dev/fd0 FAT12 "
21 export EFI_BOOT_MEDIA
=$2
22 export EFI_BOOT_DEVICE
=$3
24 if [ "$PROCESS_MARK" = TRUE
]
30 echo Start to create floppy boot disk ...
31 echo Format
$EFI_BOOT_MEDIA ...
33 umount
$EFI_BOOT_MEDIA
34 mkfs.msdos
$EFI_BOOT_DEVICE
35 mount
$EFI_BOOT_DEVICE $EFI_BOOT_MEDIA
36 echo Create boot sector ...
37 ## Linux version of GenBootSector has not pass build yet.
38 $BASETOOLS_DIR/GnuGenBootSector
-i $EFI_BOOT_DEVICE -o FDBs.com
39 $BASETOOLS_DIR/BootSectImage
-g FDBs.com
$BUILD_DIR/IA32
/DuetPkg
/BootSector
/BootSector
/OUTPUT
/bootsect.com
-f
40 $BASETOOLS_DIR/GnuGenBootSector
-o $EFI_BOOT_DEVICE -i $BUILD_DIR/IA32
/DuetPkg
/BootSector
/BootSector
/OUTPUT
/bootsect.com
42 cp $BUILD_DIR/FV
/Efildr
$EFI_BOOT_MEDIA
44 mkdir
-p $EFI_BOOT_MEDIA/efi
45 mkdir
-p $EFI_BOOT_MEDIA/efi
/boot
47 cp $WORKSPACE/EdkShellBinPkg
/Bin
/Ia32
/Shell.efi
$EFI_BOOT_MEDIA/efi
/boot
/bootia32.efi
51 echo "Wrong FAT type $4 for floppy!"
58 echo "Start to create file boot disk ..."
59 echo Create boot sector ...
61 ## Linux version of GenBootSector has not pass build yet.
62 $BASETOOLS_DIR/GnuGenBootSector
-i $EFI_BOOT_MEDIA -o FDBs.com
63 $BASETOOLS_DIR/BootSectImage
-g FDBs.com
$BUILD_DIR/IA32
/DuetPkg
/BootSector
/BootSector
/OUTPUT
/Bootsect.com
-f
64 $BASETOOLS_DIR/GnuGenBootSector
-o $EFI_BOOT_MEDIA -i $BUILD_DIR/IA32
/DuetPkg
/BootSector
/BootSector
/OUTPUT
/Bootsect.com
67 echo "Wrong FAT type" $4 "for floppy!"
77 cp $BUILD_DIR/FV
/Efildr16
$EFI_BOOT_MEDIA
78 mkdir
$EFI_BOOT_MEDIA/efi
/boot
79 cp $WORKSPACE/EdkShellBinPkg
/bin
/ia32
/Shell.efi
$EFI_BOOT_MEDIA/efi
/boot
/bootia32.efi
82 echo Format
$EFI_BOOT_DEVICE ...
84 echo Create boot sector ...
85 ## Linux version of GenBootSector & Bootsectimage has not pass build yet.
86 $BASETOOLS_DIR/GnuGenBootSector
-i $EFI_BOOT_DEVICE -o UsbBs16.com
87 $BASETOOLS_DIR/BootSectImage
-g UsbBs16.com
$BUILD_DIR/IA32
/DuetPkg
/BootSector
/BootSector
/OUTPUT
/Bs16.com
-f
88 $BASETOOLS_DIR/GnuGenBootSector
-o $EFI_BOOT_DEVICE -i $BUILD_DIR/IA32
/DuetPkg
/BootSector
/BootSector
/OUTPUT
/Bs16.com
89 $BASETOOLS_DIR/GnuGenBootSector
-m -o $EFI_BOOT_DEVICE -i $BUILD_DIR/IA32
/DuetPkg
/BootSector
/BootSector
/OUTPUT
/Mbr.com
91 echo PLEASE UNPLUG USB
, THEN PLUG IT AGAIN TO DO STEP2
!
97 cp $BUILD_DIR/FV
/Efildr20
$EFI_BOOT_MEDIA
98 mkdir
$EFI_BOOT_MEDIA/efi
/boot
99 cp $WORKSPACE/EdkShellBinPkg
/bin
/ia32
/Shell.efi
$EFI_BOOT_MEDIA/efi
/boot
/bootia32.efi
102 echo Format
$EFI_BOOT_DEVICE ...
104 echo Create boot sector ...
105 ## Linux version of GenBootSector & Bootsectimage has not pass build yet.
106 $BASETOOLS_DIR/GnuGenBootSector
-i $EFI_BOOT_DEVICE -o UsbBs32.com
107 $BASETOOLS_DIR/BootSectImage
-g UsbBs32.com
$BUILD_DIR/IA32
/DuetPkg
/BootSector
/BootSector
/OUTPUT
/Bs32.com
-f
108 $BASETOOLS_DIR/GnuGenBootSector
-o $EFI_BOOT_DEVICE -i $BUILD_DIR/IA32
/DuetPkg
/BootSector
/BootSector
/OUTPUT
/Bs32.com
109 $BASETOOLS_DIR/GnuGenBootSector
-m -o $EFI_BOOT_DEVICE -i $BUILD_DIR/IA32
/DuetPkg
/BootSector
/BootSector
/OUTPUT
/Mbr.com
111 echo PLEASE UNPLUG USB
, THEN PLUG IT AGAIN TO DO STEP2
!
114 echo "Wrong FAT type $1 for floppy!"
120 echo "Not support yet!"
123 echo "Arg1 should be [floppy | file | usb | ide] !"