Linux内核模块编译方式
来源:互联网 发布:和视频软件 编辑:程序博客网 时间:2024/05/24 06:49
一、加入Konfig方式,make menuconfig添加
Konfig
## 802.1d Ethernet Bridging#config BRIDGEtristate "802.1d Ethernet Bridging"select LLCselect STPdepends on IPV6 || IPV6=n---help--- If you say Y here, then your Linux box will be able to act as an Ethernet bridge, which means that the different Ethernet segments it is connected to will appear as one Ethernet to the participants. Several such bridges can work together to create even larger networks of Ethernets using the IEEE 802.1 spanning tree algorithm. As this is a standard, Linux bridges will cooperate properly with other third party bridge products. In order to use the Ethernet bridge, you'll need the bridge configuration tools; see <file:Documentation/networking/bridge.txt> for location. Please read the Bridge mini-HOWTO for more information. If you enable iptables support along with the bridge support then you turn your bridge into a bridging IP firewall. iptables will then see the IP packets being bridged, so you need to take this into account when setting up your firewall rules. Enabling arptables support when bridging will let arptables see bridged ARP traffic in the arptables FORWARD chain. To compile this code as a module, choose M here: the module will be called bridge. If unsure, say N.config BRIDGE_IGMP_SNOOPINGbool "IGMP/MLD snooping"depends on BRIDGEdepends on INETdefault y---help--- If you say Y here, then the Ethernet bridge will be able selectively forward multicast traffic based on IGMP/MLD traffic received from each port. Say N to exclude this support and reduce the binary size. If unsure, say Y.Makefile
## Makefile for the IEEE 802.1d ethernet bridging layer.#obj-$(CONFIG_BRIDGE) += bridge.obridge-y:= br.o br_device.o br_fdb.o br_forward.o br_if.o br_input.o \br_ioctl.o br_notify.o br_stp.o br_stp_bpdu.o \br_stp_if.o br_stp_timer.o br_netlink.obridge-$(CONFIG_SYSFS) += br_sysfs_if.o br_sysfs_br.obridge-$(CONFIG_BRIDGE_NETFILTER) += br_netfilter.obridge-$(CONFIG_BRIDGE_IGMP_SNOOPING) += br_multicast.oobj-$(CONFIG_BRIDGE_NF_EBTABLES) += netfilter/
二、直接make
obj-m := bridge.obridge-y := br.o br_device.o br_fdb.o br_forward.o br_if.o br_input.o br_ioctl.o br_notify.o br_stp.o br_stp_bpdu.o br_stp_if.o br_stp_timer.o br_netlink.o PWD := $(shell pwd) KERNELDIR := ~/mt5860_cn_android_512/rel/obj/kernel/chiling/kernel/linux-3.0/mt5880_android_smp_mod_defconfig_modules#注意上处路径为编译过的kernel路径,不能为没编译过的CROSS_COMPILE := /mtkoss/gnuarm/vfp_4.5.1_2.6.27_cortex-a9-rhel4/i686/bin/armv7a-mediatek451_001_vfp-linux-gnueabi-#注意上述为交叉编译时指定ARCH:=armdefault:$(MAKE) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) -C $(KERNELDIR) M=$(PWD) modules# cp -rf mini.ko ../module/# cp -rf lddbus.ko ../module/clean:rm *.mod.c *.o *.ko *.bak modules.* Module.*
0 0
- Linux内核模块编译方式
- linux内核模块编译
- linux内核模块编译
- Linux内核模块编译
- Linux内核模块编译
- Linux 内核 模块 编译
- linux内核模块编译
- linux内核模块编译
- Linux内核模块编译
- Linux内核模块编译
- linux内核模块编译
- linux内核模块编译
- Linux编译内核模块
- Linux内核编译,内核模块编译加载
- 编译一个linux内核模块
- Linux内核模块编译指南
- linux内核模块编译步骤
- Linux 交叉编译内核模块
- 11.1.2.1 使用可变数据结构
- linux\redhat推荐的分区方案
- 用批处理进行进制转换
- oracle中填充函数lpad/rpad的使用
- 环形缓存区bufferC语言实现
- Linux内核模块编译方式
- 生产的私人性与社会性的矛盾
- 网页宽度自动适应手机屏幕宽度的方法
- mysqlbinlog用法详细说明
- 解析当前最新话题众筹
- 微信促使网络发展
- 单片机中应用观察者模式
- Java中可变长参数的使用及注意事项
- nfs