Subject: Re: X11 on Ultra 2 using 32 bit kernel and user land.
To: Jochen Kunz <jkunz@unixag-kl.fh-kl.de>
From: Michael Lorenz <macallan@netbsd.org>
List: port-sparc64
Date: 04/19/2007 15:05:22
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On Apr 19, 2007, at 13:05, Jochen Kunz wrote:

> On Wed, 18 Apr 2007 14:18:12 -0400
> Michael Lorenz <macallan@netbsd.org> wrote:
>
>> Look at the Makefile in src/x11/Xserver/hw/xfree86/drivers/ - there's
>> bunch of .if ${ARCH} which control what drivers to build.
> I enabled sunffb in the mentioned Makefile. The following build faild
> with:
> #   compile  sunffb/ffb_accel.o
> [...]
> /var/tmp//ccJ1UAZt.s: Assembler messages:
> /var/tmp//ccJ1UAZt.s:143: Error: Architecture mismatch on "sllx".
> /var/tmp//ccJ1UAZt.s:143:  (Requires v9|v9a|v9b; requested architecture
> is sparclite.)
> /var/tmp//ccJ1UAZt.s:146: Error: Architecture mismatch on "stx".
> /var/tmp//ccJ1UAZt.s:146:  (Requires v9|v9a|v9b; requested architecture
> is sparclite.)
>
> As this build will be instaled on US hardware only I added to
> /etc/mk.conf:
> .if ${MACHINE} == "sparc"
> CFLAGS+=-mcpu=v9
> .endif
> and restarted the build.

Hmm, some of the assembly changes probably need to be reverted for 
32bit sparc. The real driver source is in 
xsrc/xfree/xc/programs/Xserver/hw/xfree86/drivers/sunffb

> Sidenote: If we can get this to work I sugest to add -mcpu=v9 for this
> single file only. Only US machines have sunffb, so -mcpu=v9 should not
> hurd. (?)

I'd rather have Martin's opinion on this, I know a little sparcv8 but 
almost no sparcv9.

> The build faild because distrib/sets/lists/xserver/md.sparc was missing
> ./usr/X11R6/lib/modules/drivers/sunffb_drv.o
> ./usr/X11R6/man/cat4/sunffb.0
> ./usr/X11R6/man/man4/sunffb.4
>
> I fixed this, restarted the build and finaly got a build that was
> halfway build with -mcpu=v9 and without the other half. I instaled the
> resulted Xserver, run XFree86 -configure and got a 
> /root/XF86Config.new.
> So far, so good. But when I tried to run the server it gave me:
> (EE) SUNFFB: Failed to load module "xf8_32wid" (module does not exist, 
> 0)

Umm, this module should live somewhere in src/x11/Xserver/hw/xfree86, 
probably needs to be enabled in another Makefile.

> I am currently running a clean rebuild with -mcpu=v9. It failed in Mesa
> because some #ifdef asumes __sparc_v9__ == 64 bit. Maybe it is not a
> good idea to build sparc with -mcpu=v9?

Yeah, assumptions like that will be all over the place. Maybe v8plus is 
more like it.

have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iQEVAwUBRie9c8pnzkX8Yg2nAQK7dwgArOxy/OUnSgBbpehJJMPAKr+mSLgFKDCA
HYJItC2+IgxJlDMLvqU93UVKJq/FUK7CCVLPbwneal3GS8KOQ1XLXTgPnhxx8CyM
RQCo5MAB0PTeW+ePh2E2YIy7yXEV26CGWtcdPjWUKb9y+1iJMdOAp93PGmWp8ian
I44b5Ss/7CH44aeBG9/JbS0WmHHXlgZ2nUNxGZCYRf/iP1chtIv+zukgC895DkR8
I2dJiIi8RePsVelcIb+m1/zydY8sP0uL36vIXdwLqah9TmLrrE+COxs6jsDygN2X
j24GK74VWr0qKU3fnrBXdj9S+zjKPl9m2fmUI3p0zPf/oZywhj3XdA==
=t87m
-----END PGP SIGNATURE-----