View Single Post
Old 22nd September 2010
AnilG AnilG is offline
Real Name: Anil Gee
Port Guard
Join Date: Sep 2010
Location: Sydney Australia
Posts: 20

So I tried using pkg_add directly on the tar.gz, without a mirror in PACKAGEROOT, and in various directories (!), until I finally decided to try an ordinary make alongside /usr/src/sys/modules/usb/upgt:
> mkdir /usr/src/sys/modules/usb/upgtfw
> cd /usr/src/sys/modules/usb/upgtfw
> cp ~/upgt-firmware- . # get the upgtfw package from wherever it was
> tar -xf upgt-firmware-
> rm upgt-firmware-
> mv upgt-firmware-* .
> rmdir upgt-firmware-
> make
===> Vulnerability check disabled, database not found
===> License check disabled, port has not defined LICENSE
=> upgt-fw- doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from
upgt-fw- 100% of 22 kB 28 kBps
===> Extracting for upgt-firmware-kmod-
=> MD5 Checksum OK for upgt-fw-
=> SHA256 Checksum OK for upgt-fw-
===> Patching for upgt-firmware-kmod-
===> Configuring for upgt-firmware-kmod-
===> Building for upgt-firmware-kmod-
Warning: Object directory not changed from original /usr/src/sys/modules/usb/upgtfw/work/upgtfw
@ -> /usr/src/sys
machine -> /usr/src/sys/i386/include
upgt-gw3887 upgt-gw3887
awk -f @/tools/fw_stub.awk upgt-gw3887:upgt-gw3887:21310 -mupgtfw -cupgtfw.c
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -c upgtfw.c
ld -d -warn-common -r -d -o upgtfw.kld upgt-gw3887.fwo upgtfw.o
:> export_syms
awk -f /usr/src/sys/modules/usb/upgtfw/work/upgtfw/../../../../../conf/kmod_syms.awk upgtfw.kld export_syms | xargs -J% objcopy % upgtfw.kld
ld -Bshareable -d -warn-common -o upgtfw.ko upgtfw.kld
objcopy --strip-debug upgtfw.ko
> make install
===> Installing for upgt-firmware-kmod-
===> Generating temporary packing list
===> Checking if net/upgtfw already installed
install -o root -g wheel -m 555 upgtfw.ko /boot/modules
kldxref /boot/modules
===> Registering installation for upgt-firmware-kmod-

Wow that looks like it worked; and now I get:
> kldload if_upgt
> kldstat
Id Refs Address Size Name
1 20 0xc0400000 bbbae4 kernel
2 1 0xc0fbc000 b260 if_wi.ko
3 1 0xc4a8d000 9000 i915.ko
4 1 0xc4a96000 14000 drm.ko
5 1 0xc5a88000 7000 if_upgt.ko
6 1 0xc5a8f000 9000 upgtfw.ko

I'd say that means upgt is loaded!
I'm pretty happy this is working, but is that the wrong advice in upgt(4)?
Reply With Quote