You are not logged in.

#1 2006-01-21 21:07:59

RobK
Member
Registered: 2005-12-07
Posts: 121

Making a Driver Package for USB CD-Writer Drives

I am currently making a package to install drivers for the older USB CD and DVD Writers made by Microsolutions.  The trade-marked name under which most of these drives were made is "Backpack" CD Writers, DVD Writers and USB Hard drives.

Microsolutions has all the needed firmware on its website.  (I am not sure for how much longer since the company is going out of business).  During hotplugging, a small utility program called fxload loads the firmware into the USB CD/DVD Writers.  Microsolutions also provided lines to be added to the usb.usermap.

Since arch no longer uses hotplug (in favour of udev), I will have to write some udev rules to install the firmware via fxload.  I will no longer need the usb.usermap.

I started the first step in making the package.  Create a PKGBUILD that will download the firmware off the Microsolutions website, unpack the binary firmware and create a package.  But I am having some problems due to my lack of knowledge of the install command.  Here is my build script.

build() {
  cd $startdir/src/bpck-usb-firmware-$pkgver
  install -D -m644 bpckusb $startdir/pkg/etc/hotplug/usb/bpckusb
  install -D -m644 firmware/* $startdir/pkg/etc/hotplug/usb/bpckusb.fw
}

But I get the following error:

==> Extracting Sources...
==>     tar --use-compress-program=gzip -xf bpck-usb-firmware-1.1.tgz
tar: bpck-usb-firmware-1.1/firmware/BPINTCD.HEX: time stamp 2013-09-28 02:16:48 is 242471587 s in the future
tar: bpck-usb-firmware-1.1/firmware/BPINTHD.HEX: time stamp 2020-09-17 09:23:28 is 462471587 s in the future
==> Starting build()...
install: installing multiple files, but last argument, `/var/abs/local/bpckusb/pkg/etc/hotplug/usb/bpckusb.fw' is not a directory
Try `install --help' for more information.
==> ERROR: Build Failed.  Aborting

It looks like I am using the install command wrong.  If there is a simple fix, please let me know.

Also I will need to create an install script that will  add some udev rules.  Is there a good example of an install script that adds udev rules in the repository?

Rob

Offline

#2 2006-01-21 23:09:54

RobK
Member
Registered: 2005-12-07
Posts: 121

Re: Making a Driver Package for USB CD-Writer Drives

It looks like I solved the first problem.  I needed to add another install command to make the directory first.  Here is my build script.

build() {
cd $startdir/src/bpck-usb-firmware-$pkgver
install -D -m644 bpckusb $startdir/pkg/etc/hotplug/usb/bpckusb
install -d -m755 $startdir/pkg/etc/hotplug/usb/bpckusb.fw
install -D -m644 firmware/* $startdir/pkg/etc/hotplug/usb/bpckusb.fw
}

Now I have a package for the firmware.  I made this package depend on "fxload" a package already created in AUR. 

But I need to add an install script to this package that will ADD some udev rules to the Arch system.  Can anyone point to some  packages that have an install script which add udev rules.  I am sure someone must have already done such a thing.

If not, can someone point to a package that uses an install script.  I like to see how it is done.

Rob

Offline

#3 2006-01-22 00:15:08

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Making a Driver Package for USB CD-Writer Drives

Have a look at the libgphoto2 PKGBUILD and associated files. Since hotplug went away, the .usermap provided in the source code is now converted into udev rules by a script.

Offline

#4 2006-01-22 17:09:54

RobK
Member
Registered: 2005-12-07
Posts: 121

Re: Making a Driver Package for USB CD-Writer Drives

Thanks for the reply.  I have converted the usb.usermap to udev rules.  The udev rules call a script provided by the CD WRiter vendor. This script uses fxload to load the firmware into the USB CD Writer.  Everything seems to work fine.  But I am not sure where I should place the firmware and script.

The vendor supplied firmware was designed for the old hotplug daemon.  The script was placed in /etc/hotplug/usb and the firmware was placed in /etc/hotplug/usb/bpackusb.fw.

Even though hotplug is not longer used in Arch, should I continue to place these files in the /etc/hotplug/usb and /etc/hotplug/usb/bpackusb.fw directories?  Or should I place them in /lib/udev?  Or perhaps somewhere else?

Rob
P.S.  I wish the FHS was clearer.

Offline

#5 2006-01-22 17:48:09

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Making a Driver Package for USB CD-Writer Drives

Firmware generally goes in /lib/firmware, and udev scripts in /lib/udev.

Offline

#6 2006-01-22 20:15:21

RobK
Member
Registered: 2005-12-07
Posts: 121

Re: Making a Driver Package for USB CD-Writer Drives

Thanks.

On my arch box, I do not see /lib/firmware.  I will create it and put the firmware in /lib/firmware/bpckusb.d

Rob

Offline

Board footer

Powered by FluxBB