Skip to content

Draft: Rework Xe CI kconfig fragments

Dragoon Aethis requested to merge rknop-config-removals into main

This is a bit of an experiment that I would like to submit for discussion. Not sure if it's to be merged, but would like some opinions.

The current kconfig is generated by grabbing lsmod output from all the CI machines, then generating a trimmed-down config with most of the driver modules removed. This works, but every time we add a new machine to CI, random things may end up not working - keyboards not responding because the vendor-specific HID module was gone, no sensor support, new USB network dongles not working, and so on. Currently, building this config and packaging images + modules for execution generates 135MB .tar.gz packages (530MB decompressed). A clean build takes ~8mins on my i9-12900 box.

On the other end of the spectrum there are distro configs which ship the kitchen sink. Everything works, but the .tar.gz clocks in at 2GiB (decompressed is ~= same because kmods are .zstd-compressed already) and the build takes almost 30mins.

So let's try something in between - this is an attempt at making a lightweight enough config without ripping out everything but the lsmod output:

  • A number of connectivity and IO subsystems are entirely disabled in 00-ci.fragment. None of them are critical for the platform to work, but they take up quite a lot of space.
  • In 01-ci-fs-storage.fragment we enable a bunch of critical file systems and storage drivers as built-ins, then disable the rest. In SCSI, we disable almost everything but the generic drivers + a single SAS controller on the ATS-M servers we have in our CI farm.
  • In 02-ci-networking.fragment we enable all the USB NICs, selected onboard/PCIe Intel/Broadcom/Realtek adapters, then disable the rest. In the network stack, we remove almost all wireless protocols, a number of legacy/rarely-used subsystems and a number of tuning modules (congestion, scheduling, etc). Normal Ethernet networking is almost fully functional, including virtual interfaces for Docker, VLANs and what not.
  • In 03-ci-sound.fragment we enable the bare minimum needed for HDMI audio to work, then disable everything else. Audio over anything except HDMI will not work.
  • In 04-ci-hid-input.fragment we disable joysticks, gamepads, USB tablets, etc. (Touchscreens should still work.)
  • 10-xe.fragment and 20-i915.fragment had their sound-related blocks moved to 03-ci-sound.fragment.
  • 30-drm.fragment now explicitly disables some older DRM drivers and ancient framebuffer devices.

The end result is a 200MB .tar.gz (740MB decompressed) that builds in 10 minutes. Not as good as the trimmed-down config, but in return we get better platform compatibility, especially if we want to move i915 boxes to this unified config.

So, what do you think about this? @demarchi @rodrigovivi

Merge request reports

Loading