- CONSOLE=$CONSOLE_INFO
- tname=`type_to_name $t`
- if [[ "$t" == *_serial ]]; then
- if [ "$CONSOLE_INFO" == "$DEFAULT_CONSOLE" ] ; then
- CONSOLE="$DEFAULT_SERIAL_CONSOLE"
+ console=$CONSOLE_INFO
+
+ # figure if this is a serial image (can be specified in the type or with -s)
+ if [[ "$t" == *serial* || "$console" != "$GRAPHIC_CONSOLE" ]]; then
+ # remove serial from type
+ t=`echo $t | sed 's/_serial//'`
+ # check console
+ [ "$console" == "$GRAPHIC_CONSOLE" ] && console="$SERIAL_CONSOLE"
+ # compute filename part
+ if [ "$console" == "$SERIAL_CONSOLE" ] ; then
+ serial="-serial"
+ else
+ serial="-serial-$(echo $console | sed -e 's,:,,g')"