内核根目录下makefile
init-y := init/
drivers-y := drivers/ sound/ firmware/
hbxdrivers-y += /home/workspace/hbx/linux/drivers/
net-y := net/
libs-y := lib/
core-y := usr/
vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
$(lspcore-y) $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
$(
hbxdrivers-y) $(net-y) $(net-m) $(libs-y) $(libs-m)))
/home/workspace/hbx/linux/drivers/目录下的makefile实现如下:
obj-y += serial/
obj-y += bsp/source/boards/$(BOARD)/$(CPU)/$(OS)/
bsp/source/boards/$(BOARD)/$(CPU)/$(OS)/目录下构建makefile,添加相应的驱动
obj-y += ../../../../bcm/ksource/
../../../../bcm/ksource/目录下的makefile实现入下:
obj-y := abc.o bcd.o
阅读(1593) | 评论(0) | 转发(0) |