Subject: workaround for FreeBSD binary that hardcodes a device major (was: Re: CVS commit: src/sys/conf)
To: Simon Burge <>
From: Emmanuel Dreyfus <>
List: tech-kern
Date: 09/24/2006 06:01:01
Simon Burge <> wrote:

> This would seem to break all kernel configs that don't have a twa
> device.  At least for evbppc/WALNUT I get:
>       #      link  WALNUT/netbsd
>        [ ... ]
>       devsw.o:(.data+0x590): undefined reference to `twa_cdevsw'

I backed the change out to restore the build, but I wonder how this
should be fixed.

3ware's tw_cli is only available as a FreeBSD or Linux binary. The
FreeBSD version hardcodes the twa major at 187. There is the same
problem for twe at major 146. I see 3 options

1) Tag the major 187 as reserved in the MI range and only define it on
2) Use a MD major for twa, and patch freebsd_sys_mknod() so that 187
gets translated into the right major
3) Use a MD major for twa, and patch the tw_cli binary so that the right
major gets used. 

What's the best way?

Emmanuel Dreyfus