-#!/usr/bin/make -f
+# Makefile for newer cp2101 driver, we call cp210x
+# Essentially, it makes a debian source package which
+# then can be built by pbuilder, etc.
-STRIP = strip --strip-unneeded --remove-section=.comment --remove-section=.note
+# Change or override these values as necessary for each package release
+
+PKGVER = 0.11
+DEBDIST = hardy
+DEBRELEASE = 0tmi
+
+
+# No need to change anything below this line
+
+REPOID := $(shell svn info 2>/dev/null | grep "Revision: " | sed -e s'/^[^0-9]*\([0-9]*\).*$$/svn:revision \1/')
+ifeq (,$(REPOID))
+ REPOID := $(shell git svn info 2>/dev/null | grep "Revision: " | sed -e s'/^[^0-9]*\([0-9]*\).*$$/svn:revision \1/')
+ifeq (,$(REPOID))
+ REPOID := $(shell git log -n1 2>/dev/null | head -1 | sed -e s'/^/git:/')
+endif
+endif
+ifeq (,$(REPOID))
+ $(error You much check the code out via svn, git-svn, or git)
+endif
+
+BUILD := build
+DEBVER := $(PKGVER)-$(DEBRELEASE)
+RFC822DATE := $(shell date --rfc-822)
+ROOTNAME := cp210x
+PACKAGE := $(ROOTNAME)-module-dkms
+TARFILE := $(PACKAGE)_$(DEBVER).orig.tar.gz
+DEBSRC := $(PACKAGE)-$(PKGVER)
+ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
+DEBFILE := $(BUILD)/$(PACKAGE)_$(DEBVER)_$(ARCH).deb
+DEBSRCFILE := $(BUILD)/$(PACKAGE)_$(DEBVER).dsc
+
+
+source: $(DEBSRCFILE)
+$(DEBSRCFILE): $(BUILD)/debian-stamp
+ cd $(BUILD) && dpkg-source -b $(DEBSRC)
+ touch $@
+
+
+binary: $(DEBFILE)
+$(DEBFILE): $(BUILD)/debian-stamp
+ cd $(BUILD)/$(DEBSRC) && dpkg-buildpackage -sa -us -uc
+
+
+$(BUILD)/src-stamp: $(wildcard src/*) dkms.conf
+ mkdir -p $(BUILD)
+ rm -rf $(BUILD)/$(DEBSRC)
+ cp -a src $(BUILD)/$(DEBSRC)
+ cp -a dkms.conf $(BUILD)/$(DEBSRC)
+ perl -i -pe 's/xxDEBVERxx/$(DEBVER)/g' $(BUILD)/$(DEBSRC)/dkms.conf
+ find $(BUILD)/$(DEBSRC) -name .svn -type d -exec rm -rf "{}" ";" 2>/dev/null || exit 0
+ rm -rf $(BUILD)/$(DEBSRC)/.git || exit 0
+ tar -C $(BUILD) -czf $(BUILD)/$(TARFILE) $(DEBSRC)
+ touch $@
+
+
+configure: $(BUILD)/debian-stamp
+$(BUILD)/debian-stamp: $(BUILD)/src-stamp $(wildcard debian.in/*)
+ mkdir -p $(BUILD)/$(DEBSRC)/debian
+ rsync --quiet -avz --exclude=.svn/ --exclude=.git/ debian.in/ $(BUILD)/$(DEBSRC)/debian/
+ perl -i -pe 's/xxPACKAGExx/$(PACKAGE)/g' $(BUILD)/$(DEBSRC)/debian/*
+ perl -i -pe 's/xxROOTNAMExx/$(ROOTNAME)/g' $(BUILD)/$(DEBSRC)/debian/*
+ perl -i -pe 's/xxPKGVERxx/$(PKGVER)/g' $(BUILD)/$(DEBSRC)/debian/*
+ perl -i -pe 's/xxDEBVERxx/$(DEBVER)/g' $(BUILD)/$(DEBSRC)/debian/*
+ perl -i -pe 's/xxDEBDISTxx/$(DEBDIST)/g' $(BUILD)/$(DEBSRC)/debian/*
+ perl -i -pe 's/xxRFC822DATExx/$(RFC822DATE)/g' $(BUILD)/$(DEBSRC)/debian/*
+ perl -i -pe 's/xxREPOIDxx/$(REPOID)/g' $(BUILD)/$(DEBSRC)/debian/*
+ touch $@
-all:
- -rm -rf builddir
- cp -a src builddir
- cd builddir && ./configure -kver $(KVER)
- test -f builddir/Makefile.go
- $(MAKE) -C builddir -f Makefile.go
- cp builddir/cp2101.ko cp210x.ko
- $(STRIP) cp210x.ko
clean:
- -rm -rf builddir cp210x.ko
+ rm -rf $(BUILD)
+
+
+debug:
+ @echo "BUILD = $(BUILD)"
+ @echo "PKGVER = $(PKGVER)"
+ @echo "REPOID = $(REPOID)"
+ @echo "DEBRELEASE = $(DEBRELEASE)"
+ @echo "DEBVER = $(DEBVER)"
+ @echo "RFC822DATE = $(RFC822DATE)"
+ @echo "PACKAGE = $(PACKAGE)"
+ @echo "TARFILE = $(TARFILE)"
+ @echo "DEBSRC = $(DEBSRC)"
+ @echo "ARCH = $(ARCH)"
+ @echo "DEBFILE = $(BUILD)/$(PACKAGE)_$(DEBVER)_$(ARCH).deb"
+ @echo "DEBSRCFILE = $(BUILD)/$(PACKAGE)_$(DEBVER).dsc"
-.PHONY: all clean
+.PHONY: clean binary source configure
+++ /dev/null
-# Makefile for newer cp2101 driver, we call cp210x
-# Essentially, it makes a debian source package which
-# then can be built by pbuilder, etc.
-
-DEBDIST = hardy
-BUILD = build
-KVER := $(shell uname -r)
-PKGVER = 0.11
-
-REPORELEASE := $(shell svn info 2>/dev/null | grep "Revision: " | sed -e s'/^[^0-9]*\([0-9]*\).*$$/\1/')
-ifeq (,$(REPORELEASE))
- REPORELEASE := $(shell git svn info 2>/dev/null | grep "Revision: " | sed -e s'/^[^0-9]*\([0-9]*\).*$$/\1/')
-endif
-ifeq (,$(REPORELEASE))
- $(error You much check the code out from svn using svn or git)
-endif
-
-DEBRELEASE := 0tmi$(REPORELEASE)
-DEBVER := $(PKGVER)-$(DEBRELEASE)
-RFC822DATE := $(shell date --rfc-822)
-ROOTNAME := cp210x
-PACKAGE := $(ROOTNAME)-module-$(KVER)
-TARFILE := $(PACKAGE)_$(DEBVER).orig.tar.gz
-DEBSRC := $(PACKAGE)-$(PKGVER)
-ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
-DEBFILE := $(BUILD)/$(PACKAGE)_$(DEBVER)_$(ARCH).deb
-DEBSRCFILE := $(BUILD)/$(PACKAGE)_$(DEBVER).dsc
-
-
-source: $(DEBSRCFILE)
-$(DEBSRCFILE): $(BUILD)/debian-stamp
- cd $(BUILD) && dpkg-source -b $(DEBSRC)
- touch $@
-
-
-binary: $(DEBFILE)
-$(DEBFILE): $(BUILD)/debian-stamp
- cd $(BUILD)/$(DEBSRC) && dpkg-buildpackage -sa -us -uc
-
-
-$(BUILD)/src-stamp: $(wildcard src/*)
- mkdir -p $(BUILD)
- rm -rf $(BUILD)/$(DEBSRC)
- cp -a src $(BUILD)/$(DEBSRC)
- find $(BUILD)/$(DEBSRC) -name .svn -type d -exec rm -rf "{}" ";" 2>/dev/null || exit 0
- rm -rf $(BUILD)/$(DEBSRC)/.git || exit 0
- tar -C $(BUILD) -czf $(BUILD)/$(TARFILE) $(DEBSRC)
- touch $@
-
-
-configure: $(BUILD)/debian-stamp
-$(BUILD)/debian-stamp: $(BUILD)/src-stamp $(wildcard debian.in/*)
- mkdir -p $(BUILD)/$(DEBSRC)/debian
- rsync --quiet -avz --exclude=.svn/ --exclude=.git/ debian.in/ $(BUILD)/$(DEBSRC)/debian/
- perl -i -pe 's/xxPACKAGExx/$(PACKAGE)/g' $(BUILD)/$(DEBSRC)/debian/*
- perl -i -pe 's/xxROOTNAMExx/$(ROOTNAME)/g' $(BUILD)/$(DEBSRC)/debian/*
- perl -i -pe 's/xxPKGVERxx/$(PKGVER)/g' $(BUILD)/$(DEBSRC)/debian/*
- perl -i -pe 's/xxKVERxx/$(KVER)/g' $(BUILD)/$(DEBSRC)/debian/*
- perl -i -pe 's/xxDEBVERxx/$(DEBVER)/g' $(BUILD)/$(DEBSRC)/debian/*
- perl -i -pe 's/xxDEBDISTxx/$(DEBDIST)/g' $(BUILD)/$(DEBSRC)/debian/*
- perl -i -pe 's/xxRFC822DATExx/$(RFC822DATE)/g' $(BUILD)/$(DEBSRC)/debian/*
- touch $@
-
-
-clean:
- rm -rf $(BUILD)
-
-
-debug:
- @echo "BUILD = $(BUILD)"
- @echo "KVER = $(KVER)"
- @echo "PKGVER = $(PKGVER)"
- @echo "REPORELEASE = |$(REPORELEASE)|"
- @echo "DEBRELEASE = $(DEBRELEASE)"
- @echo "DEBVER = $(DEBVER)"
- @echo "RFC822DATE = $(RFC822DATE)"
- @echo "PACKAGE = $(PACKAGE)"
- @echo "TARFILE = $(TARFILE)"
- @echo "DEBSRC = $(DEBSRC)"
- @echo "ARCH = $(ARCH)"
- @echo "DEBFILE = $(BUILD)/$(PACKAGE)_$(DEBVER)_$(ARCH).deb"
- @echo "DEBSRCFILE = $(BUILD)/$(PACKAGE)_$(DEBVER).dsc"
-
-
-.PHONY: clean binary source configure
--- /dev/null
+#!/usr/bin/make -f
+
+STRIP = strip --strip-unneeded --remove-section=.comment --remove-section=.note
+
+all:
+ -rm -rf builddir
+ cp -a src builddir
+ cd builddir && ./configure -kver $(KVER)
+ test -f builddir/Makefile.go
+ $(MAKE) -C builddir -f Makefile.go
+ cp builddir/cp2101.ko cp210x.ko
+ $(STRIP) cp210x.ko
+
+clean:
+ -rm -rf builddir cp210x.ko
+
+
+.PHONY: all clean
Priority: optional
Maintainer: R. Steve McKown <rsmckown@gmail.com>
Standards-Version: 3.7.2.0
-Build-Depends: dpkg-dev (>= 1.13.9), binutils (>= 2.9.5.0.12), gcc (>= 4:4.2.2), dpatch, file, bzip2, lsb-release, linux-headers-xxKVERxx
+Build-Depends: dpkg-dev (>= 1.13.9)
Package: xxPACKAGExx
Architecture: any
-Depends: linux-image-xxKVERxx
+Depends: dkms (>> 2.0.20), linux-headers, linux-image, binutils (>= 2.9.5.0.12), gcc (>= 4:4.2.2), dpatch, file, bzip2, lsb-release
+Conflicts: cp210x-module-2.6.24-19-generic, cp210x-module-2.6.24-21-generic, cp210x-module-2.6.24-22-generic, cp210x-module-2.6.24-23-generic, cp210x-module-2.6.24-24-generic, cp210x-module-2.6.24-25-generic
Priority: extra
-Description: Enhanced USB/serial kernel module for xxROOTNAMExx based devices.
+Description: Enhanced USB/serial kernel module for cp210x based devices.
This module blacklists the standard cp2101 module installed in the kernel,
- effectively taking its place. This package will be obsolete once the ioctl
- calls supporting the advanced features of the xxROOTNAMExx appear in the mainline
- kernel source. This code is an enhanced version of Silicon Lab's xxPKGVERxx
- driver.
+ effectively taking its place. This code is an enhanced version of Silicon
+ Lab's v0.11 driver, released under the GPLv2 with their permission. It
+ provides support for setting USB metadata, configuring port state, and
+ interacting with the GPIO pins. This package will be obsolete once the
+ new features of this module have been incorporated into the mainline kernel
+ driver. Built from xxREPOIDxx
set -e
if [ "$1" = "configure" ]; then
- depmod -q xxKVERxx || true
modprobe -rq cp2101 || true
fi
#!/usr/bin/make -f
-# debian/rules file - for xxROOTNAMExx-module
+# debian/rules file - for cp210x-module-dkms
# Based on sample debian/rules file - for GNU Hello (1.3).
# Copyright 1994,1995 by Ian Jackson.
# Copyright 1998-2007 James Troup
# This file may have to be extensively modified
package = xxPACKAGExx
-inst_dir = debian/tmp/lib/modules/xxKVERxx/kernel/drivers/usb/serial
-
-STRIP = strip --strip-unneeded --remove-section=.comment --remove-section=.note
+inst_dir = debian/tmp/usr/src/xxPACKAGExx-xxDEBVERxx
install_dir = install -d -m 755
install_file = install -m 644
DISTRIBUTION := $(shell lsb_release -is)
-# At the current time (20080828) this package has to build from the source
-# directory. For now, the solution is quite hackish: copy the source
-# directory to the build directory before running configure.
-tempdir := $(shell tempfile $(package))
-
configure-stamp:
- $(checkdir)
- rm -rf configure-stamp builddir
- rm -f $(tempdir)
- cp -a . $(tempdir)
- mv -f $(tempdir) builddir
- cd builddir && ./configure -kver xxKVERxx
touch $@
build: build-stamp
build-stamp: configure-stamp
$(checkdir)
- $(MAKE) -C builddir -f Makefile.go
touch $@
$(checkdir)
rm -rf debian/tmp
$(install_dir) $(inst_dir)
- chmod a+x builddir/installmod
- $(MAKE) -C builddir -f Makefile.go \
- INSTALL_PREFIX=$$(pwd)/debian/tmp install
- mv $(inst_dir)/cp2101.ko $(inst_dir)/xxROOTNAMExx.ko
+ cp -a . $(inst_dir)
$(install_dir) debian/tmp/etc/modprobe.d
echo "blacklist cp2101" > debian/tmp/etc/modprobe.d/$(package)
-ifeq ($(with_strip),yes)
- find debian/tmp -type f | xargs file | grep "ELF.*executable" | \
- cut -f 1 -d : | xargs $(STRIP)
-endif
touch $@
clean:
$(checkdir)
- -rm -rf debian/tmp builddir
+ -rm -rf debian/tmp
-rm -fr debian/patched debian/files* debian/substvars
-rm -f *-stamp
define checkdir
- test -f Makefile.go -a -f debian/rules
+ test -f debian/rules
endef
-PACKAGE_VERSION="0.11-0tmi81"
-PACKAGE_NAME="cp210x-module"
+PACKAGE_VERSION="xxDEBVERxx"
+PACKAGE_NAME="cp210x-module-dkms"
CLEAN="make clean"
BUILT_MODULE_NAME[0]=cp210x
DEST_MODULE_LOCATION[0]="/kernel/drivers/usb/serial/"