The installation of OpenCBM differs a little bit depending on the cable used to connect your CBM equipment. The following instructions try to show the installation procedure as straight-forward as possible. At first, I will describe the prerequisites for each cable type. Afterwards, I will describe the installation bits that are common to all cable types. At last, I will describe some special postprocessing steps that are needed for some cable types.
These two cables are rather easy. In order to compile them, you need the libusb packages (libusb 0.1, not 1.0) and the corresponding libusb development package. For Debian based systems, it is enough to install the package `libusb-dev'.
The XA1541 cable and the XM1541 cable need a kernel module (cbm.o) which acts as a driver for the parallel port based cables.
The kernel module (cbm.o) does not require any kernel patches and should compile right out of the box, at least with kernel 3.x and 2.6.x, but 2.0.x, 2.2.x and 2.4.x might still work as well. They have not been tested in ages, though, thus, you are on your own.
In order to compile the kernel module, you will need the headers that correspond to your current running kernel. For debian-based systems, you can accomplish this by running aptitude install linux-headers-`uname -r` as root.
If you intend to modify the drive routines for `d64copy' and `cbmformat' you also need a crossassembler. `opencbm/LINUX/config.make' comes with rules for Ullrich von Bassewitz' `cl65' (comes with cc65, http://www.cc65.org/). Starting with version cbm4linux 0.2.3, opencbm includes precompiled 6502 binaries, so as long as you don't touch the .a65 files, there's no need for a crossassembler.
This package comes with a .spec file for those who want to build binary .RPMs. See the RPM documentation (outside of this paper) for details about the build process. Additionally, all files needed to built Debian .DEB packages are included. If you upgrade from a previous (non-RPM and non-DEB) version and want to install a packetized binary version (RPM or DEB), don't forget to remove the old files hanging aroung (just do "make uninstall", preferably in the *old* source directory. For a >= 0.4.0 version of opencbm, change the line to "make -f LINUX/Makefile uninstall".).
The compile-time configuration is located in `opencbm/LINUX/config.make'. Check the KERN_FLAGS line if you're running kernel 2.0.x or if you don't want to use the Linux parport subsystem for some reason. Same goes for SMP machines.
This is only needed if you are using the XA1541 or XM1541 cables. Otherwise, skip this section
If you're using the parport subsystem (which is default), you should now be able to load the driver module by issuing (as root)
or, when built with -DDIRECT_PORT_ACCESS:
/var/log/messages if the correct cable type was recognized
Normally, you will have access to your device only if you are logged in as root, or if you use sudo. You might want to change this behaviour. For this, OpenCBM includes udev rules that allow you to customize who is able to access the devices.
These files are located in:
The appropriate file(s) are copied into the directory /etc/udev/rules.d/ at installation time. They will allow any member of the group user to use the corresponding cable.
If you want to use another group, just change the files accordingly.
Finding the cause of a failure condition can be hard. Anyway, the following tips might help you:
/var/log/messages; it might give you some hints.
Check the interrupts with cat /proc/interrupts.
alias parport_lowlevel parport_pc options parport_pc io=0x378 irq=7
As a first test, try something simple like
(no root privileges required)
Failure can be caused by:
/usr/local/lib/cannot be found; in this case, add
/etc/ld.so.confand execute ldconfig (as root).
/dev/cbmdevice; try chmod 777 /dev/cbm
Most probably, you will want to add this to
/etc/modules.conf to have
the driver loaded on demand: (the file is called
some older SuSE systems)
alias char-major-10-177 cbm options cbm [options]
With [options] being one or more of:
Congratulation, you have successfully set up your opencbm installation!