Obtained missing Module.mk needed to build eepromer directory tools from
http://cgit.openembedded.org/cgit.cgi/openembedded/plain/recipes/i2c-tools/files/Module.mk

Signed-off-by: Jon Ringle <[email protected]>
---
 ...1-eepromer-Add-Module.mk-obtained-from-oe.patch |   93 ++++++++++++++++++++
 patches/i2c-tools-3.0.3/series                     |    4 +
 rules/i2c-tools.in                                 |   44 +++++++++-
 rules/i2c-tools.make                               |    9 ++
 4 files changed, 149 insertions(+), 1 deletions(-)
 create mode 100644 
patches/i2c-tools-3.0.3/0001-eepromer-Add-Module.mk-obtained-from-oe.patch
 create mode 100644 patches/i2c-tools-3.0.3/series

diff --git 
a/patches/i2c-tools-3.0.3/0001-eepromer-Add-Module.mk-obtained-from-oe.patch 
b/patches/i2c-tools-3.0.3/0001-eepromer-Add-Module.mk-obtained-from-oe.patch
new file mode 100644
index 0000000..f098be8
--- /dev/null
+++ b/patches/i2c-tools-3.0.3/0001-eepromer-Add-Module.mk-obtained-from-oe.patch
@@ -0,0 +1,93 @@
+From: Jon Ringle <[email protected]>
+Date: Thu, 8 Sep 2011 06:02:24 -0400
+Subject: [PATCH] eepromer: Add Module.mk obtained from oe
+
+http://cgit.openembedded.org/cgit.cgi/openembedded/plain/recipes/i2c-tools/files/Module.mk
+
+Signed-off-by: Jon Ringle <[email protected]>
+---
+ eepromer/Module.mk |   72 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 72 insertions(+), 0 deletions(-)
+ create mode 100644 eepromer/Module.mk
+
+diff --git a/eepromer/Module.mk b/eepromer/Module.mk
+new file mode 100644
+index 0000000..fcaf72f
+--- /dev/null
++++ b/eepromer/Module.mk
+@@ -0,0 +1,72 @@
++# EEPROMER
++#
++# Licensed under the GNU General Public License.
++
++EEPROMER_DIR  := eepromer
++
++EEPROMER_CFLAGS       := -Wstrict-prototypes -Wshadow -Wpointer-arith 
-Wcast-qual \
++                 -Wcast-align -Wwrite-strings -Wnested-externs -Winline \
++                 -W -Wundef -Wmissing-prototypes -Iinclude
++
++EEPROMER_TARGETS      := eepromer eeprom eeprog
++
++#
++# Programs
++#
++
++$(EEPROMER_DIR)/eepromer: $(EEPROMER_DIR)/eepromer.o
++      $(CC) $(LDFLAGS) -o $@ $^
++
++$(EEPROMER_DIR)/eeprom: $(EEPROMER_DIR)/eeprom.o
++      $(CC) $(LDFLAGS) -o $@ $^
++
++$(EEPROMER_DIR)/eeprog: $(EEPROMER_DIR)/eeprog.o $(EEPROMER_DIR)/24cXX.o 
++      $(CC) $(LDFLAGS) -o $@ $^
++
++#
++# Objects
++#
++
++$(EEPROMER_DIR)/eepromer.o: $(EEPROMER_DIR)/eepromer.c
++      $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
++
++$(EEPROMER_DIR)/eeprom.o: $(EEPROMER_DIR)/eeprom.c
++      $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
++
++$(EEPROMER_DIR)/eeprog.o: $(EEPROMER_DIR)/eeprog.c
++      $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
++
++$(EEPROMER_DIR)/24cXX.o: $(EEPROMER_DIR)/24cXX.c
++      $(CC) $(CFLAGS) $(EEPROMER_CFLAGS) -c $< -o $@
++
++#
++# Commands
++#
++
++all-eepromer: $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
++
++strip-eepromer: $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
++      strip $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
++
++clean-eepromer:
++      $(RM) $(addprefix $(EEPROMER_DIR)/,*.o $(EEPROMER_TARGETS))
++
++install-eepromer: $(addprefix $(EEPROMER_DIR)/,$(EEPROMER_TARGETS))
++      $(INSTALL_DIR) $(DESTDIR)$(sbindir) $(DESTDIR)$(man8dir)
++      for program in $(EEPROMER_TARGETS) ; do \
++      $(INSTALL_PROGRAM) $(EEPROMER_DIR)/$$program $(DESTDIR)$(sbindir) ; done
++
++uninstall-eepromer:
++      for program in $(EEPROMER_TARGETS) ; do \
++      $(RM) $(DESTDIR)$(sbindir)/$$program ; \
++      $(RM) $(DESTDIR)$(man8dir)/$$program.8 ; done
++
++all: all-eepromer
++
++strip: strip-eepromer
++
++clean: clean-eepromer
++
++install: install-eepromer
++
++uninstall: uninstall-eepromer
+-- 
+1.7.0.4
+
diff --git a/patches/i2c-tools-3.0.3/series b/patches/i2c-tools-3.0.3/series
new file mode 100644
index 0000000..da49d09
--- /dev/null
+++ b/patches/i2c-tools-3.0.3/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-eepromer-Add-Module.mk-obtained-from-oe.patch
+# bd288ef40cbd42d261f49e1ec1fbb9a7  - git-ptx-patches magic
diff --git a/rules/i2c-tools.in b/rules/i2c-tools.in
index 7089bc5..270b4b6 100644
--- a/rules/i2c-tools.in
+++ b/rules/i2c-tools.in
@@ -1,8 +1,50 @@
 ## SECTION=shell_and_console
