hhtian | 1ebd6c1 | 2010-04-29 12:24:22 +0000 | [diff] [blame] | 1 | @REM Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR> |
| 2 | @REM This program and the accompanying materials |
andrewfish | f3198cb | 2010-02-05 06:50:09 +0000 | [diff] [blame] | 3 | @REM are licensed and made available under the terms and conditions of the BSD License |
| 4 | @REM which accompanies this distribution. The full text of the license may be found at |
| 5 | @REM http://opensource.org/licenses/bsd-license.php |
| 6 | @REM |
| 7 | @REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, |
| 8 | @REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. |
| 9 | @REM |
| 10 | |
| 11 | @REM Example usage of this script. default is a DEBUG build |
| 12 | @REM b |
| 13 | @REM b clean |
| 14 | @REM b release |
| 15 | @REM b release clean |
| 16 | @REM b -v -y build.log |
| 17 | |
andrewfish | 3aa4215 | 2010-02-05 18:43:49 +0000 | [diff] [blame] | 18 | ECHO OFF |
| 19 | @REM Setup Build environment. Sets WORKSPACE and puts build in path |
andrewfish | f3198cb | 2010-02-05 06:50:09 +0000 | [diff] [blame] | 20 | CALL ..\edksetup.bat |
andrewfish | 3aa4215 | 2010-02-05 18:43:49 +0000 | [diff] [blame] | 21 | |
| 22 | @REM Set for tools chain. Currently RVCT31 |
andrewfish | f3198cb | 2010-02-05 06:50:09 +0000 | [diff] [blame] | 23 | SET TARGET_TOOLS=RVCT31 |
| 24 | SET TARGET=DEBUG |
| 25 |
|
| 26 | @if /I "%1"=="RELEASE" (
|
andrewfish | 3aa4215 | 2010-02-05 18:43:49 +0000 | [diff] [blame] | 27 | @REM If 1st argument is release set TARGET to RELEASE and shift arguments to remove it
|
andrewfish | f3198cb | 2010-02-05 06:50:09 +0000 | [diff] [blame] | 28 | SET TARGET=RELEASE
|
| 29 | shift /1
|
| 30 | )
|
| 31 | |
| 32 | SET BUILD_ROOT=%WORKSPACE%\Build\BeagleBoard\%TARGET%_%TARGET_TOOLS% |
andrewfish | f3198cb | 2010-02-05 06:50:09 +0000 | [diff] [blame] | 33 | |
andrewfish | 3aa4215 | 2010-02-05 18:43:49 +0000 | [diff] [blame] | 34 | @REM Build the Beagle Board firmware and creat an FD (FLASH Device) Image. |
andrewfish | f3198cb | 2010-02-05 06:50:09 +0000 | [diff] [blame] | 35 | CALL build -p BeagleBoardPkg\BeagleBoardPkg.dsc -a ARM -t RVCT31 -b %TARGET% %1 %2 %3 %4 %5 %6 %7 %8 |
andrewfish | 61e299a | 2010-03-02 00:05:24 +0000 | [diff] [blame] | 36 | @if ERRORLEVEL 1 goto Exit |
andrewfish | f3198cb | 2010-02-05 06:50:09 +0000 | [diff] [blame] | 37 | |
| 38 | @if /I "%1"=="CLEAN" goto Clean
|
| 39 | |
| 40 | @REM |
| 41 | @REM Ram starts at 0x80000000 |
| 42 | @REM OMAP 3530 TRM defines 0x80008208 as the entry point |
| 43 | @REM The reset vector is caught by the mask ROM in the OMAP 3530 so that is why this entry |
| 44 | @REM point looks so strange. |
| 45 | @REM OMAP 3430 TRM section 26.4.8 has Image header information. (missing in OMAP 3530 TRM) |
| 46 | @REM |
andrewfish | 61e299a | 2010-03-02 00:05:24 +0000 | [diff] [blame] | 47 | @cd Tools |
andrewfish | f3198cb | 2010-02-05 06:50:09 +0000 | [diff] [blame] | 48 | |
| 49 | ECHO Building tools... |
| 50 | CALL nmake |
| 51 | |
| 52 | ECHO Patching image with ConfigurationHeader.dat |
andrewfish | 3aa4215 | 2010-02-05 18:43:49 +0000 | [diff] [blame] | 53 | CALL GenerateImage -D ..\ConfigurationHeader.dat -E 0x80008208 -I %BUILD_ROOT%\FV\BEAGLEBOARD_EFI.fd -O %BUILD_ROOT%\FV\BeagleBoard_EFI_flashboot.fd |
andrewfish | f3198cb | 2010-02-05 06:50:09 +0000 | [diff] [blame] | 54 | |
| 55 | ECHO Patching ..\Debugger_scripts ... |
| 56 | SET DEBUGGER_SCRIPT=..\Debugger_scripts |
andrewfish | 3aa4215 | 2010-02-05 18:43:49 +0000 | [diff] [blame] | 57 | @for /f %%a IN ('dir /b %DEBUGGER_SCRIPT%\*.inc %DEBUGGER_SCRIPT%\*.cmm') do ( |
| 58 | @CALL replace %DEBUGGER_SCRIPT%\%%a %BUILD_ROOT%\%%a ZZZZZZ %BUILD_ROOT% WWWWWW %WORKSPACE% |
andrewfish | f3198cb | 2010-02-05 06:50:09 +0000 | [diff] [blame] | 59 | ) |
| 60 | |
| 61 | cd .. |
andrewfish | 23cb7cb | 2010-02-19 22:48:26 +0000 | [diff] [blame] | 62 | :Exit |
andrewfish | f3198cb | 2010-02-05 06:50:09 +0000 | [diff] [blame] | 63 | EXIT /B |
| 64 | |
| 65 | :Clean |
| 66 | cd Tools |
| 67 | CALL nmake clean |
| 68 | cd .. |