把smarthome编译进内核
2014-11-26 18:24
134 查看
模块编译
y:把驱动编译到内核
m:把驱动编译成模块
n:不编译模块
把模块编译到内核
在linux2.6.xx/drivers/目录中,建立自己文件夹,
smarthome
进入到linux2.6.xx/drivers/smarthome/
新建两个文件,Makefile Kconfig
Kconfig:
config SMARTHOME
tristate "My Smarthome Driver --->"
default n
help
this is a smart home driver
Makefile:
obj-$(CONFIG_SMARTHOME)+=smarthome.o
进入到linux2.6.xx/drivers/
编辑Kconfig,在menu "Device Drivers"和endmenu中间添加
source "drivers/smarthome/Kconfig"
进入到linux2.6.xx/drivers/
编辑Makefile
obj-$(CONFIG_SMARTHOME) += smarthome/
进入到linux2.6.xx/arch/arm/
编辑Kconfig,在menu "Device Drivers"和endmenu中间添加
source "drivers/smarthome/Kconfig"
如果要使用上s3c2410_defconfig来编译
进入\linux-2.6.15\arch\arm\configs
编辑s3c2410_defconfig
添加:
CONFIG_SMARTHOME=y
完成添加。
编译的时候可以这样子编译:
make s3c2410_defconfig
make uImage
即可编译。
y:把驱动编译到内核
m:把驱动编译成模块
n:不编译模块
把模块编译到内核
在linux2.6.xx/drivers/目录中,建立自己文件夹,
smarthome
进入到linux2.6.xx/drivers/smarthome/
新建两个文件,Makefile Kconfig
Kconfig:
config SMARTHOME
tristate "My Smarthome Driver --->"
default n
help
this is a smart home driver
Makefile:
obj-$(CONFIG_SMARTHOME)+=smarthome.o
进入到linux2.6.xx/drivers/
编辑Kconfig,在menu "Device Drivers"和endmenu中间添加
source "drivers/smarthome/Kconfig"
进入到linux2.6.xx/drivers/
编辑Makefile
obj-$(CONFIG_SMARTHOME) += smarthome/
进入到linux2.6.xx/arch/arm/
编辑Kconfig,在menu "Device Drivers"和endmenu中间添加
source "drivers/smarthome/Kconfig"
如果要使用上s3c2410_defconfig来编译
进入\linux-2.6.15\arch\arm\configs
编辑s3c2410_defconfig
添加:
CONFIG_SMARTHOME=y
完成添加。
编译的时候可以这样子编译:
make s3c2410_defconfig
make uImage
即可编译。
相关文章推荐
- linux内核编译
- 内核编译Openwrt制作ipk动态更新文件
- 交叉编译 Linux 内核 for ARM
- Android编译环境(4) - Android内核编译方法(未公开源码)
- Linux 环境下编译 0.11版本内核 kernel(部分转载,加上自己修改的部分(绿色注释))
- 编译linux 内核
- 内核介绍及内核编译
- Linux内核编译与裁剪(ARM版)
- 内核编译及系统裁剪
- linux-2.6.9 kernel 内核成功编译
- 交叉编译环境之编译内核阶段各种错误
- linux2.6内核编译方法详述
- LINUX 编译内核选项 向作者致敬
- 如何将ramdisk.img 编译进内核和修改init.rc
- fedora12编译内核
- Linux 2.6.19.x 内核编译配置选项简介
- ubuntu编译内核-make menuconfig 出现错误及解决
- Linux 2.6.19.x 内核编译配置选项简介
- linux编译内核出现include/asm/glue.h:111:2: #error Unknown data abort handler type
- 内核模块编译实践