From: Miroslav Ondra Date: Fri, 21 Sep 2018 00:44:18 +0000 (+0200) Subject: add debian package generator definition X-Git-Url: http://git.graph-it.com/?a=commitdiff_plain;h=84595076a60b4357fedc01db013735c8d0bc508b;p=graphit%2Funipi-kernel.git add debian package generator definition --- diff --git a/Makefile b/Makefile index 97ee527..e638735 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,11 @@ all: cd ${MODULES_DIR_PATH}$$m; make all;\ done +install: + for m in ${MODULES_LIST}; do\ + cd ${MODULES_DIR_PATH}$$m; make modules_install INSTALL_MOD_PATH=${DESTDIR};\ + done + clean: for m in ${MODULES_LIST}; do\ cd ${MODULES_DIR_PATH}$$m; make clean;\ diff --git a/debian/README b/debian/README new file mode 100644 index 0000000..2e30799 --- /dev/null +++ b/debian/README @@ -0,0 +1,6 @@ +The Debian Package unipi-kernel-modules +---------------------------- + +Comments regarding the Package + + -- Miroslav Ondra Wed, 11 Apr 2018 10:14:19 +0200 diff --git a/debian/autoscripts/postinst-modules b/debian/autoscripts/postinst-modules new file mode 100644 index 0000000..a31f562 --- /dev/null +++ b/debian/autoscripts/postinst-modules @@ -0,0 +1,3 @@ +if [ "$1" = "configure" ]; then + depmod -a #KVERS# || true +fi diff --git a/debian/autoscripts/postrm-modules b/debian/autoscripts/postrm-modules new file mode 100644 index 0000000..b2b10fb --- /dev/null +++ b/debian/autoscripts/postrm-modules @@ -0,0 +1 @@ + depmod -a #KVERS# || true diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..c61d781 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,68 @@ +unipi-kernel-modules (1.16) unstable; urgency=medium + + * changed from binary to dkms version + + -- Miroslav Ondra Fri, 21 Sep 2018 01:03:41 +0200 + +neuron-kernel (1.15.20180914) unstable; urgency=medium + + * Compiled for kernel 4.14.69-v7+ (=1.20180910-1) + + -- Miroslav Ondra Fri, 14 Sep 2018 16:35:36 +0200 + +neuron-kernel (1.15.20180907) unstable; urgency=medium + + * Compiled for kernel 4.14.62-v7+ (=1.20180817-1) + * fixed spi buffer alignement + * redesigned uart rx/tx proc + + -- Miroslav Ondra Fri, 14 Sep 2018 00:47:53 +0200 + +neuron-kernel (1.14.20180803) unstable; urgency=medium + + * fixed trace_printk for debugging + + -- Miroslav Ondra Fri, 03 Aug 2018 12:42:40 +0200 + +neuron-kernel (1.14.20180802) unstable; urgency=medium + + * redesigned line discipline + + -- Miroslav Ondra Thu, 02 Aug 2018 21:37:29 +0200 + +neuron-kernel (1.13.20180719) unstable; urgency=medium + + * Compiled for kernel 4.14.52-v7+ (=1.20180703-1) + * changed char dev name to /dev/unipispi + + -- Miroslav Ondra Thu, 02 Aug 2018 21:36:09 +0200 + +neuron-kernel (1.12.14062018-0) unstable; urgency=medium + + * Compiled for new distribution kernel 4.14.52-v7+ (=1.20180703-1) + + -- Miroslav Ondra Wed, 16 Jul 2018 10:00:19 +0200 + +neuron-kernel (1.11.06062018-0) unstable; urgency=medium + + * Compiled for new distribution kernel 4.14.34-v7+ (=1.20180417-1) + + -- Miroslav Ondra Wed, 06 Jun 2018 20:16:19 +0200 + +neuron-kernel (0.03082018-3) unstable; urgency=medium + + * Compiled for new distribution kernel 4.14.34-v7+ (=1.20180417-1) + + -- Miroslav Ondra Wed, 18 Apr 2018 21:49:19 +0200 + +neuron-kernel (0.03082018-2) unstable; urgency=medium + + * Compiled for new distribution kernel (=1.20180328-1) + + -- Miroslav Ondra Wed, 17 Apr 2018 10:14:19 +0200 + +neuron-kernel (0.03082018) unstable; urgency=medium + + * Initial Release. + + -- Miroslav Ondra Wed, 11 Apr 2018 10:14:19 +0200 diff --git a/debian/clean b/debian/clean new file mode 100644 index 0000000..46d5c03 --- /dev/null +++ b/debian/clean @@ -0,0 +1,5 @@ +debian/neuron-kernel.install +debian/unipi-kernel-modules-dkms.install +debian/neuron-kernel.substvars +debian/neuron-kernel.postinst.debhelper +debian/neuron-kernel.postrm.debhelper diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..886fa1a --- /dev/null +++ b/debian/control @@ -0,0 +1,26 @@ +Source: unipi-kernel-modules +Section: kernel +Priority: optional +Maintainer: Miroslav Ondra +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.8 +Homepage: +#Vcs-Git: https://anonscm.debian.org/collab-maint/neuron-kernel.git + +Package: neuron-kernel +Architecture: armhf +Depends: ${misc:Depends}, unipi-common, raspberrypi-kernel(=${RPI-FIRMWARE-VER}) +Description: UniPi Neuron kernel modules + Binary kernel modules for UniPi Neuron controller. Compiled with + raspberrypi-kernel from Raspbian distribution. + +Package: unipi-kernel-modules-dkms +Architecture: linux-any +Depends: ${misc:Depends}, unipi-common, dkms +Replaces: neuron-kernel +Conflicts: neuron-kernel +Description: UniPi Neuron kernel modules - DKMS source + This package contains source code of kernel module for spi protocol + used by internal boards in the UniPi Neuron/Axon controllers. + Can be used with DKMS so that local kernel images are automatically + built and installed every time relevant kernel packages are upgraded. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..9a7edec --- /dev/null +++ b/debian/copyright @@ -0,0 +1,33 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: unipi-kernel-modules +Source: + +Files: * +Copyright: 2018 UniPi Technology +License: GPL-3.0+ + +Files: debian/* +Copyright: 2018 Miroslav Ondra +License: GPL-3.0+ + +License: GPL-3.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 3 of the License, or + (at your option) any later version. + . + This package 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 . + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. +# Please avoid picking licenses with terms that are more restrictive than the +# packaged work, as it may make Debian's contributions unacceptable upstream. diff --git a/debian/neuron-kernel-docs.docs b/debian/neuron-kernel-docs.docs new file mode 100644 index 0000000..5874bfe --- /dev/null +++ b/debian/neuron-kernel-docs.docs @@ -0,0 +1,3 @@ +README +README.Debian +README.source diff --git a/debian/neuron-kernel.changelog b/debian/neuron-kernel.changelog new file mode 100644 index 0000000..f5a5e36 --- /dev/null +++ b/debian/neuron-kernel.changelog @@ -0,0 +1,74 @@ +unipi-kernel-modules (1.16.1.20180919-1) unstable; urgency=medium + + * Compiled for raspberrypi-kernel 1.20180919-1 + + -- Miroslav Ondra Fri, 21 Sep 2018 02:36:55 +0200 + +unipi-kernel-modules (1.16) unstable; urgency=medium + + * changed from binary to dkms version + + -- Miroslav Ondra Fri, 21 Sep 2018 01:03:41 +0200 + +neuron-kernel (1.15.20180914) unstable; urgency=medium + + * Compiled for kernel 4.14.69-v7+ (=1.20180910-1) + + -- Miroslav Ondra Fri, 14 Sep 2018 16:35:36 +0200 + +neuron-kernel (1.15.20180907) unstable; urgency=medium + + * Compiled for kernel 4.14.62-v7+ (=1.20180817-1) + * fixed spi buffer alignement + * redesigned uart rx/tx proc + + -- Miroslav Ondra Fri, 14 Sep 2018 00:47:53 +0200 + +neuron-kernel (1.14.20180803) unstable; urgency=medium + + * fixed trace_printk for debugging + + -- Miroslav Ondra Fri, 03 Aug 2018 12:42:40 +0200 + +neuron-kernel (1.14.20180802) unstable; urgency=medium + + * redesigned line discipline + + -- Miroslav Ondra Thu, 02 Aug 2018 21:37:29 +0200 + +neuron-kernel (1.13.20180719) unstable; urgency=medium + + * Compiled for kernel 4.14.52-v7+ (=1.20180703-1) + * changed char dev name to /dev/unipispi + + -- Miroslav Ondra Thu, 02 Aug 2018 21:36:09 +0200 + +neuron-kernel (1.12.14062018-0) unstable; urgency=medium + + * Compiled for new distribution kernel 4.14.52-v7+ (=1.20180703-1) + + -- Miroslav Ondra Wed, 16 Jul 2018 10:00:19 +0200 + +neuron-kernel (1.11.06062018-0) unstable; urgency=medium + + * Compiled for new distribution kernel 4.14.34-v7+ (=1.20180417-1) + + -- Miroslav Ondra Wed, 06 Jun 2018 20:16:19 +0200 + +neuron-kernel (0.03082018-3) unstable; urgency=medium + + * Compiled for new distribution kernel 4.14.34-v7+ (=1.20180417-1) + + -- Miroslav Ondra Wed, 18 Apr 2018 21:49:19 +0200 + +neuron-kernel (0.03082018-2) unstable; urgency=medium + + * Compiled for new distribution kernel (=1.20180328-1) + + -- Miroslav Ondra Wed, 17 Apr 2018 10:14:19 +0200 + +neuron-kernel (0.03082018) unstable; urgency=medium + + * Initial Release. + + -- Miroslav Ondra Wed, 11 Apr 2018 10:14:19 +0200 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..3f8db1a --- /dev/null +++ b/debian/rules @@ -0,0 +1,70 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + + +# see FEATURE AREAS in dpkg-buildflags(1) +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# see ENVIRONMENT in dpkg-buildflags(1) +# package maintainers to append CFLAGS +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# package maintainers to append LDFLAGS +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + +MOD_VERSION=$(shell dpkg-parsechangelog |grep ^Version:|cut -d ' ' -f 2) + +.raspbian-versions: + misc/check-raspbian + +include ./.raspbian-versions + +DISTRIB=$(shell dpkg-parsechangelog -l debian/neuron-kernel.changelog -S Distribution) +NEURON_KERNEL_VERSION=$(shell dpkg-parsechangelog -l debian/neuron-kernel.changelog -S Version) + +%: + dh $@ --with dkms + +# dh_make generated override targets +# This is example for Cmake (See https://bugs.debian.org/641051 ) +#override_dh_auto_configure: +# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) + +override_dh_installmodules: + DH_AUTOSCRIPTDIR=debian/autoscripts dh_installmodules + + +override_dh_prep: + dh_prep --exclude=neuron-kernel.substvars + echo RPI-FIRMWARE-VER=${RPI_FIRMWARE_VER} >> debian/neuron-kernel.substvars + sed "s/#MOD_VERSION#/$(MOD_VERSION)/g" debian/unipi-kernel-modules-dkms.install.in > debian/unipi-kernel-modules-dkms.install + @if echo ${NEURON_KERNEL_VERSION} | grep -qve "^$(MOD_VERSION)"; then\ + ( sed '/^ -- /q;' debian/changelog; echo ""; cat debian/neuron-kernel.changelog )>debian/_cl;\ + mv debian/_cl debian/neuron-kernel.changelog;\ + fi + @if [ ${NEURON_KERNEL_VERSION} != $(MOD_VERSION).$(RPI_FIRMWARE_VER) ]; then\ + dch -mv $(MOD_VERSION).$(RPI_FIRMWARE_VER) --release-heuristic=log \ + -c debian/neuron-kernel.changelog "Compiled for raspberrypi-kernel ${RPI_FIRMWARE_VER}"; \ + fi; + @if [ ${DISTRIB} != "UNRELEASED" ]; then dch -rm -c debian/neuron-kernel.changelog ""; fi + +override_dh_dkms: + dh_dkms -V $(MOD_VERSION) + +#override_dh_build: + +override_dh_auto_configure: + misc/check-raspbian + misc/current + +override_dh_auto_build: + dh_auto_build -- CCPREFIX=${DEB_TARGET_GNU_TYPE}- \ + LINUX_DIR_PATH=${PWD}/tmp/linux-raspberrypi-kernel_${RPI_FIRMWARE_VER} + +override_dh_auto_install: + dh_auto_install --destdir=debian/neuron-kernel -- CCPREFIX=${DEB_TARGET_GNU_TYPE}- \ + LINUX_DIR_PATH=${PWD}/tmp/linux-raspberrypi-kernel_${RPI_FIRMWARE_VER} + +#override_dh_gencontrol: +# dh_gencontrol diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/debian/unipi-kernel-modules-dkms.dkms b/debian/unipi-kernel-modules-dkms.dkms new file mode 100644 index 0000000..e02b3b4 --- /dev/null +++ b/debian/unipi-kernel-modules-dkms.dkms @@ -0,0 +1,10 @@ +PACKAGE_NAME="unipi" +PACKAGE_VERSION="#MODULE_VERSION#" + +BUILT_MODULE_NAME[0]="unipi" +BUILT_MODULE_LOCATION[0]="" +DEST_MODULE_LOCATION[0]="/extra" +AUTOINSTALL=yes + +MAKE[0]="make -C $kernel_source_dir M=${dkms_tree}/unipi/${module_version}/build modules" +CLEAN="make -C ${dkms_tree}/unipi/${module_version} clean; rm -rf ${dkms_tree}/unipi/${module_version}/build/{Module.*,modules.order,OBJ.*}" diff --git a/debian/unipi-kernel-modules-dkms.install.in b/debian/unipi-kernel-modules-dkms.install.in new file mode 100644 index 0000000..fb99166 --- /dev/null +++ b/debian/unipi-kernel-modules-dkms.install.in @@ -0,0 +1,2 @@ +modules/unipi/src usr/src/unipi-#MOD_VERSION# +modules/unipi/Makefile usr/src/unipi-#MOD_VERSION# diff --git a/misc/check-raspbian b/misc/check-raspbian new file mode 100755 index 0000000..097ec8c --- /dev/null +++ b/misc/check-raspbian @@ -0,0 +1,44 @@ +#!/bin/bash + +############################################### +# +# check latest raspbian kernel version, download it to directory tmp +# +################################################# + +# get latest raspbian kernel version +wget -q http://archive.raspberrypi.org/debian/dists/stretch/main/binary-armhf/Packages.gz -O - | gunzip \ +| awk '/^Package: raspberrypi-kernel-headers[[:blank:]]*$/ { ok=1; next} /^Package: / {ok=0;} (ok!=1) {next} + /^Version: / {print "RPI_FIRMWARE_VER=" $2 } + /^Filename: / {print "RPI_FIRMWARE_FILE=" $2; nextfile }' > .raspbian-versions + +# compare with locally installed version +if [ ! -d tmp ]; then + [ -f tmp ] && rm -f tmp +else + if diff -s .raspbian-versions tmp/versions >/dev/null 2>&1; then + # kernel headers are loaded + exit 0 + fi + rm -rf tmp +fi +mkdir tmp + +. .raspbian-versions + +# Dowload current raspbian kernel source +# get commit number used for making this kernel version +cd tmp +wget https://raw.githubusercontent.com/raspberrypi/firmware/stable/extra/git_hash -O- > .git_hash +GIT_VER=`cat .git_hash` + wget https://github.com/raspberrypi/linux/archive/$GIT_VER.zip -O raspberrypi-kernel_${RPI_FIRMWARE_VER}.zip + unzip raspberrypi-kernel_${RPI_FIRMWARE_VER}.zip + mv linux-$GIT_VER linux-raspberrypi-kernel_${RPI_FIRMWARE_VER} + #----------------------------------------------------------------------- + rm raspberrypi-kernel_${RPI_FIRMWARE_VER}.zip + +# download headers and symbols +wget http://archive.raspberrypi.org/debian/${RPI_FIRMWARE_FILE} +dpkg-deb -x `basename ${RPI_FIRMWARE_FILE}` h +cd .. +cat .raspbian-versions >tmp/versions diff --git a/misc/current b/misc/current new file mode 100755 index 0000000..89d903e --- /dev/null +++ b/misc/current @@ -0,0 +1,20 @@ +#!/bin/bash + +########################################## +## +## compile module agains kernel tree in tmp +## +########################################## + +cd tmp +. versions + + +KERNEL_VER=`ls -1 h/lib/modules | grep '\-v7'` +echo $KERNEL_VER +cp h/usr/src/linux-headers-${KERNEL_VER}/.config linux-raspberrypi-kernel_${RPI_FIRMWARE_VER} +cp h/usr/src/linux-headers-${KERNEL_VER}/Module.symvers linux-raspberrypi-kernel_${RPI_FIRMWARE_VER} +cd linux-raspberrypi-kernel_${RPI_FIRMWARE_VER} +make modules_prepare CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm +cd ../.. +#make all CCPREFIX=arm-linux-gnueabi- ARCH=arm LINUX_DIR_PATH=${PWD}/tmp/linux-raspberrypi-kernel_${RPI_FIRMWARE_VER} diff --git a/misc/raspbian b/misc/raspbian old mode 100644 new mode 100755 index 8a99f9f..464d0dd --- a/misc/raspbian +++ b/misc/raspbian @@ -1,14 +1,23 @@ #!/bin/bash +############################################### +# +# check latest raspbian kernel version, download it to directory tmp +# compile module +################################################# + mkdir -p tmp + +# get latest raspbian kernel version wget -q http://archive.raspberrypi.org/debian/dists/stretch/main/binary-armhf/Packages.gz -O - | gunzip \ | awk '/^Package: raspberrypi-kernel-headers[[:blank:]]*$/ { ok=1; next} /^Package: / {ok=0;} (ok!=1) {next} -/^Version: / {print "RPI_FIRMWARE_VER=" $2 } -/^Filename: / {print "RPI_FIRMWARE_FILE=" $2; nextfile }' > tmp/versions + /^Version: / {print "RPI_FIRMWARE_VER=" $2 } + /^Filename: / {print "RPI_FIRMWARE_FILE=" $2; nextfile }' > tmp/versions cd tmp . versions +# get kernel source #----------------------------------------------------------------------- # this method doesn't work if tag in git wasn't created #wget https://github.com/raspberrypi/linux/archive/raspberrypi-kernel_${RPI_FIRMWARE_VER}.zip @@ -16,16 +25,20 @@ cd tmp # alternate method to get raspberrypi-kernel_${RPI_FIRMWARE_VER}.zip # get commit number used for making this kernel version -wget https://raw.githubusercontent.com/raspberrypi/firmware/stable/extra/git_hash -O- > .git_hash -GIT_VER=`cat .git_hash` -wget https://github.com/raspberrypi/linux/archive/$GIT_VER.zip -O raspberrypi-kernel_${RPI_FIRMWARE_VER}.zip -unzip raspberrypi-kernel_${RPI_FIRMWARE_VER}.zip -mv linux-$GIT_VER linux-raspberrypi-kernel_${RPI_FIRMWARE_VER} -#----------------------------------------------------------------------- -rm raspberrypi-kernel_${RPI_FIRMWARE_VER}.zip + wget https://raw.githubusercontent.com/raspberrypi/firmware/stable/extra/git_hash -O- > .git_hash + GIT_VER=`cat .git_hash` + wget https://github.com/raspberrypi/linux/archive/$GIT_VER.zip -O raspberrypi-kernel_${RPI_FIRMWARE_VER}.zip + unzip raspberrypi-kernel_${RPI_FIRMWARE_VER}.zip + mv linux-$GIT_VER linux-raspberrypi-kernel_${RPI_FIRMWARE_VER} + #----------------------------------------------------------------------- + rm raspberrypi-kernel_${RPI_FIRMWARE_VER}.zip + +# download headers and symbols wget http://archive.raspberrypi.org/debian/${RPI_FIRMWARE_FILE} dpkg-deb -x `basename ${RPI_FIRMWARE_FILE}` h + +# prepare kernel tree and compile module KERNEL_VER=`ls -1 h/lib/modules | grep '\-v7'` echo $KERNEL_VER cp h/usr/src/linux-headers-${KERNEL_VER}/.config linux-raspberrypi-kernel_${RPI_FIRMWARE_VER} diff --git a/modules/unipi/Makefile b/modules/unipi/Makefile index 8d1b288..b9088e2 100644 --- a/modules/unipi/Makefile +++ b/modules/unipi/Makefile @@ -49,9 +49,13 @@ default: all ; all: make ARCH=arm CROSS_COMPILE=${CCPREFIX} -C ${LINUX_DIR_PATH} M=${PWD} modules +modules_install: + make ARCH=arm CROSS_COMPILE=${CCPREFIX} -C ${LINUX_DIR_PATH} M=${PWD} modules_install + clean: - make -C ${LINUX_DIR_PATH} M=$(PWD) clean - rm -f ${BIN_DIR_PATH}/${KERNEL_MODULE_NAME}.ko + rm -f ${unipi-objs} src/.*.o.cmd + rm -f ${KERNEL_MODULE_NAME}.ko ${KERNEL_MODULE_NAME}.mod.c .*.o.cmd .*.ko.cmd *.o modules.order Module.symvers + rm -rf .tmp_versions transfer: clean symlink scp ${BIN_DIR_PATH}/${KERNEL_MODULE_NAME}.ko ${TARGET_PLC_PATH} diff --git a/modules/unipi/bin/.dummy b/modules/unipi/bin/.dummy deleted file mode 100644 index 664bbb0..0000000 --- a/modules/unipi/bin/.dummy +++ /dev/null @@ -1 +0,0 @@ -# Compiled binaries go here diff --git a/modules/unipi/current b/modules/unipi/current deleted file mode 100755 index d79fb96..0000000 --- a/modules/unipi/current +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -########################################## -## -## compile module agains kernel tree in tmp -## -########################################## - -cd tmp -. versions - - -KERNEL_VER=`ls -1 h/lib/modules | grep '\-v7'` -echo $KERNEL_VER -cp h/usr/src/linux-headers-${KERNEL_VER}/.config linux-raspberrypi-kernel_${RPI_FIRMWARE_VER} -cp h/usr/src/linux-headers-${KERNEL_VER}/Module.symvers linux-raspberrypi-kernel_${RPI_FIRMWARE_VER} -cd linux-raspberrypi-kernel_${RPI_FIRMWARE_VER} -make modules_prepare CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm -cd ../.. -make all CCPREFIX=arm-linux-gnueabi- ARCH=arm LINUX_DIR_PATH=tmp/linux-raspberrypi-kernel_${RPI_FIRMWARE_VER} diff --git a/modules/unipi/raspbian b/modules/unipi/raspbian deleted file mode 100755 index 464d0dd..0000000 --- a/modules/unipi/raspbian +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -############################################### -# -# check latest raspbian kernel version, download it to directory tmp -# compile module -################################################# - -mkdir -p tmp - -# get latest raspbian kernel version -wget -q http://archive.raspberrypi.org/debian/dists/stretch/main/binary-armhf/Packages.gz -O - | gunzip \ -| awk '/^Package: raspberrypi-kernel-headers[[:blank:]]*$/ { ok=1; next} /^Package: / {ok=0;} (ok!=1) {next} - /^Version: / {print "RPI_FIRMWARE_VER=" $2 } - /^Filename: / {print "RPI_FIRMWARE_FILE=" $2; nextfile }' > tmp/versions - -cd tmp -. versions - -# get kernel source -#----------------------------------------------------------------------- -# this method doesn't work if tag in git wasn't created -#wget https://github.com/raspberrypi/linux/archive/raspberrypi-kernel_${RPI_FIRMWARE_VER}.zip -#unzip raspberrypi-kernel_${RPI_FIRMWARE_VER}.zip - -# alternate method to get raspberrypi-kernel_${RPI_FIRMWARE_VER}.zip -# get commit number used for making this kernel version - - wget https://raw.githubusercontent.com/raspberrypi/firmware/stable/extra/git_hash -O- > .git_hash - GIT_VER=`cat .git_hash` - wget https://github.com/raspberrypi/linux/archive/$GIT_VER.zip -O raspberrypi-kernel_${RPI_FIRMWARE_VER}.zip - unzip raspberrypi-kernel_${RPI_FIRMWARE_VER}.zip - mv linux-$GIT_VER linux-raspberrypi-kernel_${RPI_FIRMWARE_VER} - #----------------------------------------------------------------------- - rm raspberrypi-kernel_${RPI_FIRMWARE_VER}.zip - -# download headers and symbols -wget http://archive.raspberrypi.org/debian/${RPI_FIRMWARE_FILE} -dpkg-deb -x `basename ${RPI_FIRMWARE_FILE}` h - -# prepare kernel tree and compile module -KERNEL_VER=`ls -1 h/lib/modules | grep '\-v7'` -echo $KERNEL_VER -cp h/usr/src/linux-headers-${KERNEL_VER}/.config linux-raspberrypi-kernel_${RPI_FIRMWARE_VER} -cp h/usr/src/linux-headers-${KERNEL_VER}/Module.symvers linux-raspberrypi-kernel_${RPI_FIRMWARE_VER} -cd linux-raspberrypi-kernel_${RPI_FIRMWARE_VER} -make modules_prepare CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm -cd ../.. -make all CCPREFIX=arm-linux-gnueabi- ARCH=arm LINUX_DIR_PATH=tmp/linux-raspberrypi-kernel_${RPI_FIRMWARE_VER} diff --git a/modules/unipi/src/unipi_common.h b/modules/unipi/src/unipi_common.h index 32cab2c..9970fe6 100644 --- a/modules/unipi/src/unipi_common.h +++ b/modules/unipi/src/unipi_common.h @@ -51,7 +51,7 @@ #if NEURONSPI_SCHED_REQUIRED > 0 #include #endif -#define NEURONSPI_MAJOR_VERSIONSTRING "Version 1.15:2018:09:14" +#define NEURONSPI_MAJOR_VERSIONSTRING "Version 1.16:2018:09:21" #define NEURONSPI_MAX_DEVS 3 #define NEURONSPI_MAX_UART 16