Subject: Re: ARM and RPM (again)

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Wed, 1 Jul 1998 00:02:05 +2500 (BST)

This is a repeat of my message, seeing as it appears to have got
lost.

Andrew E. Mileski writes:
> This will make it difficult impossible distinguish an ARM3
> compatible RPM from an ARM4 one.  RPM relies on "uname -m".

However, as far as RPMs and user programs are concerned, there is
very little point in distinguishing between the processors alone.
For a.out, since everything runs in 26-bit mode, it is irrelevent.
For ELF, the fact that the binary runs in 32-bit mode doesn't
affect it's compatability with the older machines.  Currently,
the only thing that I can think is affected by the processor -
the floating point emulator.  On Acorn systems, the keyboard
mapping that is loaded is influenced by the processor type
(since an ARM3 can only mean an older keyboard, whereas ARM610
and up implies newer keyboard).

Ok, you could optimise the binaries, for instance, to use StrongARM
ldrh/strh instructions, but uname -m won't tell you if the machine
is capable of running these, since that is more dependent on the
platform than processor.  (RiscPC can't use StrongARMs ldrh/strh
instructions since IOMD isn't up to it).  It also won't tell you
the endianness of the machine, since that is again up to the
platform designers.

Hence, the use of 'uname -m' as it stands for selecting RPMs is
meaningless, whether it returns the processor architecture version
or the actual processor type.

Is there a hole here?  I think so, since on the ARM, the processor
type/architecture is not sufficient to completely define the
machine.  There is some extra information that is required to
properly define the machine type.

Since uname -m is supposed to 'Print the machine (hardware) type.',
it would make more sense if it returned something like:

	armv4h-little	for Corel's Netwinder/DECs EBSA285
	armv4-little	for Acorn's RiscPC with StrongARM
	armv3-little	for Acorn's RiscPC with ARM610/710

The older machines present some problem, because they don't have
a defined version.  However, we could say that ARM3 (with swp) is
version 2, and ARM2 without is version 1, so we end up with:

	armv2-little	for Acorn's A5000
	armv1-little	for Acorn's Archimedes

This then allows for the case where someone decides to build a
big-endian ARM system (quite possible, since the ARM chips
support it), and it's hardware type would be:

	armv4h-big

Obviously, these could be abbreviated to armv4hl, armv4l and
armv4b.  A more accurate description could be obtained by using

	armv4-riscpc

but I think that that would be going too far.

Note: arch (/bin/arch) uses the same source of information, so
any changes here also affects the output of this program as well.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.uk.linux.org/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |

   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.uk.linux.org/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]