title: minicom runscript: expect not catching command prompt
body: <p>I have an issue where runscript is exiting before it can catch the prompt after Linux finishes booting.  My "proof" that its exiting is that the minicom menu can be pulled up once the prompt is visible, but my "send " was never issued.  Otherwise while minicom is running a script it doesn't take user-input for things like ctrl+az, etc.</p>
  
  <p>In order to try and see if the script is timing out I attempted adding timeout within the expect:</p>
  
  <pre><code>print "\n\n#####\nExec Linux\n#####\n\n"
  send exec -c \"noinitrd console=ttymxc0,115200 root=/dev/nfs&lt;etc.&gt;
  expect {
          "ubiformat:"
          "root@xxx_yyy:" break
          "root@xxx.yyy:" break
          "root@undefined.yyy:" break
          timeout 300 print "\n\n\n#####\n Expect timeout waiting for prompt during Linux boot, not going to do flash.sh\n#####\n\n"
  }
  </code></pre>
  
  <p>This results in my log file containing:</p>
  
  <pre><code>MXC Watchdog # 0 Timer: initial timeoutscript "update.mc" line 111: unknown command "300"
  </code></pre>
  
  <p>What's interesting is that on boards where the script works, it consistently works.  And on those where the command prompt isn't caught by expect, it consistently fails.</p>
  
  <p>I opened the log file in vim and issued ":set list" to see if the prompt matched perfectly what I had in my expect and it does.</p>
  
  <p>Notes on expect patterns:</p>
  
  <pre><code>"ubiformat:" // trying to reset timeout every time ubiformat is seen, so extra time it takes to format NAND doesn't cause a timeout
  "root@&lt;*&gt;:" break // trying to catch one of the possible prompts, either consistently works or fails based on boards tested on
  timeout 300 print "..." // trying to print a message if the reason I'm exiting the expect is because of a timeout, but note the syntax error printed in the log.
  </code></pre>
  
  <p>Questions:
  Any recommendations on how to debug why sometimes the prompt isn't caught by expect?
  Any recommendations on proper timeout syntax within an expect?</p>
  
  <p>Next I'll try 1h2m30s syntax for time within timeout, which I saw in one example somewhere.  Maybe > 60 isn't allowed with out 'h', 'm' or 's'.</p>