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) ==============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) Serial Devices
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) ==============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) Serial Device Naming
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) ====================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8)     As of 2.6.10, serial devices on ia64 are named based on the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9)     order of ACPI and PCI enumeration.  The first device in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10)     ACPI namespace (if any) becomes /dev/ttyS0, the second becomes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11)     /dev/ttyS1, etc., and PCI devices are named sequentially
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12)     starting after the ACPI devices.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14)     Prior to 2.6.10, there were confusing exceptions to this:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) 	- Firmware on some machines (mostly from HP) provides an HCDP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 	  table[1] that tells the kernel about devices that can be used
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) 	  as a serial console.  If the user specified "console=ttyS0"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 	  or the EFI ConOut path contained only UART devices, the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) 	  kernel registered the device described by the HCDP as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 	  /dev/ttyS0.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 	- If there was no HCDP, we assumed there were UARTs at the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 	  legacy COM port addresses (I/O ports 0x3f8 and 0x2f8), so
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	  the kernel registered those as /dev/ttyS0 and /dev/ttyS1.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27)     Any additional ACPI or PCI devices were registered sequentially
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28)     after /dev/ttyS0 as they were discovered.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30)     With an HCDP, device names changed depending on EFI configuration
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31)     and "console=" arguments.  Without an HCDP, device names didn't
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32)     change, but we registered devices that might not really exist.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34)     For example, an HP rx1600 with a single built-in serial port
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35)     (described in the ACPI namespace) plus an MP[2] (a PCI device) has
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36)     these ports:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38)       ==========  ==========     ============    ============   =======
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39)       Type        MMIO           pre-2.6.10      pre-2.6.10     2.6.10+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 		  address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 				 (EFI console    (EFI console
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42)                                  on builtin)     on MP port)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43)       ==========  ==========     ============    ============   =======
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44)       builtin     0xff5e0000        ttyS0           ttyS1         ttyS0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45)       MP UPS      0xf8031000        ttyS1           ttyS2         ttyS1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46)       MP Console  0xf8030000        ttyS2           ttyS0         ttyS2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47)       MP 2        0xf8030010        ttyS3           ttyS3         ttyS3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48)       MP 3        0xf8030038        ttyS4           ttyS4         ttyS4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49)       ==========  ==========     ============    ============   =======
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) Console Selection
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) =================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54)     EFI knows what your console devices are, but it doesn't tell the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55)     kernel quite enough to actually locate them.  The DIG64 HCDP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56)     table[1] does tell the kernel where potential serial console
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57)     devices are, but not all firmware supplies it.  Also, EFI supports
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58)     multiple simultaneous consoles and doesn't tell the kernel which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59)     should be the "primary" one.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61)     So how do you tell Linux which console device to use?
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	- If your firmware supplies the HCDP, it is simplest to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	  configure EFI with a single device (either a UART or a VGA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	  card) as the console.  Then you don't need to tell Linux
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	  anything; the kernel will automatically use the EFI console.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 	  (This works only in 2.6.6 or later; prior to that you had
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 	  to specify "console=ttyS0" to get a serial console.)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 	- Without an HCDP, Linux defaults to a VGA console unless you
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	  specify a "console=" argument.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74)     NOTE: Don't assume that a serial console device will be /dev/ttyS0.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75)     It might be ttyS1, ttyS2, etc.  Make sure you have the appropriate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76)     entries in /etc/inittab (for getty) and /etc/securetty (to allow
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77)     root login).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) Early Serial Console
^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)     The kernel can't start using a serial console until it knows where
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83)     the device lives.  Normally this happens when the driver enumerates
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84)     all the serial devices, which can happen a minute or more after the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85)     kernel starts booting.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87)     2.6.10 and later kernels have an "early uart" driver that works
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88)     very early in the boot process.  The kernel will automatically use
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89)     this if the user supplies an argument like "console=uart,io,0x3f8",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90)     or if the EFI console path contains only a UART device and the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91)     firmware supplies an HCDP.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) Troubleshooting Serial Console Problems
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) =======================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96)     No kernel output after elilo prints "Uncompressing Linux... done":
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	- You specified "console=ttyS0" but Linux changed the device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	  to which ttyS0 refers.  Configure exactly one EFI console
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	  device[3] and remove the "console=" option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	- The EFI console path contains both a VGA device and a UART.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	  EFI and elilo use both, but Linux defaults to VGA.  Remove
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 	  the VGA device from the EFI console path[3].
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 	- Multiple UARTs selected as EFI console devices.  EFI and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 	  elilo use all selected devices, but Linux uses only one.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	  Make sure only one UART is selected in the EFI console
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 	  path[3].
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	- You're connected to an HP MP port[2] but have a non-MP UART
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 	  selected as EFI console device.  EFI uses the MP as a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 	  console device even when it isn't explicitly selected.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 	  Either move the console cable to the non-MP UART, or change
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 	  the EFI console path[3] to the MP UART.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117)     Long pause (60+ seconds) between "Uncompressing Linux... done" and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118)     start of kernel output:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	- No early console because you used "console=ttyS<n>".  Remove
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	  the "console=" option if your firmware supplies an HCDP.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 	- If you don't have an HCDP, the kernel doesn't know where
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	  your console lives until the driver discovers serial
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 	  devices.  Use "console=uart,io,0x3f8" (or appropriate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 	  address for your machine).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128)     Kernel and init script output works fine, but no "login:" prompt:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 	- Add getty entry to /etc/inittab for console tty.  Look for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 	  the "Adding console on ttyS<n>" message that tells you which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 	  device is the console.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134)     "login:" prompt, but can't login as root:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	- Add entry to /etc/securetty for console tty.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138)     No ACPI serial devices found in 2.6.17 or later:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 	- Turn on CONFIG_PNP and CONFIG_PNPACPI.  Prior to 2.6.17, ACPI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	  serial devices were discovered by 8250_acpi.  In 2.6.17,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 	  8250_acpi was replaced by the combination of 8250_pnp and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 	  CONFIG_PNPACPI.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) [1]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148)     http://www.dig64.org/specifications/agreement
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149)     The table was originally defined as the "HCDP" for "Headless
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150)     Console/Debug Port."  The current version is the "PCDP" for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151)     "Primary Console and Debug Port Devices."
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) [2]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154)     The HP MP (management processor) is a PCI device that provides
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155)     several UARTs.  One of the UARTs is often used as a console; the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156)     EFI Boot Manager identifies it as "Acpi(HWP0002,700)/Pci(...)/Uart".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157)     The external connection is usually a 25-pin connector, and a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158)     special dongle converts that to three 9-pin connectors, one of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159)     which is labelled "Console."
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) [3]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162)     EFI console devices are configured using the EFI Boot Manager
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163)     "Boot option maintenance" menu.  You may have to interrupt the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164)     boot sequence to use this menu, and you will have to reset the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165)     box after changing console configuration.