Skip to content

Commit

Permalink
peak-linux-driver: upgrade to 8.6.0
Browse files Browse the repository at this point in the history
- Upgraded driver to v8.6.0
- Made it build with the currently used kernel v4.9
- Split it into two packages: kernel module and libs with headers
  • Loading branch information
sashko committed Aug 27, 2018
1 parent 0218ce4 commit 4b25e51
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 36 deletions.
34 changes: 34 additions & 0 deletions recipes-kernel/peak-can-driver/peak-linux-driver-libs_8.6.0.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#
# Copyright (C) 2015 Pelagicore AB
# Copyright (C) 2018 Luxoft Sweden AB
#
# SPDX-License-Identifier: MIT
#
DESCRIPTION = "PEAK CAN Bus Linux API"
HOMEPAGE = "http://www.peak-system.com/fileadmin/media/linux/index.htm"

LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://${WORKDIR}/peak-linux-driver-${PV}/Documentation/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"

SRC_URI = "http://www.peak-system.com/fileadmin/media/linux/files/peak-linux-driver-${PV}.tar.gz"
SRC_URI[md5sum] = "f62d94c721aa6a83316fcb4232631a64"
SRC_URI[sha256sum] = "62fa0ebde620a436816546bc1f82feb663a32f20db26e8889b7204b9686f5776"

DEPENDS = "popt"

RDEPENDS_${PN} = "bash"

S = "${WORKDIR}/peak-linux-driver-${PV}/lib"

INSANE_SKIP_${PN} = "ldflags"

EXTRA_OEMAKE = "NET=NETDEV_SUPPORT"

do_install() {
oe_runmake install DESTDIR=${D}
}

FILES_${PN} += "\
${includedir} \
${libdir} \
"
53 changes: 53 additions & 0 deletions recipes-kernel/peak-can-driver/peak-linux-driver-modules_8.6.0.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#
# Copyright (C) 2015 Pelagicore AB
# Copyright (C) 2018 Luxoft Sweden AB
#
# SPDX-License-Identifier: MIT
#
DESCRIPTION = "PEAK CAN Bus Driver for Linux"
HOMEPAGE = "http://www.peak-system.com/fileadmin/media/linux/index.htm"

LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://${WORKDIR}/peak-linux-driver-${PV}/Documentation/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"

inherit module

SRC_URI = "http://www.peak-system.com/fileadmin/media/linux/files/peak-linux-driver-${PV}.tar.gz"
SRC_URI[md5sum] = "f62d94c721aa6a83316fcb4232631a64"
SRC_URI[sha256sum] = "62fa0ebde620a436816546bc1f82feb663a32f20db26e8889b7204b9686f5776"

DEPENDS = "virtual/kernel"

S = "${WORKDIR}/peak-linux-driver-${PV}/driver"

EXTRA_OEMAKE = "NET=NETDEV_SUPPORT \
KERNEL_LOCATION=${STAGING_KERNEL_BUILDDIR} \
"

do_install() {
# create directories
install -m 0755 -d ${D}/${base_bindir}
install -m 0755 -d ${D}/${sysconfdir}/udev/rules.d/
install -m 0755 -d ${D}/${sysconfdir}/modprobe.d/
install -m 0755 -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/misc/

# install kernel module
install -m 0644 ${S}/pcan.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/misc/
install -m 0644 ${S}/udev/blacklist-peak.conf ${D}/${sysconfdir}/modprobe.d/pcan.conf

# install tools and scripts
install -m 0755 ${S}/lspcan ${D}/${base_bindir}
install -m 0744 ${S}/pcan_make_devices ${D}/${base_bindir}
install -m 0744 ${S}/udev/pcan_usb_minor_check.bash ${D}/${base_bindir}

# install udev rules
install -m 0644 ${S}/udev/45-pcan.rules ${D}/${sysconfdir}/udev/rules.d/
}

FILES_${PN} += "\
${base_bindir} \
${sysconfdir}/udev/rules.d/ \
/lib/modules/${KERNEL_VERSION}/kernel/misc/ \
"

KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " pcan"
36 changes: 0 additions & 36 deletions recipes-kernel/peak-can-driver/peak-linux-driver_7.9.bb

This file was deleted.

0 comments on commit 4b25e51

Please sign in to comment.