aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-09-06 08:42:33 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-09-06 08:42:33 +0200
commit224f5cc31e75eb072faffc3d313252cdb80cb05d (patch)
treea9dd6766d9d9ef861c859ccbcc7e28b6f0305b21
parent14f1af73722cab98d02096221b482c27a0e14355 (diff)
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)
-rwxr-xr-xbootstrap20
1 files changed, 19 insertions, 1 deletions
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