From 224f5cc31e75eb072faffc3d313252cdb80cb05d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 6 Sep 2022 08:42:33 +0200 Subject: Disable unneeded kernel drivers (sound, gpu, wireless) Note that disabling gpu seems to have killed the high-resolution console, which is unfortunate. New [previous] (old) sizes: buildos-image 6,598,240 [6,631,136] (6,316,352) buildos-initrd 330,529,007 [350,467,663] (332,280,629) --- bootstrap | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index 72aeb5a..c202e4c 100755 --- a/bootstrap +++ b/bootstrap @@ -52,7 +52,7 @@ mirror="http://http.us.debian.org/debian/" base_pkgs="locales,klibc-utils,sudo" base_pkgs+=",udev,dbus,systemd-timesyncd,systemd-container" base_pkgs+=",kmod,linux-base,firmware-linux-free,irqbalance" -base_pkgs+=",intel-microcode,amd64-microcode" +base_pkgs+=",intel-microcode" #,amd64-microcode base_pkgs+=",pciutils,usbutils,dmidecode,cpuid" base_pkgs+=",hdparm,btrfs-progs" base_pkgs+=",lm-sensors,smartmontools,linux-cpupower" @@ -449,6 +449,24 @@ scripts/config --disable INIT_STACK_ALL_ZERO scripts/config --enable DEBUG_INFO_NONE scripts/config --disable DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT +# Disable sound subsystem/drivers. +# +sed -i -re '/^CONFIG_SND_.+/d' .config +sed -i -re '/^CONFIG_SOUND_.+/d' .config +scripts/config --disable CONFIG_SOUND +scripts/config --disable CONFIG_SND + +# Disable GPU subsystem/drivers. +# +# NOTE: this seems to have killed the high-resolution console. +# +sed -i -re '/^CONFIG_DRM_.+/d' .config +scripts/config --disable CONFIG_DRM + +# Disable wireless network drivers. +# +scripts/config --disable CONFIG_WLAN + # Adjust kernel command line size limit. # sed -i -re 's/^(#define COMMAND_LINE_SIZE).+\$/\1 4096/' arch/x86/include/asm/setup.h -- cgit v1.1