aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorCatalin Toda <catalinii@yahoo.com>2022-07-15 10:18:23 -0700
committerHauke Mehrtens <hauke@hauke-m.de>2022-12-06 00:11:21 +0100
commit69ed96fba86f157ff5161a87957fbe4e68f980ec (patch)
treedcfdbdf6a7a94ea37724c6af0cf6135a5ce552db /package
parent1f9bf1ee82054ad5b0b8afbb59ee710a41c61af4 (diff)
downloadupstream-69ed96fba86f157ff5161a87957fbe4e68f980ec.tar.gz
upstream-69ed96fba86f157ff5161a87957fbe4e68f980ec.tar.bz2
upstream-69ed96fba86f157ff5161a87957fbe4e68f980ec.zip
kernel: netconsole: add network console logging support
Accessing the console on many devices is difficult. netconsole eases debugging on devices that crash after the network is up. Reference to the netconsole documentation in upstream Linux: <https://www.kernel.org/doc/html/latest/networking/netconsole.html> | |netconsole=[+][src-port]@[src-ip]/[<dev>],[tgt-port]@<tgt-ip>/[tgt-macaddr] | | where | + if present, enable extended console support | src-port source for UDP packets (defaults to 6665) | src-ip source IP to use (interface address) | dev network interface (eth0) | tgt-port port for logging agent (6666) | tgt-ip IP address for logging agent | tgt-macaddr ethernet MAC address for logging agent (broadcast) OpenWrt specific notes: OpenWrt's device userspace scripts are attaching the network interface (i.e. eth0) to a (virtual) bridge (br-lan) device. This will cause netconsole to report: |network logging stopped on interface eth0 as it is joining a master device (and unfortunately the traffic/logs to stop at this point) As a workaround, the netconsole module can be manually loaded again after the bridge has been setup with: insmod netconsole netconsole=@/br-lan,@192.168.1.x/MA:C... One way of catching errors before the handoff, try to append the /etc/modules.conf file with the following extra line: options netconsole netconsole=@/eth0,@192.168.1.x/MA:C... and install the kmod-netconsole (=y) into the base image. Signed-off-by: Catalin Toda <catalinii@yahoo.com> (Added commit message from PR, added links to documentation) Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (cherry picked from commit 488b25f5ac5028923f67e3beade92dab0c2591f1)
Diffstat (limited to 'package')
-rw-r--r--package/kernel/linux/modules/netsupport.mk16
1 files changed, 16 insertions, 0 deletions
diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk
index d8074d27b6..53e21c0e9f 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -1437,3 +1437,19 @@ define KernelPackage/wireguard/description
endef
$(eval $(call KernelPackage,wireguard))
+
+
+define KernelPackage/netconsole
+ SUBMENU:=$(NETWORK_SUPPORT_MENU)
+ TITLE:=Network console logging support
+ KCONFIG:=CONFIG_NETCONSOLE \
+ CONFIG_NETCONSOLE_DYNAMIC=n
+ FILES:=$(LINUX_DIR)/drivers/net/netconsole.ko
+ AUTOLOAD:=$(call AutoProbe,netconsole)
+endef
+
+define KernelPackage/netconsole/description
+ Network console logging support.
+endef
+
+$(eval $(call KernelPackage,netconsole))