X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-redboot.git;a=blobdiff_plain;f=build.sh;h=9363ba525f9e1b87e42d77f299c853bd08ea84fe;hp=c667d27bdfe065120f9aa1dd84f95b536365c39b;hb=0e96fc3ed8cfc4caf2fc1575112dd5473f610423;hpb=f1e37f425017fa272a0ae92f528d0249a4795452 diff --git a/build.sh b/build.sh index c667d27b..9363ba52 100644 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash options="cnqrR" release=false tools_dir="$PWD/tools/bin" @@ -84,7 +84,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 +148,20 @@ 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} 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}" 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