tools: kwboot: Add support for backspace key in mini terminal
authorPali Rohár <pali@kernel.org>
Wed, 2 Mar 2022 10:49:23 +0000 (11:49 +0100)
committerStefan Roese <sr@denx.de>
Fri, 4 Mar 2022 12:12:20 +0000 (13:12 +0100)
commite8d26e8276358fcd1c2fe28293d3b4c82a735731
treee430ccf8e3c042731063e2a20fab9178048baa0c
parent93976af58926626077eca8b7bbd1aa592649ec01
tools: kwboot: Add support for backspace key in mini terminal

Marvell BootROM recognize only '\b' byte as backspace. Use terminfo
for retrieving current backspace sequence and replace any occurrence of
backspace sequence by the '\b' byte.

Reading terminfo database is possible via tigetstr() function from system
library libtinfo.so.*. So link kwboot with -ltinfo.

Normally terminfo functions are in <term.h> system header file. But this
header file conflicts with U-Boot "termios_linux.h" header file. So declare
terminfo functions manually.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
tools/Makefile
tools/kwboot.c