리눅스 커널 용어 정리 (2) - make modules_install
modules
The default target for external modules. It has the same functionality as if no target was specified.
modules_install
Install the external module(s). The default location is /lib/modules/<kernel_release>/extra/,
but a prefix maybe added with INSTALL_MOD_PATH
INSTALL_MOD_PATH
Above are the default directories but as always some level of customization is possible. A prefix can be added to the installation path using the variable INSTALL_MOD_PATH:
INSTALL_MOD_DIR
External modules are by default installed to a directory under /lib/modules/$(KERNELRELEASE)/extra/, but you may wish to locate modules for a specific functionality in a separate directory. For this purpose, use INSTALL_MOD_DIR to specify an alternative name to "extra."
커널빌드시 target 에 modules 을 설치하는 modules_install 이라는 명령어가 있다.
해당 명령어는 modules 는 /lib/modules 디렉토리에 설치하게 된다.
modules_install 명령어 사용시 modules.dep 파일도 생성하여 타겟보드에서 modprobe 명령도 쓸 수 있게 된다.
크로스 컴파일 할 때
make 할 때 INSTALL_MOD_PATH 를 추가하면된다.
make ARCH=arm CROSS_COMPILE=arm-linux- INSTALL_MOD_PATH=${PRJROOT}/images/modules-2.6.20 modules_install