[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Trimming the default kernel config



I spent some hours yesterday going through the list of modules that are
present in an amd64 kernel but don't have either (a) a module alias that
supports auto-loading or demand loading or (b) another module depdending
on them.

- Some of these are pure software drivers which are expected to be
explicitly loaded where they're wanted.

- Some of them are ISA (non-PnP) drivers which have to be explicitly
loaded where they're wanted.  But they were missing dependencies on ISA
(which is not supported on amd64).  I'm sending patches upstream for
these, so they will only be enabled for platforms with ISA slots.

- Some of them are for external serial devices that can't be
auto-detected (at least not by the kernel).

- Some of them are for external parallel devices that again aren't
auto-detected by the kernel.  I disabled the IDE, SCSI, Ethernet and
camera drivers which were a horrible hack in the 90s and surely unneeded
today.  I didn't touch other parallel drivers for which parallel port
bandwidth probably isn't a major constraint.

- Some of them are very old PCI drivers that never got updated for Linux
2.6.  I've disabled several of these as they'll never be fixed.  I also
tried fixing a lirc PCI driver that looked easily salvageable.

- Some of them are new PCI drivers that are just missing a
MODULE_DEVICE_TABLE().  I'm sending patches upstream to add these.

- Some of them are platform drivers for devices that are exposed by a
PCI or other hotplug driver.

- Many of them are platform, I2C or SPI drivers for devices that need to
be loaded based on knowledge of the specific platform they're present in
(board code, FDT files, knowledge in other drivers, perhaps ACPI).  I've
disabled most of these at the top level, on the basis that they're not
generally useful and should be enabled per-architecture or per-flavour.
Possibly this will cause breakage for some flavours, but then I think
they should be re-enabled just for those flavours.  I left I2C hwmon,
iio, input, leds, media and misc devices alone.  Many hwmon and most
media drivers are widely useful, and I wasn't sure about the others.

- I disabled the regulator subsystem entirely at the top level as it's
not needed for most configurations.

In future I would like our configuration policy for platform drivers and
for I2C and SPI drivers that need platform knowledge to be default-off.

Ben.

-- 
Ben Hutchings
If you seem to know what you are doing, you'll be given more to do.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: