From db77c6991228d339f77f005f7ff977bd246ef0e7 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 28 May 2025 08:33:15 -0400 Subject: [PATCH] MT#55283 remove kernel patching code Unused and unmaintained Change-Id: I61930f757c9b1f536fc4177ca1ab6ee5e3650f5e --- kernel-module/Makefile | 5 +--- utils/patch-kernel | 52 ------------------------------------------ 2 files changed, 1 insertion(+), 56 deletions(-) delete mode 100755 utils/patch-kernel diff --git a/kernel-module/Makefile b/kernel-module/Makefile index 954f4c295..2b2a53f50 100644 --- a/kernel-module/Makefile +++ b/kernel-module/Makefile @@ -10,7 +10,7 @@ EXTRA_CFLAGS+= -DRTPENGINE_VERSION="\"$(RTPENGINE_VERSION)\"" obj-m += xt_RTPENGINE.o -.PHONY: modules clean patch install +.PHONY: modules clean install modules: $(MAKE) -C $(KBUILD) M=$(CURDIR) O=$(KBUILD) modules @@ -19,9 +19,6 @@ clean: $(MAKE) -C $(KBUILD) M=$(CURDIR) clean || true rm -f rtpengine-kmod.mk -patch: - ../utils/patch-kernel magic "$(CURDIR)" "$(KERNEL)" "$(RTPENGINE_VERSION)" - install: install -D xt_RTPENGINE.ko $(DESTDIR)/lib/modules/$(shell uname -r)/updates/xt_RTPENGINE.ko depmod -a diff --git a/utils/patch-kernel b/utils/patch-kernel deleted file mode 100755 index c2aa8d5bd..000000000 --- a/utils/patch-kernel +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh - -if test "$1" != magic; then - echo - echo "Don't run this script manually, instead run:" - echo " make patch KERNEL=/path/to/kernel/sources" - echo - exit 1 -fi - -if test -z "$3"; then - echo - echo "Usage:" - echo " make patch KERNEL=/path/to/kernel/sources" - echo - exit 1 -fi - -KERN=$3 - -for x in . include/linux/netfilter/ net/netfilter/Kconfig net/netfilter/Makefile; do - if ! test -e "$KERN"/"$x"; then - echo "I don't recognize $KERN as a kernel source tree" - exit 1 - fi -done - -set -e - -cp -v xt_RTPENGINE.h "$KERN"/include/linux/netfilter/ -cp -v xt_RTPENGINE.c "$KERN"/net/netfilter/ - -if ! grep -q CONFIG_NETFILTER_XT_TARGET_RTPENGINE "$KERN"/net/netfilter/Makefile; then - ( - echo - echo "EXTRA_CFLAGS += -DRTPENGINE_VERSION=\"\\\"$4\\\"\"" - echo "obj-\$(CONFIG_NETFILTER_XT_TARGET_RTPENGINE) += xt_RTPENGINE.o" - ) >> "$KERN"/net/netfilter/Makefile -fi - -if ! grep -q Kconfig\\.rtpengine "$KERN"/net/netfilter/Kconfig; then - cat >> "$KERN"/net/netfilter/Kconfig.rtpengine << \__EOF -config NETFILTER_XT_TARGET_RTPENGINE - tristate "Sipwise NGCP RTPENGINE target support" - depends on IP_NF_FILTER - help - Sipwise NGCP rtpengine kernel support - - To compile it as a module, choose M here. If unsure, say N. -__EOF - echo 'source "net/netfilter/Kconfig.rtpengine"' >> "$KERN"/net/netfilter/Kconfig -fi