summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/i2c-tools
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-01-31 11:05:11 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-02-06 11:06:28 +0000
commit95fbee5af37a388fd9fdb23a16b90cc43b875b8e (patch)
tree6704a3aa8e1ced497486aa47474f417c42897007 /meta/recipes-devtools/i2c-tools
parent7aa9be36dbb911d860990030188bea8e29a8375d (diff)
downloadpoky-95fbee5af37a388fd9fdb23a16b90cc43b875b8e.tar.gz
i2c-tools: rewrite packaging
For unknowable reasons this recipe inherits autotools-brokensep despite not in fact using autotools. Remove the inherit, add a do_install() that calls the makefile directly. Extend EXTRA_OEMAKE to pass bindir/sbindir/incdir/libdir/mandir so the files are all packaged in the correct location (and remove the now redundant sed of Makefile). Pass EXTRA=eeprog to EXTRA_OEMAKE to build eeprog, and remove the now redundant edit of Makefile. Backport a patch from upstream to remove linux/i2c-dev.h instead of installing it with a different name (which nobody will be using). (From OE-Core rev: a5d5d66c30378c35900c46dac4e4824a10521477) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/i2c-tools')
-rw-r--r--meta/recipes-devtools/i2c-tools/files/remove-i2c-dev.patch98
-rw-r--r--meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb17
2 files changed, 105 insertions, 10 deletions
diff --git a/meta/recipes-devtools/i2c-tools/files/remove-i2c-dev.patch b/meta/recipes-devtools/i2c-tools/files/remove-i2c-dev.patch
new file mode 100644
index 0000000000..703688d08a
--- /dev/null
+++ b/meta/recipes-devtools/i2c-tools/files/remove-i2c-dev.patch
@@ -0,0 +1,98 @@
1Upstream-Status: Backport
2Signed-off-by: Ross Burton <ross.burton@intel.com>
3
4From 226bc03acca44cf4b300597308064c44676b6f4b Mon Sep 17 00:00:00 2001
5From: Jean Delvare <jdelvare@suse.de>
6Date: Tue, 23 Jan 2018 14:24:16 +0100
7Subject: Delete duplicate i2c-dev.h
8
9The <linux/i2c-dev.h> header file is provided by the kernel, so drop
10our own copy of this file.
11
12Signed-off-by: Jean Delvare <jdelvare@suse.de>
13Acked-by: Wolfram Sang <wsa@the-dreams.de>
14---
15 include/linux/i2c-dev.h | 72 -------------------------------------------------
16 1 file changed, 72 deletions(-)
17 delete mode 100644 include/linux/i2c-dev.h
18
19diff --git a/include/linux/i2c-dev.h b/include/linux/i2c-dev.h
20deleted file mode 100644
21index 839d25a..0000000
22--- a/include/linux/i2c-dev.h
23+++ /dev/null
24@@ -1,72 +0,0 @@
25-/*
26- i2c-dev.h - i2c-bus driver, char device interface
27-
28- Copyright (C) 1995-97 Simon G. Vogl
29- Copyright (C) 1998-99 Frodo Looijaard <frodol@dds.nl>
30-
31- This program is free software; you can redistribute it and/or modify
32- it under the terms of the GNU General Public License as published by
33- the Free Software Foundation; either version 2 of the License, or
34- (at your option) any later version.
35-
36- This program is distributed in the hope that it will be useful,
37- but WITHOUT ANY WARRANTY; without even the implied warranty of
38- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39- GNU General Public License for more details.
40-
41- You should have received a copy of the GNU General Public License
42- along with this program; if not, write to the Free Software
43- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
44- MA 02110-1301 USA.
45-*/
46-
47-#ifndef _LINUX_I2C_DEV_H
48-#define _LINUX_I2C_DEV_H
49-
50-#include <linux/types.h>
51-
52-
53-/* /dev/i2c-X ioctl commands. The ioctl's parameter is always an
54- * unsigned long, except for:
55- * - I2C_FUNCS, takes pointer to an unsigned long
56- * - I2C_RDWR, takes pointer to struct i2c_rdwr_ioctl_data
57- * - I2C_SMBUS, takes pointer to struct i2c_smbus_ioctl_data
58- */
59-#define I2C_RETRIES 0x0701 /* number of times a device address should
60- be polled when not acknowledging */
61-#define I2C_TIMEOUT 0x0702 /* set timeout in units of 10 ms */
62-
63-/* NOTE: Slave address is 7 or 10 bits, but 10-bit addresses
64- * are NOT supported! (due to code brokenness)
65- */
66-#define I2C_SLAVE 0x0703 /* Use this slave address */
67-#define I2C_SLAVE_FORCE 0x0706 /* Use this slave address, even if it
68- is already in use by a driver! */
69-#define I2C_TENBIT 0x0704 /* 0 for 7 bit addrs, != 0 for 10 bit */
70-
71-#define I2C_FUNCS 0x0705 /* Get the adapter functionality mask */
72-
73-#define I2C_RDWR 0x0707 /* Combined R/W transfer (one STOP only) */
74-
75-#define I2C_PEC 0x0708 /* != 0 to use PEC with SMBus */
76-#define I2C_SMBUS 0x0720 /* SMBus transfer */
77-
78-
79-/* This is the structure as used in the I2C_SMBUS ioctl call */
80-struct i2c_smbus_ioctl_data {
81- __u8 read_write;
82- __u8 command;
83- __u32 size;
84- union i2c_smbus_data *data;
85-};
86-
87-/* This is the structure as used in the I2C_RDWR ioctl call */
88-struct i2c_rdwr_ioctl_data {
89- struct i2c_msg *msgs; /* pointers to i2c_msgs */
90- __u32 nmsgs; /* number of i2c_msgs */
91-};
92-
93-#define I2C_RDRW_IOCTL_MAX_MSGS 42
94-
95-
96-#endif /* _LINUX_I2C_DEV_H */
97--
98cgit v1.1
diff --git a/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb b/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb
index e936fd759b..01ac47f611 100644
--- a/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb
+++ b/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb
@@ -8,22 +8,19 @@ SRC_URI = "${KERNELORG_MIRROR}/software/utils/i2c-tools/${BP}.tar.gz \
8 file://0001-lib-Module.mk-Add-missing-dependencies.patch \ 8 file://0001-lib-Module.mk-Add-missing-dependencies.patch \
9 file://0001-tools-Module.mk-Add-missing-dependencies.patch \ 9 file://0001-tools-Module.mk-Add-missing-dependencies.patch \
10 file://0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch \ 10 file://0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch \
11 file://remove-i2c-dev.patch \
11" 12"
12 13
13SRC_URI[md5sum] = "d92a288d70f306d3895e3a7e9c14c9aa" 14SRC_URI[md5sum] = "d92a288d70f306d3895e3a7e9c14c9aa"
14SRC_URI[sha256sum] = "5b60daf6f011de0acb61de57dba62f2054bb39f19961d67e0c91610f071ca403" 15SRC_URI[sha256sum] = "5b60daf6f011de0acb61de57dba62f2054bb39f19961d67e0c91610f071ca403"
15 16
16inherit autotools-brokensep 17EXTRA_OEMAKE = "bindir=${bindir} sbindir=${sbindir} \
18 incdir=${includedir} libdir=${libdir} \
19 mandir=${mandir} \
20 EXTRA=eeprog"
17 21
18do_compile_prepend() { 22do_install() {
19 sed -i 's#/usr/local#/usr#' ${S}/Makefile 23 oe_runmake 'DESTDIR=${D}' install
20 echo "include eeprog/Module.mk" >> ${S}/Makefile
21}
22
23do_install_append() {
24 install -d ${D}${includedir}/linux
25 install -m 0644 include/linux/i2c-dev.h ${D}${includedir}/linux/i2c-dev-user.h
26 rm -f ${D}${includedir}/linux/i2c-dev.h
27} 24}
28 25
29PACKAGES =+ "${PN}-misc" 26PACKAGES =+ "${PN}-misc"