Commit c9baece9 authored by Pavel Pisa's avatar Pavel Pisa

driver: include Debian control files to build DKMS CTU CAN FD driver package.

Package is build by

  dpkg-buildpackage

The result is ctucanfd-drv_X.Y.Z_all.deb package.
When it is installed then driver is build automatically
for actual running kernel version and is rebuild for each
upgraded kernel version in future.

Driver can be rebuild for specific kernel version
by command

  dkms autoinstall -m ctucanfd-drv -k 4.18.0-0.bpo.3-amd64
Signed-off-by: Pavel Pisa's avatarPavel Pisa <pisa@cmp.felk.cvut.cz>
parent 3f73535c
Pipeline #5951 passed with stages
in 12 minutes and 2 seconds
......@@ -7,3 +7,9 @@
*~
.fuse_hidden*
.mypy_cache
debian/ctucanfd-drv
debian/*.log
debian/*.substvars
debian/debhelper-build-stamp
debian/*.debhelper
debian/files
ctucanfd-drv (1.0.0) unstable; urgency=medium
* Initial dkms build.
-- Pavel Pisa <ppisa@pikron.com> Fri, 18 Jan 2019 19:09:04 +0100
Source: ctucanfd-drv
Maintainer: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Section: admin
Priority: optional
Build-Depends: debhelper (>=9),
dkms
Standards-Version: 1.0.0
Vcs-Browser: https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core
Vcs-Git: https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core.git
Homepage: https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core
Package: ctucanfd-drv
Architecture: all
Depends: ${misc:Depends}
Description: CTU CAN FD IP Core driver
CAN with Flexible Data-rate IP Core developed
at Department of Measurement of FEE CTU.
.
This package provides driver for the core.
It supports PCI express cards as well as it provides
platform driver for SoC integration when appropriate
device tree is provided.
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: ctucanfd_ip_core
Source: https://gitlab.fel.cvut.cz/canbus/ctucanfd_ip_core
Files: /driver/*
Copyright: 2018-2019 Ondrej Ille <ondrej.ille@gmail.com>
2018-2019 Martin Jerabek <martin.jerabek01@gmail.com>
2018-2019 Pavel Pisa <pisa@cmp.felk.cvut.cz>
License: GPL-2.0+
Files: /src/*
Copyright: 2018-2019 Ondrej Ille <ondrej.ille@gmail.com>
2018-2019 Martin Jerabek <martin.jerabek01@gmail.com>
License: CTUCANFD-Core License
License: CTUCANFD-Core License
CTU CAN FD IP Core
Copyright (C) 2015-2018
.
Authors:
Ondrej Ille <ondrej.ille@gmail.com>
Martin Jerabek <martin.jerabek01@gmail.com>
.
Project advisors:
Jiri Novak <jnovak@fel.cvut.cz>
Pavel Pisa <pisa@cmp.felk.cvut.cz>
.
Department of Measurement (http://meas.fel.cvut.cz/)
Faculty of Electrical Engineering (http://www.fel.cvut.cz)
Czech Technical University (http://www.cvut.cz/)
.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this VHDL component and associated documentation files (the "Component"),
to deal in the Component without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Component, and to permit persons to whom the
Component is furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Component.
.
THE COMPONENT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHTHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE COMPONENT OR THE USE OR OTHER DEALINGS
IN THE COMPONENT.
.
The CAN protocol is developed by Robert Bosch GmbH and protected by patents.
Anybody who wants to implement this IP core on silicon has to obtain a CAN
protocol license from Bosch.
License: GPL-2.0+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General Public License
Version 2 can be found in `/usr/share/common-licenses/GPL-2'.
#!/bin/sh
for fname in ctu_can_fd.c ctu_can_fd_frame.h ctu_can_fd_hw.c ctu_can_fd_hw.h \
ctu_can_fd_regs.h ; do
echo driver/${fname} /usr/src/${PACKAGE_NAME}-${PACKAGE_VERSION}
done
for fname in Kbuild Makefile ; do
echo driver/linux/${fname} /usr/src/${PACKAGE_NAME}-${PACKAGE_VERSION}
done
driver/dkms.conf
README.md
#!/usr/bin/make -f
export DH_VERBOSE = 1
export OMIT_KERNEL_PASSES = y
PACKAGE_NAME=$(shell grep PACKAGE_NAME= driver/dkms.conf | cut -d= -f2 | cut -d\" -f2)
PACKAGE_VERSION=$(shell grep PACKAGE_VERSION= driver/dkms.conf | cut -d= -f2 | cut -d\" -f2)
export PACKAGE_NAME PACKAGE_VERSION
%:
dh $@ --with dkms
# Nothing to configure, build or auto-install (this all happens after
# installation using dkms)
override_dh_auto_configure:
override_dh_auto_build:
override_dh_auto_install:
PACKAGE_VERSION="1.0.0"
PACKAGE_NAME="ctucanfd-drv"
CLEAN="make clean"
BUILT_MODULE_NAME[0]="ctucanfd"
BUILT_MODULE_LOCATION[0]=""
DEST_MODULE_LOCATION[0]="/extra"
MAKE[0]="make KERNEL_VERSION=$kernelver -C ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build"
AUTOINSTALL="yes"
CROSS_COMPILE= arm-linux-gnueabihf-
ifeq ($(KERNEL_VERSION),)
CROSS_COMPILE?= arm-linux-gnueabihf-
KDIR ?= /home/mjerabek/projects/kernel/linux-4.15-build/zynq
ARCH=arm
ifeq ($(shell hostname),hathi)
INSTALL_DIR=/srv/nfs4/debian-armhf-devel
endif
#KDIR ?= /lib/modules/$(shell uname -r)/build
#ARCH ?= x86_64
else
KDIR = /lib/modules/$(KERNEL_VERSION)/build
endif
MAKEARGS := -C $(KDIR)
MAKEARGS += $(if $(ARCH),ARCH=$(ARCH))
MAKEARGS += $(if $(CROSS_COMPILE),CROSS_COMPILE=$(CROSS_COMPILE))
$(warning "$(MAKEARGS)")
default:
$(MAKE) -C $(KDIR) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) M=$$PWD
ifeq ($(shell hostname),hathi)
-rm -f /srv/nfs4/debian-armhf-devel/ctucanfd.ko
cp ctucanfd.ko /srv/nfs4/debian-armhf-devel/
$(MAKE) $(MAKEARGS) M=$$PWD
ifneq ($(INSTALL_DIR),)
-rm -f $(INSTALL_DIR)/ctucanfd.ko
cp ctucanfd.ko $(INSTALL_DIR)/
endif
clean:
$(MAKE) -C $(KDIR) M=$$PWD ARCH=arm clean
$(MAKE) $(MAKEARGS) M=$$PWD clean
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment