Browse Source

add support for i2c-tools and kernel support on geode

Waldemar Brodkorb 14 years ago
parent
commit
db3b11c8da

+ 13 - 0
mk/modules.mk

@@ -1537,3 +1537,16 @@ $(eval $(call KMOD_template,PLIP,plip,\
 $(eval $(call KMOD_template,OPROFILE,oprofile,\
 	$(MODULES_DIR)/kernel/arch/x86/oprofile/oprofile \
 ,10))
+
+#
+# I2C
+#
+$(eval $(call KMOD_template,I2C,i2c,\
+	$(MODULES_DIR)/kernel/drivers/i2c/i2c-core \
+	$(MODULES_DIR)/kernel/drivers/i2c/i2c-dev \
+,20))
+
+$(eval $(call KMOD_template,SCx200_ACB,scx200-acb,\
+	$(MODULES_DIR)/kernel/drivers/i2c/busses/scx200_acb \
+,25))
+

+ 28 - 0
package/i2c-tools/Makefile

@@ -0,0 +1,28 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=		i2c-tools
+PKG_VERSION:=		3.0.2
+PKG_RELEASE:=		1
+PKG_MD5SUM:=		b546345ac19db56719dea6b8199f11e0
+PKG_DESCR:=		I2C tools for Linux
+PKG_SECTION:=		misc
+PKG_URL:=		http://www.lm-sensors.org/wiki/I2CTools
+PKG_SITES:=		http://dl.lm-sensors.org/i2c-tools/releases/
+
+DISTFILES:=             ${PKG_NAME}-${PKG_VERSION}.tar.bz2
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,I2C_TOOLS,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIG_STYLE:=		manual
+
+post-install:
+	$(INSTALL_DIR) $(IDIR_I2C_TOOLS)/usr/sbin
+	$(INSTALL_BIN) $(WRKINST)/usr/sbin/i2c* \
+		$(IDIR_I2C_TOOLS)/usr/sbin
+
+include ${TOPDIR}/mk/pkg-bottom.mk

+ 24 - 0
package/i2c-tools/patches/patch-Makefile

@@ -0,0 +1,24 @@
+--- i2c-tools-3.0.2.orig/Makefile	2007-11-01 18:54:57.000000000 +0100
++++ i2c-tools-3.0.2/Makefile	2010-07-13 21:44:41.807074577 +0200
+@@ -4,8 +4,8 @@
+ #
+ # Licensed under the GNU General Public License.
+ 
+-DESTDIR	=
+-prefix	= /usr/local
++DESTDIR	?=
++prefix	= /usr
+ bindir	= $(prefix)/bin
+ sbindir	= $(prefix)/sbin
+ mandir	= $(prefix)/share/man
+@@ -18,8 +18,8 @@ INSTALL_DIR	:= $(INSTALL) -m 755 -d
+ INSTALL_PROGRAM	:= $(INSTALL) -m 755
+ RM		:= rm -f
+ 
+-CC	:= gcc
+-CFLAGS	:= -Wall
++CC	?= gcc
++CFLAGS	?= -Wall
+ 
+ CFLAGS	+= -O2
+ # When debugging, use the following instead

+ 22 - 11
target/linux/config/Config.in.misc

@@ -8,13 +8,33 @@ config ADK_KERNEL_RFKILL
 	boolean
 	default n
 
-menu "Miscellaneous devices support"
-
 config ADK_KERNEL_WATCHDOG
 	boolean
 	default y if ADK_TARGET_WITH_WATCHDOG
 	default n
 
+config ADK_KERNEL_I2C_CHARDEV
+	boolean
+	default n
+
+menu "Miscellaneous devices support"
+	
+config ADK_KPACKAGE_KMOD_I2C
+	prompt "kmod-i2c.......................... I2C support"
+	tristate
+	select ADK_KERNEL_I2C_CHARDEV
+	default n
+	help
+	  I2C support
+
+config ADK_KPACKAGE_KMOD_SCx200_ACB
+	prompt "kmod-i2c-geode.................... I2C driver for Geode"
+	tristate
+	depends on ADK_KPACKAGE_KMOD_I2C
+	default n
+	help
+	  I2C driver for Geode boards.
+
 config ADK_KPACKAGE_KMOD_SOFT_WATCHDOG
 	prompt "kmod-softdog...................... Software watchdog"
 	tristate
@@ -25,15 +45,6 @@ config ADK_KPACKAGE_KMOD_SOFT_WATCHDOG
 	  from some situations that the hardware watchdog will recover
 	  from. Equally it's a lot cheaper to install.
 
-#config ADK_KPACKAGE_KMOD_WD1100
-#	prompt "kmod-wd1100....................... Soekris net4801 watchdog"
-#	tristate
-#	select ADK_KERNEL_WATCHDOG
-#	default n
-#	help
-#	  Driver for the NatSemi SC1x00 series Watchdog
-#	  found on Soekris net4801 boards
-
 config ADK_KPACKAGE_KMOD_PARPORT
 	prompt "kmod-parport...................... generic parallel port support"
 	tristate