Subject: shared arm userland (was Re: /usr/include/machine)
To: None <>
From: Chris Gilbert <>
List: tech-kern
Date: 07/13/2001 23:11:31
There seems to be some confusion over what the machine and arm dir's are all 
about.  I'm hoping that this email will help to clarify the situation.  (it 
may not as it's late and I'm tired)  Note that I'm speaking as a proponent of 
having a shared arm userland and machine dir, so apply bias appropriatley :)

I view there being 2 clear reasons for having a generic arm machine dir:

1: it removes the need for duplicate copies of header files spread across 
different arch dirs and the required maintenance work that's needed to keep 
them all in sync.

2: that any arm binary should run on any arm system.  It should not care 
about the underlying hardware, it should just run.  If something is different 
then we need to make a library routine that detects at runtime what hardware 
it's on or create sysctl's to find out those bits of information.  This means 
that userland should see the same machine header files on all arm platforms.

The work on removing duplicate headers has been done on cats, dnard and 
netwinder dirs.  This has led to make build not working on these platforms.  
However they are new ports and as such should be treated as such.

The arm32 platform should still build as it has machine symlinked to arm32 
not arm.  It's worth noting that an arm32 userland should work fine on cats 
dnard and netwinder.

I raised the issue yesterday on the arm mailing list to discuss how to handle 
a shared arm userland for libkvm, as libkvm is quite closely tied to the 
kernel.  This led to some discussion (and one or two mad ideas, that were 
pre-caffine induced from me :)  At some point it was brought onto tech-kern 

As it stands we're looking at how to handle the libkvm issue, there are a few 
other build problems, but most are fixed by adding the appropriate defines 
into the arm dir's version of that header.

As for what to do next, there's a few options:
1: revert back to when we could do a make build, the last time being when 
cats and dnard were part of the arm32 dir (note that netwinder never was in 
arm32 dir)
2: fixup the cats, dnard and netwinder dirs to actually have the duplicate 
copies of the include files and set machine to point at the 
cats/dnard/netwinder dir.
3: fix the arm machine dir to have what's needed to build a generic arm 

(and there's probably others that I've not thought of)

Out of the options I prefer 3, followed by 2, and would not want to consider 
1 as I view it as a step backwards.

In terms of time, both 2 and 3 would take time to do and test properly, 2 
would be shorter to do, but then would feel like effort was wasted on it when 
we do 3 and chuck 2 away.