Bug 150991

Summary: [patch] Install upgtfw using pkg_add as advised in upgt(4) fails
Product: Documentation Reporter: Anil Gulati <anilg>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed Overcome By Events    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Anil Gulati 2010-09-27 13:00:16 UTC
Loading kernel module upgt requires upgtfw firmware is installed, but upgt(4) man page advises this can be done with pkg_add, but it fails.

Attempting to install the firware obtained from the address given in the man page (and other versions from elsewhere) fails using pkg_add.

The man page appears to be incorrect:

# kldload if_upgt
KLD if_upgt.ko: depends on upgtfw_fw - not available or version mismatch
kldload: can't load if_upgt: No such file or directory

# man 4 upgt
..
This driver requires the upgtfw firmware to be installed before it will work.
A package of the firmware which can be installed via pkg_add(1) is available:
http://weongyo.org/project/upgt/upgt-firmware-2.13.1.0.tar.gz
..

# pkg_add upgt-firmware-2.13.1.0.tar.gz
tar: +CONTENTS: Not found in archive
tar: Error exit delayed from previous errors.
pkg_add: tar extract of /usr/home/anil/upgt-firmware-2.13.1.0.tar.gz failed!
pkg_add: unable to extract table of contents file from '/usr/home/anil/upgt-firmware-2.13.1.0.tar.gz' - not a package?

Fix: A normal build DOES work to install the firmware:

# mkdir /usr/src/sys/modules/usb/upgtfw
# cd /usr/src/sys/modules/usb/upgtfw
# cp ~/upgt-firmware-2.13.1.0.tar.gz . # get the upgtfw package from wherever it was
# tar -xf upgt-firmware-2.13.1.0.tar.gz
# rm upgt-firmware-2.13.1.0.tar.gz
# mv upgt-firmware-2.13.1.0/* .
# rmdir upgt-firmware-2.13.1.0
# make
# kldload if_upgt
# kldstat
  if_upgt.ko
  upgtfw.ko

Wireless adapter dependent on the upgt driver started working after this, proving build worked.
Forum thread where this was worked out: http://www.daemonforums.org/showthread.php?t=5108

To fix this I have included a patch for the man page /usr/src/share/man/man4/upgt.4


Patch attached with submission follows:
How-To-Repeat: Download the firmware zipped tar from the upgt(4) man page and attempt to pkg_add:

# pkg_add upgt-firmware-2.13.1.0.tar.gz
tar: +CONTENTS: Not found in archive
tar: Error exit delayed from previous errors.
pkg_add: tar extract of /usr/home/anil/upgt-firmware-2.13.1.0.tar.gz failed!
pkg_add: unable to extract table of contents file from '/usr/home/anil/upgt-firmware-2.13.1.0.tar.gz' - not a package?