Skip to content

redhat/configs: prune another large batch of modules for automotive

Upstream Status: RHEL Only

JIRA: https://issues.redhat.com/browse/RHEL-15039

There were some built in options that can be disabled to help make the kernel smaller, and faster to boot. Let's also disable another large batch kernel modules that are not needed for the automotive use case. This patch also moves a few arch-specific settings that were in the automotive/ directory into the proper architecture subdirectory.

This change was also validated by making sure that no hardware functionality described in DT was mistakenly disabled with this script:

generate_config_diff()
{
        ./scripts/dtc/dt_to_config arch/arm64/boot/dts/qcom/sa8775p-ride.dts | \
            grep CONFIG_ | awk '{print $9}' | sort | uniq > configs.txt
        ./scripts/dtc/dt_to_config arch/arm64/boot/dts/qcom/sa8540p-ride.dts | \
            grep CONFIG_ | awk '{print $9}' | sort | uniq >> configs.txt
        ./scripts/dtc/dt_to_config arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b.dts | \
            grep CONFIG_ | awk '{print $9}' | sort | uniq >> configs.txt
        cat configs.txt | sort | uniq | xargs -iblah \
            echo "grep -w blah redhat/configs/kernel-automotive-5.14.0-aarch64.config" | sh | grep ^#
}

git checkout main-automotive
generate_config_diff > config-original.txt

git checkout remove-more-kconfigs
generate_config_diff > config-new.txt

diff -u config-original.txt config-new.txt

It was also boot tested on a VM and on a RideSX4 board.

Some overall statistics after this merge request (TODO - update these numbers):

  • aarch64 with current merge request:
    • compressed kernel size: 9.96 MB (0.43 MB savings)
    • 815 modules, 212 modules built in = 1,027 modules total (4 savings)
  • Before latest merge request:
    • compressed kernel size: 10.39 MB
    • 754 modules, 277 modules built in = 1,031 modules total
  • x86_64 with current merge request -- now booting qemu in ~225ms
    • compressed kernel size: 11.75 MB (0.29 MB savings)
    • 753 modules, 191 modules built in = 944 modules total (361 savings)
  • Before latest merge request:
    • compressed kernel size: 12.04 MB
    • 1,059 modules, 246 modules built in = 1,305 modules total

Signed-off-by: Brian Masney bmasney@redhat.com

Edited by Brian Masney

Merge request reports