Skip to content

Commit 6d7f279

Browse files
StaticRocketpraneethbajjuri
authored andcommitted
fix(ptp): embed the setup_hsr.sh script
Embed the last archived copy of this script. https://web.archive.org/web/20210115045653/https://processors.wiki.ti.com/images/1/18/Setup_hsr.pdf Signed-off-by: Randolph Sapp <[email protected]>
1 parent 7c3e870 commit 6d7f279

File tree

1 file changed

+47
-5
lines changed
  • source/linux/Industrial_Protocols/PTP

1 file changed

+47
-5
lines changed

source/linux/Industrial_Protocols/PTP/_PTP.rst

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,13 +1846,55 @@ each clock plays in this test is as follows:
18461846
Procedure
18471847
~~~~~~~~~
18481848

1849-
The script file
1850-
`setup\_hsr.sh <http://processors.wiki.ti.com/images/1/18/Setup_hsr.pdf>`__
1851-
and clock configuration files e.g. dut_1_hsr_oc.cfg, dut_2_hsr_oc.cfg,
1852-
dut_3_hsr_oc.cfg (each identical, same as listed in
1853-
`PTP Redundancy <Industrial_Protocols_PTP.html#redundancy-hsr-prp>`__
1849+
The script file :ref:`setup-hsr` and clock configuration files e.g.
1850+
dut_1_hsr_oc.cfg, dut_2_hsr_oc.cfg, dut_3_hsr_oc.cfg (each identical, same as
1851+
listed in `PTP Redundancy <Industrial_Protocols_PTP.html#redundancy-hsr-prp>`__
18541852
section for HSR) will be used in the setup of the tests.
18551853

1854+
.. code-block:: bash
1855+
:caption: setup_hsr.sh
1856+
:name: setup-hsr
1857+
1858+
#!/bin/bash
1859+
1860+
ETHA=eth2
1861+
MACA=70:FF:76:1C:18:09
1862+
ETHB=eth3
1863+
MACB=70:FF:76:1C:18:0A
1864+
RED_IP=192.168.8.3
1865+
1866+
########################################################
1867+
# Do not modify below
1868+
########################################################
1869+
HSR=hsr0
1870+
echo "ifconfig $ETHA hw ether $MACA"
1871+
ifconfig $ETHA hw ether $MACA
1872+
sleep 1
1873+
echo "ifconfig $ETHB hw ether $MACA"
1874+
ifconfig $ETHB hw ether $MACA
1875+
sleep 1
1876+
echo "ethtool -K $ETHA hsr-rx-offload on"
1877+
ethtool -K $ETHA hsr-rx-offload on
1878+
sleep 1
1879+
echo "ethtool -K $ETHB hsr-rx-offload on"
1880+
ethtool -K $ETHB hsr-rx-offload on
1881+
sleep 1
1882+
echo "ifconfig $ETHA up"
1883+
ifconfig $ETHA up
1884+
sleep 1
1885+
echo "ifconfig $ETHB up"
1886+
ifconfig $ETHB up
1887+
sleep 1
1888+
echo "ip link add name $HSR type hsr slave1 $ETHA slave2 $ETHB supervision 45 version 1"
1889+
ip link add name $HSR type hsr slave1 $ETHA slave2 $ETHB supervision 45 version 1
1890+
sleep 1
1891+
echo "ifconfig $HSR $RED_IP"
1892+
ifconfig $HSR $RED_IP
1893+
sleep 1
1894+
ifconfig $HSR
1895+
echo
1896+
echo "configured $HSR on $ETHA $ETHB"
1897+
18561898
- For each DUT-X, copy the setup script setup\_hsr.sh and the clock
18571899
configuration file dut\_X\_hsr\_oc.cfg into the target filesystem of
18581900
DUT-X. For the sample setup above

0 commit comments

Comments
 (0)