NSLU2-Linux
view · edit · print · history

Strangely enough, OpenSlug lacks any printer support out of the box, and while I hope to package CUPS and it's dependancies, for the time being, everything needs to be installed and compiled on the slug itself.

None of these steps seems to work on my OpenSlug...dependencies need to be better documented and the steps better debugged.

1. Install slugos-native for it's compilers, and openssl

 ipkg install slugos-native openssl

2. Connect your printer to the slug via USB. Note: CUPS supports printing over networks and serial ports, but that is outside the scope of this document.

3. Download CUPS dependancies in root's home folder. All the source code we need is available from the CUPS website.

 cd ~; mkdir src; cd src
 wget ftp://ftp.easysw.com/pub/libraries/zlib-1.1.3.tar.gz
 wget ftp://ftp.easysw.com/pub/libraries/tiff-v3.4-tar.gz
 wget ftp://ftp.easysw.com/pub/libraries/jpegsrc.v6b.tar.gz
 wget ftp://ftp.easysw.com/pub/libraries/libpng-1.0.6.tar.gz
 wget ftp://ftp.easysw.com/pub/cups/1.2.2/cups-1.2.2-source.tar.gz

4. This section is broken...it does not work. It needs to be updated by the maintainer.

 Install ZLIB. OpenSlug already includes this library, but the header is strangely missing so recompile it.
 tar zxvf zlib-1.1.3.tar.gz
 cd zlib-1.1.3
 ./configure --prefix=/usr/local --enable-shared; make; make install
 cd ..

5. This section is broken...it does not work. It needs to be updated by the maintainer.

 Install LibTIFF?
 tar zxvf tiff-v3.4-tar.gz
 cd tiff-v3.4
 ./configure; make; make install
 cd ..

6. Install LibPNG?

 tar zxvf  libpng-1.0.6.tar.gz
 cd libpng-1.0.6
 make -f scripts/makefile.linux
 make -f scripts/makefile.linux install
 cd ..

7. Install LibJPEG?. LibJPEG? has an old version of libtool so it doesn't quite work correctly, but can be made to work fairly easily.

 tar zxvf jpegsrc.v6b.tar.gz
 cd jpeg-6b
 ./configure --prefix=/usr/local --enable-shared; (configure will fail, but it will write the Makefile, this is normal)
 ./ltconfig ltmain.sh armeb-linux (this builds libtool, and allows make to build a shared library)
 make
 make install
 make install-lib
 cd ..

8. Install CUPS. There is a known bug with PAM and CUPS on OpenSlug at the moment

 tar zxvf cups-1.2.2.tar.gz
 ./configure --prefix=/usr/local --with-perl --enable-openssl --disable-pam
 make; make install

At this point CUPS is installed, but still non-functional. We now need to install the kernel module, and load it, as well as create device nodes since OpenSlug doesn't have any for printers:

9. Install the usblp kernel module and load it

 ipkg install kmod-usb-printer
 modprobe usblp

10. Create /dev/usb/lp0 and lp1

 mkdir -p /dev/usb
 mknod /dev/usb/lp0 c 180 0
 mknod /dev/usb/lp1 c 180 1

If for any reason you need more then two USB printer ports, ports lp2-lp15 can be created in the same way by increasing the minor number. At this point, CUPS is installed and functional, but you will likely need to install Ghostscript, and printer drivers for almost all modern printers.

NOTE: For those in need of a foo2zjs wrapper the solution is not viable. 2 weeks now and no success. Also ghostscript is not available from the slugOS repo. Do NOT use ghostscript from the OptWare? packages as it will freeze and keep the processor at 100% for days (tried that on my own skin). Even after compiling everything involving cups from source, including the foo2zjs wrapper my printer will still not work (HP 1020). Problem still not solved.

It seems that for HP printers in need of the foo2zjs driver hplip is also a must. The problem is that hplip fails at compile time and there is no hplip package. The printer works perfectly on Debian using it's own packages and the foo2zjs driver compiled from source.

view · edit · print · history · Last edited by Magarus.
Based on work by Magarus, maladon, sonicmctails, eFfeM, and George Styles.
Originally by ByronT.
Page last modified on March 11, 2008, at 10:08 AM