[FOSS_TLK] Fix Build Script to generate TOS
Sharif Inamdar [Tue, 10 Mar 2015 05:03:01 +0000 (10:03 +0530)]
Fix the build script inorder to generate tos.img
at one go.
Just do "./build <chip>" in tlk/ and it will build
the tos.img for that particular chip.

Signed-off-by: Sharif Inamdar <isharif@nvidia.com>
Change-Id: Ibd88abccadf657346be1a67edbef28f2b747ded1
Reviewed-on: http://git-master/r/758969
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

build
makefile
task/rules.mk

diff --git a/build b/build
index d102198..b4bafaa 100755 (executable)
--- a/build
+++ b/build
@@ -3,7 +3,7 @@
 FAILED=""
 MONLIB=false
 TARGET_ARCH=arm64
-TOOLS_PATH=../tools/aarch64-linux-android-4.8
+TOOLS_PATH=../tools/arm-eabi-4.8
 
 if [ -d "$TOOLS_PATH" ]; then
        echo Tools found
@@ -16,12 +16,16 @@ if [ "$1" = "t124" ]; then
        MONLIB=true
        TARGET_ARCH=arm
 fi
-cd secure_monitor
+cd ../lib
+nice make -j4 -e || FAILED="$FAILED $1"
+cd ../tasks
+nice make -j4 -e || FAILED="$FAILED $1"
+cd ../secure_monitor
 echo PROJECT=tegra TARGET=$1 TARGET_ARCH=$TARGET_ARCH MONITOR_LIBRARY=$MONLIB STANDALONE_MONITOR=false nice make -j4 -e || FAILED="$FAILED $1"
 PROJECT=tegra TARGET=$1 TARGET_ARCH=$TARGET_ARCH MONITOR_LIBRARY=$MONLIB STANDALONE_MONITOR=false nice make -j4 -e || FAILED="$FAILED $1"
-cd ..
-echo PROJECT=tegra TARGET=$1 TARGET_ARCH=$TARGET_ARCH nice make -j4 -e || FAILED="$FAILED $1"
-PROJECT=tegra TARGET=$1 TARGET_ARCH=$TARGET_ARCH nice make -j4 -e || FAILED="$FAILED $1"
+cd ../tlk
+echo TOOLCHAIN_PREFIX=$TOOLS_PATH/bin/arm-eabi- PROJECT=tegra TARGET=$1 TARGET_ARCH=$TARGET_ARCH nice make -j4 -e || FAILED="$FAILED $1"
+TOOLCHAIN_PREFIX=$TOOLS_PATH/bin/arm-eabi- PROJECT=tegra TARGET=$1 TARGET_ARCH=$TARGET_ARCH nice make -j4 -e || FAILED="$FAILED $1"
 
 if [ "$FAILED" != "" ]; then
        echo
index e322c80..edb9565 100644 (file)
--- a/makefile
+++ b/makefile
@@ -131,7 +131,7 @@ include target/rules.mk
 include kernel/rules.mk
 include dev/rules.mk
 include app/rules.mk
-#include task/rules.mk
+include task/rules.mk
 
 # recursively include any modules in the MODULE variable, leaving a trail of included
 # modules in the ALLMODULES list
index 16ac0ac..7c62af7 100644 (file)
@@ -16,7 +16,7 @@ GENERATED += $(TASK_OBJ) $(TASK_BIN)
 $(TASK_OBJ): $(TASK_BIN)
        @$(MKDIR)
        @echo generating $@
-       cd $(TASKDIR); $(LD) -r -b binary -o $(notdir $@) $(notdir $^)
+       cd $(TASKDIR); ../$(LD) -r -b binary -o $(notdir $@) $(notdir $^)
        $(OBJCOPY) --prefix-sections=.task $@
 
 $(TASK_BIN): $(TASKS)