From 1a43a66986f91df9f0d0a2377394deab74422fb5 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 16 Mar 2020 10:23:27 +0100 Subject: farm: magnus: Add basic tools Add basic tools to use Magnus' board farm. Signed-off-by: Geert Uytterhoeven --- farm/magnus/screen-magnus | 10 ++++ farm/magnus/screenrc | 114 ++++++++++++++++++++++++++++++++++++++++++++++ farm/magnus/tftpd-magnus | 19 ++++++++ 3 files changed, 143 insertions(+) create mode 100755 farm/magnus/screen-magnus create mode 100644 farm/magnus/screenrc create mode 100755 farm/magnus/tftpd-magnus (limited to 'farm/magnus') diff --git a/farm/magnus/screen-magnus b/farm/magnus/screen-magnus new file mode 100755 index 0000000..a54c8f9 --- /dev/null +++ b/farm/magnus/screen-magnus @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ $# == 0 ]; then + TARGET=${0#*-} +else + TARGET=$1 +fi + +scp $(dirname $0)/screenrc $TARGET-mgr: +ssh $TARGET-mgr -t screen -x -R -S ttyS1 -c screenrc /dev/ttyS1 diff --git a/farm/magnus/screenrc b/farm/magnus/screenrc new file mode 100644 index 0000000..998418c --- /dev/null +++ b/farm/magnus/screenrc @@ -0,0 +1,114 @@ +# $Id: screenrc,v 1.15 2003/10/08 11:39:03 zal Exp $ +# +# /etc/screenrc +# +# This is the system wide screenrc. +# +# You can use this file to change the default behavior of screen system wide +# or copy it to ~/.screenrc and use it as a starting point for your own +# settings. +# +# Commands in this file are used to set options, bind screen functions to +# keys, redefine terminal capabilities, and to automatically establish one or +# more windows at the beginning of your screen session. +# +# This is not a comprehensive list of options, look at the screen manual for +# details on everything that you can put in this file. +# + +# ------------------------------------------------------------------------------ +# SCREEN SETTINGS +# ------------------------------------------------------------------------------ + +#startup_message off +#nethack on + +#defflow on # will force screen to process ^S/^Q +deflogin on +#autodetach off + +# turn visual bell on +vbell on +vbell_msg " Wuff ---- Wuff!! " + +# define a bigger scrollback, default is 100 lines +defscrollback 1024 + +# ------------------------------------------------------------------------------ +# SCREEN KEYBINDINGS +# ------------------------------------------------------------------------------ + +# Remove some stupid / dangerous key bindings +bind ^k +#bind L +bind ^\ +# Make them better +bind \\ quit +bind K kill +bind I login on +bind O login off +bind } history + +# An example of a "screen scraper" which will launch urlview on the current +# screen window +# +#bind ^B eval "hardcopy_append off" "hardcopy -h $HOME/.screen-urlview" "screen urlview $HOME/.screen-urlview" + +# ------------------------------------------------------------------------------ +# TERMINAL SETTINGS +# ------------------------------------------------------------------------------ + +# The vt100 description does not mention "dl". *sigh* +termcapinfo vt100 dl=5\E[M + +# turn sending of screen messages to hardstatus off +hardstatus off +# Set the hardstatus prop on gui terms to set the titlebar/icon title +termcapinfo xterm*|rxvt*|kterm*|Eterm* hs:ts=\E]0;:fs=\007:ds=\E]0;\007 +# use this for the hard status string +hardstatus string "%h%? users: %u%?" + +# An alternative hardstatus to display a bar at the bottom listing the +# windownames and highlighting the current windowname in blue. (This is only +# enabled if there is no hardstatus setting for your terminal) +# +#hardstatus lastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<" + +# set these terminals up to be 'optimal' instead of vt100 +termcapinfo xterm*|linux*|rxvt*|Eterm* OP + +# Change the xterm initialization string from is2=\E[!p\E[?3;4l\E[4l\E> +# (This fixes the "Aborted because of window size change" konsole symptoms found +# in bug #134198) +termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l' + +# To get screen to add lines to xterm's scrollback buffer, uncomment the +# following termcapinfo line which tells xterm to use the normal screen buffer +# (which has scrollback), not the alternate screen buffer. +# +#termcapinfo xterm|xterms|xs|rxvt ti@:te@ + +# Enable non-blocking mode to better cope with flaky ssh connections. +defnonblock 5 + +# ------------------------------------------------------------------------------ +# STARTUP SCREENS +# ------------------------------------------------------------------------------ + +# Example of automatically running some programs in windows on screen startup. +# +# The following will open top in the first window, an ssh session to monkey +# in the next window, and then open mutt and tail in windows 8 and 9 +# respectively. +# +# screen top +# screen -t monkey ssh monkey +# screen -t mail 8 mutt +# screen -t daemon 9 tail -f /var/log/daemon.log + +# custom C-a x handling +bind x detach +bind ^x detach + +# fix scrollback +termcapinfo xterm* ti@:te@ diff --git a/farm/magnus/tftpd-magnus b/farm/magnus/tftpd-magnus new file mode 100755 index 0000000..4ec30e2 --- /dev/null +++ b/farm/magnus/tftpd-magnus @@ -0,0 +1,19 @@ +#!/bin/bash + +TARGET=${0#*-} + +case "$1" in +start) + ssh $TARGET-mgr qemu-system-i386 -machine none -net nic,vlan=0 \ + -net tap,vlan=0,ifname=tap0,script=no,downscript=no \ + -net user,vlan=0,tftp=/home/user/ & + ;; + +stop) + ssh $TARGET-mgr killall qemu-system-i386 + ;; + +*) + echo "Usage: $0 (start|stop)" + exit 1 +esac -- cgit v1.2.3 From 289a478770207ab1c9cc16d8713eb70ffdb7fb80 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 16 Mar 2020 10:24:17 +0100 Subject: farm: magnus: Add ssh config file Add all known entries for management hosts in Magnus' farm. This includes the sever for documents under NDA. Note: some entries may be stale. Signed-off-by: Geert Uytterhoeven --- farm/magnus/ssh_config | 228 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 228 insertions(+) create mode 100644 farm/magnus/ssh_config (limited to 'farm/magnus') diff --git a/farm/magnus/ssh_config b/farm/magnus/ssh_config new file mode 100644 index 0000000..f3f57b8 --- /dev/null +++ b/farm/magnus/ssh_config @@ -0,0 +1,228 @@ +# Server for documents under NDA +host magnus-docs + hostname 218.219.193.216 + port 10000 + user user + +# Renesas Salvator-X / R-Car M3-W ES1.0 (r8a77950) +# salvator-x-0082-m3-es1 +host salvator-x-0082-m3-es1-mgr + hostname 218.219.193.216 + port 9004 + user user + +# Renesas Salvator-X / R-Car H3 ES3.0 (r8a77951) +# salvator-x-0647-h3-es3 +host h3es30-salvator-x-mgr + hostname 218.219.193.216 + port 9005 + user user + +# Renesas Salvator-XS / R-Car H3 ES2.0 (r8a77951) +# salvator-xs-1890-h3-es2 +host salvator-xs-1890-h3-es2-mgr + hostname 218.219.193.216 + port 9006 + user user + +# Renesas Salvator-X / R-Car H3 ES1.0 (r8a77950) +# salvator-x-0180-h3-es1 +host salvator-x-0180-h3-es1-mgr + hostname 218.219.193.216 + port 9007 + user user + +# Renesas R-Car Starter Kit Premier aka H3ULCB (RTP0RC77951SKBX010SA00) +# R-Car H3 ES2.0 (r8a77951) +# ulcb-2051-h3-es2 +host h3es20-ulcb-mgr + hostname 218.219.193.216 + port 9008 + user user + +# Renesas R-Car Starter Kit Premier aka H3ULCB (RTP0RC7795SKBX0010SA00) +# R-Car H3 ES1.1 (r8a77950) +# ulcb-0018-h3-es1 +host h3es11-ulcb-mgr + hostname 218.219.193.216 + port 9009 + user user + +# Renesas R-Car Starter Kit Pro aka M3ULCB (RTP0RC7796SKBX0010SA09) +# R-Car M3-W ES1.0 (r8a77960) +# ulcb-0695-m3-es1 +host m3ulcb-mgr + hostname 218.219.193.216 + port 9010 + user user + +# Renesas Salvator-XS / R-Car H3 M3-W+ ES3.0 (r8a77961) +host m3+-salvator-xs-mgr + hostname 218.219.193.216 + port 9011 + user user + +# Renesas Draak / R-Car D3 ES1.0 (r8a77995) +# draak-0075-d3-es1 +host draak-mgr + hostname 218.219.193.216 + port 9013 + user user + #tunnel ethernet + #tunneldevice 9013:0 + +# Renesas Eagle / R-Car V3M ES1.0 (r8a77970) +# eagle-0203-v3m +host eagle-mgr + hostname 218.219.193.216 + port 9014 + user user + #tunnel ethernet + #tunneldevice 4:0 + +# Renesas Eagle / R-Car V3M ES1.0 (r8a77970) +# eagle-md-pin +host eagle-md-pin + hostname 218.219.193.216 + port 9015 + user user + +# Renesas Salvator-XS / R-Car M3-W ES1.1 (r8a77960) +# salvator-xs-2094-m3-es11 +host m3-salvator-xs-mgr + hostname 218.219.193.216 + port 9016 + user user + +# Renesas Salvator-X / R-Car M3-N ES1.0 (r8a77965) +# salvator-x-0588-m3n +host m3n-salvator-x-mgr + hostname 218.219.193.216 + port 9017 + user user + +# Alix +# alix +host alix-mgr + hostname 218.219.193.216 + port 9018 + user user + +# Renesas R2D-PLUS (sh7751) +host r2d-plus-mgr + hostname 218.219.193.216 + port 9300 + user user + +# Renesas RSK7203 (sh7203) +host rsk7203-mgr + hostname 218.219.193.216 + port 9310 + user user + +# Renesas Migo-R (sh7722) +# migor +host migor-mgr + hostname 218.219.193.216 + port 9311 + user user + +# Renesas Ebisu / R-Car E3 (r8a77990) +# ebisu-0044-e3 +host ebisu-mgr + hostname 218.219.193.216 + port 9021 + user user + +# Renesas Lager / R-Car H2 ES1.0 (r8a7790) +# lager-184-h2 +host lager-mgr + hostname 218.219.193.216 + port 9200 + user user + +# Renesas Koelsch / R-Car M2-W ES1.0 (r8a7791) +# koelsch-220-m2 +host koelsch-220-m2-mgr + hostname 218.219.193.216 + port 9201 + user user + #tunnel ethernet + #tunneldevice 2:0 + +# Renesas ALT / R-Car E2 ES1.0 (r8a7794) +# alt-129-e2 +host alt-mgr + hostname 218.219.193.216 + port 9202 + user user + +# Renesas Gose / R-Car M2-N ES1.0 (r8a7793) +# gose-017-m2n +host gose-mgr + hostname 218.219.193.216 + port 9203 + user user + +# Renesas Blanche (RTP0RC7792SEB00010S) / R-Car V2H ES1.1 (r8a7792) +# blanche-083-v2h +host blanche-mgr + hostname 218.219.193.216 + port 9204 + user user + +# Renesas Porter (M2-LCDP) / R-Car M2-W ES3.0 (r8a7791) +# porter-g15380002-m2 +host porter-mgr + hostname 218.219.193.216 + port 9205 + user user + +# Renesas Silk / R-Car E2 ES1.0 (r8a7794) +# silk-g15310124-e2 +host silk-mgr + hostname 218.219.193.216 + port 9206 + user user + +# Renesas Wheat / R-Car V2H ES1.1 (r8a7792) +# wheat-7420-v2h +host wheat-mgr + hostname 218.219.193.216 + port 9207 + user user + +# Renesas BOCK-W / R-Car M1A (r8a7778) +# bockw-053-m1a +host bock-w-mgr + hostname 218.219.193.216 + port 9208 + user user + +# Renesas Marzen / R-Car H1 ES1.0 (r8a7779) +# marzen-223-h1 +host marzen-mgr + hostname 218.219.193.216 + port 9209 + user user + +# Kyoto Microcomputer KZM-A9-G / SH-Mobile AG5 +# kzm9g-k0000019-ag5 +host kzm9g-k0000019-ag5-mgr + hostname 218.219.193.216 + port 9211 + user user + +# Kyoto Microcomputer KZM-A9-Dual / EMMA Mobile EV2 (emev2) +# kzm9d-j0200367-emev2 +host kzm9d-mgr + hostname 218.219.193.216 + port 9211 + user user + +# Renesas Genmai / RZ/A1H (r7s72100) +# genmai-3hd0066-rz1a +host genmai-mgr + hostname 218.219.193.216 + port 9212 + user user -- cgit v1.2.3 From f23496b936db647cfe1290c5bb7cde7698bc91e7 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 16 Mar 2020 10:26:15 +0100 Subject: farm: magnus: Add Salvator-XS with R-Car M3-W+ Signed-off-by: Geert Uytterhoeven --- farm/magnus/boot-m3+-salvator-xs | 4 ++++ farm/magnus/screen-m3+-salvator-xs | 1 + farm/magnus/tftpd-m3+-salvator-xs | 1 + 3 files changed, 6 insertions(+) create mode 100755 farm/magnus/boot-m3+-salvator-xs create mode 120000 farm/magnus/screen-m3+-salvator-xs create mode 120000 farm/magnus/tftpd-m3+-salvator-xs (limited to 'farm/magnus') diff --git a/farm/magnus/boot-m3+-salvator-xs b/farm/magnus/boot-m3+-salvator-xs new file mode 100755 index 0000000..7b92cbf --- /dev/null +++ b/farm/magnus/boot-m3+-salvator-xs @@ -0,0 +1,4 @@ +#!/bin/bash + +ssh m3+-salvator-xs-mgr screen -X stuff \ + \$\'setenv bootargs ignore_loglevel $*\; setenv ipaddr 10.0.2.15\; setenv serverip 10.0.2.2\; tftpboot 0x48080000 Image\; tftpboot 0x49f00000 r8a77961-salvator-xs.dtb\; booti 0x48080000 - 0x49f00000\\n\' diff --git a/farm/magnus/screen-m3+-salvator-xs b/farm/magnus/screen-m3+-salvator-xs new file mode 120000 index 0000000..e1abc5e --- /dev/null +++ b/farm/magnus/screen-m3+-salvator-xs @@ -0,0 +1 @@ +screen-magnus \ No newline at end of file diff --git a/farm/magnus/tftpd-m3+-salvator-xs b/farm/magnus/tftpd-m3+-salvator-xs new file mode 120000 index 0000000..02c8d32 --- /dev/null +++ b/farm/magnus/tftpd-m3+-salvator-xs @@ -0,0 +1 @@ +tftpd-magnus \ No newline at end of file -- cgit v1.2.3 From ca4bec8e62e92cd695307f461ee58d60eba68d52 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 16 Mar 2020 10:26:52 +0100 Subject: farm: magnus: Add README Signed-off-by: Geert Uytterhoeven --- farm/magnus/README | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 farm/magnus/README (limited to 'farm/magnus') diff --git a/farm/magnus/README b/farm/magnus/README new file mode 100644 index 0000000..74ac590 --- /dev/null +++ b/farm/magnus/README @@ -0,0 +1,18 @@ + + - Include ssh_config in your ~/.ssh/config + + - Connect to screen on ( followed by "D" to disconnect): + + screen- + + - Start/stop TFTP on management host for : + + tftpd- start | stop + + - Power control for : + + ssh -mgr power on | off | status + + - Boot : + + boot- [ ...] -- cgit v1.2.3