Remove all kernel modules from a buildroot build
Hello,
I've successfully build a custom Linux system with buildroot (stable release 2016.05) for the Raspberry Pi. Everything works fine so far and buildroot is a really nice tool.
I've one question for which I don't find an answer in the docs or on the
web: the directory /lib/modules/4.4.8 contains all kernel modules and consumes around 93% of the entiere root filesystem. My system does not need any kernel modules and modules like dvb-* are included which I'll certainly not used.
Is there a way of configuring buildroot to omit all this modules and save the space and therefore reduce the image size?
Regards,
mythbu
Hello,
Quoted 2 lines · On Fri, 2 Sep 2016 08:48:55 +0200, Mythbu2 wrote:
Is there a way of configuring buildroot to omit all this modules and save the space and therefore reduce the image size?
Yes: customize your kernel configuration and remove all the kernel modules that you don't need.
For the Raspberry Pi, we're using the "bcmrpi" defconfig that comes from the Linux kernel tree hosted on Github at
https://github.com/raspberrypi/linux.git. If this configuration doesn't suit you, you simply have to customize it.
See
https://buildroot.org/downloads/manual/manual.html#_configuration_of_other_components
for some details.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com