Subject: Re: workaround for FreeBSD binary that hardcodes a device major (was: Re: CVS commit: src/sys/conf)
To: matthew green <mrg@eterna.com.au>
From: Bill Studenmund <wrstuden@netbsd.org>
List: source-changes
Date: 09/23/2006 23:33:24
--wac7ysb48OaltWcw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Sep 24, 2006 at 03:13:31PM +1000, matthew green wrote:
>   =20
>    [About http://mail-index.NetBSD.org/source-changes/2006/09/23/0110.htm=
l]
>    > This would seem to break all kernel configs that don't have a twa
>    > device.  At least for evbppc/WALNUT I get:
>    >=20
>    >       #      link  WALNUT/netbsd
>    >        [ ... ]
>    >       devsw.o:(.data+0x590): undefined reference to `twa_cdevsw'
>   =20
>    I backed the change out to restore the build, but I wonder how this
>    should be fixed.
>   =20
>    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
>   =20
>    1) Tag the major 187 as reserved in the MI range and only define it on
>    i386
>    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 rig=
ht
>    major gets used.=20
>   =20
>    What's the best way?
>=20
>=20
> since the hardcoded value is for freebsd, #2 seems the right place.

I agree. It's a FreeBSD-specific issue, it needs a FreeBSD-specific fix.

Take care,

Bill

--wac7ysb48OaltWcw
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)

iD8DBQFFFia0Wz+3JHUci9cRAlCtAJwN4YQ+borwNs4L1fL1VNj1qEeEkgCgic6M
/2IAb7iLhkrhA4No7aXK4tY=
=o4WH
-----END PGP SIGNATURE-----

--wac7ysb48OaltWcw--