mirror of https://github.com/acidanthera/audk.git
Add a parameter for process boot disk create.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7933 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
4af947e5ca
commit
536c563dd9
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
# Set up environment at fisrt.
|
# Set up environment at fisrt.
|
||||||
export BASETOOLS_DIR=$WORKSPACE_TOOLS_PATH/Bin/Win32
|
export BUILD_DIR=$WORKSPACE/Build/DuetPkg/DEBUG_UNIXGCC
|
||||||
export BUILD_DIR=$WORKSPACE/Conf/BaseToolsSource/Source/C/bin
|
export BASETOOLS_DIR=$WORKSPACE/Conf/BaseToolsSource/Source/C/bin
|
||||||
export DISK_LABEL=DUET
|
export DISK_LABEL=DUET
|
||||||
|
|
||||||
if [ \
|
if [ \
|
||||||
|
@ -11,92 +11,101 @@ if [ \
|
||||||
"$*" = "--help" \
|
"$*" = "--help" \
|
||||||
]
|
]
|
||||||
then
|
then
|
||||||
echo "Usage: CreateBootDisk [usb|floppy|ide] DiskNumber [FAT12|FAT16|FAT32]"
|
echo "Usage: CreateBootDisk [usb|floppy|ide] MediaPath DevicePath [FAT12|FAT16|FAT32]"
|
||||||
|
echo "e.g. : CreateBootDisk floppy /media/floppy0 /dev/fd0 FAT12 "
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export EFI_BOOT_DISK=$2
|
export EFI_BOOT_MEDIA=$2
|
||||||
|
export EFI_BOOT_DEVICE=$3
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
floppy)
|
floppy)
|
||||||
if [ "$3" = FAT12 ]
|
if [ "$4" = FAT12 ]
|
||||||
then
|
then
|
||||||
echo Start to create floppy boot disk ...
|
echo Start to create floppy boot disk ...
|
||||||
echo Format $EFI_BOOT_DISK ...
|
echo Format $EFI_BOOT_MEDIA ...
|
||||||
## Do some format things , not done yet.
|
## Do some format things , not done yet.
|
||||||
echo Create boot sector ...
|
echo Create boot sector ...
|
||||||
## Linux version of GenBootSector has not pass build yet.
|
## Linux version of GenBootSector has not pass build yet.
|
||||||
$BASETOOLS_DIR/Genbootsector -i $EFI_BOOT_DISK -o FDBs.com
|
$BASETOOLS_DIR/GnuGenBootSector -i $EFI_BOOT_DEVICE -o FDBs.com
|
||||||
$BASETOOLS_DIR/Bootsectimage -g FDBs.com $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Bootsect.com -f
|
echo aaa
|
||||||
$BASETOOLS_DIR/Genbootsector -o $EFI_BOOT_DISK -i $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Bootsect.com
|
$BASETOOLS_DIR/BootSectImage -g FDBs.com $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/bootsect.com -f
|
||||||
|
echo bbb
|
||||||
|
$BASETOOLS_DIR/GnuGenBootSector -o $EFI_BOOT_DEVICE -i $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/bootsect.com
|
||||||
|
echo ccc
|
||||||
|
|
||||||
cp $BUILD_DIR/FV/EfiLdr $EFI_BOOT_DISK
|
cp $BUILD_DIR/FV/Efildr $EFI_BOOT_MEDIA
|
||||||
cat $WORKSPACE/EdkShellBinPkg/bin/ia32/Shell.efi > $EFI_BOOT_DISK/efi/boot/bootia32.efi
|
|
||||||
|
mkdir -p $EFI_BOOT_MEDIA/efi
|
||||||
|
mkdir -p $EFI_BOOT_MEDIA/efi/boot
|
||||||
|
|
||||||
|
cp $WORKSPACE/EdkShellBinPkg/Bin/Ia32/Shell.efi $EFI_BOOT_MEDIA/efi/boot/bootia32.efi
|
||||||
|
|
||||||
echo Done.
|
echo Done.
|
||||||
else
|
else
|
||||||
echo "Wrong FAT type $3 for floppy!"
|
echo "Wrong FAT type $4 for floppy!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
file) # CreateFile
|
file) # CreateFile
|
||||||
if [ "$3" = FAT12 ]
|
if [ "$4" = FAT12 ]
|
||||||
then
|
then
|
||||||
echo "Start to create file boot disk ..."
|
echo "Start to create file boot disk ..."
|
||||||
echo Create boot sector ...
|
echo Create boot sector ...
|
||||||
|
|
||||||
## Linux version of GenBootSector has not pass build yet.
|
## Linux version of GenBootSector has not pass build yet.
|
||||||
$BASETOOLS_DIR/Genbootsector -i $EFI_BOOT_DISK -o FDBs.com
|
$BASETOOLS_DIR/GnuGenBootSector -i $EFI_BOOT_MEDIA -o FDBs.com
|
||||||
$BASETOOLS_DIR/Bootsectimage -g FDBs.com $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Bootsect.com -f
|
$BASETOOLS_DIR/BootSectImage -g FDBs.com $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Bootsect.com -f
|
||||||
$BASETOOLS_DIR/Genbootsector -o $EFI_BOOT_DISK -i $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Bootsect.com
|
$BASETOOLS_DIR/GnuGenBootSector -o $EFI_BOOT_MEDIA -i $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Bootsect.com
|
||||||
echo Done.
|
echo Done.
|
||||||
else
|
else
|
||||||
echo "Wrong FAT type" $3 "for floppy!"
|
echo "Wrong FAT type" $4 "for floppy!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
usb) # CreateUsb
|
usb) # CreateUsb
|
||||||
|
|
||||||
if [ "$3" = FAT16 ]
|
if [ "$4" = FAT16 ]
|
||||||
then
|
then
|
||||||
if [ "$4" = step2 ]
|
if [ "$5" = step2 ]
|
||||||
then
|
then
|
||||||
cp $BUILD_DIR/FV/EfiLdr16 $EFI_BOOT_DISK
|
cp $BUILD_DIR/FV/Efildr16 $EFI_BOOT_MEDIA
|
||||||
mkdir $EFI_BOOT_DISK/efi/boot
|
mkdir $EFI_BOOT_MEDIA/efi/boot
|
||||||
cp $WORKSPACE/EdkShellBinPkg/bin/ia32/Shell.efi $EFI_BOOT_DISK/efi/boot/bootia32.efi
|
cp $WORKSPACE/EdkShellBinPkg/bin/ia32/Shell.efi $EFI_BOOT_MEDIA/efi/boot/bootia32.efi
|
||||||
echo "step2 Done!"
|
echo "step2 Done!"
|
||||||
else
|
else
|
||||||
echo Format $EFI_BOOT_DISK ...
|
echo Format $EFI_BOOT_DEVICE ...
|
||||||
#Do format command.
|
#Do format command.
|
||||||
echo Create boot sector ...
|
echo Create boot sector ...
|
||||||
## Linux version of GenBootSector & Bootsectimage has not pass build yet.
|
## Linux version of GenBootSector & Bootsectimage has not pass build yet.
|
||||||
$BASETOOLS_DIR/Genbootsector -i $EFI_BOOT_DISK -o UsbBs16.com
|
$BASETOOLS_DIR/GnuGenBootSector -i $EFI_BOOT_DEVICE -o UsbBs16.com
|
||||||
$BASETOOLS_DIR/Bootsectimage -g UsbBs16.com $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Bs16.com -f
|
$BASETOOLS_DIR/BootSectImage -g UsbBs16.com $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Bs16.com -f
|
||||||
$BASETOOLS_DIR/Genbootsector -o $EFI_BOOT_DISK -i $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Bs16.com
|
$BASETOOLS_DIR/GnuGenBootSector -o $EFI_BOOT_DEVICE -i $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Bs16.com
|
||||||
$BASETOOLS_DIR/Genbootsector -m -o $EFI_BOOT_DISK -i $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Mbr.com
|
$BASETOOLS_DIR/GnuGenBootSector -m -o $EFI_BOOT_DEVICE -i $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Mbr.com
|
||||||
echo Done.
|
echo Done.
|
||||||
echo PLEASE UNPLUG USB, THEN PLUG IT AGAIN TO DO STEP2!
|
echo PLEASE UNPLUG USB, THEN PLUG IT AGAIN TO DO STEP2!
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
elif [ "$3" = FAT32 ]
|
elif [ "$4" = FAT32 ]
|
||||||
then
|
then
|
||||||
if [ "$4" = step2 ]
|
if [ "$5" = step2 ]
|
||||||
then
|
then
|
||||||
cp $BUILD_DIR/FV/EfiLdr20 $EFI_BOOT_DISK
|
cp $BUILD_DIR/FV/Efildr20 $EFI_BOOT_MEDIA
|
||||||
mkdir $EFI_BOOT_DISK/efi/boot
|
mkdir $EFI_BOOT_MEDIA/efi/boot
|
||||||
cp $WORKSPACE/EdkShellBinPkg/bin/ia32/Shell.efi $EFI_BOOT_DISK/efi/boot/bootia32.efi
|
cp $WORKSPACE/EdkShellBinPkg/bin/ia32/Shell.efi $EFI_BOOT_MEDIA/efi/boot/bootia32.efi
|
||||||
echo "step2 Done!"
|
echo "step2 Done!"
|
||||||
else
|
else
|
||||||
echo Format $EFI_BOOT_DISK ...
|
echo Format $EFI_BOOT_DEVICE ...
|
||||||
#Do format command.
|
#Do format command.
|
||||||
echo Create boot sector ...
|
echo Create boot sector ...
|
||||||
## Linux version of GenBootSector & Bootsectimage has not pass build yet.
|
## Linux version of GenBootSector & Bootsectimage has not pass build yet.
|
||||||
$BASETOOLS_DIR/Genbootsector -i $EFI_BOOT_DISK -o UsbBs32.com
|
$BASETOOLS_DIR/GnuGenBootSector -i $EFI_BOOT_DEVICE -o UsbBs32.com
|
||||||
$BASETOOLS_DIR/Bootsectimage -g UsbBs32.com $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Bs32.com -f
|
$BASETOOLS_DIR/BootSectImage -g UsbBs32.com $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Bs32.com -f
|
||||||
$BASETOOLS_DIR/Genbootsector -o $EFI_BOOT_DISK -i $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Bs32.com
|
$BASETOOLS_DIR/GnuGenBootSector -o $EFI_BOOT_DEVICE -i $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Bs32.com
|
||||||
$BASETOOLS_DIR/Genbootsector -m -o $EFI_BOOT_DISK -i $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Mbr.com
|
$BASETOOLS_DIR/GnuGenBootSector -m -o $EFI_BOOT_DEVICE -i $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Mbr.com
|
||||||
echo Done.
|
echo Done.
|
||||||
echo PLEASE UNPLUG USB, THEN PLUG IT AGAIN TO DO STEP2!
|
echo PLEASE UNPLUG USB, THEN PLUG IT AGAIN TO DO STEP2!
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -116,36 +125,3 @@ case "$1" in
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue