From b1a12a4a0cdaa9f8edade6b09e0b4ba263d16be9 Mon Sep 17 00:00:00 2001
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sat, 7 May 2022 15:16:47 +0200
Subject: [PATCH] generic: reduce kernel size some more (#2510)

Remove a few features that became enabled by default since OpenWrt 19.07.
Disabling CONFIG_RELAY also reduces RAM usage.
---
 targets/generic | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/targets/generic b/targets/generic
index 7c652eb94..7e8c17f2b 100644
--- a/targets/generic
+++ b/targets/generic
@@ -44,11 +44,20 @@ try_config('PACKAGE_ATH_DEBUG', true)
 
 try_config('TARGET_SQUASHFS_BLOCK_SIZE', 256)
 
+config('KERNEL_PROC_STRIPPED', true)
+config('KERNEL_AIO', false)
+config('KERNEL_IO_URING', false)
+config('KERNEL_FHANDLE', false)
+config('KERNEL_FANOTIFY', false)
+config('KERNEL_CGROUPS', false)
 config('KERNEL_IP_MROUTE', false)
 config('KERNEL_IPV6_MROUTE', false)
 config('KERNEL_IPV6_SEG6_LWTUNNEL', false)
 config('SECCOMP', false)
 config('KERNEL_SECCOMP', false)
+-- kmod-mt7915e pulls in CONFIG_KERNEL_RELAY
+-- use try_config, so enabling the package is still possible
+try_config('PACKAGE_kmod-mt7915e', false)
 
 config('COLLECT_KERNEL_DEBUG', true)
 
-- 
GitLab