summaryrefslogtreecommitdiff
path: root/edk2
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-22 03:01:53 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-22 03:01:53 +0000
commit299e9020830b80f3902a622eecfcff63261d5e08 (patch)
treef4e123df9e2c5b5a80fab99d9691548185595359 /edk2
parentbed6ccf7e200ca25cfc41547c0689b4ce0138f9f (diff)
This patch includes:
1) Use the binaries of boot sector directly instead of building it. Because the code of boot sector will be modified rarely and it is native code. 2) Correct the shell binary file path which is changed by recently. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk@8620 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'edk2')
-rw-r--r--edk2/DuetPkg/BootSector/bin/Gpt.combin0 -> 512 bytes
-rw-r--r--edk2/DuetPkg/BootSector/bin/Mbr.combin0 -> 512 bytes
-rw-r--r--edk2/DuetPkg/BootSector/bin/Readme.txt8
-rw-r--r--edk2/DuetPkg/BootSector/bin/St16_64.combin0 -> 4096 bytes
-rw-r--r--edk2/DuetPkg/BootSector/bin/St32_64.combin0 -> 4096 bytes
-rw-r--r--edk2/DuetPkg/BootSector/bin/Start.combin0 -> 4096 bytes
-rw-r--r--edk2/DuetPkg/BootSector/bin/Start16.combin0 -> 4096 bytes
-rw-r--r--edk2/DuetPkg/BootSector/bin/Start32.combin0 -> 4096 bytes
-rw-r--r--edk2/DuetPkg/BootSector/bin/Start64.combin0 -> 4096 bytes
-rw-r--r--edk2/DuetPkg/BootSector/bin/bootsect.combin0 -> 512 bytes
-rw-r--r--edk2/DuetPkg/BootSector/bin/bs16.combin0 -> 512 bytes
-rw-r--r--edk2/DuetPkg/BootSector/bin/bs32.combin0 -> 512 bytes
-rw-r--r--edk2/DuetPkg/BootSector/bin/efi32.combin0 -> 139264 bytes
-rw-r--r--edk2/DuetPkg/BootSector/bin/efi32.com2bin0 -> 4096 bytes
-rw-r--r--edk2/DuetPkg/BootSector/bin/efi64.combin0 -> 139264 bytes
-rw-r--r--edk2/DuetPkg/BootSector/bin/efi64.com2bin0 -> 4096 bytes
-rw-r--r--edk2/DuetPkg/CreateBootDisk.bat27
-rw-r--r--edk2/DuetPkg/CreateBootDisk.sh27
-rw-r--r--edk2/DuetPkg/DuetPkg.dsc3
-rw-r--r--edk2/DuetPkg/PostBuild.bat16
-rw-r--r--edk2/DuetPkg/PostBuild.sh26
21 files changed, 56 insertions, 51 deletions
diff --git a/edk2/DuetPkg/BootSector/bin/Gpt.com b/edk2/DuetPkg/BootSector/bin/Gpt.com
new file mode 100644
index 000000000..f055fd742
--- /dev/null
+++ b/edk2/DuetPkg/BootSector/bin/Gpt.com
Binary files differ
diff --git a/edk2/DuetPkg/BootSector/bin/Mbr.com b/edk2/DuetPkg/BootSector/bin/Mbr.com
new file mode 100644
index 000000000..ca292a011
--- /dev/null
+++ b/edk2/DuetPkg/BootSector/bin/Mbr.com
Binary files differ
diff --git a/edk2/DuetPkg/BootSector/bin/Readme.txt b/edk2/DuetPkg/BootSector/bin/Readme.txt
new file mode 100644
index 000000000..55dd8cd66
--- /dev/null
+++ b/edk2/DuetPkg/BootSector/bin/Readme.txt
@@ -0,0 +1,8 @@
+These binaries are used to make the bootable floppy or usb disk.
+The binaries of boot sector are built from DuetPkg\Bootsector\BootSector.inf at r8617 with following steps:
+1) enter edk2 workspace directory from command line windows.
+2) run "edksetup.bat"
+3) run "build -p DuetPkg/DuetPkg.dsc -a IA32 -m DuetPkg/BootSector/BootSector.inf"
+
+
+
diff --git a/edk2/DuetPkg/BootSector/bin/St16_64.com b/edk2/DuetPkg/BootSector/bin/St16_64.com
new file mode 100644
index 000000000..dbb4a9af7
--- /dev/null
+++ b/edk2/DuetPkg/BootSector/bin/St16_64.com
Binary files differ
diff --git a/edk2/DuetPkg/BootSector/bin/St32_64.com b/edk2/DuetPkg/BootSector/bin/St32_64.com
new file mode 100644
index 000000000..68b6c76ea
--- /dev/null
+++ b/edk2/DuetPkg/BootSector/bin/St32_64.com
Binary files differ
diff --git a/edk2/DuetPkg/BootSector/bin/Start.com b/edk2/DuetPkg/BootSector/bin/Start.com
new file mode 100644
index 000000000..adc5a3d0c
--- /dev/null
+++ b/edk2/DuetPkg/BootSector/bin/Start.com
Binary files differ
diff --git a/edk2/DuetPkg/BootSector/bin/Start16.com b/edk2/DuetPkg/BootSector/bin/Start16.com
new file mode 100644
index 000000000..34e5dca6d
--- /dev/null
+++ b/edk2/DuetPkg/BootSector/bin/Start16.com
Binary files differ
diff --git a/edk2/DuetPkg/BootSector/bin/Start32.com b/edk2/DuetPkg/BootSector/bin/Start32.com
new file mode 100644
index 000000000..47f2f5d43
--- /dev/null
+++ b/edk2/DuetPkg/BootSector/bin/Start32.com
Binary files differ
diff --git a/edk2/DuetPkg/BootSector/bin/Start64.com b/edk2/DuetPkg/BootSector/bin/Start64.com
new file mode 100644
index 000000000..326e3fec3
--- /dev/null
+++ b/edk2/DuetPkg/BootSector/bin/Start64.com
Binary files differ
diff --git a/edk2/DuetPkg/BootSector/bin/bootsect.com b/edk2/DuetPkg/BootSector/bin/bootsect.com
new file mode 100644
index 000000000..079978e79
--- /dev/null
+++ b/edk2/DuetPkg/BootSector/bin/bootsect.com
Binary files differ
diff --git a/edk2/DuetPkg/BootSector/bin/bs16.com b/edk2/DuetPkg/BootSector/bin/bs16.com
new file mode 100644
index 000000000..be40ba817
--- /dev/null
+++ b/edk2/DuetPkg/BootSector/bin/bs16.com
Binary files differ
diff --git a/edk2/DuetPkg/BootSector/bin/bs32.com b/edk2/DuetPkg/BootSector/bin/bs32.com
new file mode 100644
index 000000000..0255c82e8
--- /dev/null
+++ b/edk2/DuetPkg/BootSector/bin/bs32.com
Binary files differ
diff --git a/edk2/DuetPkg/BootSector/bin/efi32.com b/edk2/DuetPkg/BootSector/bin/efi32.com
new file mode 100644
index 000000000..7c982e0ba
--- /dev/null
+++ b/edk2/DuetPkg/BootSector/bin/efi32.com
Binary files differ
diff --git a/edk2/DuetPkg/BootSector/bin/efi32.com2 b/edk2/DuetPkg/BootSector/bin/efi32.com2
new file mode 100644
index 000000000..d4bae935c
--- /dev/null
+++ b/edk2/DuetPkg/BootSector/bin/efi32.com2
Binary files differ
diff --git a/edk2/DuetPkg/BootSector/bin/efi64.com b/edk2/DuetPkg/BootSector/bin/efi64.com
new file mode 100644
index 000000000..e53413238
--- /dev/null
+++ b/edk2/DuetPkg/BootSector/bin/efi64.com
Binary files differ
diff --git a/edk2/DuetPkg/BootSector/bin/efi64.com2 b/edk2/DuetPkg/BootSector/bin/efi64.com2
new file mode 100644
index 000000000..689f4ab4a
--- /dev/null
+++ b/edk2/DuetPkg/BootSector/bin/efi64.com2
Binary files differ
diff --git a/edk2/DuetPkg/CreateBootDisk.bat b/edk2/DuetPkg/CreateBootDisk.bat
index 3e5272030..2272a11dc 100644
--- a/edk2/DuetPkg/CreateBootDisk.bat
+++ b/edk2/DuetPkg/CreateBootDisk.bat
@@ -4,6 +4,7 @@
@set BASETOOLS_DIR=%WORKSPACE_TOOLS_PATH%\Bin\Win32
@set BUILD_DIR=%WORKSPACE%\Build\DuetPkg\DEBUG_MYTOOLS
+@set BOOTSECTOR_BIN_DIR=%WORKSPACE%\DuetPkg\BootSector\bin
@set DISK_LABEL=DUET
@echo on
@@ -28,13 +29,13 @@ goto Help
@del FormatCommandInput.txt
@echo Create boot sector ...
%BASETOOLS_DIR%\Genbootsector.exe -i %EFI_BOOT_DISK% -o FDBs.com
-%BASETOOLS_DIR%\Bootsectimage.exe -g FDBs.com %BUILD_DIR%\IA32\DuetPkg\BootSector\BootSector\OUTPUT\Bootsect.com -f
+%BASETOOLS_DIR%\Bootsectimage.exe -g FDBs.com %BOOTSECTOR_BIN_DIR%\Bootsect.com -f
@REM @del FDBS.com
-%BASETOOLS_DIR%\Genbootsector.exe -o %EFI_BOOT_DISK% -i %BUILD_DIR%\IA32\DuetPkg\BootSector\BootSector\OUTPUT\Bootsect.com
+%BASETOOLS_DIR%\Genbootsector.exe -o %EFI_BOOT_DISK% -i %BOOTSECTOR_BIN_DIR%\Bootsect.com
@echo Done.
copy %BUILD_DIR%\FV\EfiLdr %EFI_BOOT_DISK%
mkdir %EFI_BOOT_DISK%\efi\boot
-copy %WORKSPACE%\EdkShellBinPkg\bin\ia32\Shell.efi %EFI_BOOT_DISK%\efi\boot\bootia32.efi /y
+copy %WORKSPACE%\EdkShellBinPkg\MinimumShell\ia32\Shell.efi %EFI_BOOT_DISK%\efi\boot\bootia32.efi /y
@goto end
:CreateFile
@@ -42,9 +43,9 @@ copy %WORKSPACE%\EdkShellBinPkg\bin\ia32\Shell.efi %EFI_BOOT_DISK%\efi\boot\boot
@echo Start to create file boot disk ...
@echo Create boot sector ...
%BASETOOLS_DIR%\Genbootsector.exe -i %EFI_BOOT_DISK% -o FDBs.com
-%BASETOOLS_DIR%\Bootsectimage.exe -g FDBs.com %BUILD_DIR%\IA32\DuetPkg\BootSector\BootSector\OUTPUT\Bootsect.com -f
+%BASETOOLS_DIR%\Bootsectimage.exe -g FDBs.com %BOOTSECTOR_BIN_DIR%\Bootsect.com -f
@REM @del FDBS.com
-%BASETOOLS_DIR%\Genbootsector.exe -o %EFI_BOOT_DISK% -i %BUILD_DIR%\IA32\DuetPkg\BootSector\BootSector\OUTPUT\Bootsect.com
+%BASETOOLS_DIR%\Genbootsector.exe -o %EFI_BOOT_DISK% -i %BOOTSECTOR_BIN_DIR%\Bootsect.com
@echo Done.
@goto end
@@ -62,9 +63,9 @@ copy %WORKSPACE%\EdkShellBinPkg\bin\ia32\Shell.efi %EFI_BOOT_DISK%\efi\boot\boot
@del FormatCommandInput.txt
@echo Create boot sector ...
@%BASETOOLS_DIR%\Genbootsector.exe -i %EFI_BOOT_DISK% -o UsbBs16.com
-@%BASETOOLS_DIR%\Bootsectimage.exe -g UsbBs16.com %BUILD_DIR%\IA32\DuetPkg\BootSector\BootSector\OUTPUT\Bs16.com -f
-@%BASETOOLS_DIR%\Genbootsector.exe -o %EFI_BOOT_DISK% -i %BUILD_DIR%\IA32\DuetPkg\BootSector\BootSector\OUTPUT\Bs16.com
-@%BASETOOLS_DIR%\Genbootsector.exe -m -o %EFI_BOOT_DISK% -i %BUILD_DIR%\IA32\DuetPkg\BootSector\BootSector\OUTPUT\Mbr.com
+@%BASETOOLS_DIR%\Bootsectimage.exe -g UsbBs16.com %BOOTSECTOR_BIN_DIR%\Bs16.com -f
+@%BASETOOLS_DIR%\Genbootsector.exe -o %EFI_BOOT_DISK% -i %BOOTSECTOR_BIN_DIR%\Bs16.com
+@%BASETOOLS_DIR%\Genbootsector.exe -m -o %EFI_BOOT_DISK% -i %BOOTSECTOR_BIN_DIR%\Mbr.com
@echo Done.
@echo PLEASE UNPLUG USB, THEN PLUG IT AGAIN!
@goto end
@@ -72,7 +73,7 @@ copy %WORKSPACE%\EdkShellBinPkg\bin\ia32\Shell.efi %EFI_BOOT_DISK%\efi\boot\boot
:CreateUsb_FAT16_step2
@copy %BUILD_DIR%\FV\EfiLdr16 %EFI_BOOT_DISK%
@mkdir %EFI_BOOT_DISK%\efi\boot
-@copy %WORKSPACE%\EdkShellBinPkg\bin\ia32\Shell.efi %EFI_BOOT_DISK%\efi\boot\bootia32.efi /y
+copy %WORKSPACE%\EdkShellBinPkg\MinimumShell\Ia32\Shell.efi %EFI_BOOT_DISK%\efi\boot\bootia32.efi /y
@goto end
:CreateUsb_FAT32
@@ -83,10 +84,10 @@ copy %WORKSPACE%\EdkShellBinPkg\bin\ia32\Shell.efi %EFI_BOOT_DISK%\efi\boot\boot
@del FormatCommandInput.txt
@echo Create boot sector ...
@%BASETOOLS_DIR%\Genbootsector.exe -i %EFI_BOOT_DISK% -o UsbBs32.com
-@%BASETOOLS_DIR%\Bootsectimage.exe -g UsbBs32.com %BUILD_DIR%\IA32\DuetPkg\BootSector\BootSector\OUTPUT\Bs32.com -f
+@%BASETOOLS_DIR%\Bootsectimage.exe -g UsbBs32.com %BOOTSECTOR_BIN_DIR%\Bs32.com -f
@del UsbBs32.com
-@%BASETOOLS_DIR%\Genbootsector.exe -o %EFI_BOOT_DISK% -i %BUILD_DIR%\IA32\DuetPkg\BootSector\BootSector\OUTPUT\Bs32.com
-@%BASETOOLS_DIR%\Genbootsector.exe -m -o %EFI_BOOT_DISK% -i %BUILD_DIR%\IA32\DuetPkg\BootSector\BootSector\OUTPUT\Mbr.com
+@%BASETOOLS_DIR%\Genbootsector.exe -o %EFI_BOOT_DISK% -i %BOOTSECTOR_BIN_DIR%\Bs32.com
+@%BASETOOLS_DIR%\Genbootsector.exe -m -o %EFI_BOOT_DISK% -i %BOOTSECTOR_BIN_DIR%\Mbr.com
@echo Done.
@echo PLEASE UNPLUG USB, THEN PLUG IT AGAIN!
@goto end
@@ -94,7 +95,7 @@ copy %WORKSPACE%\EdkShellBinPkg\bin\ia32\Shell.efi %EFI_BOOT_DISK%\efi\boot\boot
:CreateUsb_FAT32_step2
@copy %BUILD_DIR%\FV\EfiLdr20 %EFI_BOOT_DISK%
@mkdir %EFI_BOOT_DISK%\efi\boot
-@copy %WORKSPACE%\EdkShellBinPkg\bin\ia32\Shell.efi %EFI_BOOT_DISK%\efi\boot\bootia32.efi /y
+@copy %WORKSPACE%\EdkShellBinPkg\MinimumShell\ia32\Shell.efi %EFI_BOOT_DISK%\efi\boot\bootia32.efi /y
@goto end
:CreateIde
diff --git a/edk2/DuetPkg/CreateBootDisk.sh b/edk2/DuetPkg/CreateBootDisk.sh
index 69c66f335..fb54a31b0 100644
--- a/edk2/DuetPkg/CreateBootDisk.sh
+++ b/edk2/DuetPkg/CreateBootDisk.sh
@@ -3,6 +3,7 @@
# Set up environment at fisrt.
export BUILD_DIR=$WORKSPACE/Build/DuetPkg/DEBUG_UNIXGCC
export BASETOOLS_DIR=$WORKSPACE/Conf/BaseToolsSource/Source/C/bin
+export BOOTSECTOR_BIN_DIR=$WORKSPACE/DuetPkg/BootSector/bin
export DISK_LABEL=DUET
export PROCESS_MARK=TRUE
@@ -36,15 +37,15 @@ then
echo Create boot sector ...
## Linux version of GenBootSector has not pass build yet.
$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
- $BASETOOLS_DIR/GnuGenBootSector -o $EFI_BOOT_DEVICE -i $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/bootsect.com
+ $BASETOOLS_DIR/BootSectImage -g FDBs.com $BOOTSECTOR_BIN_DIR/bootsect.com -f
+ $BASETOOLS_DIR/GnuGenBootSector -o $EFI_BOOT_DEVICE -i $BOOTSECTOR_BIN_DIR/bootsect.com
cp $BUILD_DIR/FV/Efildr $EFI_BOOT_MEDIA
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
+ cp $WORKSPACE/EdkShellBinPkg/MinimumShell/Ia32/Shell.efi $EFI_BOOT_MEDIA/efi/boot/bootia32.efi
echo Done.
else
@@ -60,8 +61,8 @@ then
## Linux version of GenBootSector has not pass build yet.
$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/GnuGenBootSector -o $EFI_BOOT_MEDIA -i $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Bootsect.com
+ $BASETOOLS_DIR/BootSectImage -g FDBs.com $BOOTSECTOR_BIN_DIR/bootsect.com -f
+ $BASETOOLS_DIR/GnuGenBootSector -o $EFI_BOOT_MEDIA -i $BOOTSECTOR_BIN_DIR/bootsect.com
echo Done.
else
echo "Wrong FAT type" $4 "for floppy!"
@@ -76,7 +77,7 @@ then
then
cp $BUILD_DIR/FV/Efildr16 $EFI_BOOT_MEDIA
mkdir $EFI_BOOT_MEDIA/efi/boot
- cp $WORKSPACE/EdkShellBinPkg/bin/ia32/Shell.efi $EFI_BOOT_MEDIA/efi/boot/bootia32.efi
+ cp $WORKSPACE/EdkShellBinPkg/MinimumShell/ia32/Shell.efi $EFI_BOOT_MEDIA/efi/boot/bootia32.efi
echo "step2 Done!"
else
echo Format $EFI_BOOT_DEVICE ...
@@ -84,9 +85,9 @@ then
echo Create boot sector ...
## Linux version of GenBootSector & Bootsectimage has not pass build yet.
$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/GnuGenBootSector -o $EFI_BOOT_DEVICE -i $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Bs16.com
- $BASETOOLS_DIR/GnuGenBootSector -m -o $EFI_BOOT_DEVICE -i $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Mbr.com
+ $BASETOOLS_DIR/BootSectImage -g UsbBs16.com $BOOTSECTOR_BIN_DIR/bs16.com -f
+ $BASETOOLS_DIR/GnuGenBootSector -o $EFI_BOOT_DEVICE -i $BOOTSECTOR_BIN_DIR/bs16.com
+ $BASETOOLS_DIR/GnuGenBootSector -m -o $EFI_BOOT_DEVICE -i $BOOTSECTOR_BIN_DIR/Mbr.com
echo Done.
echo PLEASE UNPLUG USB, THEN PLUG IT AGAIN TO DO STEP2!
fi
@@ -96,7 +97,7 @@ then
then
cp $BUILD_DIR/FV/Efildr20 $EFI_BOOT_MEDIA
mkdir $EFI_BOOT_MEDIA/efi/boot
- cp $WORKSPACE/EdkShellBinPkg/bin/ia32/Shell.efi $EFI_BOOT_MEDIA/efi/boot/bootia32.efi
+ cp $WORKSPACE/EdkShellBinPkg/MinimumShell/ia32/Shell.efi $EFI_BOOT_MEDIA/efi/boot/bootia32.efi
echo "step2 Done!"
else
echo Format $EFI_BOOT_DEVICE ...
@@ -104,9 +105,9 @@ then
echo Create boot sector ...
## Linux version of GenBootSector & Bootsectimage has not pass build yet.
$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/GnuGenBootSector -o $EFI_BOOT_DEVICE -i $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Bs32.com
- $BASETOOLS_DIR/GnuGenBootSector -m -o $EFI_BOOT_DEVICE -i $BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT/Mbr.com
+ $BASETOOLS_DIR/BootSectImage -g UsbBs32.com $BOOTSECTOR_BIN_DIR/bs32.com -f
+ $BASETOOLS_DIR/GnuGenBootSector -o $EFI_BOOT_DEVICE -i $BOOTSECTOR_BIN_DIR/bs32.com
+ $BASETOOLS_DIR/GnuGenBootSector -m -o $EFI_BOOT_DEVICE -i $BOOTSECTOR_BIN_DIR/Mbr.com
echo Done.
echo PLEASE UNPLUG USB, THEN PLUG IT AGAIN TO DO STEP2!
fi
diff --git a/edk2/DuetPkg/DuetPkg.dsc b/edk2/DuetPkg/DuetPkg.dsc
index 08b40b74f..45f99cfb4 100644
--- a/edk2/DuetPkg/DuetPkg.dsc
+++ b/edk2/DuetPkg/DuetPkg.dsc
@@ -184,9 +184,6 @@
# Sample Application
#
MdeModulePkg/Application/HelloWorld/HelloWorld.inf
-
-[Components.IA32]
- DuetPkg/BootSector/BootSector.inf
[BuildOptions.common]
MSFT:*_*_*_CC_FLAGS = /FAsc /FR$(@R).SBR
diff --git a/edk2/DuetPkg/PostBuild.bat b/edk2/DuetPkg/PostBuild.bat
index 8ed7943e2..43f7de946 100644
--- a/edk2/DuetPkg/PostBuild.bat
+++ b/edk2/DuetPkg/PostBuild.bat
@@ -6,6 +6,7 @@
@set BUILD_DIR=%WORKSPACE%\Build\DuetPkg\DEBUG_MYTOOLS
@set BASETOOLS_DIR=%WORKSPACE_TOOLS_PATH%\Bin\Win32
+@set BOOTSECTOR_BIN_DIR=%WORKSPACE%\DuetPkg\BootSector\bin
@set PROCESSOR=""
@if "%1"=="" goto NoArch
@@ -13,9 +14,6 @@
@if "%1"=="X64" set PROCESSOR=X64
@if %PROCESSOR%=="" goto WrongArch
-@set OUTPUT_DIR=%BUILD_DIR%\%PROCESSOR%\DuetPkg\BootSector\BootSector\OUTPUT
-@set BOOTSECTOR_OUTPUT_DIR=%BUILD_DIR%\IA32\DuetPkg\BootSector\BootSector\OUTPUT
-
@echo Compressing DUETEFIMainFv.FV ...
@%BASETOOLS_DIR%\LzmaCompress -e -o %BUILD_DIR%\FV\DUETEFIMAINFV.z %BUILD_DIR%\FV\DUETEFIMAINFV.Fv
@@ -31,18 +29,18 @@
:GENERATE_IMAGE_IA32
@%BASETOOLS_DIR%\EfiLdrImage.exe -o %BUILD_DIR%\FV\Efildr32 %BUILD_DIR%\%PROCESSOR%\EfiLoader.efi %BUILD_DIR%\FV\DxeIpl.z %BUILD_DIR%\FV\DxeMain.z %BUILD_DIR%\FV\DUETEFIMAINFV.z
-@copy /b %OUTPUT_DIR%\Start.com+%OUTPUT_DIR%\Efi32.com2+%BUILD_DIR%\FV\Efildr32 %BUILD_DIR%\FV\Efildr
-@copy /b %OUTPUT_DIR%\Start16.com+%OUTPUT_DIR%\Efi32.com2+%BUILD_DIR%\FV\Efildr32 %BUILD_DIR%\FV\Efildr16
-@copy /b %OUTPUT_DIR%\Start32.com+%OUTPUT_DIR%\Efi32.com2+%BUILD_DIR%\FV\Efildr32 %BUILD_DIR%\FV\Efildr20
+@copy /b %BOOTSECTOR_BIN_DIR%\Start.com+%BOOTSECTOR_BIN_DIR%\Efi32.com2+%BUILD_DIR%\FV\Efildr32 %BUILD_DIR%\FV\Efildr
+@copy /b %BOOTSECTOR_BIN_DIR%\Start16.com+%BOOTSECTOR_BIN_DIR%\Efi32.com2+%BUILD_DIR%\FV\Efildr32 %BUILD_DIR%\FV\Efildr16
+@copy /b %BOOTSECTOR_BIN_DIR%\Start32.com+%BOOTSECTOR_BIN_DIR%\Efi32.com2+%BUILD_DIR%\FV\Efildr32 %BUILD_DIR%\FV\Efildr20
@goto end
:GENERATE_IMAGE_X64
@%BASETOOLS_DIR%\EfiLdrImage.exe -o %BUILD_DIR%\FV\Efildr64 %BUILD_DIR%\%PROCESSOR%\EfiLoader.efi %BUILD_DIR%\FV\DxeIpl.z %BUILD_DIR%\FV\DxeMain.z %BUILD_DIR%\FV\DUETEFIMAINFV.z
-@copy /b %BOOTSECTOR_OUTPUT_DIR%\Start64.com+%BOOTSECTOR_OUTPUT_DIR%\Efi64.com2+%BUILD_DIR%\FV\Efildr64 %BUILD_DIR%\FV\EfildrPure
+@copy /b %BOOTSECTOR_BIN_DIR%\Start64.com+%BOOTSECTOR_BIN_DIR%\Efi64.com2+%BUILD_DIR%\FV\Efildr64 %BUILD_DIR%\FV\EfildrPure
@%BASETOOLS_DIR%\GenPage.exe %BUILD_DIR%\FV\EfildrPure -o %BUILD_DIR%\FV\Efildr
-@copy /b %BOOTSECTOR_OUTPUT_DIR%\St16_64.com+%BOOTSECTOR_OUTPUT_DIR%\Efi64.com2+%BUILD_DIR%\FV\Efildr64 %BUILD_DIR%\FV\Efildr16Pure
+@copy /b %BOOTSECTOR_BIN_DIR%\St16_64.com+%BOOTSECTOR_BIN_DIR%\Efi64.com2+%BUILD_DIR%\FV\Efildr64 %BUILD_DIR%\FV\Efildr16Pure
@%BASETOOLS_DIR%\GenPage.exe %BUILD_DIR%\FV\Efildr16Pure -o %BUILD_DIR%\FV\Efildr16
-@copy /b %BOOTSECTOR_OUTPUT_DIR%\St32_64.com+%BOOTSECTOR_OUTPUT_DIR%\Efi64.com2+%BUILD_DIR%\FV\Efildr64 %BUILD_DIR%\FV\Efildr20Pure
+@copy /b %BOOTSECTOR_BIN_DIR%\St32_64.com+%BOOTSECTOR_BIN_DIR%\Efi64.com2+%BUILD_DIR%\FV\Efildr64 %BUILD_DIR%\FV\Efildr20Pure
@%BASETOOLS_DIR%\GenPage.exe %BUILD_DIR%\FV\Efildr20Pure -o %BUILD_DIR%\FV\Efildr20
@goto end
diff --git a/edk2/DuetPkg/PostBuild.sh b/edk2/DuetPkg/PostBuild.sh
index 024e32c79..eebfcfae4 100644
--- a/edk2/DuetPkg/PostBuild.sh
+++ b/edk2/DuetPkg/PostBuild.sh
@@ -8,6 +8,7 @@
export BUILD_DIR=$WORKSPACE/Build/DuetPkg/DEBUG_UNIXGCC
export BASETOOLS_DIR=$WORKSPACE/Conf/BaseToolsSource/Source/C/bin
+export BOOTSECTOR_BIN_DIR=$WORKSPACE/DuetPkg/BootSector/bin
export PROCESSOR=""
if [ \
-z "$1" -o \
@@ -35,7 +36,6 @@ esac
#
# Boot sector module could only be built under IA32 tool chain
#
-export OUTPUT_DIR=$BUILD_DIR/IA32/DuetPkg/BootSector/BootSector/OUTPUT
echo Compressing DUETEFIMainFv.FV ...
$BASETOOLS_DIR/LzmaCompress -e -o $BUILD_DIR/FV/DUETEFIMAINFV.z $BUILD_DIR/FV/DUETEFIMAINFV.Fv
@@ -51,29 +51,29 @@ echo Generate Loader Image ...
if [ $PROCESSOR = IA32 ]
then
$BASETOOLS_DIR/EfiLdrImage -o $BUILD_DIR/FV/Efildr32 $BUILD_DIR/$PROCESSOR/EfiLoader.efi $BUILD_DIR/FV/DxeIpl.z $BUILD_DIR/FV/DxeMain.z $BUILD_DIR/FV/DUETEFIMAINFV.z
- cat $OUTPUT_DIR/start.com $OUTPUT_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32 > $BUILD_DIR/FV/Efildr
+ cat $BOOTSECTOR_BIN_DIR/start.com $BOOTSECTOR_BIN_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32 > $BUILD_DIR/FV/Efildr
#
# It is safe to use "bcat" to cat following binary file, if bcat command is avaiable for your system
#
- #bcat -o $BUILD_DIR/FV/Efildr.bcat $OUTPUT_DIR/start.com $OUTPUT_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32
- cat $OUTPUT_DIR/start16.com $OUTPUT_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32 > $BUILD_DIR/FV/Efildr16
- #bcat -o $BUILD_DIR/FV/Efildr16.bcat $OUTPUT_DIR/start16.com $OUTPUT_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32
- cat $OUTPUT_DIR/start32.com $OUTPUT_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32 > $BUILD_DIR/FV/Efildr20
- #bcat -o $BUILD_DIR/FV/Efildr20.bcat $OUTPUT_DIR/start32.com $OUTPUT_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32
+ #bcat -o $BUILD_DIR/FV/Efildr.bcat $BOOTSECTOR_BIN_DIR/start.com $BOOTSECTOR_BIN_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32
+ cat $BOOTSECTOR_BIN_DIR/start16.com $BOOTSECTOR_BIN_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32 > $BUILD_DIR/FV/Efildr16
+ #bcat -o $BUILD_DIR/FV/Efildr16.bcat $BOOTSECTOR_BIN_DIR/start16.com $BOOTSECTOR_BIN_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32
+ cat $BOOTSECTOR_BIN_DIR/start32.com $BOOTSECTOR_BIN_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32 > $BUILD_DIR/FV/Efildr20
+ #bcat -o $BUILD_DIR/FV/Efildr20.bcat $BOOTSECTOR_BIN_DIR/start32.com $BOOTSECTOR_BIN_DIR/efi32.com2 $BUILD_DIR/FV/Efildr32
echo Done!
fi
if [ $PROCESSOR = X64 ]
then
$BASETOOLS_DIR/EfiLdrImage -o $BUILD_DIR/FV/Efildr64 $BUILD_DIR/$PROCESSOR/EfiLoader.efi $BUILD_DIR/FV/DxeIpl.z $BUILD_DIR/FV/DxeMain.z $BUILD_DIR/FV/DUETEFIMAINFV.z
- cat $OUTPUT_DIR/start64.com $OUTPUT_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64 > $BUILD_DIR/FV/EfildrPure
- #bcat -o $BUILD_DIR/FV/EfildrPure $OUTPUT_DIR/start64.com $OUTPUT_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64
+ cat $BOOTSECTOR_BIN_DIR/start64.com $BOOTSECTOR_BIN_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64 > $BUILD_DIR/FV/EfildrPure
+ #bcat -o $BUILD_DIR/FV/EfildrPure $BOOTSECTOR_BIN_DIR/start64.com $BOOTSECTOR_BIN_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64
$BASETOOLS_DIR/GenPage $BUILD_DIR/FV/EfildrPure -o $BUILD_DIR/FV/Efildr
- cat $OUTPUT_DIR/st16_64.com $OUTPUT_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64 > $BUILD_DIR/FV/Efildr16Pure
- #bcat -o $BUILD_DIR/FV/Efildr16Pure $OUTPUT_DIR/st16_64.com $OUTPUT_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64
+ cat $BOOTSECTOR_BIN_DIR/st16_64.com $BOOTSECTOR_BIN_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64 > $BUILD_DIR/FV/Efildr16Pure
+ #bcat -o $BUILD_DIR/FV/Efildr16Pure $BOOTSECTOR_BIN_DIR/st16_64.com $BOOTSECTOR_BIN_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64
$BASETOOLS_DIR/GenPage $BUILD_DIR/FV/Efildr16Pure -o $BUILD_DIR/FV/Efildr16
- cat $OUTPUT_DIR/st32_64.com $OUTPUT_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64 > $BUILD_DIR/FV/Efildr20Pure
- #bcat -o $BUILD_DIR/FV/Efildr20Pure $OUTPUT_DIR/st32_64.com $OUTPUT_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64
+ cat $BOOTSECTOR_BIN_DIR/st32_64.com $BOOTSECTOR_BIN_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64 > $BUILD_DIR/FV/Efildr20Pure
+ #bcat -o $BUILD_DIR/FV/Efildr20Pure $BOOTSECTOR_BIN_DIR/st32_64.com $BOOTSECTOR_BIN_DIR/efi64.com2 $BUILD_DIR/FV/Efildr64
$BASETOOLS_DIR/GenPage $BUILD_DIR/FV/Efildr20Pure -o $BUILD_DIR/FV/Efildr20
echo Done!