canutils
The current CAN stack in linux needs updated userspace code. The following two patches build canutils from pengutronix.
Bye,
Vitus
Signature · 2 lines
Vitus Jensen, Hannover, Germany, Universe (current) pgp public key available from keyservers
PATCH 1/2 libsocketcan: recipe to build pengutronix' libsocketcan (netlink interface)
--- recipes/socketcan/libsocketcan_0.0.7.bb | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) create mode 100644 recipes/socketcan/libsocketcan_0.0.7.bb
recipes/socketcan/libsocketcan_0.0.7.bb new file +22 -0
@@ -0,0 +1,22 @@ +DESCRIPTION = "control basic functions in socketcan from userspace" +AUTHOR = "Luotao Fu" +HOMEPAGE = "http://www.pengutronix.de" +SECTION = "libs/network" +PRIORITY = "optional" +LICENSE = "LGPL" + +TAG = "v${PV}" +PR = "r0" + +SRC_URI = "git://git.pengutronix.de/git/tools/libsocketcan.git;protocol=git;tag=${TAG} \ + " + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +do_stage () { + install -m 0644 include/libsocketcan.h ${STAGING_INCDIR}/ + install -m 0644 include/can_netlink.h ${STAGING_INCDIR}/ + oe_libinstall -a -so libsocketcan ${STAGING_LIBDIR} +}
Signature · 1 line
1.5.6.5
Re: [PATCH 1/2] libsocketcan: recipe to build pengutronix' libsocketcan (netlink interface)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
recipes/socketcan/libsocketcan_0.0.7.bb line 22
Quoted 7 lines · Vitus Jensen
recipes/socketcan/libsocketcan_0.0.7.bb new file +5
-0+do_stage () { + install -m 0644 include/libsocketcan.h ${STAGING_INCDIR}/ + install -m 0644 include/can_netlink.h ${STAGING_INCDIR}/ + oe_libinstall -a -so libsocketcan ${STAGING_LIBDIR} +}
That's using legacy staging, which we are trying very hard to kill in .dev. I suspect you can just remove method since do_install usually works in autotools based systems.
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFLyJ72MkyGM64RGpERAkKdAJ4pmScGv0xZyIW4HXPnLWn/qTkNYQCfQSUT ymrAoW04nH6clpB4ub/ETqw=
=MKJo
-----END PGP SIGNATURE-----
Re: [PATCH 1/2] libsocketcan: recipe to build pengutronix' libsocketcan (netlink interface)
Quoted 12 lines · Koen Kooi
recipes/socketcan/libsocketcan_0.0.7.bb line 22
Quoted 7 lines · Vitus Jensen
recipes/socketcan/libsocketcan_0.0.7.bb new file +5
-0+do_stage () { + install -m 0644 include/libsocketcan.h ${STAGING_INCDIR}/ + install -m 0644 include/can_netlink.h ${STAGING_INCDIR}/ + oe_libinstall -a -so libsocketcan ${STAGING_LIBDIR} +}That's using legacy staging, which we are trying very hard to kill in .dev I suspect you can just remove method since
do_installusually works in autotools based systems.
Hmm, will try to build it in our stable/2009-based tree on monday without that method.
BTW, I've seen a tree named stable/xxx/2010 in git, are there activities to create a new stable tree? The different staging methods did already create work I could live without.
Vitus
Signature · 2 lines
Vitus Jensen, Hannover, Germany, Universe (current) pgp public key available from keyservers
Re: [PATCH 1/2] libsocketcan: recipe to build pengutronix' libsocketcan (netlink interface)
Hi,
it will not work in stable tree.
Bye Henning
Re: [PATCH 1/2] libsocketcan: recipe to build pengutronix' libsocketcan (netlink interface)
In reply to Koen KooiQuoted 12 lines · Koen Kooi
recipes/socketcan/libsocketcan_0.0.7.bb line 22
Quoted 7 lines · Vitus Jensen
recipes/socketcan/libsocketcan_0.0.7.bb new file +5
-0+do_stage () { + install -m 0644 include/libsocketcan.h ${STAGING_INCDIR}/ + install -m 0644 include/can_netlink.h ${STAGING_INCDIR}/ + oe_libinstall -a -so libsocketcan ${STAGING_LIBDIR} +}That's using legacy staging, which we are trying very hard to kill in .dev. I suspect you can just remove method since
do_installusually works in autotools based systems.
Unfortunately headers aren't installed without this method and compiling of canutils fails without them. How is this handled in new staging? wiki and manual still describe legacy staging.
Vitus
Signature · 2 lines
Vitus Jensen, Hannover, Germany, Universe (current) pgp public key available from keyservers
PATCH 2/2 canutils: add new recipe
In reply to Vitus JensenAdds canutils (PTX flavour) 4.0.4 as alternative to socketcan-utils-test. canutils RCONFLICTS with socketcan-utils-test because of identical file names.
--- recipes/socketcan/canutils_4.0.4.bb | 19 +++++++++++++++++++ recipes/socketcan/socketcan-utils-test_svn.bb | 1 + 2 files changed, 20 insertions(+), 0 deletions(-) create mode 100644 recipes/socketcan/canutils_4.0.4.bb
recipes/socketcan/canutils_4.0.4.bb new file +19 -0
@@ -0,0 +1,19 @@ +DESCRIPTION = "canutils (PTX flavour)" +AUTHOR = "Luotao Fu" +HOMEPAGE = "http://www.pengutronix.de" +SECTION = "console/network" +PRIORITY = "optional" +LICENSE = "LGPL" +DEPENDS = "libsocketcan" +RDEPENDS = "libsocketcan" +RCONFLICTS = "socketcan-utils-test" + +TAG = "canutils-${PV}" +PR = "r0" + +SRC_URI = "git://git.pengutronix.de/git/tools/canutils.git;protocol=git;tag=${TAG} \ + " + +S = "${WORKDIR}/git" + +inherit autotools
recipes/socketcan/socketcan-utils-test_svn.bb +1 -0
@@ -2,6 +2,7 @@ DESCRIPTION = "Socketcan user space utilities and test apps" HOMEPAGE = "http://developer.berlios.de/projects/socketcan/" SECTION = "console/utils" LICENSE = "GPL" +RCONFLICTS = "canutils" PV = "0.0+svnr${SRCPV}"
Signature · 1 line
1.5.6.5
Because the CAN stack changed, current linux-libc-headers are needed.
Angstrom does a hard select of the version, the following patch changes it to a weak assignment which can be overridden by a machine description (as done for tb5200l).
PATCH 1/1 angstrom-2008: make PREFERRED_VERSION_linux-libc-headers a weak assignment
--- conf/distro/angstrom-2008.1.conf | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
conf/distro/angstrom-2008.1.conf +1 -1
@@ -81,7 +81,7 @@ PREFERRED_VERSION_linux-handhelds-2.6 ?= "2.6.21-hh20" #KERNEL_INITRAMFS_PATH = "${KERNEL_INITRAMFS_DIR}/$(readlink ${KERNEL_INITRAMFS_DIR}initramfs-bootmenu-image-${MACHINE}.cpio.gz)" #This is unrelated to the kernel version, but userspace apps (e.g. HAL) require a recent version to build against -PREFERRED_VERSION_linux-libc-headers = "2.6.31" +PREFERRED_VERSION_linux-libc-headers ?= "2.6.31" #Prefer glibc 2.6 and uclibc 0.9.30, these have had the most testing. PREFERRED_VERSION_glibc ?= "2.9"
Signature · 1 line
1.5.6.5
Koen Kooi
NAKRe: [PATCH] angstrom-2008: make PREFERRED_VERSION_linux-libc-headers a weak assignment
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 11 lines · Vitus Jensen
Signed-off-by Vitus Jensen <[email protected]>--- conf/distro/angstrom-2008.1.conf | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)conf/distro/angstrom-2008.1.conf +0
-0
conf/distro/angstrom-2008.1.conf PREFERRED_VERSION_linux-handhelds-2.6 ?= "2.6.21-hh20" · line 84
Quoted 5 lines
conf/distro/angstrom-2008.1.conf +1
-1@@ -81,7 +81,7 @@ PREFERRED_VERSION_linux-handhelds-2.6 ?= "2.6.21-hh20" #KERNEL_INITRAMFS_PATH = "${KERNEL_INITRAMFS_DIR}/$(readlink ${KERNEL_INITRAMFS_DIR}initramfs-bootmenu-image-${MACHINE}.cpio.gz)" #This is unrelated to the kernel version, but userspace apps (e.g. HAL) require a recent version to build against -PREFERRED_VERSION_linux-libc-headers = "2.6.31" +PREFERRED_VERSION_linux-libc-headers ?= "2.6.31"
NACK, there's is a good reason it's not soft assigned. Your hack to make it machine specific is worse, since it means that other machines with the same arch now get a "random" version.
What we can do is globally increase the version, which was planned anyway. Does can need .32 or .33? I tested using llc .32 locally, but hadn't pushed that change yet.
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFLzLazMkyGM64RGpERAprHAJ4g/qIJ+2JTBX2dBV5j9qvXabB77ACghL2M mkx8G87d5lGlBbJDbKaOSos=
=1pVK
-----END PGP SIGNATURE-----
Re: [PATCH] angstrom-2008: make PREFERRED_VERSION_linux-libc-headers a weak assignment
Quoted 14 lines · Koen Kooi
Quoted 13 lines · Vitus Jensen
Signed-off-by Vitus Jensen <[email protected]>--- conf/distro/angstrom-2008.1.conf | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)conf/distro/angstrom-2008.1.conf +0
-0@@ -81,7 +81,7 @@ PREFERRED_VERSION_linux-handhelds-2.6 ?= "2.6.21-hh20" #KERNEL_INITRAMFS_PATH = "${KERNEL_INITRAMFS_DIR}/$(readlink ${KERNEL_INITRAMFS_DIR}initramfs-bootmenu-image-${MACHINE}.cpio.gz)"
Quoted 7 lines
conf/distro/angstrom-2008.1.conf PREFERRED_VERSION_linux-handhelds-2.6 ?= "2.6.21-hh20" · line 84
Quoted 3 lines
conf/distro/angstrom-2008.1.conf +1
-1#This is unrelated to the kernel version, but userspace apps (e.g. HAL) require a recent version to build against -PREFERRED_VERSION_linux-libc-headers = "2.6.31" +PREFERRED_VERSION_linux-libc-headers ?= "2.6.31"NACK, there's is a good reason it's not soft assigned. Your hack to make it machine specific is worse, since it means that other machines with the same arch now get a "random" version.
Well, if they don't prefer a version and use angstrom they get .31.
llc is only the description if the interface to kernel, IMHO a program should work with any version new enough to contain requested features. I can think of two reasons to select a fixed version:
- either you want to use the exact same version as the kernel you are running (for whatever reason), in this case it's a machine-specific setting.
- or some userspace code has problems with newer headers. In this case it's application specific and some parsing code would have to parse all used recipes. But it would be better to fix userspace code in this case.
So floating would be fine with me. But I'm on stable/2009 so I don't care how it's done in .dev
Quoted 3 lines
What we can do is globally increase the version, which was planned anyway. Does can need .32 or .33? I tested using llc .32 locally, but hadn't pushed that change yet.
llc .32 would be good enough.
Vitus
Signature · 2 lines
Vitus Jensen, Hannover, Germany, Universe (current) pgp public key available from keyservers
Re: [PATCH] angstrom-2008: make PREFERRED_VERSION_linux-libc-headers a weak assignment
In reply to Koen KooiQuoted 10 lines
conf/distro/angstrom-2008.1.conf PREFERRED_VERSION_linux-handhelds-2.6 ?= "2.6.21-hh20" · line 84
Quoted 2 lines
conf/distro/angstrom-2008.1.conf +1
-1-PREFERRED_VERSION_linux-libc-headers = "2.6.31" +PREFERRED_VERSION_linux-libc-headers ?= "2.6.31"NACK, there's is a good reason it's not soft assigned. Your hack to make it machine specific is worse, since it means that other machines with the same arch now get a "random" version.
What we can do is globally increase the version, which was planned anyway. Does can need .32 or .33? I tested using llc .32 locally, but hadn't pushed that change yet.
eee701 require 2.6.33 headers(or libdrm to stage the headers) for the latest xf86-video-intel xorg driver
So I did that locally(I know I can't commit such stuff) and it worked. But the correct fix may be to modify libdrm to stage the libs I bet...
Denis.
Quoted 2 lines · Vitus Jensen
The current CAN stack in linux needs updated userspace code. The following two patches build canutils from pengutronix.
I've rebuild the patches to no longer require a do_stage method. The reason for the do_stage() was the inclusion of a local copy of can/netlink.h which should better be supplied by linux-libc-headers. And is, starting with 2.6.32.
Vitus
Signature · 2 lines
Vitus Jensen, Hannover, Germany, Universe (current) pgp public key available from keyservers
PATCH v2 1/1 libsocketcan: new recipe
Builds pengutronix' libsocketcan (using the new netlink interface to access CAN drivers)
--- ...ve-headers-supplied-by-linux-libc-headers.patch | 155 ++++++++++++++++++++ recipes/socketcan/libsocketcan_0.0.7.bb | 17 ++ 2 files changed, 172 insertions(+), 0 deletions(-) create mode 100644 recipes/socketcan/files/0001-remove-headers-supplied-by-linux-libc-headers.patch create mode 100644 recipes/socketcan/libsocketcan_0.0.7.bb
recipes/socketcan/files/0001-remove-headers-supplied-by-linux-libc-headers.patch new file +155 -0
@@ -0,0 +1,155 @@ +[PATCH] remove headers supplied by linux-libc-headers + +--- + include/GNUmakefile.am | 3 +- + include/can_netlink.h | 113 ------------------------------------------------ + include/libsocketcan.h | 2 +- + 3 files changed, 2 insertions(+), 116 deletions(-) + delete mode 100644 include/can_netlink.h + +diff --git a/include/GNUmakefile.am b/include/GNUmakefile.am +index 4ba2798..7d7be99 100644 +--- a/include/GNUmakefile.am ++++ b/include/GNUmakefile.am +@@ -1,5 +1,4 @@ +-noinst_HEADERS = \ +- can_netlink.h ++noinst_HEADERS = + + nobase_include_HEADERS = \ + libsocketcan.h +diff --git a/include/can_netlink.h b/include/can_netlink.h +deleted file mode 100644 +index 9ecbb78..0000000 +--- a/include/can_netlink.h ++++ /dev/null +@@ -1,113 +0,0 @@ +-/* +- * linux/can/netlink.h +- * +- * Definitions for the CAN netlink interface +- * +- * Copyright (c) 2009 Wolfgang Grandegger <[email protected]> +- * +- * Send feedback to <[email protected]> +- * +- */ +- +-#ifndef CAN_NETLINK_H +-#define CAN_NETLINK_H +- +-#include <linux/types.h> +- +-/* +- * CAN bit-timing parameters +- * +- * For futher information, please read chapter "8 BIT TIMING +- * REQUIREMENTS" of the "Bosch CAN Specification version 2.0" +- * at http://www.semiconductors.bosch.de/pdf/can2spec.pdf. +- */ +-struct can_bittiming { +- __u32 bitrate; /* Bit-rate in bits/second */ +- __u32 sample_point; /* Sample point in one-tenth of a percent */ +- __u32 tq; /* Time quanta (TQ) in nanoseconds */ +- __u32 prop_seg; /* Propagation segment in TQs */ +- __u32 phase_seg1; /* Phase buffer segment 1 in TQs */ +- __u32 phase_seg2; /* Phase buffer segment 2 in TQs */ +- __u32 sjw; /* Synchronisation jump width in TQs */ +- __u32 brp; /* Bit-rate prescaler */ +-}; +- +-/* +- * CAN harware-dependent bit-timing constant +- * +- * Used for calculating and checking bit-timing parameters +- */ +-struct can_bittiming_const { +- char name[16]; /* Name of the CAN controller hardware */ +- __u32 tseg1_min; /* Time segement 1 = prop_seg + phase_seg1 */ +- __u32 tseg1_max; +- __u32 tseg2_min; /* Time segement 2 = phase_seg2 */ +- __u32 tseg2_max; +- __u32 sjw_max; /* Synchronisation jump width */ +- __u32 brp_min; /* Bit-rate prescaler */ +- __u32 brp_max; +- __u32 brp_inc; +-}; +- +-/* +- * CAN clock parameters +- */ +-struct can_clock { +- __u32 freq; /* CAN system clock frequency in Hz */ +-}; +- +-/* +- * CAN operational and error states +- */ +-enum can_state { +- CAN_STATE_ERROR_ACTIVE = 0, /* RX/TX error count < 96 */ +- CAN_STATE_ERROR_WARNING, /* RX/TX error count < 128 */ +- CAN_STATE_ERROR_PASSIVE, /* RX/TX error count < 256 */ +- CAN_STATE_BUS_OFF, /* RX/TX error count >= 256 */ +- CAN_STATE_STOPPED, /* Device is stopped */ +- CAN_STATE_SLEEPING, /* Device is sleeping */ +- CAN_STATE_MAX +-}; +- +-/* +- * CAN controller mode +- */ +-struct can_ctrlmode { +- __u32 mask; +- __u32 flags; +-}; +- +-#define CAN_CTRLMODE_LOOPBACK 0x1 /* Loopback mode */ +-#define CAN_CTRLMODE_LISTENONLY 0x2 /* Listen-only mode */ +-#define CAN_CTRLMODE_3_SAMPLES 0x4 /* Triple sampling mode */ +- +-/* +- * CAN device statistics +- */ +-struct can_device_stats { +- __u32 bus_error; /* Bus errors */ +- __u32 error_warning; /* Changes to error warning state */ +- __u32 error_passive; /* Changes to error passive state */ +- __u32 bus_off; /* Changes to bus off state */ +- __u32 arbitration_lost; /* Arbitration lost errors */ +- __u32 restarts; /* CAN controller re-starts */ +-}; +- +-/* +- * CAN netlink interface +- */ +-enum { +- IFLA_CAN_UNSPEC, +- IFLA_CAN_BITTIMING, +- IFLA_CAN_BITTIMING_CONST, +- IFLA_CAN_CLOCK, +- IFLA_CAN_STATE, +- IFLA_CAN_CTRLMODE, +- IFLA_CAN_RESTART_MS, +- IFLA_CAN_RESTART, +- __IFLA_CAN_MAX +-}; +- +-#define IFLA_CAN_MAX (__IFLA_CAN_MAX - 1) +- +-#endif /* CAN_NETLINK_H */ +diff --git a/include/libsocketcan.h b/include/libsocketcan.h +index bd2b040..8a92eee 100644 +--- a/include/libsocketcan.h ++++ b/include/libsocketcan.h +@@ -26,7 +26,7 @@ + * @brief API overview + */ + +-#include <can_netlink.h> ++#include <linux/can/netlink.h> + + int can_do_restart(const char *name); + int can_do_stop(const char *name); +-- +1.5.6.5 +
recipes/socketcan/libsocketcan_0.0.7.bb new file +17 -0
@@ -0,0 +1,17 @@ +DESCRIPTION = "control basic functions in socketcan from userspace" +AUTHOR = "Luotao Fu" +HOMEPAGE = "http://www.pengutronix.de" +SECTION = "libs/network" +PRIORITY = "optional" +LICENSE = "LGPL" + +TAG = "v${PV}" +PR = "r0" + +SRC_URI = "git://git.pengutronix.de/git/tools/libsocketcan.git;protocol=git;tag=${TAG} \ + file://0001-remove-headers-supplied-by-linux-libc-headers.patch;patch=1 \ + " + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig
Signature · 1 line
1.5.6.5
PATCH v2 1/1 canutils: new recipe
Adds canutils (PTX flavour) 4.0.4 as alternative to socketcan-utils-test. canutils RCONFLICTS with socketcan-utils-test because of identical file names.
--- recipes/socketcan/canutils_4.0.4.bb | 19 +++++++++++++++++++ recipes/socketcan/socketcan-utils-test_svn.bb | 1 + 2 files changed, 20 insertions(+), 0 deletions(-) create mode 100644 recipes/socketcan/canutils_4.0.4.bb
recipes/socketcan/canutils_4.0.4.bb new file +19 -0
@@ -0,0 +1,19 @@ +DESCRIPTION = "canutils (PTX flavour)" +AUTHOR = "Luotao Fu" +HOMEPAGE = "http://www.pengutronix.de" +SECTION = "console/network" +PRIORITY = "optional" +LICENSE = "LGPL" +DEPENDS = "libsocketcan" +RDEPENDS = "libsocketcan" +RCONFLICTS = "socketcan-utils-test" + +TAG = "canutils-${PV}" +PR = "r0" + +SRC_URI = "git://git.pengutronix.de/git/tools/canutils.git;protocol=git;tag=${TAG} \ + " + +S = "${WORKDIR}/git" + +inherit autotools
recipes/socketcan/socketcan-utils-test_svn.bb +1 -0
@@ -2,6 +2,7 @@ DESCRIPTION = "Socketcan user space utilities and test apps" HOMEPAGE = "http://developer.berlios.de/projects/socketcan/" SECTION = "console/utils" LICENSE = "GPL" +RCONFLICTS = "canutils" SRCREV = "917" PV = "0.0+svnr${SRCPV}"
Signature · 1 line
1.5.6.5
Re: [PATCH v2] canutils: new recipe
Hello.
Quoted 17 lines · Vitus Jensen
Adds canutils (PTX flavour) 4.0.4 as alternative to socketcan-utils-test. canutils RCONFLICTS with socketcan-utils-test because of identical file names.
Signed-off-by Vitus Jensen <[email protected]>--- recipes/socketcan/canutils_4.0.4.bb | 19 +++++++++++++++++++ recipes/socketcan/socketcan-utils-test_svn.bb | 1 + 2 files changed, 20 insertions(+), 0 deletions(-) create mode 100644 recipes/socketcan/canutils_4.0.4.bbrecipes/socketcan/canutils_4.0.4.bb new file +0
-0
recipes/socketcan/canutils_4.0.4.bb line 8
Quoted 8 lines
recipes/socketcan/canutils_4.0.4.bb new file +8
-0@@ -0,0 +1,19 @@ +DESCRIPTION = "canutils (PTX flavour)" +AUTHOR = "Luotao Fu" +HOMEPAGE = "http://www.pengutronix.de" +SECTION = "console/network" +PRIORITY = "optional" +LICENSE = "LGPL" +DEPENDS = "libsocketcan" +RDEPENDS = "libsocketcan"
Why do you need this RDEPENDS on the lib when it is already in DEPENDS?
recipes/socketcan/canutils_4.0.4.bb line 15
Quoted 7 lines
recipes/socketcan/canutils_4.0.4.bb new file +7
-0+RCONFLICTS = "socketcan-utils-test" + +TAG = "canutils-${PV}" +PR = "r0" + +SRC_URI = "git://git.pengutronix.de/git/tools/canutils.git;protocol=git;tag=${TAG} \ + "
Same about release tarballs and git SRC_URIs as from the other patch.
regards
Stefan Schmidt
Re: [PATCH v2] canutils: new recipe
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 14 lines · Stefan Schmidt
Hello.
Quoted 11 lines · Vitus Jensen
Adds canutils (PTX flavour) 4.0.4 as alternative to socketcan-utils-test. canutils RCONFLICTS with socketcan-utils-test because of identical file names.
Signed-off-by Vitus Jensen <[email protected]>--- recipes/socketcan/canutils_4.0.4.bb | 19 +++++++++++++++++++ recipes/socketcan/socketcan-utils-test_svn.bb | 1 + 2 files changed, 20 insertions(+), 0 deletions(-) create mode 100644 recipes/socketcan/canutils_4.0.4.bb
Quoted 16 lines
Quoted 6 lines
recipes/socketcan/canutils_4.0.4.bb new file +0
-0recipes/socketcan/canutils_4.0.4.bb line 8
Quoted 8 lines
recipes/socketcan/canutils_4.0.4.bb new file +8
-0@@ -0,0 +1,19 @@ +DESCRIPTION = "canutils (PTX flavour)" +AUTHOR = "Luotao Fu" +HOMEPAGE = "http://www.pengutronix.de" +SECTION = "console/network" +PRIORITY = "optional" +LICENSE = "LGPL" +DEPENDS = "libsocketcan" +RDEPENDS = "libsocketcan"Why do you need this RDEPENDS on the lib when it is already in DEPENDS?
The better question is "Why doesn't OE shlib code pickup that dependency?" :)
Regardless of that, RDEPENDS = "foo" is bad, RDEPENDS_${PN} = "foo" is better. Chris created the recipe sanity stuff to check for these kinds of things.
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFL4/Y2MkyGM64RGpERApiGAKCHkZaERI3RjRMFni0srqrz1bK1zACgh4Oc txgZHww4OIZWD+cvr+GWb5w=
=eDEU
-----END PGP SIGNATURE-----
Re: [PATCH v2] canutils: new recipe
Quoted 32 lines · Koen Kooi
Quoted 14 lines · Stefan Schmidt
Hello.
Quoted 11 lines · Vitus Jensen
Adds canutils (PTX flavour) 4.0.4 as alternative to socketcan-utils-test. canutils RCONFLICTS with socketcan-utils-test because of identical file names.
Signed-off-by Vitus Jensen <[email protected]>--- recipes/socketcan/canutils_4.0.4.bb | 19 +++++++++++++++++++ recipes/socketcan/socketcan-utils-test_svn.bb | 1 + 2 files changed, 20 insertions(+), 0 deletions(-) create mode 100644 recipes/socketcan/canutils_4.0.4.bbQuoted 16 lines
Quoted 6 lines
recipes/socketcan/canutils_4.0.4.bb new file +0
-0recipes/socketcan/canutils_4.0.4.bb line 8
Quoted 8 lines
recipes/socketcan/canutils_4.0.4.bb new file +8
-0@@ -0,0 +1,19 @@ +DESCRIPTION = "canutils (PTX flavour)" +AUTHOR = "Luotao Fu" +HOMEPAGE = "http://www.pengutronix.de" +SECTION = "console/network" +PRIORITY = "optional" +LICENSE = "LGPL" +DEPENDS = "libsocketcan" +RDEPENDS = "libsocketcan"Why do you need this RDEPENDS on the lib when it is already in DEPENDS?
Quoted 2 lines
The better question is "Why doesn't OE shlib code pickup that dependency?" :)
...
I thought that both settings worked independly and added RDEPENDS because of the shared library. But the dependency was indeed detected automatically.
As for the git access: it's our policy here to fetch if possibly directly from a sourcecode repository. Providing readonly access via git or svn is really getting common and I guess those tarballs will go away sometime.
BTW: there is already a new canutils/libsocketcan release which ships with a new linux/can/netlink.h header (can_netlink.h). I will provide recipes for both versions and ship can_netlink.h again. Otherwise it could create a race between libsocketcan and linux-libc-headers versions.
Vitus
Signature · 2 lines
Vitus Jensen, Hannover, Germany, Universe (current) pgp public key available from keyservers
PATCH v3 1/3 libsocketcan: new recipes
Build pengutronix' libsocketcan (netlink interface), used by newer versions of canutils. can_netlink.h is really linux/can/netlink.h from linux-libc-headers but installed here to be independ of staged linux-libc-headers versions. libsocketcan 0.0.8 automatically installs can_netlink.h, version 0.0.7 is patched to do so.
--- .../socketcan/files/install-can_netlink.h.patch | 21 ++++++++++++++++++++ recipes/socketcan/libsocketcan.inc | 16 +++++++++++++++ recipes/socketcan/libsocketcan_0.0.7.bb | 7 ++++++ recipes/socketcan/libsocketcan_0.0.8.bb | 4 +++ 4 files changed, 48 insertions(+), 0 deletions(-) create mode 100644 recipes/socketcan/files/install-can_netlink.h.patch create mode 100644 recipes/socketcan/libsocketcan.inc create mode 100644 recipes/socketcan/libsocketcan_0.0.7.bb create mode 100644 recipes/socketcan/libsocketcan_0.0.8.bb
recipes/socketcan/files/install-can_netlink.h.patch new file +21 -0
@@ -0,0 +1,21 @@ +commit 2470d91a6254b062aae8ab6120795a0f28344687 +Author: Vitus Jensen <[email protected]> +Date: Tue May 18 16:59:01 2010 +0200 + + install can_netlink.h + +diff --git a/include/GNUmakefile.am b/include/GNUmakefile.am +index 4ba2798..eb35a3a 100644 +--- a/include/GNUmakefile.am ++++ b/include/GNUmakefile.am +@@ -1,8 +1,6 @@ +-noinst_HEADERS = \ +- can_netlink.h +- + nobase_include_HEADERS = \ +- libsocketcan.h ++ libsocketcan.h \ ++ can_netlink.h + + MAINTAINERCLEANFILES = \ + libsocketcan_config.h.in \
recipes/socketcan/libsocketcan.inc new file +16 -0
@@ -0,0 +1,16 @@ +DESCRIPTION = "Control basic functions in socketcan from userspace" +AUTHOR = "Luotao Fu" +HOMEPAGE = "http://www.pengutronix.de" +SECTION = "libs/network" +PRIORITY = "optional" +LICENSE = "LGPL" + +TAG = "v${PV}" +INC_PR = "r0" + +SRC_URI = "git://git.pengutronix.de/git/tools/libsocketcan.git;protocol=git;tag=${TAG} \ + " + +S = "${WORKDIR}/git" + +inherit autotools_stage pkgconfig
recipes/socketcan/libsocketcan_0.0.7.bb new file +7 -0
@@ -0,0 +1,7 @@ +TAG = "v${PV}" +require libsocketcan.inc + +PR = "${INC_PR}.0" + +SRC_URI += "file://install-can_netlink.h.patch;patch=1 \ + "
recipes/socketcan/libsocketcan_0.0.8.bb new file +4 -0
@@ -0,0 +1,4 @@ +TAG = "v${PV}" +require libsocketcan.inc + +PR = "${INC_PR}.0"
Signature · 1 line
1.6.4.4
PATCH v3 2/3 canutils: new recipes
Add canutils (PTX flavour) 4.0.4 and 4.0.5 as alternatives to socketcan-utils-test. Version 4.x requires libsocketcan and supports kernel 2.6.30 and above.
--- recipes/socketcan/canutils.inc | 16 ++++++++++++++++ recipes/socketcan/canutils_4.0.4.bb | 4 ++++ recipes/socketcan/canutils_4.0.5.bb | 4 ++++ 3 files changed, 24 insertions(+), 0 deletions(-) create mode 100644 recipes/socketcan/canutils.inc create mode 100644 recipes/socketcan/canutils_4.0.4.bb create mode 100644 recipes/socketcan/canutils_4.0.5.bb
recipes/socketcan/canutils.inc new file +16 -0
@@ -0,0 +1,16 @@ +DESCRIPTION = "canutils (PTX flavour)" +AUTHOR = "Luotao Fu" +HOMEPAGE = "http://www.pengutronix.de" +SECTION = "console/network" +PRIORITY = "optional" +LICENSE = "LGPL" +DEPENDS = "libsocketcan" +RCONFLICTS = "socketcan-utils-test" +INC_PR = "r0" + +SRC_URI = "git://git.pengutronix.de/git/tools/canutils.git;protocol=git;tag=${TAG} \ + " + +S = "${WORKDIR}/git" + +inherit autotools
recipes/socketcan/canutils_4.0.4.bb new file +4 -0
@@ -0,0 +1,4 @@ +TAG = "canutils-${PV}" +require canutils.inc + +PR = "${INC_PR}.0"
recipes/socketcan/canutils_4.0.5.bb new file +4 -0
@@ -0,0 +1,4 @@ +TAG = "v${PV}" +require canutils.inc + +PR = "${INC_PR}.0"
Signature · 1 line
1.6.4.4
PATCH v3 3/3 socketcan-utils-test: rconflicts with canutils
Rconflicts because of identical program names.
--- recipes/socketcan/socketcan-utils-test_svn.bb | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
recipes/socketcan/socketcan-utils-test_svn.bb +1 -0
@@ -2,6 +2,7 @@ DESCRIPTION = "Socketcan user space utilities and test apps" HOMEPAGE = "http://developer.berlios.de/projects/socketcan/" SECTION = "console/utils" LICENSE = "GPL" +RCONFLICTS = "canutils" SRCREV = "917" PV = "0.0+svnr${SRCPV}"
Signature · 1 line
1.6.4.4
Re: [PATCH v3 1/3] libsocketcan: new recipes
In reply to Vitus JensenQuoted 4 lines · Vitus Jensen
Build pengutronix' libsocketcan (netlink interface), used by newer versions of canutils. can_netlink.h is really
linux/can/netlink.hfrom linux-libc-headers but installed here to be independ of staged linux-libc-headers versions.
is there any reason to have an encapsulated copy of this header besides being independent ?
Quoted 96 lines
libsocketcan 0.0.8 automatically installs
can_netlink.h, version 0.0.7 is patched to do so.Signed-off-by Vitus Jensen <[email protected]>---
.../socketcan/files/install-can_netlink.h.patch | 21 ++++++++++++++++++++ recipes/socketcan/libsocketcan.inc | 16 +++++++++++++++ recipes/socketcan/libsocketcan_0.0.7.bb | 7 ++++++ recipes/socketcan/libsocketcan_0.0.8.bb | 4 +++4 files changed, 48 insertions(+), 0 deletions(-)create mode 100644
recipes/socketcan/files/install-can_netlink.h.patchcreate mode 100644 recipes/socketcan/libsocketcan.inc create mode 100644 recipes/socketcan/libsocketcan_0.0.7.bb create mode 100644 recipes/socketcan/libsocketcan_0.0.8.bbrecipes/socketcan/files/install-can_netlink.h.patch new file +21
-0@@ -0,0 +1,21 @@ +commit 2470d91a6254b062aae8ab6120795a0f28344687 +Author: Vitus Jensen <[email protected]> +Date: Tue May 18 16:59:01 2010 +0200 + + install can_netlink.h + +diff --git a/include/GNUmakefile.am b/include/GNUmakefile.am +index 4ba2798..eb35a3a 100644 +--- a/include/GNUmakefile.am ++++ b/include/GNUmakefile.am +@@ -1,8 +1,6 @@ +-noinst_HEADERS = \ +- can_netlink.h +- + nobase_include_HEADERS = \ +- libsocketcan.h ++ libsocketcan.h \ ++ can_netlink.h + + MAINTAINERCLEANFILES = \ + libsocketcan_config.h.in \recipes/socketcan/libsocketcan.inc new file +16
-0@@ -0,0 +1,16 @@ +DESCRIPTION = "Control basic functions in socketcan from userspace" +AUTHOR = "Luotao Fu" +HOMEPAGE = "http://www.pengutronix.de" +SECTION = "libs/network" +PRIORITY = "optional" +LICENSE = "LGPL" + +TAG = "v${PV}" +INC_PR = "r0" + +SRC_URI = "git://git.pengutronix.de/git/tools/libsocketcan.git;protocol=git;tag=${TAG} \ + " + +S = "${WORKDIR}/git" + +inherit autotools_stage pkgconfigrecipes/socketcan/libsocketcan_0.0.7.bb new file +7
-0@@ -0,0 +1,7 @@ +TAG = "v${PV}" +require libsocketcan.inc + +PR = "${INC_PR}.0" + +SRC_URI += "file://install-can_netlink.h.patch;patch=1 \ + "recipes/socketcan/libsocketcan_0.0.8.bb new file +4
-1@@ -0,0 +1,4 @@ +TAG = "v${PV}" +require libsocketcan.inc + +PR = "${INC_PR}.0" --1.6.4.4
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Re: [PATCH v3 1/3] libsocketcan: new recipes
Quoted 8 lines · Khem Raj
Quoted 4 lines · Vitus Jensen
Build pengutronix' libsocketcan (netlink interface), used by newer versions of canutils. can_netlink.h is really
linux/can/netlink.hfrom linux-libc-headers but installed here to be independ of staged linux-libc-headers versions.is there any reason to have an encapsulated copy of this header besides being independent ?
It's just that reason. can is pretty new in linux and the netlink interface even newer.
libsocketcan 0.0.8 needs headers from 2.6.34
libsocketcan 0.0.7 2.6.33, 2.6.32 or 2.6.31
Combine that with the thread about linux-libc-headers and that selecting the version of llh is a distro-thing I think it's best to provide the needed can_netlink.h version. The canutils source handles version incompatibilities.
Vitus
Signature · 2 lines
Vitus Jensen, Hannover, Germany, Universe (current) pgp public key available from keyservers
Re: [PATCH v2] libsocketcan: new recipe
In reply to Vitus JensenHello.
I was going to apply them, but I found some stuff I would like to get sorted out first. See below.
recipes/socketcan/libsocketcan_0.0.7.bb line 1
Quoted 8 lines · Vitus Jensen
Builds pengutronix' libsocketcan (using the new netlink interface to access CAN drivers)
Signed-off-by Vitus Jensen <[email protected]>recipes/socketcan/libsocketcan_0.0.7.bb new file +1
-0@@ -0,0 +1,17 @@ +DESCRIPTION = "control basic functions in socketcan from userspace"
Nitpick. Staring with a upper letter would be nice.
recipes/socketcan/libsocketcan_0.0.7.bb line 11
Quoted 10 lines
recipes/socketcan/libsocketcan_0.0.7.bb new file +10
-0+AUTHOR = "Luotao Fu" +HOMEPAGE = "http://www.pengutronix.de" +SECTION = "libs/network" +PRIORITY = "optional" +LICENSE = "LGPL" + +TAG = "v${PV}" +PR = "r0" + +SRC_URI = "git://git.pengutronix.de/git/tools/libsocketcan.git;protocol=git;tag=${TAG} \
Does Pengutronix not have release tarballs for this? In a recipe without _git.bb postfix I did not expect to find git SRC_URIs.
recipes/socketcan/libsocketcan_0.0.7.bb line 17
Quoted 6 lines
recipes/socketcan/libsocketcan_0.0.7.bb new file +6
-0+ file://0001-remove-headers-supplied-by-linux-libc-headers.patch;patch=1 \ + " + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig
regards
Stefan Schmidt