Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) .. SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) ==================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) Generic HDLC layer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) ==================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) Krzysztof Halasa <khc@pm.waw.pl>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) Generic HDLC layer currently supports:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) 1. Frame Relay (ANSI, CCITT, Cisco and no LMI)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14)    - Normal (routed) and Ethernet-bridged (Ethernet device emulation)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15)      interfaces can share a single PVC.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16)    - ARP support (no InARP support in the kernel - there is an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17)      experimental InARP user-space daemon available on:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18)      http://www.kernel.org/pub/linux/utils/net/hdlc/).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) 2. raw HDLC - either IP (IPv4) interface or Ethernet device emulation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 3. Cisco HDLC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 4. PPP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 5. X.25 (uses X.25 routines).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) Generic HDLC is a protocol driver only - it needs a low-level driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) for your particular hardware.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) Ethernet device emulation (using HDLC or Frame-Relay PVC) is compatible
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) with IEEE 802.1Q (VLANs) and 802.1D (Ethernet bridging).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) Make sure the hdlc.o and the hardware driver are loaded. It should
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) create a number of "hdlc" (hdlc0 etc) network devices, one for each
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) WAN port. You'll need the "sethdlc" utility, get it from:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 	http://www.kernel.org/pub/linux/utils/net/hdlc/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) Compile sethdlc.c utility::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 	gcc -O2 -Wall -o sethdlc sethdlc.c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) Make sure you're using a correct version of sethdlc for your kernel.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) Use sethdlc to set physical interface, clock rate, HDLC mode used,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) and add any required PVCs if using Frame Relay.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) Usually you want something like::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 	sethdlc hdlc0 clock int rate 128000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 	sethdlc hdlc0 cisco interval 10 timeout 25
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) or::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	sethdlc hdlc0 rs232 clock ext
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 	sethdlc hdlc0 fr lmi ansi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 	sethdlc hdlc0 create 99
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 	ifconfig hdlc0 up
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 	ifconfig pvc0 localIP pointopoint remoteIP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) In Frame Relay mode, ifconfig master hdlc device up (without assigning
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) any IP address to it) before using pvc devices.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) Setting interface:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) * v35 | rs232 | x21 | t1 | e1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66)     - sets physical interface for a given port
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67)       if the card has software-selectable interfaces
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68)   loopback
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69)     - activate hardware loopback (for testing only)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) * clock ext
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71)     - both RX clock and TX clock external
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) * clock int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73)     - both RX clock and TX clock internal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) * clock txint
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75)     - RX clock external, TX clock internal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) * clock txfromrx
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77)     - RX clock external, TX clock derived from RX clock
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) * rate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79)     - sets clock rate in bps (for "int" or "txint" clock only)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) Setting protocol:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) * hdlc - sets raw HDLC (IP-only) mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86)   nrz / nrzi / fm-mark / fm-space / manchester - sets transmission code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88)   no-parity / crc16 / crc16-pr0 (CRC16 with preset zeros) / crc32-itu
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90)   crc16-itu (CRC16 with ITU-T polynomial) / crc16-itu-pr0 - sets parity
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) * hdlc-eth - Ethernet device emulation using HDLC. Parity and encoding
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93)   as above.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) * cisco - sets Cisco HDLC mode (IP, IPv6 and IPX supported)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97)   interval - time in seconds between keepalive packets
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99)   timeout - time in seconds after last received keepalive packet before
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	    we assume the link is down
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) * ppp - sets synchronous PPP mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) * x25 - sets X.25 mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) * fr - Frame Relay mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)   lmi ansi / ccitt / cisco / none - LMI (link management) type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110)   dce - Frame Relay DCE (network) side LMI instead of default DTE (user).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112)   It has nothing to do with clocks!
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114)   - t391 - link integrity verification polling timer (in seconds) - user
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115)   - t392 - polling verification timer (in seconds) - network
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116)   - n391 - full status polling counter - user
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117)   - n392 - error threshold - both user and network
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118)   - n393 - monitored events count - both user and network
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) Frame-Relay only:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) * create n | delete n - adds / deletes PVC interface with DLCI #n.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123)   Newly created interface will be named pvc0, pvc1 etc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) * create ether n | delete ether n - adds a device for Ethernet-bridged
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126)   frames. The device will be named pvceth0, pvceth1 etc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) Board-specific issues
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) ---------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) n2.o and c101.o need parameters to work::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	insmod n2 hw=io,irq,ram,ports[:io,irq,...]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) example::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 	insmod n2 hw=0x300,10,0xD0000,01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) or::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 	insmod c101 hw=irq,ram[:irq,...]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) example::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	insmod c101 hw=9,0xdc000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) If built into the kernel, these drivers need kernel (command line) parameters::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 	n2.hw=io,irq,ram,ports:...
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) or::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 	c101.hw=irq,ram:...
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) If you have a problem with N2, C101 or PLX200SYN card, you can issue the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) "private" command to see port's packet descriptor rings (in kernel logs)::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 	sethdlc hdlc0 private
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) The hardware driver has to be build with #define DEBUG_RINGS.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) Attaching this info to bug reports would be helpful. Anyway, let me know
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) if you have problems using this.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) For patches and other info look at:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) <http://www.kernel.org/pub/linux/utils/net/hdlc/>.