On Sat, 24 Aug 2024 at 11:27, Mikhail Kshevetskiy <[email protected]> wrote: > > This patch adds downloading/uploading of data with netcat. > Client/server mode both supported. > > How to test: > ============ > netcat-openbsd=1.219-1 from debian were used for a tests > > a) Load data from remote host. > * U-Boot listen on tcp port 3456 > * PC connects > > u-boot: netcat load ${loadaddr} 3456 > PC: netcat -q1 ${UBOOT_IP} 3456 < image.itb > > b) Load data from remote host. > * PC listen on tcp port 3456 > * U-Boot connects > > PC: netcat -q1 -l -p 3456 < image.itb > u-boot: netcat load ${loadaddr} ${PC_IP}:3456 > > c) Save data to remote host > * U-Boot listen on tcp port 3456 > * PC connects > > u-boot: netcat save ${loadaddr} ${data_size_in_hex} 3456 > PC: netcat -w1 ${UBOOT_IP} 3456 >image.itb > > d) Save data to remote host > * PC listen on tcp port 3456 > * U-Boot connects > > PC: netcat -w1 -l -p 3456 >image.itb > u-boot: netcat save ${loadaddr} ${data_size_in_hex} ${PC_IP}:3456 > > Signed-off-by: Mikhail Kshevetskiy <[email protected]> > > xxx > --- > cmd/Kconfig | 7 ++ > cmd/net.c | 34 ++++++-- > include/net.h | 2 +- > include/net/netcat.h | 20 +++++ > net/Makefile | 1 + > net/net.c | 9 +++ > net/netcat.c | 181 +++++++++++++++++++++++++++++++++++++++++++ > 7 files changed, 248 insertions(+), 6 deletions(-) > create mode 100644 include/net/netcat.h > create mode 100644 net/netcat.c
Reviewed-by: Simon Glass <[email protected]>

