This method is similar to wait_for_text but is based on matching serial console lines instead of the VGA output.