Есть железка. Она шлёт лог в uart. Мне лень подцепляться к нему. У меня есть доступ к железке по ssh.
Можно ли программно перехватить этот поток и вывалить в консоль?
В uboot написано так:
console=ttyAMA0,115200
Папка /dev, если надо
~ # ls -la /dev
total 196
drwxrwxrwt 9 root root 3160 Jan 2 02:37 .
drwxrwxrwt 22 root root 500 Jan 1 1970 ..
drwxr-xr-x 3 root root 80 Jan 2 02:36 .udev
crw------- 1 root root 218, 31 Jan 1 1970 acodec
crw------- 1 root root 218, 14 Jan 1 1970 adec
crw------- 1 root root 218, 13 Jan 1 1970 aenc
crw------- 1 root root 218, 5 Jan 1 1970 ai
crw------- 1 root root 218, 11 Jan 1 1970 aio
crw------- 1 root root 218, 6 Jan 1 1970 ao
drwxr-xr-x 2 root root 140 Jan 1 1970 block
drwxr-xr-x 3 root root 60 Jan 1 1970 bus
drwxr-xr-x 2 root root 2760 Jan 1 1970 char
crw------- 1 root root 5, 1 Jan 1 1970 console
crw------- 1 root root 10, 63 Jan 1 1970 cpu_dma_latency
lrwxrwxrwx 1 root root 13 Jan 1 1970 fd -> /proc/self/fd
-rw-r--r-- 1 root root 1150 Jan 1 1970 free.log
crw------- 1 root root 1, 7 Jan 1 1970 full
crw------- 1 root root 254, 0 Jan 1 1970 gpiochip0
crw------- 1 root root 254, 1 Jan 1 1970 gpiochip1
crw------- 1 root root 254, 2 Jan 1 1970 gpiochip2
crw------- 1 root root 254, 3 Jan 1 1970 gpiochip3
crw------- 1 root root 254, 4 Jan 1 1970 gpiochip4
crw------- 1 root root 254, 5 Jan 1 1970 gpiochip5
crw------- 1 root root 254, 6 Jan 1 1970 gpiochip6
crw------- 1 root root 254, 7 Jan 1 1970 gpiochip7
crw------- 1 root root 218, 62 Jan 1 1970 hi_mipi
crw------- 1 root root 89, 0 Jan 1 1970 i2c-0
crw------- 1 root root 89, 1 Jan 1 1970 i2c-1
crw------- 1 root root 89, 2 Jan 1 1970 i2c-2
drwxr-xr-x 2 root root 60 Jan 1 1970 input
crw------- 1 root root 218, 20 Jan 1 1970 isp_dev
crw------- 1 root root 218, 17 Jan 1 1970 ive
crw------- 1 root root 1, 11 Jan 1 1970 kmsg
crw------- 1 root root 218, 12 Jan 1 1970 logmpp
crw------- 1 root root 1, 1 Jan 1 1970 mem
crw------- 1 root root 10, 60 Jan 1 1970 memory_bandwidth
crw------- 1 root root 10, 59 Jan 1 1970 mmz_userdev
crw------- 1 root root 90, 0 Jan 1 1970 mtd0
crw------- 1 root root 90, 1 Jan 1 1970 mtd0ro
crw------- 1 root root 90, 2 Jan 1 1970 mtd1
crw------- 1 root root 90, 3 Jan 1 1970 mtd1ro
crw------- 1 root root 90, 4 Jan 1 1970 mtd2
crw------- 1 root root 90, 5 Jan 1 1970 mtd2ro
crw------- 1 root root 90, 6 Jan 1 1970 mtd3
crw------- 1 root root 90, 7 Jan 1 1970 mtd3ro
crw------- 1 root root 90, 8 Jan 1 1970 mtd4
crw------- 1 root root 90, 9 Jan 1 1970 mtd4ro
brw------- 1 root root 31, 0 Jan 1 1970 mtdblock0
brw------- 1 root root 31, 1 Jan 1 1970 mtdblock1
brw------- 1 root root 31, 2 Jan 1 1970 mtdblock2
brw------- 1 root root 31, 3 Jan 1 1970 mtdblock3
brw------- 1 root root 31, 4 Jan 1 1970 mtdblock4
crw------- 1 root root 10, 62 Jan 1 1970 network_latency
crw------- 1 root root 10, 61 Jan 1 1970 network_throughput
drwx------ 2 root root 40 Jan 2 02:37 nginx_upload_tmp
-rw-r--r-- 1 root root 3 Jan 2 02:37 ngx_start_status
crw------- 1 root root 1, 3 Jan 1 1970 null
crw------- 1 root root 108, 0 Jan 1 1970 ppp
crw------- 1 root root 10, 1 Jan 1 1970 psaux
crw------- 1 root root 5, 2 Jan 2 02:44 ptmx
drwxr-xr-x 2 root root 0 Jan 1 1970 pts
crw------- 1 root root 10, 58 Jan 1 1970 pwm
crw------- 1 root root 1, 8 Jan 1 1970 random
-rw-r--r-- 1 root root 64 Jan 1 1970 resolv.conf
crw------- 1 root root 218, 16 Jan 1 1970 rgn
crw------- 1 root root 253, 0 Jan 1 1970 rtc0
-rwxr-xr-x 1 root root 6 Jan 1 1970 servicestatus
crw------- 1 root root 153, 0 Jan 1 1970 spidev0.0
crw------- 1 root root 153, 1 Jan 1 1970 spidev1.0
crw------- 1 root root 153, 2 Jan 1 1970 spidev1.1
lrwxrwxrwx 1 root root 15 Jan 1 1970 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root root 15 Jan 1 1970 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root root 15 Jan 1 1970 stdout -> /proc/self/fd/1
crw------- 1 root root 218, 8 Jan 1 1970 sys
-rw-r--r-- 1 root root 0 Jan 2 02:37 test_asdpd
crw------- 1 root root 5, 0 Jan 1 1970 tty
crw------- 1 root root 4, 0 Jan 1 1970 tty0
crw------- 1 root root 4, 1 Jan 1 1970 tty1
crw------- 1 root root 4, 10 Jan 1 1970 tty10
crw------- 1 root root 4, 11 Jan 1 1970 tty11
crw------- 1 root root 4, 12 Jan 1 1970 tty12
crw------- 1 root root 4, 13 Jan 1 1970 tty13
crw------- 1 root root 4, 14 Jan 1 1970 tty14
crw------- 1 root root 4, 15 Jan 1 1970 tty15
crw------- 1 root root 4, 16 Jan 1 1970 tty16
crw------- 1 root root 4, 17 Jan 1 1970 tty17
crw------- 1 root root 4, 18 Jan 1 1970 tty18
crw------- 1 root root 4, 19 Jan 1 1970 tty19
crw------- 1 root root 4, 2 Jan 1 1970 tty2
crw------- 1 root root 4, 20 Jan 1 1970 tty20
crw------- 1 root root 4, 21 Jan 1 1970 tty21
crw------- 1 root root 4, 22 Jan 1 1970 tty22
crw------- 1 root root 4, 23 Jan 1 1970 tty23
crw------- 1 root root 4, 24 Jan 1 1970 tty24
crw------- 1 root root 4, 25 Jan 1 1970 tty25
crw------- 1 root root 4, 26 Jan 1 1970 tty26
crw------- 1 root root 4, 27 Jan 1 1970 tty27
crw------- 1 root root 4, 28 Jan 1 1970 tty28
crw------- 1 root root 4, 29 Jan 1 1970 tty29
crw------- 1 root root 4, 3 Jan 1 1970 tty3
crw------- 1 root root 4, 30 Jan 1 1970 tty30
crw------- 1 root root 4, 31 Jan 1 1970 tty31
crw------- 1 root root 4, 32 Jan 1 1970 tty32
crw------- 1 root root 4, 33 Jan 1 1970 tty33
crw------- 1 root root 4, 34 Jan 1 1970 tty34
crw------- 1 root root 4, 35 Jan 1 1970 tty35
crw------- 1 root root 4, 36 Jan 1 1970 tty36
crw------- 1 root root 4, 37 Jan 1 1970 tty37
crw------- 1 root root 4, 38 Jan 1 1970 tty38
crw------- 1 root root 4, 39 Jan 1 1970 tty39
crw------- 1 root root 4, 4 Jan 1 1970 tty4
crw------- 1 root root 4, 40 Jan 1 1970 tty40
crw------- 1 root root 4, 41 Jan 1 1970 tty41
crw------- 1 root root 4, 42 Jan 1 1970 tty42
crw------- 1 root root 4, 43 Jan 1 1970 tty43
crw------- 1 root root 4, 44 Jan 1 1970 tty44
crw------- 1 root root 4, 45 Jan 1 1970 tty45
crw------- 1 root root 4, 46 Jan 1 1970 tty46
crw------- 1 root root 4, 47 Jan 1 1970 tty47
crw------- 1 root root 4, 48 Jan 1 1970 tty48
crw------- 1 root root 4, 49 Jan 1 1970 tty49
crw------- 1 root root 4, 5 Jan 1 1970 tty5
crw------- 1 root root 4, 50 Jan 1 1970 tty50
crw------- 1 root root 4, 51 Jan 1 1970 tty51
crw------- 1 root root 4, 52 Jan 1 1970 tty52
crw------- 1 root root 4, 53 Jan 1 1970 tty53
crw------- 1 root root 4, 54 Jan 1 1970 tty54
crw------- 1 root root 4, 55 Jan 1 1970 tty55
crw------- 1 root root 4, 56 Jan 1 1970 tty56
crw------- 1 root root 4, 57 Jan 1 1970 tty57
crw------- 1 root root 4, 58 Jan 1 1970 tty58
crw------- 1 root root 4, 59 Jan 1 1970 tty59
crw------- 1 root root 4, 6 Jan 1 1970 tty6
crw------- 1 root root 4, 60 Jan 1 1970 tty60
crw------- 1 root root 4, 61 Jan 1 1970 tty61
crw------- 1 root root 4, 62 Jan 1 1970 tty62
crw------- 1 root root 4, 63 Jan 1 1970 tty63
crw------- 1 root root 4, 7 Jan 1 1970 tty7
crw------- 1 root root 4, 8 Jan 1 1970 tty8
crw------- 1 root root 4, 9 Jan 1 1970 tty9
crw------- 1 root root 204, 64 Jan 1 1970 ttyAMA0
crw------- 1 root root 204, 65 Jan 1 1970 ttyAMA1
crw------- 1 root root 204, 66 Jan 1 1970 ttyAMA2
crw--w---- 1 root root 204, 64 Jan 2 02:44 ttyS000
crw------- 1 root root 10, 223 Jan 1 1970 uinput
-rwxr-xr-x 1 root root 183700 Jan 1 1970 update
crw------- 1 root root 1, 9 Jan 1 1970 urandom
crw------- 1 root root 218, 9 Jan 1 1970 vb
crw------- 1 root root 7, 0 Jan 1 1970 vcs
crw------- 1 root root 7, 1 Jan 1 1970 vcs1
crw------- 1 root root 7, 128 Jan 1 1970 vcsa
crw------- 1 root root 7, 129 Jan 1 1970 vcsa1
crw------- 1 root root 218, 2 Jan 1 1970 venc
crw------- 1 root root 218, 19 Jan 1 1970 vgs
crw------- 1 root root 218, 63 Jan 1 1970 vi
crw------- 1 root root 218, 10 Jan 1 1970 vpss
crw------- 1 root root 218, 101 Jan 1 1970 watchdog
crw------- 1 root root 1, 5 Jan 1 1970 zero