Add me as maintainer for certain packages.
[openwrt/svn-archive/archive.git] / utils / ucmb / Makefile
1 #
2 # Copyright (C) 2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6
7 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/kernel.mk
9
10 PKG_NAME:=ucmb
11 PKG_RELEASE:=1
12
13 include $(INCLUDE_DIR)/package.mk
14
15
16 define KernelPackage/ucmb
17 SUBMENU:=Other modules
18 DEPENDS:=@LINUX_2_6 \
19 @!LINUX_2_6_21 @!LINUX_2_6_22 @!LINUX_2_6_23 @!LINUX_2_6_24 \
20 @!LINUX_2_6_25 @!LINUX_2_6_26 @!LINUX_2_6_27 \
21 +kmod-spi-gpio +kmod-crc16
22 KCONFIG:=CONFIG_SPI=y \
23 CONFIG_SPI_MASTER=y
24 TITLE:=Microcontroller Message Bus
25 FILES:=$(PKG_BUILD_DIR)/ucmb.$(LINUX_KMOD_SUFFIX)
26 AUTOLOAD:=$(call AutoLoad,93,ucmb)
27 MAINTAINER:=Michael Buesch <mb@bu3sch.de>
28 endef
29
30 define KernelPackage/ucmb/description
31 The Microcontroller Message Bus is a tiny SPI-GPIO based communication
32 channel used to talk to microcontrollers over GPIO pins.
33 The lowlevel protocol is CRC16 protected, so one can be pretty sure
34 that the data transmitted and received through the /dev/ucmb node is not corrupted.
35 So no further checks should be needed at upper protocol layers.
36 The device node considers every read/write to be one packet. The maximum packet
37 size is either PAGE_SIZE (at least 4kb) or the microcontroller specific packet size
38 limit, which is likely to be a lot smaller than PAGE_SIZE.
39 To register an ucmb device, simply create a struct ucmb_platform_data
40 and register it via ucmb_device_register() from another kernel module.
41 Example implementations for the microcontroller-side code can be found in
42 the utils/ucmb/microcontroller_examples subdirectory of the OpenWRT packages feed.
43 endef
44
45 define Build/Prepare
46 $(CP) ./driver/* $(PKG_BUILD_DIR)/
47 endef
48
49 define Build/Compile
50 $(MAKE) -C "$(LINUX_DIR)" \
51 CROSS_COMPILE="$(TARGET_CROSS)" \
52 ARCH="$(LINUX_KARCH)" \
53 SUBDIRS="$(PKG_BUILD_DIR)" \
54 EXTRA_CFLAGS="$(BUILDFLAGS)" \
55 modules
56 endef
57
58 define Build/InstallDev
59 $(INSTALL_DIR) $(1)/usr/include
60 $(CP) \
61 $(PKG_BUILD_DIR)/ucmb.h \
62 $(1)/usr/include
63 endef
64
65 $(eval $(call KernelPackage,ucmb))