From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 71CD281E9E for ; Fri, 11 Nov 2016 00:32:33 -0800 (PST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP; 11 Nov 2016 00:32:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,620,1473145200"; d="scan'208";a="30027359" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga004.jf.intel.com with ESMTP; 11 Nov 2016 00:32:35 -0800 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 11 Nov 2016 00:32:17 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 11 Nov 2016 00:32:16 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.142]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.96]) with mapi id 14.03.0248.002; Fri, 11 Nov 2016 16:32:13 +0800 From: "Ni, Ruiyu" To: "Wu, Hao A" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH 1/3] DuetPkg: Resolve white-space issues for post-build scripts & ReadMe Thread-Index: AQHSO/VqTMqRT1JgSUexpcn3DDK7BaDTdCrw Date: Fri, 11 Nov 2016 08:32:12 +0000 Deferred-Delivery: Fri, 11 Nov 2016 08:32:00 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D58E73BB3@SHSMSX104.ccr.corp.intel.com> References: <1478852805-11900-1-git-send-email-hao.a.wu@intel.com> <1478852805-11900-2-git-send-email-hao.a.wu@intel.com> In-Reply-To: <1478852805-11900-2-git-send-email-hao.a.wu@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTMyN2M1NWYtMWVmMy00OGIxLTk3NWUtYjVjZDNiNjViODE0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX1BVQkxJQyJ9XX1dfSwiU3ViamVjdExhYmVscyI6W10sIlRNQ1ZlcnNpb24iOiIxNS45LjYuNiIsIlRydXN0ZWRMYWJlbEhhc2giOiJVbXRvN29hWWJid01BdmpzdE9iSmh5azRsb0RxZHByU1ZEeHdvR0tBaVV3PSJ9 x-ctpclassification: CTP_PUBLIC x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 1/3] DuetPkg: Resolve white-space issues for post-build scripts & ReadMe X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Nov 2016 08:32:33 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ruiyu Ni Regards, Ray >-----Original Message----- >From: Wu, Hao A >Sent: Friday, November 11, 2016 4:27 PM >To: edk2-devel@lists.01.org >Cc: Wu, Hao A ; Ni, Ruiyu >Subject: [PATCH 1/3] DuetPkg: Resolve white-space issues for post-build sc= ripts & ReadMe > >Cc: Ruiyu Ni >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Hao Wu >--- > DuetPkg/CreateBootDisk.bat | 14 +-- > DuetPkg/CreateBootDisk.sh | 304 ++++++++++++++++++++++------------------= ----- > DuetPkg/PostBuild.bat | 2 +- > DuetPkg/PostBuild.sh | 58 ++++----- > DuetPkg/ReadMe.txt | 44 +++---- > 5 files changed, 211 insertions(+), 211 deletions(-) > >diff --git a/DuetPkg/CreateBootDisk.bat b/DuetPkg/CreateBootDisk.bat >index 541de81..214b5b6 100644 >--- a/DuetPkg/CreateBootDisk.bat >+++ b/DuetPkg/CreateBootDisk.bat >@@ -56,7 +56,7 @@ goto Help > @copy %BOOTSECTOR_BIN_DIR%\Bootsect.com FDBs-1.com > @%BASETOOLS_DIR%\Bootsectimage.exe -g FDBs.com FDBs-1.com -f > @REM @del FDBS.com >-@%BASETOOLS_DIR%\Genbootsector.exe -o %EFI_BOOT_DISK% -i FDBs-1.com >+@%BASETOOLS_DIR%\Genbootsector.exe -o %EFI_BOOT_DISK% -i FDBs-1.com > @del FDBs-1.com > @echo Done. > @copy %BUILD_DIR%\FV\EfiLdr %EFI_BOOT_DISK% >@@ -70,7 +70,7 @@ goto Help > @copy %BOOTSECTOR_BIN_DIR%\Bootsect.com FDBs-1.com > @%BASETOOLS_DIR%\Bootsectimage.exe -g FDBs.com FDBs-1.com -f > @REM @del FDBS.com >-@%BASETOOLS_DIR%\Genbootsector.exe -o %EFI_BOOT_DISK% -i FDBs-1.com >+@%BASETOOLS_DIR%\Genbootsector.exe -o %EFI_BOOT_DISK% -i FDBs-1.com > @del FDBs-1.com > @echo Done. > @goto end >@@ -89,8 +89,8 @@ goto Help > @del FormatCommandInput.txt > @echo Create boot sector ... > @%BASETOOLS_DIR%\Genbootsector.exe -i %EFI_BOOT_DISK% -o UsbBs16.com >-@copy %BOOTSECTOR_BIN_DIR%\Bs16.com Bs16-1.com >-@%BASETOOLS_DIR%\Bootsectimage.exe -g UsbBs16.com Bs16-1.com -f >+@copy %BOOTSECTOR_BIN_DIR%\Bs16.com Bs16-1.com >+@%BASETOOLS_DIR%\Bootsectimage.exe -g UsbBs16.com Bs16-1.com -f > @%BASETOOLS_DIR%\Genbootsector.exe -o %EFI_BOOT_DISK% -i Bs16-1.com > @del Bs16-1.com > @%BASETOOLS_DIR%\Genbootsector.exe -m -o %EFI_BOOT_DISK% -i %BOOTSECTOR_B= IN_DIR%\Mbr.com >@@ -110,15 +110,15 @@ goto Help > @del FormatCommandInput.txt > @echo Create boot sector ... > @%BASETOOLS_DIR%\Genbootsector.exe -i %EFI_BOOT_DISK% -o UsbBs32.com >-@copy %BOOTSECTOR_BIN_DIR%\Bs32.com Bs32-1.com >-@%BASETOOLS_DIR%\Bootsectimage.exe -g UsbBs32.com Bs32-1.com -f >+@copy %BOOTSECTOR_BIN_DIR%\Bs32.com Bs32-1.com >+@%BASETOOLS_DIR%\Bootsectimage.exe -g UsbBs32.com Bs32-1.com -f > @del UsbBs32.com > @%BASETOOLS_DIR%\Genbootsector.exe -o %EFI_BOOT_DISK% -i Bs32-1.com > @del Bs32-1.com > @%BASETOOLS_DIR%\Genbootsector.exe -m -o %EFI_BOOT_DISK% -i %BOOTSECTOR_B= IN_DIR%\Mbr.com > @echo Done. > @echo PLEASE UNPLUG USB, THEN PLUG IT AGAIN! >-@goto end >+@goto end > > :CreateUsb_FAT32_step2 > @copy %BUILD_DIR%\FV\EfiLdr20 %EFI_BOOT_DISK% >diff --git a/DuetPkg/CreateBootDisk.sh b/DuetPkg/CreateBootDisk.sh >index f2ff571..fa00408 100755 >--- a/DuetPkg/CreateBootDisk.sh >+++ b/DuetPkg/CreateBootDisk.sh >@@ -34,9 +34,9 @@ if [ \ > "$*" =3D "--help" \ > ] > then >- echo "Usage: CreateBootDisk [usb|floppy|ide|file] MediaPath DevicePath [= FAT12|FAT16|FAT32] [IA32|X64] >[GCC44|UNIXGCC]" >- echo "e.g. : CreateBootDisk floppy /media/floppy0 /dev/fd0 FAT12 IA32" >- PROCESS_MARK=3DFALSE >+ echo "Usage: CreateBootDisk [usb|floppy|ide|file] MediaPath DevicePat= h [FAT12|FAT16|FAT32] [IA32|X64] >[GCC44|UNIXGCC]" >+ echo "e.g. : CreateBootDisk floppy /media/floppy0 /dev/fd0 FAT12 IA32= " >+ PROCESS_MARK=3DFALSE > fi > > case "$5" in >@@ -66,153 +66,153 @@ export EFI_BOOT_DEVICE=3D$3 > > if [ "$PROCESS_MARK" =3D TRUE ] > then >- case "$1" in >- floppy) >- if [ "$4" =3D FAT12 ] >- then >- echo Start to create floppy boot disk ... >- echo Format $EFI_BOOT_MEDIA ... >- ## Format floppy disk >- umount $EFI_BOOT_MEDIA >- mkfs.msdos $EFI_BOOT_DEVICE >- mount $EFI_BOOT_DEVICE $EFI_BOOT_MEDIA >- echo Create boot sector ... >- ## Linux version of GenBootSector has not pass build yet. >- $BASETOOLS_DIR/GnuGenBootSector -i $EFI_BOOT_DEVICE -o FDBs.com >- cp $BOOTSECTOR_BIN_DIR/bootsect.com FDBs-1.com >- $BASETOOLS_DIR/BootSectImage -g FDBs.com FDBs-1.com -f >- $BASETOOLS_DIR/GnuGenBootSector -o $EFI_BOOT_DEVICE -i FDBs-1.com >- rm FDBs-1.com >- cp $BUILD_DIR/FV/Efildr $EFI_BOOT_MEDIA >- >- mkdir -p $EFI_BOOT_MEDIA/efi >- mkdir -p $EFI_BOOT_MEDIA/efi/boot >- if [ "$5" =3D IA32 ] >- then >- cp $WORKSPACE/ShellBinPkg/UefiShell/Ia32/Shell.efi $EFI_BOOT_MEDIA/e= fi/boot/boot$5.efi >- else >- if [ "$5" =3D X64 ] >- then >- cp $WORKSPACE/ShellBinPkg/UefiShell/X64/Shell.efi $EFI_BOOT_MEDIA/e= fi/boot/boot$5.efi >- else >- echo Wrong Arch! >- fi >- fi >- echo Done. >- else >- echo "Wrong FAT type $4 for floppy!" >- fi >- ;; >- >- file) # CreateFile >- if [ "$4" =3D FAT12 ] >- then >- echo "Start to create file boot disk ..." >- dd bs=3D512 count=3D2880 if=3D/dev/zero of=3D$EFI_BOOT_MEDIA >- mkfs.msdos -F 12 $EFI_BOOT_MEDIA >- >- mcopy -i $EFI_BOOT_MEDIA $BUILD_DIR/FV/Efildr ::/Efildr >- mmd -i $EFI_BOOT_MEDIA ::/efi ::/efi/boot >- if [ "$5" =3D IA32 ] >- then >- mcopy -i $EFI_BOOT_MEDIA >$WORKSPACE/ShellBinPkg/UefiShell/Ia32/Shell.efi ::/efi/boot/boot$5.efi >- elif [ "$5" =3D X64 ] >- then >- mcopy -i $EFI_BOOT_MEDIA >$WORKSPACE/ShellBinPkg/UefiShell/X64/Shell.efi ::/efi/boot/boot$5.efi >- else >- echo Wrong Arch! >- fi >- mdir -i $EFI_BOOT_MEDIA -s :: >- >- ## Linux version of GenBootSector has not pass build yet. >- $BASETOOLS_DIR/GnuGenBootSector -i $EFI_BOOT_MEDIA -o $EFI_BOOT_MEDIA= .bs0 >- cp $BOOTSECTOR_BIN_DIR/bootsect.com $EFI_BOOT_MEDIA.bs1 >- $BASETOOLS_DIR/BootSectImage -g $EFI_BOOT_MEDIA.bs0 $EFI_BOOT_MEDIA.b= s1 >- $BASETOOLS_DIR/GnuGenBootSector -o $EFI_BOOT_MEDIA -i $EFI_BOOT_MEDIA= .bs1 >- rm $EFI_BOOT_MEDIA.bs[0-1] >- echo Done. >- else >- echo "Wrong FAT type" $4 "for floppy!" >- fi >- ;; >- >- usb) # CreateUsb >- >- if [ "$4" =3D FAT16 ] >- then >- if [ "$6" =3D step2 ] >- then >- cp $BUILD_DIR/FV/Efildr16 $EFI_BOOT_MEDIA >- mkdir $EFI_BOOT_MEDIA/efi/boot >- if [ "$5" =3D IA32 ] >- then >- cp $WORKSPACE/ShellBinPkg/UefiShell/Ia32/Shell.efi $EFI_BOOT_MEDIA/= efi/boot/boot$5.efi >- else >- if [ "$5" =3D X64 ] >- then >- cp $WORKSPACE/ShellBinPkg/UefiShell/X64/Shell.efi >$EFI_BOOT_MEDIA/efi/boot/boot$5.efi >- else >- echo Wrong Arch! >- fi >- fi >- echo "step2 Done!" >- else >- echo Format $EFI_BOOT_DEVICE ... >- #Do format command. >- echo Create boot sector ... >- ## Linux version of GenBootSector & Bootsectimage has not pass build= yet. >- $BASETOOLS_DIR/GnuGenBootSector -i $EFI_BOOT_DEVICE -o UsbBs16.com >- cp $BOOTSECTOR_BIN_DIR/bs16.com Bs16-1.com >- $BASETOOLS_DIR/BootSectImage -g UsbBs16.com Bs16-1.com -f >- $BASETOOLS_DIR/GnuGenBootSector -o $EFI_BOOT_DEVICE -i Bs16-1.com >- rm Bs16-1.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 >- elif [ "$4" =3D FAT32 ] >- then >- if [ "$6" =3D step2 ] >- then >- cp $BUILD_DIR/FV/Efildr20 $EFI_BOOT_MEDIA >- mkdir $EFI_BOOT_MEDIA/efi/boot >- if [ "$5" =3D IA32 ] >- then >- cp $WORKSPACE/ShellBinPkg/UefiShell/Ia32/Shell.efi $EFI_BOOT_MEDIA/= efi/boot/boot$5.efi >- else >- if [ "$5" =3D X64 ] >- then >- cp $WORKSPACE/ShellBinPkg/UefiShell/X64/Shell.efi >$EFI_BOOT_MEDIA/efi/boot/boot$5.efi >- else >- echo Wrong Arch! >- fi >- fi >- echo "step2 Done!" >- else >- echo Format $EFI_BOOT_DEVICE ... >- #Do format command. >- echo Create boot sector ... >- ## Linux version of GenBootSector & Bootsectimage has not pass build= yet. >- $BASETOOLS_DIR/GnuGenBootSector -i $EFI_BOOT_DEVICE -o UsbBs32.com >- cp $BOOTSECTOR_BIN_DIR/bs32.com Bs32-1.com >- $BASETOOLS_DIR/BootSectImage -g UsbBs32.com Bs32-1.com -f >- $BASETOOLS_DIR/GnuGenBootSector -o $EFI_BOOT_DEVICE -i Bs32-1.com >- rm Bs32-1.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 >- else >- echo "Wrong FAT type $1 for floppy!" >- fi >- >- ;; >- >- ide) # CreateIde >- echo "Not support yet!" >- ;; >- *) >- echo "Arg1 should be [floppy | file | usb | ide] !" >- >- esac >+ case "$1" in >+ floppy) >+ if [ "$4" =3D FAT12 ] >+ then >+ echo Start to create floppy boot disk ... >+ echo Format $EFI_BOOT_MEDIA ... >+ ## Format floppy disk >+ umount $EFI_BOOT_MEDIA >+ mkfs.msdos $EFI_BOOT_DEVICE >+ mount $EFI_BOOT_DEVICE $EFI_BOOT_MEDIA >+ echo Create boot sector ... >+ ## Linux version of GenBootSector has not pass build yet. >+ $BASETOOLS_DIR/GnuGenBootSector -i $EFI_BOOT_DEVICE -o FD= Bs.com >+ cp $BOOTSECTOR_BIN_DIR/bootsect.com FDBs-1.com >+ $BASETOOLS_DIR/BootSectImage -g FDBs.com FDBs-1.com -f >+ $BASETOOLS_DIR/GnuGenBootSector -o $EFI_BOOT_DEVICE -i FD= Bs-1.com >+ rm FDBs-1.com >+ cp $BUILD_DIR/FV/Efildr $EFI_BOOT_MEDIA >+ >+ mkdir -p $EFI_BOOT_MEDIA/efi >+ mkdir -p $EFI_BOOT_MEDIA/efi/boot >+ if [ "$5" =3D IA32 ] >+ then >+ cp $WORKSPACE/ShellBinPkg/UefiShell/Ia32/Shell.efi $E= FI_BOOT_MEDIA/efi/boot/boot$5.efi >+ else >+ if [ "$5" =3D X64 ] >+ then >+ cp $WORKSPACE/ShellBinPkg/UefiShell/X64/Shell.efi= $EFI_BOOT_MEDIA/efi/boot/boot$5.efi >+ else >+ echo Wrong Arch! >+ fi >+ fi >+ echo Done. >+ else >+ echo "Wrong FAT type $4 for floppy!" >+ fi >+ ;; >+ >+ file) # CreateFile >+ if [ "$4" =3D FAT12 ] >+ then >+ echo "Start to create file boot disk ..." >+ dd bs=3D512 count=3D2880 if=3D/dev/zero of=3D$EFI_BOOT_ME= DIA >+ mkfs.msdos -F 12 $EFI_BOOT_MEDIA >+ >+ mcopy -i $EFI_BOOT_MEDIA $BUILD_DIR/FV/Efildr ::/Efildr >+ mmd -i $EFI_BOOT_MEDIA ::/efi ::/efi/boot >+ if [ "$5" =3D IA32 ] >+ then >+ mcopy -i $EFI_BOOT_MEDIA >$WORKSPACE/ShellBinPkg/UefiShell/Ia32/Shell.efi ::/efi/boot/boot$5.efi >+ elif [ "$5" =3D X64 ] >+ then >+ mcopy -i $EFI_BOOT_MEDIA >$WORKSPACE/ShellBinPkg/UefiShell/X64/Shell.efi ::/efi/boot/boot$5.efi >+ else >+ echo Wrong Arch! >+ fi >+ mdir -i $EFI_BOOT_MEDIA -s :: >+ >+ ## Linux version of GenBootSector has not pass build yet. >+ $BASETOOLS_DIR/GnuGenBootSector -i $EFI_BOOT_MEDIA -o $EF= I_BOOT_MEDIA.bs0 >+ cp $BOOTSECTOR_BIN_DIR/bootsect.com $EFI_BOOT_MEDIA.bs1 >+ $BASETOOLS_DIR/BootSectImage -g $EFI_BOOT_MEDIA.bs0 $EFI_= BOOT_MEDIA.bs1 >+ $BASETOOLS_DIR/GnuGenBootSector -o $EFI_BOOT_MEDIA -i $EF= I_BOOT_MEDIA.bs1 >+ rm $EFI_BOOT_MEDIA.bs[0-1] >+ echo Done. >+ else >+ echo "Wrong FAT type" $4 "for floppy!" >+ fi >+ ;; >+ >+ usb) # CreateUsb >+ >+ if [ "$4" =3D FAT16 ] >+ then >+ if [ "$6" =3D step2 ] >+ then >+ cp $BUILD_DIR/FV/Efildr16 $EFI_BOOT_MEDIA >+ mkdir $EFI_BOOT_MEDIA/efi/boot >+ if [ "$5" =3D IA32 ] >+ then >+ cp $WORKSPACE/ShellBinPkg/UefiShell/Ia32/Shell.ef= i $EFI_BOOT_MEDIA/efi/boot/boot$5.efi >+ else >+ if [ "$5" =3D X64 ] >+ then >+ cp $WORKSPACE/ShellBinPkg/UefiShell/X64/Shell= .efi >$EFI_BOOT_MEDIA/efi/boot/boot$5.efi >+ else >+ echo Wrong Arch! >+ fi >+ fi >+ echo "step2 Done!" >+ else >+ echo Format $EFI_BOOT_DEVICE ... >+ #Do format command. >+ echo Create boot sector ... >+ ## Linux version of GenBootSector & Bootsectimage has= not pass build yet. >+ $BASETOOLS_DIR/GnuGenBootSector -i $EFI_BOOT_DEVICE -= o UsbBs16.com >+ cp $BOOTSECTOR_BIN_DIR/bs16.com Bs16-1.com >+ $BASETOOLS_DIR/BootSectImage -g UsbBs16.com Bs16-1.co= m -f >+ $BASETOOLS_DIR/GnuGenBootSector -o $EFI_BOOT_DEVICE -= i Bs16-1.com >+ rm Bs16-1.com >+ $BASETOOLS_DIR/GnuGenBootSector -m -o $EFI_BOOT_DEVIC= E -i >$BOOTSECTOR_BIN_DIR/Mbr.com >+ echo Done. >+ echo PLEASE UNPLUG USB, THEN PLUG IT AGAIN TO DO STEP= 2! >+ fi >+ elif [ "$4" =3D FAT32 ] >+ then >+ if [ "$6" =3D step2 ] >+ then >+ cp $BUILD_DIR/FV/Efildr20 $EFI_BOOT_MEDIA >+ mkdir $EFI_BOOT_MEDIA/efi/boot >+ if [ "$5" =3D IA32 ] >+ then >+ cp $WORKSPACE/ShellBinPkg/UefiShell/Ia32/Shell.ef= i $EFI_BOOT_MEDIA/efi/boot/boot$5.efi >+ else >+ if [ "$5" =3D X64 ] >+ then >+ cp $WORKSPACE/ShellBinPkg/UefiShell/X64/Shell= .efi >$EFI_BOOT_MEDIA/efi/boot/boot$5.efi >+ else >+ echo Wrong Arch! >+ fi >+ fi >+ echo "step2 Done!" >+ else >+ echo Format $EFI_BOOT_DEVICE ... >+ #Do format command. >+ echo Create boot sector ... >+ ## Linux version of GenBootSector & Bootsectimage has= not pass build yet. >+ $BASETOOLS_DIR/GnuGenBootSector -i $EFI_BOOT_DEVICE -= o UsbBs32.com >+ cp $BOOTSECTOR_BIN_DIR/bs32.com Bs32-1.com >+ $BASETOOLS_DIR/BootSectImage -g UsbBs32.com Bs32-1.co= m -f >+ $BASETOOLS_DIR/GnuGenBootSector -o $EFI_BOOT_DEVICE -= i Bs32-1.com >+ rm Bs32-1.com >+ $BASETOOLS_DIR/GnuGenBootSector -m -o $EFI_BOOT_DEVIC= E -i >$BOOTSECTOR_BIN_DIR/Mbr.com >+ echo Done. >+ echo PLEASE UNPLUG USB, THEN PLUG IT AGAIN TO DO STEP= 2! >+ fi >+ else >+ echo "Wrong FAT type $1 for floppy!" >+ fi >+ >+ ;; >+ >+ ide) # CreateIde >+ echo "Not support yet!" >+ ;; >+ *) >+ echo "Arg1 should be [floppy | file | usb | ide] !" >+ >+ esac > fi >diff --git a/DuetPkg/PostBuild.bat b/DuetPkg/PostBuild.bat >index bdcafb8..df34fa7 100644 >--- a/DuetPkg/PostBuild.bat >+++ b/DuetPkg/PostBuild.bat >@@ -1,6 +1,6 @@ > @REM ## @file > @REM # >-@REM # Currently, Build system does not provide post build mechanism for= module >+@REM # Currently, Build system does not provide post build mechanism for= module > @REM # and platform building, so just use a bat file to do post build co= mmands. > @REM # Originally, following post building command is for EfiLoader modu= le. > @REM # >diff --git a/DuetPkg/PostBuild.sh b/DuetPkg/PostBuild.sh >index f032de3..6f307e1 100755 >--- a/DuetPkg/PostBuild.sh >+++ b/DuetPkg/PostBuild.sh >@@ -2,7 +2,7 @@ > > ## @file > # >-# Currently, Build system does not provide post build mechanism for modu= le >+# Currently, Build system does not provide post build mechanism for modu= le > # and platform building, so just use a sh file to do post build commands= . > # Originally, following post building command is for EfiLoader module. > # >@@ -33,8 +33,8 @@ if [ \ > "$1" =3D "--help" \ > ] > then >- echo Error! Please specific the architecture. >- echo Usage: "./PostBuild.sh [IA32|X64] [UNIXGCC|GCC44]" >+ echo Error! Please specific the architecture. >+ echo Usage: "./PostBuild.sh [IA32|X64] [UNIXGCC|GCC44]" > fi > > case "$1" in >@@ -75,41 +75,41 @@ echo Compressing DxeMain.efi ... > $BASETOOLS_DIR/LzmaCompress -e -o $BUILD_DIR/FV/DxeMain.z $BUILD_DIR/$PRO= CESSOR/DxeCore.efi > > echo Compressing DxeIpl.efi ... >-$BASETOOLS_DIR/LzmaCompress -e -o $BUILD_DIR/FV/DxeIpl.z $BUILD_DIR/$PROC= ESSOR/DxeIpl.efi >+$BASETOOLS_DIR/LzmaCompress -e -o $BUILD_DIR/FV/DxeIpl.z $BUILD_DIR/$PROC= ESSOR/DxeIpl.efi > > echo Generate Loader Image ... > > if [ $PROCESSOR =3D IA32 ] > then >- $BASETOOLS_DIR/GenFw --rebase 0x10000 -o $BUILD_DIR/$PROCESSOR/Ef= iLoader.efi >$BUILD_DIR/$PROCESSOR/EfiLoader.efi >- $BASETOOLS_DIR/EfiLdrImage -o $BUILD_DIR/FV/Efildr32 $BUILD_DIR/$PROCESS= OR/EfiLoader.efi >$BUILD_DIR/FV/DxeIpl.z $BUILD_DIR/FV/DxeMain.z $BUILD_DIR/FV/DUETEFIMAINFV= .z >- 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 $BOOTSECTOR_BIN_DIR/start.com $BOOTSE= CTOR_BIN_DIR/efi32.com2 >$BUILD_DIR/FV/Efildr32 >- cat $BOOTSECTOR_BIN_DIR/Start16.com $BOOTSECTOR_BIN_DIR/efi32.com2 $BUIL= D_DIR/FV/Efildr32 > >$BUILD_DIR/FV/Efildr16 >- #bcat -o $BUILD_DIR/FV/Efildr16.bcat $BOOTSECTOR_BIN_DIR/start16.com $BO= OTSECTOR_BIN_DIR/efi32.com2 >$BUILD_DIR/FV/Efildr32 >- cat $BOOTSECTOR_BIN_DIR/Start32.com $BOOTSECTOR_BIN_DIR/efi32.com2 $BUIL= D_DIR/FV/Efildr32 > >$BUILD_DIR/FV/Efildr20 >- #bcat -o $BUILD_DIR/FV/Efildr20.bcat $BOOTSECTOR_BIN_DIR/start32.com $BO= OTSECTOR_BIN_DIR/efi32.com2 >$BUILD_DIR/FV/Efildr32 >- echo Done! >+ $BASETOOLS_DIR/GenFw --rebase 0x10000 -o $BUILD_DIR/$PROCESSOR/EfiLoa= der.efi >$BUILD_DIR/$PROCESSOR/EfiLoader.efi >+ $BASETOOLS_DIR/EfiLdrImage -o $BUILD_DIR/FV/Efildr32 $BUILD_DIR/$PROC= ESSOR/EfiLoader.efi >$BUILD_DIR/FV/DxeIpl.z $BUILD_DIR/FV/DxeMain.z $BUILD_DIR/FV/DUETEFIMAINFV= .z >+ cat $BOOTSECTOR_BIN_DIR/Start.com $BOOTSECTOR_BIN_DIR/efi32.com2 $BUI= LD_DIR/FV/Efildr32 > >$BUILD_DIR/FV/Efildr >+ # >+ # It is safe to use "bcat" to cat following binary file, if bcat comm= and is avaiable for your system >+ # >+ #bcat -o $BUILD_DIR/FV/Efildr.bcat $BOOTSECTOR_BIN_DIR/start.com $BOO= TSECTOR_BIN_DIR/efi32.com2 >$BUILD_DIR/FV/Efildr32 >+ cat $BOOTSECTOR_BIN_DIR/Start16.com $BOOTSECTOR_BIN_DIR/efi32.com2 $B= UILD_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 $B= UILD_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 =3D X64 ] > then >- $BASETOOLS_DIR/GenFw --rebase 0x10000 -o $BUILD_DIR/$PROCESSOR/E= fiLoader.efi >$BUILD_DIR/$PROCESSOR/EfiLoader.efi >- $BASETOOLS_DIR/EfiLdrImage -o $BUILD_DIR/FV/Efildr64 $BUILD_DIR/$PROCESS= OR/EfiLoader.efi >$BUILD_DIR/FV/DxeIpl.z $BUILD_DIR/FV/DxeMain.z $BUILD_DIR/FV/DUETEFIMAINFV= .z >- cat $BOOTSECTOR_BIN_DIR/Start64.com $BOOTSECTOR_BIN_DIR/efi64.com2 $BUIL= D_DIR/FV/Efildr64 > >$BUILD_DIR/FV/EfildrPure >- #bcat -o $BUILD_DIR/FV/EfildrPure $BOOTSECTOR_BIN_DIR/start64.com $BOOTS= ECTOR_BIN_DIR/efi64.com2 >$BUILD_DIR/FV/Efildr64 >- $BASETOOLS_DIR/GenPage $BUILD_DIR/FV/EfildrPure -o $BUILD_DIR/FV/Efildr >- cat $BOOTSECTOR_BIN_DIR/St16_64.com $BOOTSECTOR_BIN_DIR/efi64.com2 $BUIL= D_DIR/FV/Efildr64 > >$BUILD_DIR/FV/Efildr16Pure >- #bcat -o $BUILD_DIR/FV/Efildr16Pure $BOOTSECTOR_BIN_DIR/st16_64.com $BOO= TSECTOR_BIN_DIR/efi64.com2 >$BUILD_DIR/FV/Efildr64 >- $BASETOOLS_DIR/GenPage $BUILD_DIR/FV/Efildr16Pure -o $BUILD_DIR/FV/Efild= r16 >- cat $BOOTSECTOR_BIN_DIR/St32_64.com $BOOTSECTOR_BIN_DIR/efi64.com2 $BUIL= D_DIR/FV/Efildr64 > >$BUILD_DIR/FV/Efildr20Pure >- #bcat -o $BUILD_DIR/FV/Efildr20Pure $BOOTSECTOR_BIN_DIR/st32_64.com $BOO= TSECTOR_BIN_DIR/efi64.com2 >$BUILD_DIR/FV/Efildr64 >- $BASETOOLS_DIR/GenPage $BUILD_DIR/FV/Efildr20Pure -o $BUILD_DIR/FV/Efild= r20 >- >- echo Done! >+ $BASETOOLS_DIR/GenFw --rebase 0x10000 -o $BUILD_DIR/$PROCESSOR/EfiLoa= der.efi >$BUILD_DIR/$PROCESSOR/EfiLoader.efi >+ $BASETOOLS_DIR/EfiLdrImage -o $BUILD_DIR/FV/Efildr64 $BUILD_DIR/$PROC= ESSOR/EfiLoader.efi >$BUILD_DIR/FV/DxeIpl.z $BUILD_DIR/FV/DxeMain.z $BUILD_DIR/FV/DUETEFIMAINFV= .z >+ cat $BOOTSECTOR_BIN_DIR/Start64.com $BOOTSECTOR_BIN_DIR/efi64.com2 $B= UILD_DIR/FV/Efildr64 > >$BUILD_DIR/FV/EfildrPure >+ #bcat -o $BUILD_DIR/FV/EfildrPure $BOOTSECTOR_BIN_DIR/start64.com $BO= OTSECTOR_BIN_DIR/efi64.com2 >$BUILD_DIR/FV/Efildr64 >+ $BASETOOLS_DIR/GenPage $BUILD_DIR/FV/EfildrPure -o $BUILD_DIR/FV/Efil= dr >+ cat $BOOTSECTOR_BIN_DIR/St16_64.com $BOOTSECTOR_BIN_DIR/efi64.com2 $B= UILD_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/Ef= ildr16 >+ cat $BOOTSECTOR_BIN_DIR/St32_64.com $BOOTSECTOR_BIN_DIR/efi64.com2 $B= UILD_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/Ef= ildr20 >+ >+ echo Done! > fi > > >diff --git a/DuetPkg/ReadMe.txt b/DuetPkg/ReadMe.txt >index f280679..d7ad3d6 100644 >--- a/DuetPkg/ReadMe.txt >+++ b/DuetPkg/ReadMe.txt >@@ -7,32 +7,32 @@ A. Build DUET image on Windows Platform > To build DUET image, following tools are required: > > 1). *Visual Studio 2005* >- Assume installed at , >+ Assume installed at , > e.g.: C:\Program Files\Microsoft Visual Studio .NET 2003\. > 2). WinDDK > Assume installed at , e.g.: C:\WINDDK\3790.1830\. >- >+ > 2. Build steps > >-2.1 Build Duet Platform module >+2.1 Build Duet Platform module > > 1). run cmd.exe to open command line window. > 2). enter workspace root directory such as c:\edk2_tree > 2). run "edksetup.bat" >- 3). run "build -p DuetPkg\DuetPkg.dsc -a IA32" for IA32 architecture pl= atform or >+ 3). run "build -p DuetPkg\DuetPkg.dsc -a IA32" for IA32 architecture pl= atform or > "build -p DuetPkg\DuetPkg.dsc -a X64" for X64 architecture plat= form. >- >-2.2 Execute post build actions >+ >+2.2 Execute post build actions > 1). enter \DuetPkg directory. >- 2). run "PostBuild.bat IA32" for IA32 architecture platform or >+ 2). run "PostBuild.bat IA32" for IA32 architecture platform or > "PostBuild.bat X64" for X64 architecture platform. > > Create bootable disk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >- >+ > 3. Create boot disk > The following steps are same for IA32 architecture platform or X64 arch= itecture platform. >- >+ > 3.1 Create floppy boot disk > 1). enter \DuetPkg directory. > 2). Insert a floppy disk to drive >@@ -51,9 +51,9 @@ Create bootable disk > or "CreateBootDisk.bat usb e: FAT16 X64 step2" if usb drive is e: a= nd FAT format is FAT16 and Arch to boot is X64. > or "CreateBootDisk.bat usb e: FAT32 IA32 step2" if usb drive is e: = and FAT format is FAT32 and Arch to boot is IA32. > or "CreateBootDisk.bat usb e: FAT32 X64 step2" if usb drive is e: a= nd FAT format is FAT32 and Arch to boot is X64. >- >+ > B. Build DUET image on Linux Platform >-=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > 1. Tools preparation > > To build DUET image, GCC44 is required: >@@ -62,28 +62,28 @@ B. Build DUET image on Linux Platform > > 2. Build steps > >-2.1 Build Duet Platform module >+2.1 Build Duet Platform module > > 1). Open the terminal. > 2). enter workspace root directory such as /edk2_tree > 3). run ". edksetup.sh BaseTools" >- 4). run "build -p DuetPkg/DuetPkg.dsc -a IA32 -t GCC44" for IA32 archit= ecture platform or >+ 4). run "build -p DuetPkg/DuetPkg.dsc -a IA32 -t GCC44" for IA32 archit= ecture platform or > "build -p DuetPkg/DuetPkg.dsc -a X64 -t GCC44" for X64 architec= ture platform. >- >-2.2 Execute post build actions >+ >+2.2 Execute post build actions > 1). enter /edk2_tree/DuetPkg directory. >- 2). run "./PostBuild.sh IA32 GCC44" for IA32 architecture platform or >+ 2). run "./PostBuild.sh IA32 GCC44" for IA32 architecture platform or > "./PostBuild.sh X64 GCC44" for X64 architecture platform. > > NOTE: After post build action, you should check the size of EfiLdr at $W= ORKSPACE/Build/DuetPkg/DEBUG_GCC44 directory, >it must less than 470k. > If not, you should manually remove some unnecessary drivers at Due= tPkg.fdf file. >- >+ > 3. Create bootable disk > The following steps are same for IA32 architecture platform or X64 arc= hitecture platform. > Now only support floopy. >- >+ > 3.1 Create floppy boot disk >- 1). enter /edk2_tree/DuetPkg directory. >- 2). Insert a floppy disk to drive >- 3). run "CreateBootDisk.sh" to build floppy drive >- such as "./CreateBootDisk.sh floppy /media/floppy0 /dev/fd0 FAT12 IA3= 2" >\ No newline at end of file >+ 1). enter /edk2_tree/DuetPkg directory. >+ 2). Insert a floppy disk to drive >+ 3). run "CreateBootDisk.sh" to build floppy drive >+ such as "./CreateBootDisk.sh floppy /media/floppy0 /dev/fd0 FAT= 12 IA32" >-- >1.9.5.msysgit.0