Yurij Posted March 31, 2018 Share Posted March 31, 2018 I have the latest armbian running on Orange Pi Zero (H2+) root@orangepi:~# uname -a Linux orangepi 4.14.18-sunxi #24 SMP Fri Feb 9 16:24:32 CET 2018 armv7l GNU/Linux During boot kernel creates 256 virtual tty devices: root@orangepi:~# ls /dev/tty* [0/433] /dev/tty /dev/tty38 /dev/ttya1 /dev/ttyc2 /dev/ttye3 /dev/ttyq3 /dev/ttys2 /dev/ttytd /dev/ttyve /dev/ttyxf /dev/tty0 /dev/tty39 /dev/ttya2 /dev/ttyc3 /dev/ttye4 /dev/ttyq4 /dev/ttyS2 /dev/ttyte /dev/ttyvf /dev/ttyy0 /dev/tty1 /dev/tty4 /dev/ttya3 /dev/ttyc4 /dev/ttye5 /dev/ttyq5 /dev/ttys3 /dev/ttytf /dev/ttyw0 /dev/ttyy1 /dev/tty10 /dev/tty40 /dev/ttya4 /dev/ttyc5 /dev/ttye6 /dev/ttyq6 /dev/ttyS3 /dev/ttyu0 /dev/ttyw1 /dev/ttyy2 /dev/tty11 /dev/tty41 /dev/ttya5 /dev/ttyc6 /dev/ttye7 /dev/ttyq7 /dev/ttys4 /dev/ttyu1 /dev/ttyw2 /dev/ttyy3 /dev/tty12 /dev/tty42 /dev/ttya6 /dev/ttyc7 /dev/ttye8 /dev/ttyq8 /dev/ttyS4 /dev/ttyu2 /dev/ttyw3 /dev/ttyy4 /dev/tty13 /dev/tty43 /dev/ttya7 /dev/ttyc8 /dev/ttye9 /dev/ttyq9 /dev/ttys5 /dev/ttyu3 /dev/ttyw4 /dev/ttyy5 /dev/tty14 /dev/tty44 /dev/ttya8 /dev/ttyc9 /dev/ttyea /dev/ttyqa /dev/ttyS5 /dev/ttyu4 /dev/ttyw5 /dev/ttyy6 /dev/tty15 /dev/tty45 /dev/ttya9 /dev/ttyca /dev/ttyeb /dev/ttyqb /dev/ttys6 /dev/ttyu5 /dev/ttyw6 /dev/ttyy7 /dev/tty16 /dev/tty46 /dev/ttyaa /dev/ttycb /dev/ttyec /dev/ttyqc /dev/ttyS6 /dev/ttyu6 /dev/ttyw7 /dev/ttyy8 /dev/tty17 /dev/tty47 /dev/ttyab /dev/ttycc /dev/ttyed /dev/ttyqd /dev/ttys7 /dev/ttyu7 /dev/ttyw8 /dev/ttyy9 /dev/tty18 /dev/tty48 /dev/ttyac /dev/ttycd /dev/ttyee /dev/ttyqe /dev/ttyS7 /dev/ttyu8 /dev/ttyw9 /dev/ttyya /dev/tty19 /dev/tty49 /dev/ttyad /dev/ttyce /dev/ttyef /dev/ttyqf /dev/ttys8 /dev/ttyu9 /dev/ttywa /dev/ttyyb /dev/tty2 /dev/tty5 /dev/ttyae /dev/ttycf /dev/ttyGS0 /dev/ttyr0 /dev/ttys9 /dev/ttyua /dev/ttywb /dev/ttyyc /dev/tty20 /dev/tty50 /dev/ttyaf /dev/ttyd0 /dev/ttyp0 /dev/ttyr1 /dev/ttysa /dev/ttyub /dev/ttywc /dev/ttyyd /dev/tty21 /dev/tty51 /dev/ttyb0 /dev/ttyd1 /dev/ttyp1 /dev/ttyr2 /dev/ttysb /dev/ttyuc /dev/ttywd /dev/ttyye /dev/tty22 /dev/tty52 /dev/ttyb1 /dev/ttyd2 /dev/ttyp2 /dev/ttyr3 /dev/ttysc /dev/ttyud /dev/ttywe /dev/ttyyf /dev/tty23 /dev/tty53 /dev/ttyb2 /dev/ttyd3 /dev/ttyp3 /dev/ttyr4 /dev/ttysd /dev/ttyue /dev/ttywf /dev/ttyz0 /dev/tty24 /dev/tty54 /dev/ttyb3 /dev/ttyd4 /dev/ttyp4 /dev/ttyr5 /dev/ttyse /dev/ttyuf /dev/ttyx0 /dev/ttyz1 /dev/tty25 /dev/tty55 /dev/ttyb4 /dev/ttyd5 /dev/ttyp5 /dev/ttyr6 /dev/ttysf /dev/ttyv0 /dev/ttyx1 /dev/ttyz2 /dev/tty26 /dev/tty56 /dev/ttyb5 /dev/ttyd6 /dev/ttyp6 /dev/ttyr7 /dev/ttyt0 /dev/ttyv1 /dev/ttyx2 /dev/ttyz3 /dev/tty27 /dev/tty57 /dev/ttyb6 /dev/ttyd7 /dev/ttyp7 /dev/ttyr8 /dev/ttyt1 /dev/ttyv2 /dev/ttyx3 /dev/ttyz4 /dev/tty28 /dev/tty58 /dev/ttyb7 /dev/ttyd8 /dev/ttyp8 /dev/ttyr9 /dev/ttyt2 /dev/ttyv3 /dev/ttyx4 /dev/ttyz5 /dev/tty29 /dev/tty59 /dev/ttyb8 /dev/ttyd9 /dev/ttyp9 /dev/ttyra /dev/ttyt3 /dev/ttyv4 /dev/ttyx5 /dev/ttyz6 /dev/tty3 /dev/tty6 /dev/ttyb9 /dev/ttyda /dev/ttypa /dev/ttyrb /dev/ttyt4 /dev/ttyv5 /dev/ttyx6 /dev/ttyz7 /dev/tty30 /dev/tty60 /dev/ttyba /dev/ttydb /dev/ttypb /dev/ttyrc /dev/ttyt5 /dev/ttyv6 /dev/ttyx7 /dev/ttyz8 /dev/tty31 /dev/tty61 /dev/ttybb /dev/ttydc /dev/ttypc /dev/ttyrd /dev/ttyt6 /dev/ttyv7 /dev/ttyx8 /dev/ttyz9 /dev/tty32 /dev/tty62 /dev/ttybc /dev/ttydd /dev/ttypd /dev/ttyre /dev/ttyt7 /dev/ttyv8 /dev/ttyx9 /dev/ttyza /dev/tty33 /dev/tty63 /dev/ttybd /dev/ttyde /dev/ttype /dev/ttyrf /dev/ttyt8 /dev/ttyv9 /dev/ttyxa /dev/ttyzb /dev/tty34 /dev/tty7 /dev/ttybe /dev/ttydf /dev/ttypf /dev/ttys0 /dev/ttyt9 /dev/ttyva /dev/ttyxb /dev/ttyzc /dev/tty35 /dev/tty8 /dev/ttybf /dev/ttye0 /dev/ttyq0 /dev/ttyS0 /dev/ttyta /dev/ttyvb /dev/ttyxc /dev/ttyzd /dev/tty36 /dev/tty9 /dev/ttyc0 /dev/ttye1 /dev/ttyq1 /dev/ttys1 /dev/ttytb /dev/ttyvc /dev/ttyxd /dev/ttyze /dev/tty37 /dev/ttya0 /dev/ttyc1 /dev/ttye2 /dev/ttyq2 /dev/ttyS1 /dev/ttytc /dev/ttyvd /dev/ttyxe /dev/ttyzf and systemd spends a lot of boot time on running services for each of them (I really need this device to start up as quick as possible, each second counts): Output of systemd-analyze plot Begin: End: Search shows that this is a known issue "caused by CONFIG_LEGACY_PTYS=y and CONFIG_LEGACY_PTY_COUNT=256 in the kernel configuration": https://github.com/scaleway/image-debian/issues/27 Other posts suggest passing "pty.legacy_count=<some_small_value>" as a kernel parameter, but I have no idea how to achieve this with armbian, it seems that armbianEnv.txt is not aware of anything like this. Please help me figure out how to pass "pty.legacy_count=2" kernel parameter to kernel during boot (since editing boot.cmd is considerd to be a bad practice). Thanks. Link to comment Share on other sites More sharing options...
Yurij Posted March 31, 2018 Author Share Posted March 31, 2018 The solution was to use extraargs env variable: append extraargs=pty.legacy_count=2 to /boot/armbianEnv.txt extraargs=pty.legacy_count=2 Now it doesn't create that many ttys and systemd services for them. Link to comment Share on other sites More sharing options...
IgorS Posted April 18, 2018 Share Posted April 18, 2018 Useful. Thanks! 1 Link to comment Share on other sites More sharing options...
Recommended Posts