]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BeagleBoardPkg/b.bat
Program SD Cards into 4-bit mode (support for this is required in the spec). This...
[mirror_edk2.git] / BeagleBoardPkg / b.bat
index 32501eea6dac898f1408bce2c6c54f585e27e89c..7fa4ee691055431d13467b7c1ed296ef22a48f8f 100755 (executable)
@@ -1,5 +1,5 @@
-@REM Copyright (c) 2008 - 2010, Apple, Inc.  All rights reserved.
-@REM All rights reserved. This program and the accompanying materials
+@REM Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
+@REM This program and the accompanying materials
 @REM are licensed and made available under the terms and conditions of the BSD License
 @REM which accompanies this distribution.  The full text of the license may be found at
 @REM http://opensource.org/licenses/bsd-license.php
 @REM b release clean
 @REM b -v -y build.log
 
-
+ECHO OFF
+@REM Setup Build environment. Sets WORKSPACE and puts build in path
 CALL ..\edksetup.bat
+
+@REM Set for tools chain. Currently RVCT31
 SET TARGET_TOOLS=RVCT31
 SET TARGET=DEBUG
 \r
 @if /I "%1"=="RELEASE" (\r
+  @REM If 1st argument is release set TARGET to RELEASE and shift arguments to remove it \r
   SET TARGET=RELEASE\r
   shift /1\r
 )\r
 
 SET BUILD_ROOT=%WORKSPACE%\Build\BeagleBoard\%TARGET%_%TARGET_TOOLS%
-BUILD_ROOT=$WORKSPACE/Build/BeagleBoard/"$TARGET"_"$TARGET_TOOLS"
 
+@REM Build the Beagle Board firmware and creat an FD (FLASH Device) Image.
 CALL build -p BeagleBoardPkg\BeagleBoardPkg.dsc -a ARM -t RVCT31 -b %TARGET% %1 %2 %3 %4 %5 %6 %7 %8
+@if ERRORLEVEL 1 goto Exit
 
 @if /I "%1"=="CLEAN" goto Clean\r
 
@@ -39,21 +44,22 @@ CALL build -p BeagleBoardPkg\BeagleBoardPkg.dsc -a ARM -t RVCT31 -b %TARGET% %1
 @REM point looks so strange. 
 @REM OMAP 3430 TRM section 26.4.8 has Image header information. (missing in OMAP 3530 TRM)
 @REM
-cd Tools
+@cd Tools
 
 ECHO Building tools...
 CALL nmake 
 
 ECHO Patching image with ConfigurationHeader.dat
-CALL GenerateImage -D ConfigurationHeader.dat -E 0x80008208 -I ../../Build/FV/BEAGLEBOARD_EFI.fd -O ../../Build/FV/BeagleBoard_EFI_flashboot.fd
+CALL GenerateImage -D ..\ConfigurationHeader.dat -E 0x80008208 -I %BUILD_ROOT%\FV\BEAGLEBOARD_EFI.fd -O %BUILD_ROOT%\FV\BeagleBoard_EFI_flashboot.fd
 
 ECHO Patching ..\Debugger_scripts ...
 SET DEBUGGER_SCRIPT=..\Debugger_scripts
-for /f %%a IN ('dir /b %DEBUGGER_SCRIPT%\*.inc %DEBUGGER_SCRIPT%\*.cmm') do (
-  CALL replace %DEBUGGER_SCRIPT%\%%a %BUILD_ROOT%\%%a ZZZZZZ %BUILD_ROOT% WWWWWW  %WORKSPACE%
+@for /f %%a IN ('dir /b %DEBUGGER_SCRIPT%\*.inc %DEBUGGER_SCRIPT%\*.cmm') do (
+  @CALL replace %DEBUGGER_SCRIPT%\%%a %BUILD_ROOT%\%%a ZZZZZZ %BUILD_ROOT% WWWWWW  %WORKSPACE%
 )
 
 cd ..
+:Exit
 EXIT /B
 
 :Clean