X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=BeagleBoardPkg%2Fbuild.sh;h=ad8e69fc2478393027b24cb0b4a02f9ee526be8d;hb=28f5d708e7a162e5d34afc620b1ec908a43e33a5;hp=85ce46eb14ec7b19dd4c4636a2144fa0221fd04b;hpb=adbd84b439da9b16f498e1b813686ff29da4ff4f;p=mirror_edk2.git diff --git a/BeagleBoardPkg/build.sh b/BeagleBoardPkg/build.sh index 85ce46eb14..ad8e69fc24 100755 --- a/BeagleBoardPkg/build.sh +++ b/BeagleBoardPkg/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2008 - 2009, Apple, Inc. All rights reserved. -# All rights reserved. This program and the accompanying materials +# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
+# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php @@ -37,7 +37,7 @@ function process_debug_scripts { # # Setup workspace if it is not set # -if [ -z "$WORKSPACE" ] +if [ -z "${WORKSPACE:-}" ] then echo Initializing workspace cd .. @@ -51,17 +51,22 @@ else fi # -# Pick a default tool type for a given OS +# Pick a default tool type for a given OS if no toolchain already defined # -case `uname` in - CYGWIN*) +if [ -z "${TARGET_TOOLS:-}" ] +then + case `uname` in + CYGWIN*) TARGET_TOOLS=RVCT31CYGWIN ;; - Linux*) - # Not tested - TARGET_TOOLS=ELFGCC + Linux*) + if [[ ! -z `locate arm-linux-gnueabi-gcc` ]]; then + TARGET_TOOLS=ARMLINUXGCC + else + TARGET_TOOLS=ARMGCC + fi ;; - Darwin*) + Darwin*) Major=$(uname -r | cut -f 1 -d '.') if [[ $Major == 9 ]] then @@ -71,7 +76,8 @@ case `uname` in TARGET_TOOLS=XCODE32 fi ;; -esac + esac +fi TARGET=DEBUG for arg in "$@" @@ -99,9 +105,9 @@ fi # Build the edk2 BeagleBoard code # if [[ $TARGET == RELEASE ]]; then - build -p $WORKSPACE/BeagleBoardPkg/BeagleBoardPkg.dsc -a ARM -t $TARGET_TOOLS -b -D DEBUG_TARGET=RELEASE $1 $2 $3 $4 $5 $6 $7 $8 + build -p $WORKSPACE/BeagleBoardPkg/BeagleBoardPkg.dsc -a ARM -t $TARGET_TOOLS -b $TARGET -D DEBUG_TARGET=RELEASE ${2:-} ${3:-} ${4:-} ${5:-} ${6:-} ${7:-} ${8:-} else - build -p $WORKSPACE/BeagleBoardPkg/BeagleBoardPkg.dsc -a ARM -t $TARGET_TOOLS -b $TARGET $1 $2 $3 $4 $5 $6 $7 $8 + build -p ${WORKSPACE:-}/BeagleBoardPkg/BeagleBoardPkg.dsc -a ARM -t $TARGET_TOOLS -b $TARGET ${1:-} ${2:-} ${3:-} ${4:-} ${5:-} ${6:-} ${7:-} ${8:-} fi @@ -132,12 +138,12 @@ rm -f $FLASH_BOOT # # Ram starts at 0x80000000 -# OMAP 3530 TRM defines 0x80008208 as the entry point +# OMAP 3530 TRM defines 0x80008000 as the entry point # The reset vector is caught by the mask ROM in the OMAP 3530 so that is why this entry # point looks so strange. # OMAP 3430 TRM section 26.4.8 has Image header information. (missing in OMAP 3530 TRM) # -$GENERATE_IMAGE -D $WORKSPACE/BeagleBoardPkg/ConfigurationHeader.dat -E 0x80008208 -I $BUILD_ROOT/FV/BEAGLEBOARD_EFI.fd -O $FLASH_BOOT +$GENERATE_IMAGE -D $WORKSPACE/BeagleBoardPkg/ConfigurationHeader.dat -E 0x80008000 -I $BUILD_ROOT/FV/BEAGLEBOARD_EFI.fd -O $FLASH_BOOT echo Creating debugger scripts process_debug_scripts $WORKSPACE/BeagleBoardPkg/Debugger_scripts