您的位置:首页 > 其它

把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

即可编译。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: