-if [ "${ARCH}" -a "${ARCH}" != "$2" ]; then
- echo "Failed: \$ARCH=${ARCH}, should be '$2' for ${BOARD_NAME}" 1>&2
+arch="$2"
+cpu="$3"
+if [ "$4" = "-" ] ; then
+ board=${BOARD_NAME}
+else
+ board="$4"
+fi
+[ $# -gt 4 ] && [ "$5" != "-" ] && vendor="$5"
+[ $# -gt 5 ] && [ "$6" != "-" ] && soc="$6"
+[ $# -gt 6 ] && [ "$7" != "-" ] && {
+ # check if we have a board config name in the options field
+ # the options field mave have a board config name and a list
+ # of options, both separated by a colon (':'); the options are
+ # separated by commas (',').
+ #
+ # Check for board name
+ tmp="${7%:*}"
+ if [ "$tmp" ] ; then
+ CONFIG_NAME="$tmp"
+ fi
+ # Check if we only have a colon...
+ if [ "${tmp}" != "$7" ] ; then
+ options=${7#*:}
+ TARGETS="`echo ${options} | sed 's:,: :g'` ${TARGETS}"
+ fi
+}
+
+if [ "${ARCH}" -a "${ARCH}" != "${arch}" ]; then
+ echo "Failed: \$ARCH=${ARCH}, should be '${arch}' for ${BOARD_NAME}" 1>&2