From 54bd905345670cbec0c737dd8ac3340d5e6e2aa2 Mon Sep 17 00:00:00 2001 From: smckown Date: Wed, 15 Apr 2009 16:40:40 +0000 Subject: [PATCH] Update README file. --- README | 58 ++++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 42 insertions(+), 16 deletions(-) diff --git a/README b/README index f2c583c..0c1b0f7 100644 --- a/README +++ b/README @@ -1,20 +1,46 @@ -To make the cp2101 driver from this code base: +The best way to build and package this code for apt is to: -For older kernels (2.6.15-2.6.17): +* Check it out from the version control system. Only svn is supported today + by the Makefile. +* cd cp210x # to go into the top level directory checked out +* make +* cd build +* sudo pbuilder update # if needed +* sudo pbuilder build $(ls -t cp210x-module*dsc | head -1) +* scp /var/cache/pbuilder/result/cp210x-module-*-0tmi* \ + aptuser@aptpackageserver:/tmp/ +* ssh aptuser@aptpackageserver +* cd /tmp +* reprepro -Vb /var/local/aptrepo/ubuntu include hardy cp210x*.changes +* rm cp210x* -./configure -vi cp2101.c - replace #include "usb-serial.h" with - #include "/path/to/usb-serial.h" - The file is found in linux source; may have to download it -make -f Makefile.go all -sudo make -f Makefile.go install -to test: sudo modprobe cp2101, or plug in a device +Build a .deb locally is quite a bit simpler and faster: -For newer kernels (2.6.20 and up): +* Check out the code +* cd cp210x +* make binary +* # find the .deb in the build/ directory +* # To install locally, FIRST REMOVE all cp210x-module packages installed. Then, +* sudo dpkg -i build/cp210x-module*.deb -./configure -kver `uname -r` -make -f Makefile.go all -chmod a+x installmod -sudo make -f Makefile.go install -to test: sudo modprobe cp2101, or plug in a device +The cp2101.ko file can be built and installed from the source directory as +well, but this isn't recommended: + +* Check out the code +* cd cp210x/src +* ./configure -kver $(uname -r) +* make -f Makefile.go all +* # The binary is called cp2101.ko +* # To install, +* chmod a+x installmod +* sudo make -f Makefile.go install +* # To clean the source tree, +* sudo make -f Makefile.go clean + +Older kernels are supported, but require one to check out the pre2.6.24 +branch from the repo, then follow any of the steps above. You may have to +edit cp2101.c and replace: + #include "usb-serial.h" +with: + #include "/path/to/usb-serial.h" +before building. -- 2.39.2