The previous velxio-init was racing devtmpfs population: its bash redirect '</dev/ttyAMA1 >/dev/ttyAMA1' fired before the kernel had enumerated the PL011 driver and populated the device node, so PID 1's fd 0/1/2 redirect failed and the `while true` loop spun on "No such file or directory" forever. Two fixes baked into the SD image: 1. Wait up to 12 s for /dev/ttyAMA1 to appear (200 ms poll × 60). On real bare-metal Pi the node is there at init time, but under QEMU emulation the PL011 probe races. 2. Exec the shell with </dev/console >/dev/console — /dev/console is set up by the kernel (no race) and points at the last `console=` arg from the cmdline, which is ttyAMA1. Also wrap in `setsid -c` so bash gets a controlling terminal and behaves interactively. Verified end-to-end with a live QEMU boot against the patched .img: shell prompt `root@raspberrypi:/#` appears within ~50 s wall (most of that is the kernel waiting on the second SD slot mmc1 timeout twice = 20 s). |
||
|---|---|---|
| .. | ||
| api | ||
| core | ||
| database | ||
| mcp | ||
| models | ||
| schemas | ||
| services | ||
| utils | ||
| __init__.py | ||
| main.py | ||