+[ $# -gt 7 ] && exit 1
+
+# Strip all options and/or _config suffixes
+CONFIG_NAME="${1%_config}"
+
+[ "${BOARD_NAME}" ] || BOARD_NAME="${1%_config}"
+
+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
+}