]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - MAKEALL
fw_env: calculate default number of env sectors
[karo-tx-uboot.git] / MAKEALL
diff --git a/MAKEALL b/MAKEALL
index 80cd4f83e9bda5583b5522120c39e2fd52dbf86d..705a0bb5e1a2f2c20c325e7b67452f5e3ab282a5 100755 (executable)
--- a/MAKEALL
+++ b/MAKEALL
@@ -18,6 +18,7 @@ usage()
          -c CPU,    --cpu CPU         Build all boards with cpu CPU
          -v VENDOR, --vendor VENDOR   Build all boards with vendor VENDOR
          -s SOC,    --soc SOC         Build all boards with soc SOC
+         -b BOARD,  --board BOARD     Build all boards with board name BOARD
          -l,        --list            List all targets to be built
          -m,        --maintainers     List all targets and maintainer email
          -M,        --mails           List all targets and all affilated emails
@@ -59,8 +60,8 @@ usage()
        exit ${ret}
 }
 
-SHORT_OPTS="ha:c:v:s:lmMCnr"
-LONG_OPTS="help,arch:,cpu:,vendor:,soc:,list,maintainers,mails,check,continue,rebuild-errors"
+SHORT_OPTS="ha:c:v:s:b:lmMCnr"
+LONG_OPTS="help,arch:,cpu:,vendor:,soc:,board:,list,maintainers,mails,check,continue,rebuild-errors"
 
 # Option processing based on util-linux-2.13/getopt-parse.bash
 
@@ -121,6 +122,17 @@ while true ; do
                fi
                SELECTED='y'
                shift 2 ;;
+       -b|--board)
+               # echo "Option BOARD: argument \`$2'"
+               if [ "$opt_b" ] ; then
+                       opt_b="${opt_b%)} || \$6 == \"$2\" || \$7 == \"$2\")"
+               else
+                       # We need to check the 7th field too
+                       # for boards whose 6th field is "-"
+                       opt_b="(\$6 == \"$2\" || \$7 == \"$2\")"
+               fi
+               SELECTED='y'
+               shift 2 ;;
        -C|--check)
                CHECK='C=1'
                shift ;;
@@ -158,6 +170,7 @@ FILTER="\$1 !~ /^#/"
 [ "$opt_c" ] && FILTER="${FILTER} && $opt_c"
 [ "$opt_s" ] && FILTER="${FILTER} && $opt_s"
 [ "$opt_v" ] && FILTER="${FILTER} && $opt_v"
+[ "$opt_b" ] && FILTER="${FILTER} && $opt_b"
 
 if [ "$SELECTED" ] ; then
        SELECTED=$(awk '('"$FILTER"') { print $7 }' boards.cfg)
@@ -367,6 +380,12 @@ LIST_ARM11="$(targets_by_cpu arm1136)      \
 
 LIST_ARMV7="$(targets_by_cpu armv7)"
 
+#########################################################################
+## ARMV8 Systems
+#########################################################################
+
+LIST_ARMV8="$(targets_by_cpu armv8)"
+
 #########################################################################
 ## AT91 Systems
 #########################################################################
@@ -379,8 +398,6 @@ LIST_at91="$(targets_by_soc at91)"
 
 LIST_pxa="$(targets_by_cpu pxa)"
 
-LIST_ixp="$(targets_by_cpu ixp)"
-
 #########################################################################
 ## SPEAr Systems
 #########################################################################
@@ -391,7 +408,11 @@ LIST_spear="$(targets_by_soc spear)"
 ## ARM groups
 #########################################################################
 
-LIST_arm="$(targets_by_arch arm)"
+LIST_arm="$(targets_by_arch arm |              \
+       for ARMV8_TARGET in $LIST_ARMV8;        \
+               do sed "/$ARMV8_TARGET/d";      \
+       done)                                   \
+"
 
 #########################################################################
 ## MIPS Systems                (default = big endian)
@@ -506,6 +527,12 @@ LIST_sparc="$(targets_by_arch sparc)"
 
 LIST_nds32="$(targets_by_arch nds32)"
 
+#########################################################################
+## ARC Systems
+#########################################################################
+
+LIST_arc="$(targets_by_arch arc)"
+
 #-----------------------------------------------------------------------
 
 get_target_location() {
@@ -645,8 +672,6 @@ build_target() {
                output_dir="${OUTPUT_PREFIX}"
        fi
 
-       export BUILD_DIR="${output_dir}"
-
        target_arch=$(get_target_arch ${target})
        eval cross_toolchain=\$CROSS_COMPILE_`echo $target_arch | tr '[:lower:]' '[:upper:]'`
        if [ "${cross_toolchain}" ] ; then
@@ -657,6 +682,10 @@ build_target() {
            MAKE=make
        fi
 
+       if [  "${output_dir}" != "." ] ; then
+               MAKE="${MAKE} O=${output_dir}"
+       fi
+
        ${MAKE} distclean >/dev/null
        ${MAKE} -s ${target}_config
 
@@ -671,7 +700,7 @@ build_target() {
        if [ $BUILD_MANY == 1 ] ; then
                trap - TERM
 
-               ${MAKE} -s tidy
+               ${MAKE} -s clean
 
                if [ -s ${LOG_DIR}/${target}.ERR ] ; then
                        cp ${LOG_DIR}/${target}.ERR ${OUTPUT_PREFIX}/ERR/${target}