
This adds SPDX license headers in place of the wide assortment of things currently in our script headers. We default to GPL-2.0-only except for the oeqa code where it was clearly submitted and marked as MIT on the most part or some scripts which had the "or later" GPL versioning. The patch also drops other obsolete bits of file headers where they were encoountered such as editor modelines, obsolete maintainer information or the phrase "All rights reserved" which is now obsolete and not required in copyright headers (in this case its actually confusing for licensing as all rights were not reserved). More work is needed for OE-Core but this takes care of the bulk of the scripts and meta/lib directories. The top level LICENSE files are tweaked to match the new structure and the SPDX naming. (From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
1.5 KiB
Executable File
#!/bin/sh
Copyright (C) 2014 Intel Corporation
SPDX-License-Identifier: MIT
if [ "$1" = "" -o "$1" = "--help" ] ; then echo "Usage: $0 " echo echo "Simple script to handle maintaining a terminal for serial devices that" echo "disappear when a device is powered down or reset, such as the USB" echo "serial console on the original BeagleBone (white version)." echo echo "e.g. $0 picocom -b 115200 /dev/ttyUSB0" echo exit fi
args="$@" DEVICE="" while [ "$1" != "" ]; do case "$1" in /dev/*) DEVICE=$1 break;; esac shift done
if [ "$DEVICE" != "" ] ; then while true; do if [ ! -e $DEVICE ] ; then echo "serdevtry: waiting for $DEVICE to exist..." while [ ! -e $DEVICE ]; do sleep 0.1 done fi if [ ! -w $DEVICE ] ; then # Sometimes (presumably because of a race with udev) we get to # the device before its permissions have been set up RETRYNUM=0 while [ ! -w $DEVICE ]; do if [ "$RETRYNUM" = "2" ] ; then echo "Device $DEVICE exists but is not writable!" exit 1 fi RETRYNUM=$((RETRYNUM+1)) sleep 0.1 done fi $args if [ -e $DEVICE ] ; then break fi done else echo "Unable to determine device node from command: $args" exit 1 fi