echo "Internal error!" >&2 ; exit 1 ;;
esac
done
+
+GNU_MAKE=$(scripts/show-gnu-make) || {
+ echo "GNU Make not found" >&2
+ exit 1
+}
+
# echo "Remaining arguments:"
# for arg do echo '--> '"\`$arg'" ; done
+tools/genboardscfg.py || {
+ echo "Failed to generate boards.cfg" >&2
+ exit 1
+}
+
FILTER="\$1 !~ /^#/"
[ "$opt_a" ] && FILTER="${FILTER} && $opt_a"
[ "$opt_c" ] && FILTER="${FILTER} && $opt_c"
LIST_4xx="$(targets_by_cpu ppc4xx)"
-#########################################################################
-## MPC824x Systems
-#########################################################################
-
-LIST_824x="$(targets_by_cpu mpc824x)"
-
#########################################################################
## MPC8260 Systems (includes 8250, 8255 etc.)
#########################################################################
LIST_86xx="$(targets_by_cpu mpc86xx)"
-#########################################################################
-## 74xx/7xx Systems
-#########################################################################
-
-LIST_74xx_7xx="$(targets_by_cpu 74xx_7xx)"
-
#########################################################################
## PowerPC groups
#########################################################################
${LIST_85xx} \
${LIST_86xx} \
${LIST_4xx} \
- ${LIST_74xx_7xx}\
"
# Alias "ppc" -> "powerpc" to not break compatibility with older scripts
set ${line}
- CONFIG_NAME="${7%_config}"
+ CONFIG_NAME="${7%_defconfig}"
- [ "${BOARD_NAME}" ] || BOARD_NAME="${7%_config}"
+ [ "${BOARD_NAME}" ] || BOARD_NAME="${7%_defconfig}"
if [ $# -gt 5 ]; then
if [ "$6" = "-" ] ; then
get_target_arch() {
local target=$1
- # Automatic mode
- local line=`awk '\$7 == "'"$target"'" { print \$0 }' boards.cfg`
-
- if [ -z "${line}" ] ; then echo "" ; return ; fi
-
- set ${line}
- echo "$2"
+ awk '$7 == "'$target'" { print $2 }' boards.cfg
}
list_target() {
target_arch=$(get_target_arch ${target})
eval cross_toolchain=\$CROSS_COMPILE_`echo $target_arch | tr '[:lower:]' '[:upper:]'`
if [ "${cross_toolchain}" ] ; then
- MAKE="make CROSS_COMPILE=${cross_toolchain}"
+ MAKE="$GNU_MAKE CROSS_COMPILE=${cross_toolchain}"
elif [ "${CROSS_COMPILE}" ] ; then
- MAKE="make CROSS_COMPILE=${CROSS_COMPILE}"
+ MAKE="$GNU_MAKE CROSS_COMPILE=${CROSS_COMPILE}"
else
- MAKE=make
+ MAKE=$GNU_MAKE
fi
if [ "${output_dir}" != "." ] ; then
MAKE="${MAKE} O=${output_dir}"
fi
- ${MAKE} distclean >/dev/null
- ${MAKE} -s ${target}_config
+ ${MAKE} mrproper >/dev/null
+
+ echo "Building ${target} board..."
+ ${MAKE} -s ${target}_defconfig >/dev/null
${MAKE} ${JOBS} ${CHECK} all \
>${LOG_DIR}/$target.MAKELOG 2> ${LOG_DIR}/$target.ERR
RC=1
fi
+ OBJS=${output_dir}/u-boot
+ if [ -e ${output_dir}/spl/u-boot-spl ]; then
+ OBJS="${OBJS} ${output_dir}/spl/u-boot-spl"
+ fi
+
+ ${CROSS_COMPILE}size ${OBJS} | tee -a ${LOG_DIR}/$target.MAKELOG
+
if [ $BUILD_MANY == 1 ] ; then
trap - TERM
fi
fi
- OBJS=${output_dir}/u-boot
- if [ -e ${output_dir}/spl/u-boot-spl ]; then
- OBJS="${OBJS} ${output_dir}/spl/u-boot-spl"
- fi
-
- ${CROSS_COMPILE}size ${OBJS} | tee -a ${LOG_DIR}/$target.MAKELOG
-
[ -e "${LOG_DIR}/${target}.ERR" ] && cat "${LOG_DIR}/${target}.ERR"
touch "${donep}${build_idx}"