HP LaserJet P1005 and foo2zjs

Recently, I had to connect my old HP LaserJet P1005 printer to my CRUX box. I’ve had it for over 10 years, and I remember that on Slackware, it did not work out of the box. Instead, I had to use the drivers provided by foo2zjs. So, I decided to install them again.

I looked around and it seemed that the old website (http://foo2zjs.rkkda.com/) was no longer available. As described in my LQ post linked above, what I did back then was remove the hplip package, download foo2zjs and install it, by simply running:

make
getweb ./P1005
make install
make install-hotplug

The highlighted line downloads firmware for my printer only. However, since the website is dead, so this will not work even if I had the sources. I searched some more and found foo2zjs hosted by koenkooi at GitHub. The tarball come with the firmware already present, so the getweb step is not needed. Great! Installing the drivers like this should work on any Linux distro.

However, I wanted to make a port for CRUX (3.6.1), in order to package the drivers. One problem was that specifying DESTDIR=$PKG did not work efficiently at the make install step and did not work at all at the make install-hotplug step. I took some inspiration from foo2zjs-nightly at AUR, but mainly by inspecting the Makefile, I managed to make my own patch that inserts $(DESTDIR) where needed.

My port applies the patch and leaves a few things from the default Makefile to be run post-install. I needed to load usblp module to make the printer work:

modprobe usblp

I put the above line in:

/etc/rc.modules

CUPS blacklists the module by default, so I had to modify cups.conf accordingly:

/etc/modprobe.d/cups.conf

When the usage of this module becomes completely obsolete and deprecated I will have to find another solution. Maybe the drivers will no longer require it…



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s