Do not block the boot process for five seconds or longer. When adding the configurable timeout the other timeout code got broken. Remove it and instead supply uart_recv_bytes with the timeout per charachter.