From db14ffd17b33ad58a26ba5d99c89ccea39bc2d94 Mon Sep 17 00:00:00 2001 From: Henning Heinold Date: Fri, 24 Oct 2014 17:28:17 +0200 Subject: [PATCH] i2c-tools: add the i2c-tools * use the recipe from oe-core master * add it to task-sysmocom-feed Fixes: SYS#692 --- recipes-apps/tasks/task-sysmocom-feed.bb | 4 +- .../i2c-tools/i2c-tools-3.1.1/Module.mk | 72 +++++++++++++++++++ recipes-devtools/i2c-tools/i2c-tools_3.1.1.bb | 34 +++++++++ 3 files changed, 108 insertions(+), 2 deletions(-) create mode 100644 recipes-devtools/i2c-tools/i2c-tools-3.1.1/Module.mk create mode 100644 recipes-devtools/i2c-tools/i2c-tools_3.1.1.bb diff --git a/recipes-apps/tasks/task-sysmocom-feed.bb b/recipes-apps/tasks/task-sysmocom-feed.bb index ae0dc4187c..859dc0e768 100644 --- a/recipes-apps/tasks/task-sysmocom-feed.bb +++ b/recipes-apps/tasks/task-sysmocom-feed.bb @@ -3,11 +3,11 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" ALLOW_EMPTY_${PN} = "1" -PR = "r12" +PR = "r13" RDEPENDS_${PN} = "\ task-sysmocom-tools \ task-sysmocom-debug \ minicom vlan patch procps psmisc \ ppp rsync sed usbutils openvpn iperf \ - lcr cronie iproute2" + lcr cronie iproute2 i2c-tools" diff --git a/recipes-devtools/i2c-tools/i2c-tools-3.1.1/Module.mk b/recipes-devtools/i2c-tools/i2c-tools-3.1.1/Module.mk new file mode 100644 index 0000000000..fcaf72f22a --- /dev/null +++ b/recipes-devtools/i2c-tools/i2c-tools-3.1.1/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 diff --git a/recipes-devtools/i2c-tools/i2c-tools_3.1.1.bb b/recipes-devtools/i2c-tools/i2c-tools_3.1.1.bb new file mode 100644 index 0000000000..3a87534203 --- /dev/null +++ b/recipes-devtools/i2c-tools/i2c-tools_3.1.1.bb @@ -0,0 +1,34 @@ +UMMARY = "Set of i2c tools for linux" +SECTION = "base" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" + +SRC_URI = "http://dl.lm-sensors.org/i2c-tools/releases/${BP}.tar.bz2 \ + file://Module.mk \ +" +SRC_URI[md5sum] = "0fdbff53ebd0b8d9249256d6c56480b1" +SRC_URI[sha256sum] = "14d4d7d60d1c12e43f2befe239c682a5c44c27682f153d4b58c1e392d2db1700" + +inherit autotools + +do_compile_prepend() { + cp ${WORKDIR}/Module.mk ${S}/eepromer/ + sed -i 's#/usr/local#${exec_prefix}#' ${S}/Makefile + echo "include eepromer/Module.mk" >> ${S}/Makefile +} + +do_install_append() { + install -d ${D}${includedir}/linux + install -m 0644 include/linux/i2c-dev.h ${D}${includedir}/linux/i2c-dev-user.h + rm -f ${D}${includedir}/linux/i2c-dev.h +} + +PACKAGES =+ "${PN}-misc" +FILES_${PN}-misc = "${sbindir}/i2c-stub-from-dump \ + ${bindir}/ddcmon \ + ${bindir}/decode-edid \ + ${bindir}/decode-dimms \ + ${bindir}/decode-vaio \ + " +RRECOMMENDS_${PN} += "${PN}-misc" +RDEPENDS_${PN}-misc += "perl"