Subject: RE: errata 2.3.39

From: Jamey Hicks <[email-masked]>
Date: Thu, 2 Mar 2000 15:47:19 -0500

If the kernel can dynamically detect which processor and architecture it is
running on, then you don't need to build separate kernels for each.  If you
only have one processor/architecture combination, then it doesn't matter,
but if you're supporting multiple it's much easier this way.  

This code is small and only gets executed once at startup, so it doesn't
consume much time.  There is a complexity issue with maintaining this code.

>   If the lists are still needed should the lists in head-armv.S and
> setup.c be
>   collapsed into one list?

I would vote in favor of this suggestion.  I would like to see the
architecture data collected into a section, like the processor data is, with
each entry identified by the registered architecture number, rather than
position, so that the architecture data could be moved into the
architecture-specific files.

> head-armv.S:
>   Uses magic numbers in __lookup_processor_type '#36' and in
>   __lookup_architecture_type '16'. Should these be replaced with
> calculated
>   constant definitions? Where should they be defined? 
> (procinfo.h, ???)
> (SAM)

Using a section for the procinfo and the architecture info would allow the
linker to calculate the currently manually maintained constants (#36 etc).
Accessing this data from assembly precludes the direct use of assembly
language, but we could store the necessary field offsets in variables that
are initialized via sizeof() and offsetof().

-Jamey

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]
++        Please use [email-masked] for           ++
++                        kernel-related discussions.                      ++

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Fri, 3 Mar 2000 00:30:19 +0000 (GMT)

> architecture-specific files.

"vote"?  I wasn't aware that we had a general election today! ;)

There's one problem here - there aren't really any suitable per-architecture
files to move it into, and I'm dead against creating some just to store
this information.

The original idea behind the two lists was to (eventually) provide some way
of telling the user that they were running an incompatable kernel for their
architecture, but the code didn't materialise ;(

> are initialized via sizeof() and offsetof().

That's, erm, even more disgusting than the arch/arm/lib/constants.h hack,
and will preclude the use of nicities like 'ldm'!
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.linux.org.uk/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |

---

From: Philip Blundell <[email-masked]>
Date: Fri, 03 Mar 2000 09:46:58 +0000

>files to move it into, and I'm dead against creating some just to store

Actually, that seems like rather a good idea.  The `fixup' code that is 
currently in setup.c and surrounded by ifdefs could move there also.

p.

---

From: "ªü­õ" <[email-masked]>
Date: Tue, 7 Mar 2000 01:33:14 +0800

When I compile Linux 2.2.12 using binutil 2.9.5.0.29, I got the following error message:
%make zImage
...
arm-linux-ld -T /home/murphy/armbuild/linux-2.2.12/linux/arch/arm/vmlinux-armv.lds -e stext -Ttext 0xC0008000
arch/arm/kernel/head-armv.o arch/arm/kernel/init_task.o init/main.o init/version.o \
......
arm-linux-ld: target elf32arm not found

	From the release note of binutils-2.9.5.0.29, I have some hints:
To get the correct behaviour from gcc, amend the *link section of your specs
file as follows:

*link:
%{h*} %{version:-v}    %{b} %{Wl,*:%*}    %{static:-Bstatic}
%{shared:-shared}    %{symbolic:-Bsymbolic}    %{rdynamic:-export-dynamic}
%{!dynamic-linker: -dynamic-linker /lib/ld-linux.so.2}    -X
%{mbig-endian:-EB} %{mapcs-26:-m armelf_linux26}
%{!mapcs-26:-m armelf_linux} -p

	I guess it is necessary to modify the 'specs file'.
	But, where is the 'specs file'?

---

From: Scott Bambrough <[email-masked]>
Date: Mon, 06 Mar 2000 13:31:42 -0500

>         But, where is the 'specs file'?

Do `gcc -v`.  The output will tell you exactly where it is.

Scott

-- 
Scott Bambrough - Software Engineer
REBEL.COM    http://www.rebel.com
NetWinder    http://www.netwinder.org

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Mon, 6 Mar 2000 21:22:54 +0000 (GMT)

> When I compile Linux 2.2.12 using binutil 2.9.5.0.29, I got the following

That is expected.  You should upgrade to Linux 2.2.14 if you're using
binutils 2.9.5
   _____