[EXT] Re: [PATCH] tools/mrvl_uart.sh: Remove script

Kostya Porotchkin kostap at marvell.com
Sun Feb 6 07:32:18 CET 2022


Hi, Stefan,

________________________________
From: Stefan Roese <sr at denx.de>
Sent: Friday, February 4, 2022 07:46
To: Pali Rohár <pali at kernel.org>; Marek Behún <marek.behun at nic.cz>
Cc: u-boot at lists.denx.de <u-boot at lists.denx.de>; Kostya Porotchkin <kostap at marvell.com>
Subject: [EXT] Re: [PATCH] tools/mrvl_uart.sh: Remove script

External Email

----------------------------------------------------------------------
Added Kosta to Cc, as he is the author of this script.

On 2/3/22 17:50, Pali Rohár wrote:
> There are two tools for sending images over UART to Marvell SoCs: kwboot
> and mrvl_uart.sh. kwboot received lot of new features and improvements in
> last few months. There is no need to maintain two tools in U-Boot, so
> remove old mrvl_uart.sh tool.
>
> Signed-off-by: Pali Rohár <pali at kernel.org>
> ---
>   tools/mrvl_uart.sh | 119 ---------------------------------------------
>   1 file changed, 119 deletions(-)
>   delete mode 100755 tools/mrvl_uart.sh

Kosta, do you see any problems with removing this script? As you might
have seen, Pali and Marek did some great work on kwboot in the mean
time. Is there anything left in mrvl_uart.sh that kwboot can't handle?

I have no objections. If it works with other utility, it's good enough to me.

Regards
Kosta

Thanks,
Stefan

> diff --git a/tools/mrvl_uart.sh b/tools/mrvl_uart.sh
> deleted file mode 100755
> index a46411fc99fb..000000000000
> --- a/tools/mrvl_uart.sh
> +++ /dev/null
> @@ -1,119 +0,0 @@
> -#!/bin/bash
> -# SPDX-License-Identifier: GPL-2.0
> -#
> -######################################################
> -# Copyright (C) 2016 Marvell International Ltd.
> -#
> -# https://urldefense.proofpoint.com/v2/url?u=https-3A__spdx.org_licenses&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=-N9sN4p5NSr0JGQoQ_2UCOgAqajG99W1EbSOww0WU8o&m=-xB-ulRTo6jmziJtjKO-uZIA3fRrVF1eO7iCic2512bsXq1dncHj7MZfGwgeHf5b&s=woGkTBcqlZAvwkBGvYPkCgAtlak70RHo6ojWfMA5tgA&e=
> -#
> -# Author: Konstantin Porotchkin kostap at marvell.com
> -#
> -# Version 0.3
> -#
> -# UART recovery downloader for Armada SoCs
> -#
> -######################################################
> -
> -port=$1
> -file=$2
> -speed=$3
> -
> -pattern_repeat=1500
> -default_baudrate=115200
> -tmpfile=/tmp/xmodem.pattern
> -tools=( dd stty sx minicom )
> -
> -case "$3" in
> -    2)
> -        fast_baudrate=230400
> -        prefix="\xF2"
> -        ;;
> -    4)
> -        fast_baudrate=460800
> -        prefix="\xF4"
> -        ;;
> -    8)
> -      fast_baudrate=921600
> -        prefix="\xF8"
> -        ;;
> -    *)
> -      fast_baudrate=$default_baudrate
> -        prefix="\xBB"
> -esac
> -
> -if [[ -z "$port" || -z "$file" ]]
> -then
> -    echo -e "\nMarvell recovery image downloader for Armada SoC family."
> -    echo -e "Command syntax:"
> -    echo -e "\t$(basename $0) <port> <file> [2|4|8]"
> -    echo -e "\tport  - serial port the target board is connected to"
> -    echo -e "\tfile  - recovery boot image for target download"
> -    echo -e "\t2|4|8 - times to increase the default serial port speed by"
> -    echo -e "For example - load the image over ttyUSB0 @ 460800 baud:"
> -    echo -e "$(basename $0) /dev/ttyUSB0 /tmp/flash-image.bin 4\n"
> -    echo -e "=====WARNING====="
> -    echo -e "- The speed-up option is not available in SoC families prior to A8K+"
> -    echo -e "- This utility is not compatible with Armada 37xx SoC family\n"
> -fi
> -
> -# Sanity checks
> -if [ -c "$port" ]
> -then
> -   echo -e "Using device connected on serial port \"$port\""
> -else
> -   echo "Wrong serial port name!"
> -   exit 1
> -fi
> -
> -if [ -f "$file" ]
> -then
> -   echo -e "Loading flash image file \"$file\""
> -else
> -   echo "File $file does not exist!"
> -   exit 1
> -fi
> -
> -# Verify required tools installation
> -for tool in ${tools[@]}
> -do
> -    toolname=`which $tool`
> -    if [ -z "$toolname" ]
> -    then
> -        echo -e "Missing installation of \"$tool\" --> Exiting"
> -        exit 1
> -    fi
> -done
> -
> -
> -echo -e "Recovery will run at $fast_baudrate baud"
> -echo -e "========================================"
> -
> -if [ -f "$tmpfile" ]
> -then
> -    rm -f $tmpfile
> -fi
> -
> -# Send the escape sequence to target board using default debug port speed
> -stty -F $port raw ignbrk time 5 $default_baudrate
> -counter=0
> -while [ $counter -lt $pattern_repeat ]; do
> -    echo -n -e "$prefix\x11\x22\x33\x44\x55\x66\x77" >> $tmpfile
> -    let counter=counter+1
> -done
> -
> -echo -en "Press the \"Reset\" button on the target board and "
> -echo -en "the \"Enter\" key on the host keyboard simultaneously"
> -read
> -dd if=$tmpfile of=$port &>/dev/null
> -
> -# Speed up the binary image transfer
> -stty -F $port raw ignbrk time 5 $fast_baudrate
> -sx -vv $file > $port < $port
> -#sx-at91 $port $file
> -
> -# Return the port to the default speed
> -stty -F $port raw ignbrk time 5 $default_baudrate
> -
> -# Optional - fire up Minicom
> -minicom -D $port -b $default_baudrate
> -

Viele Grüße,
Stefan Roese

--
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de


More information about the U-Boot mailing list