Subject: Re: 32-Bit Userland On 64-Bit Machine?
To: Martin Husemann <martin@duskware.de>
From: Bill Dorsey <dorsey@lila.com>
List: port-sparc64
Date: 05/24/2003 15:31:05
Hi,

I am trying to get the former option working (32-bit sun4u kernel with 
32-bit sparc userland).  Unfortunately, it is far from straightforward 
to do this.

To begin with, the sparc miniroot doesn't work on an Ultrasparc.  
Something about fast page MMU error.  I used the sparc64 miniroot and 
was able to tell it to grab the installation sets from the sparc 
directory instead of the sparc64 directory.  Then when it finishes with 
the installation, I'm able to replace the generic kernel (which won't 
work on the Ultra) with the sun4u kernel by hand.  However, when I try 
to boot up the system after this, I find that I am missing devices for 
the IDE disks (wd*).  So, the system never makes it past single-user 
mode with the root filesystem mounted read only.

I find it a bit strange that what seems to me to be the most useful 
configuration of an ultra-sparc based system (running in 32-bit mode 
for best compatibility -- just as Sun does with Solaris) requires one 
to perform a lot of contortions before getting it working.

The next thing I will try is installing the full sparc64 system, and 
then replacing the userland with the 32-bit sparc userland (as I did 
before), but this time also replacing the kernel with the 32-bit sun4u 
kernel.  Hopefully this will leave me with a usable system.

There ought to be a FAQ on this...

--
Bill

On Friday, May 23, 2003, at 10:28 US/Pacific, Martin Husemann wrote:

> On Fri, May 23, 2003 at 10:15:02AM -0700, Bill Dorsey wrote:
>
>> So, I am wondering if anyone has had any luck in installing a 32-bit
>> sparc userland on a 64-bit machine?  If so, I would love to know how
>> you did it!
>
> Well, I did not update it very recently, but I do so from time to time.
>
> You have basically two options to run 32bit userland:
>
>  - run a 32bit sun4u kernel (which is a sparc64 kernel compiled with a
>    sparc toolchain and appropriate build options)
>  - run a 64bit kernel with 64bit userland base, but COMPAT_NETBSD32
>    option in the kernel and a sparc (32bit) userland + pkgs under
>    /emul/netbsd
>
> From your description it sounds like you ended up with the latter 
> option
> but unpacking the 32bit stuff in / instead of /emul/netbsd.
>
> I myself use the former approach. To install it from scratch just use 
> the
> SUN4U kernel from the NetBSD sparc distribution and a regular sparc 
> userland.
>
> Using a 64 bit kernel may result in better performance in some 
> situations,
> but it does not usually make a big difference in my practical 
> experience.
>
> Martin
>
>