2005-03-15 How to install cbm4linux for Fedora Core 3 cbm4linux is a linux utility for data transfer between your 1541 disk drive and linux PC, using XM1541 or XA1541 cable. This is a short documentation, how to compile cbm4linux for Fedora Core 3. The cbm4linux site: http://cbm4linux.sourceforge.net http://www.lb.shuttle.de/puffin/cbm4linux/ "$" = user commands, "#"= root commands Let's get the source and patch: $ cd /home/packages/cbm4linux $ wget http://www.lb.shuttle.de/puffin/cbm4linux/cbm4linux-0.3.2.tar.gz $ wget http://skalaria.japo.fi/patch-FC3-kernel2.6.diff The source is not directly suitable for series 2.6 kernels, so we need this patch. The patch also contains the parport-enumerate patch you find on the cbm4linux site. $ tar xzf cbm4linux-0.3.2.tar.gz $ cd cbm4linux-0.3.2 $ cp -v ../patch-FC3-kernel2.6.diff . $ patch -p0 < patch-FC3-kernel2.6.diff patching file config.make patching file kernel/cbm_module.c $ less -i README Let's compile it, make the device node and install. The latter two should be done as root: $ make # make dev # make install Check the file /etc/ld.so.conf. Make sure the directory /usr/local/lib was added to your ld search path, if it was not there already: # echo "/usr/local/lib" >> /etc/ld.so.conf # ldconfig FC3 runs with udev. The module is not designed for udev, so we still have to do some Fedora specific adjustment: # cp -a /dev/cbm /etc/udev/devices/ # joe /etc/udev/permissions.d/50-udev.permissions I used joe as an example editor. Add the following into the end of the file: ,----------- file: 50-udev.permissions ------------- | | # cbm.ko kernel module for XM1541 / XA1541 | cbm:root:root:0666 | '---- Now it is a good idea to reboot, to see that hotplug, udev and things are set correctly at the boot time. After this, we are ready to test the transfer finally works. You must stop the printing daemons and the kernel module "lp", because otherwise they would interfere with cbm4linux transfer: # service cups stop # rmmod lp Now, turn on your 1541. The following command will load the cbm module, probe the cable. This should take approximately 5 seconds. # modprobe cbm Now we can finally try it out! Issue a command $ cbmctrl status 8 You should get a message "73,cbm dos v2.6 1541,00,00". If not, try cbmctrl reset instead, then check your cable, and make sure there is no another printer daemon conflicting the printer port, and your printer port address and irq are correct. It might be a good idea to disable haldaemon (service haldaemon stop). Also note that the cable will not work with USB parallel printer ports! The following commands might help you for troubleshooting (as root), or if your parallel port doesn't get a correct parameters by default: cat /proc/interrupts cat /proc/ioports rmmod lp rmmod parport_pc rmmod parport modprobe parport_pc io=0x378 irq=7 modprobe cbm Check that your lpt port works. remove the cbm module and try printing (If there was a printer attached & configured for your lpt port): rmmod cbm service cups start lpr something.txt That was all about troubleshooting. I assume everything went fine with 1541. There is one thing left. Because of the udev thing, FC3 does not autoload the cbm module anymore, when you issue cbmctrl. You can try adding modprobe cbm to /etc/rc.d/rc.local, but your 1541 must be turned on during the boot. Instead, you can try adding this to your root's ~/.bashrc : alias cbmprobe='service cups stop ; rmmod lp ; modprobe cbm' Now you can finally just go for transfering some nice bits between 1541 and linux... This information and patch was written by Agemixer. Big thanks and greetings go to Michael Klein, Pekka Takala, Mixer, Grue, Alih, mic42, and some helpful souls in #fedora.fi for the information about patching, coding, udev, hal, hotplug, and aswell a lot about kernel modules, especially this one. 2005-03-15 Agemixer of Skalaria