newusb/usb2 build breakage in tinybsd

Hans Petter Selasky hselasky at freebsd.org
Sat Jan 31 02:11:39 PST 2009


Hi Steve,

On Saturday 31 January 2009, Steve Calfee wrote:
> Hi,
>
> I am trying to backport usb2 to freebsd7.0. I have followed the
> instructions at http://www.selasky.org/hans_petter/usb4bsd/index.html
> and things work ok on the install until I get to the recommended make
> step for me to manually handle (printed out by your make file).
> Incidentally, your web site should say to build in the FreeBSD.usb2
> directory, I think.
>
> One complication is that I am crosscompiling with the tinybsd script -
> at least the target is an x86.
>
> I was held up for awhile because I missed the instruction echo'ed from
> the ..../FreeBSD.usb2/Makefile telling me to patch/change kmod.mk.
> Missing that causes the make to stop because usb2_if.h is missing.

Are you building the kernel or Modules?

>
> I had other build breakage due probably to kernel changes, so I just
> removed the build files for serial_xxx and storage_rio and wlan(_xxx)
> from /sys/modules/usb2/Makefile.

Yes, the API's these modules use in the system has changed a lot between 7.x 
and 8.x !

>
> Then, there are two backporting issues. The first looks pretty safe, I
> included the little finit routine into usb2_dev.c. That routine does
> not exist in FreeBSD 7.0.
>
> The other Issue I am not sure I have safely solved --
>
> Apparently some extra info (file descriptor ptr) is tucked into struct
> thread called td_fpop. I could not tell what it is used for - it is
> stored to in the USB_VNOPS_FO_CLOSE macro, then fo_close is called,
> and then it is nulled. I just commented out both accesses to td_fpop -
> the fp is also passed to fo_close, so I don't think it is needed. Do
> you know of any issues around td_fpop?

I think it is safe to remove setting that variable, because the routine that 
needs it is no longer called.

>
> Thanks, and I am sure I will have some more rookie questions as I go
> forward,

--HPS


More information about the freebsd-usb mailing list