-config I2C_TOOLS
+
+menuconfig I2C_TOOLS
        tristate
        prompt "i2c-tools"
        help
          The userland i2c tools from lm-sensors. They provide generic access
          to i2c devices.
 
+if I2C_TOOLS
+
+config I2C_TOOLS_EEPROMER
+       bool
+       prompt "eepromer"
+       help
+         Tools for writing to EEPROMs. These tools rely on the "i2c-dev" kernel
+         driver
+       
+         These programs are used to read and write eeproms.
+       
+         Use eeprom for small eeproms with one-byte addresses:
+               24C01, 24C01A, 24C02, 24C04, 24C08, and 24C16
+           It works only on true i2c bus adapters.
+           See README.eeprom for details.
+       
+         Use eepromer for large eeproms with two-byte addresses:
+           24C32, 24C64, 24C128, 24C256, and 24C512
+           It works only on true i2c bus adapters.
+           See README.eepromer for details.
+       
+         Use eeprog for either small or large eeproms.
+           Use the -16 switch for large eeproms.
+           It works on both i2c and smbus bus adapters.
+           See README.eeprog for details.
+       
+         !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Warning 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+         !!!                                                                   
        !
+         !!! These programs should only be used on external busses such as 
i2c-pport   !
+         !!! unless you REALLY know what you are doing.                        
        !
+         !!!                                                                   
        !
+         !!! Your computer probably contains eeproms for saving data vital to 
its      !
+         !!! operation. If you are not careful you might overwrite this data 
with      !
+         !!! this program and your computer may no longer boot!                
        !
+         !!!                                                                   
        !
+         !!! An example are the EEPROMS on your SDRAM DIMMs, your computer may 
no      !
+         !!! longer detect the RAM module rendering it essentially USELESS!    
        !
+         !!!                                                                   
        !
+         !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Warning 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+endif
diff --git a/rules/i2c-tools.make b/rules/i2c-tools.make
index 6ee8582..d92ca9a 100644
--- a/rules/i2c-tools.make
+++ b/rules/i2c-tools.make
@@ -44,6 +44,10 @@ I2C_TOOLS_MAKE_OPT := \
        KERNELVERSION=$(KERNEL_HEADER_VERSION) \
        $(CROSS_ENV_CC)
 
+ifdef PTXCONF_I2C_TOOLS_EEPROMER
+I2C_TOOLS_MAKE_OPT += EXTRA=eepromer
+endif
+
 # install the header files to include/i2c-tools
 # this way they don't collide with the toolchain's i2c headers
 I2C_TOOLS_INSTALL_OPT := \
@@ -72,6 +76,11 @@ $(STATEDIR)/i2c-tools.targetinstall:
        @$(call install_copy, i2c-tools, 0, 0, 0755, -, /usr/sbin/i2cdump)
        @$(call install_copy, i2c-tools, 0, 0, 0755, -, /usr/sbin/i2cset)
        @$(call install_copy, i2c-tools, 0, 0, 0755, -, /usr/sbin/i2cget)
+ifdef PTXCONF_I2C_TOOLS_EEPROMER
+       @$(call install_copy, i2c-tools, 0, 0, 0755, -, /usr/sbin/eepromer)
+       @$(call install_copy, i2c-tools, 0, 0, 0755, -, /usr/sbin/eeprom)
+       @$(call install_copy, i2c-tools, 0, 0, 0755, -, /usr/sbin/eeprog)
+endif
 
        @$(call install_finish, i2c-tools)
 
-- 
1.7.0.4


-- 
ptxdist mailing list
[email protected]

Reply via email to