X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=build.sh;h=b09c9afa451447ee668a735a4bdeaa60de23ab29;hb=1d3cd563ac1e8b942340efcf989007f8a5b45595;hp=c667d27bdfe065120f9aa1dd84f95b536365c39b;hpb=a7c4c0257f81cd34238afd10b7820b1ae774e036;p=karo-tx-redboot.git diff --git a/build.sh b/build.sh index c667d27b..b09c9afa 100644 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash options="cnqrR" release=false tools_dir="$PWD/tools/bin" @@ -10,8 +10,6 @@ rebuild=false doit=true make_opts= -cmd_prefix=${CROSS_COMPILE-arm-926ejs-linux-gnu-} - error() { if [ -n "${target}" ];then echo "${target} build aborted" @@ -49,10 +47,6 @@ build_host_tools() { cd "$wd" } -if [ `uname -s` = Linux ];then - PATH="/usr/local/arm/cross-gcc-4.2.0/i686-pc-linux-gnu/bin:$PATH" -fi - while getopts "$options" opt;do case $opt in c) @@ -84,7 +78,7 @@ shift $(($OPTIND - 1)) if [ $# -gt 0 ];then targets="$@" else - targets=$(cd config; ls *.ecc) + targets=$(cd config;ls *.ecc) fi set -e @@ -148,20 +142,18 @@ for target in ${targets};do if $clean;then $quiet || echo "Cleaning up build tree for ${target}" - make ${make_opts} COMMAND_PREFIX=${cmd_prefix} clean + make ${make_opts} clean fi $quiet || echo "Compiling ${target}" [ -d "${build_dir}" ] - make -C "${build_dir}" COMMAND_PREFIX=${cmd_prefix} ${make_opts} + make -C "${build_dir}" ${make_opts} cd $wd if $doit && [ -s "${inst_dir}/bin/redboot.elf" ];then bootstrap_addr="$(${cmd_prefix}nm "${inst_dir}/bin/redboot.elf" \ | sed '/Now_in_SDRAM/!d;s/ .*$//')" - if ! echo "$bootstrap_addr" | grep -i '^[0-9a-f]\{4\}0[0-7]';then -# if ! ${cmd_prefix}nm "${inst_dir}/bin/redboot.elf" \ -# | grep 'Now_in_SDRAM' | grep -i '^[0-9a-f]\{4\}0[0-7]';then + if [ -n "$bootstrap_addr" ] && ! echo "$bootstrap_addr" | grep -i '^[0-9a-f]\{4\}0[0-7]';then echo "ERROR: Bootstrap does not fit into first NAND page!" echo $bootstrap_addr exit 1