0

I'm in the beginning stages of using a cross compiler (ELDK) to build an embedded Linux system from the kernel source. The Kernel is built successfully with make ARCH=powerpc CROSS_COMPILE=powerpc-linux- 44x/virtex5_defconfig and make ARCH=powerpc CROSS_COMPILE=powerpc-linux- uImage.

I'd like to include built-in modules at this stage compiled on my host machine. I run

make ARCH=powerpc CROSS_COMPILE=powerpc-linux- modules
make ARCH=powerpc CROSS_COMPILE=powerpc-linux- INSTALL_MOD_PATH=/opt/eldk-5.8/powerpc-4xx modules_install

and see that default modules included with the kernal are built and installed to the specified directory.

My question is how do I define which modules are built and installed with these latter two commands? I'd like to both exclude some of the default modules and include additional modules that from separate source code, like coreutils.

Thanks for any help you could provide.

1
  • You need to read the kernel README file in the source code on the build procedure, i.e. it's make menuconfig. FYI the ARCH and CROSS_COMPILE symbols can be defined as shell environment variables so you don't have to type them in each make command (i.e. export ARCH=powerpc).
    – sawdust
    Commented Nov 13, 2017 at 19:54

1 Answer 1

0

Following up with an answer on this question for posterity sake to help others who might be as clueless as I was at the time.

Indeed, as sawdust commented, adding built-in modules and drivers can be configured via make menuconfig. Many packages have the option of being configured as built-in (to the kernel binary) or a module. In the former case, there would be no need to output them to a root file system via make modules_install.

Custom drivers can be added into the Kernel tree by including the source in a relevant folder and then updating the KConfig and Makefile that governs that folder, following the example of the built-in packages.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .