linux编译驱动之 make modules SUBDIRS
来源:互联网 发布:大数据电商平台 编辑:程序博客网 时间:2024/05/18 15:04
补充:make modules SUBDIRS=指定编译那个目录下的Makefile
今天在编译linux kernel的时候发现make menuconfig中配置成<M>模式的驱动模块没有加入编译之,下面命令编译内核的:
make uImage
通过查看kernel的makefile发些了一些蛛丝马迹,现在将工作笔记记录如下:在linux kernel下运行终端,输入如下命令查看kernel编译相关的一些信息
make help
Cleaning targets:
clean - Remove most generated files but keep the config and
enough build support to build external modules
mrproper - Remove all generated files + config + various backup files
distclean - mrproper + remove editor backup and patch files
Configuration targets:
config - Update current config utilising a line-oriented program
nconfig - Update current config utilising a ncurses menu based program
menuconfig - Update current config utilising a menu based program
xconfig - Update current config utilising a QT based front-end
gconfig - Update current config utilising a GTK based front-end
oldconfig - Update current config utilising a provided .config as base
localmodconfig - Update current config disabling modules not loaded
localyesconfig - Update current config converting local mods to core
silentoldconfig - Same as oldconfig, but quietly, additionally update deps
defconfig - New config with default from ARCH supplied defconfig
savedefconfig - Save current config as ./defconfig (minimal config)
allnoconfig - New config where all options are answered with no
allyesconfig - New config where all options are accepted with yes
allmodconfig - New config selecting modules when possible
alldefconfig - New config with all symbols set to default
randconfig - New config with random answer to all options
listnewconfig - List new options
oldnoconfig - Same as silentoldconfig but set new symbols to n (unset)
Other generic targets:
all - Build all targets marked with [*]
* vmlinux - Build the bare kernel
* modules - Build all modules
modules_install - Install all modules to INSTALL_MOD_PATH (default: /)
firmware_install- Install all firmware to INSTALL_FW_PATH
(default: $(INSTALL_MOD_PATH)/lib/firmware)
dir/ - Build all files in dir and below
dir/file.[oisS] - Build specified target only
dir/file.lst - Build specified mixed source/assembly target only
(requires a recent binutils and recent build (System.map))
dir/file.ko - Build module including final link
modules_prepare - Set up for building external modules
tags/TAGS - Generate tags file for editors
cscope - Generate cscope index
gtags - Generate GNU GLOBAL index
kernelrelease - Output the release version string
kernelversion - Output the version stored in Makefile
headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH
(default: /home/book/workspace/kernel/linux-3.4.2_jz2440/usr)
Static analysers
checkstack - Generate a list of stack hogs
namespacecheck - Name space analysis on compiled kernel
versioncheck - Sanity check on version.h usage
includecheck - Check for duplicate included header files
export_report - List the usages of all exported symbols
headers_check - Sanity check on exported headers
headerdep - Detect inclusion cycles in headers
coccicheck - Check with Coccinelle.
Kernel packaging:
rpm-pkg - Build both source and binary RPM kernel packages
binrpm-pkg - Build only the binary kernel package
deb-pkg - Build the kernel as a deb package
tar-pkg - Build the kernel as an uncompressed tarball
targz-pkg - Build the kernel as a gzip compressed tarball
tarbz2-pkg - Build the kernel as a bzip2 compressed tarball
tarxz-pkg - Build the kernel as a xz compressed tarball
perf-tar-src-pkg - Build perf-3.4.2.tar source tarball
perf-targz-src-pkg - Build perf-3.4.2.tar.gz source tarball
perf-tarbz2-src-pkg - Build perf-3.4.2.tar.bz2 source tarball
perf-tarxz-src-pkg - Build perf-3.4.2.tar.xz source tarball
Documentation targets:
Linux kernel internal documentation in different formats:
htmldocs - HTML
pdfdocs - PDF
psdocs - Postscript
xmldocs - XML DocBook
mandocs - man pages
installmandocs - install man pages generated by mandocs
cleandocs - clean all generated DocBook files
Architecture specific targets (arm):
* zImage - Compressed kernel image (arch/arm/boot/zImage)
Image - Uncompressed kernel image (arch/arm/boot/Image)
* xipImage - XIP kernel image, if configured (arch/arm/boot/xipImage)
uImage - U-Boot wrapped zImage
bootpImage - Combined zImage and initial RAM disk
(supply initrd image via make variable INITRD=<path>)
dtbs - Build device tree blobs for enabled boards
install - Install uncompressed kernel
zinstall - Install compressed kernel
uinstall - Install U-Boot wrapped compressed kernel
Install using (your) ~/bin/installkernel or
(distribution) /sbin/installkernel or
install to $(INSTALL_PATH) and run lilo
发现并没有把make menuconfig中配置成<M>模式的驱动模块没有加入编译,分析才发现还得执行如下命令就OK了。
make modules
- linux编译驱动之 make modules SUBDIRS
- 编译某一个ko模块make modules SUBDIRS=drivers/xxx/
- 编译某一个ko模块make modules SUBDIRS=drivers/xxx/
- 如何编译某一个ko模块make modules SUBDIRS=drivers/usb/gadget
- make: *** [subdirs] Error 1
- linux-2.6.19 内核编译时 make modules执行错误!!
- [linux] kernel modules make study.
- 对linux编译模块make -C path_to_kernel_src M=`pwd` modules的理解
- Linux驱动之make menuconfig make uImage Kconfig
- make modules
- make modules
- linux modules 指定模块编译
- linux驱动编译时make -C M= 解释
- linux驱动编译时make -C M= 解释
- linux驱动之内核编译
- 编译内核时一定要make modules这一步
- linux编译-make参数
- Linux make 编译命令
- 字符串的全排列算法讲解
- Keytool工具使用方法
- 张氏读写锁,c++信号量实现
- C++ bitset的使用简介
- 104. Maximum Depth of Binary Tree(菜鸟刷题第一天)
- linux编译驱动之 make modules SUBDIRS
- C++:顺序容器及顺序容器适配器(stack、queue、priority_queue)
- Mysql备份和恢复
- Spark Shuffle内存分析
- delphi(客户端) socket 与 PHP_socket(服务器) 通信的例子
- dz论坛程序备份搬家
- 常用oracle函数备份
- 动态创建mfc控件
- java 泛型