Subject: Re: arm-linux cross-gcc build

From: kjdevel <[email-masked]>
Date: Mon, 8 Nov 1999 10:58:14 +0100 (MET)

Hi, 

I'm trying to build the latest version of the gnu cross-compiling
toolchain for arm-linux targets (in my case, on a i686-linux host,
for a Psion Series 5 target)

The files/versions I intend to use:

binutils-2.9.5.0.19
gcc-2.95.2
glibc-2.1.2            

Now my question (as first asked on linux-arm) is:

> >  which linux kernel versions are compatible with the above versions of
> >   the tool-chain?
> >   (in particular, how about linux-2.2.1, since it seems to be the
> >   de facto standard for the Psion)

On Sun, 7 Nov 1999, Philip Blundell wrote:

> The kernel experts can probably answer this more definitively (try the 
> linux-arm-kernel list), but I'm fairly sure that version will not work.  
> Both the 2.2 and 2.3 kernels in CVS seem to be OK though.

Could anyone on this list give a more definitive answer?

Another question is:
>From the ftp site, the most recent version seems to be linux-2.2.13, with 
patch-2.2.13-rmk1.gz.  Is that sufficient, or do I need other patches in
addition?

Thanks in advance!

Klaasjan van Druten

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

---

From: Ben Williamson <[email-masked]>
Date: Thu, 11 Nov 1999 02:46:10 +1000 (EST)

Disclaimer: I'm still back in 2.2.1 land, so if this already exists in
newer kernels/patches, please beat me with a stick.

I spent the last few days hacking on Werner's crash+burn-26 to make it
boot on an EP7211.  (More info posted on linux-7110.)  This part contains
an ARM720T core, ie an ARM7 with architecture v4 (and Thumb).  Various
spots in the kernel seem to assert that v4 implies StrongARM, which is not
the case here.  I tried to do what looked reasonable and it seems to work
so far; my patch is now available for your viewing pleasure:

    ftp://ftp.netwinder.org/users/b/benw/ep7211/cb26-benw1.gz

I'd welcome any feedback on what I've done, I'm learning a lot as I go
along and I'm sure that some of this should be done differently to coexist
happily with the RPC-that-might-have-a-SA110-card world.  I'm particularly
uncertain of putting #ifdef CONFIG_ARCH_ARMV4 in proc-arm6,7.S to deal
with the MMU differences.  Suggestions?

Phil: You've mentioned playing with support for Thumb user-space binaries.
Do you have any hardware to do that on yet?  I looked in the latest philb
and rmk patches and couldn't find any mention of ARM720T, ARM7v4 etc.  I'm
behind a !@#$% modem now so I haven't managed to download a 2.3.x kernel
yet.  *sniff*  I miss DSL.

Cheers,

- Ben.

-------------------------------------------------------------------
Ben Williamson       [email-masked]     http://www.pobox.com/~benw/

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Wed, 10 Nov 1999 19:11:14 +0000 (GMT)

Ben Williamson writes:
> an ARM720T core, ie an ARM7 with architecture v4 (and Thumb).

Oh dear.  I suppose something crazy like this was bound to happen some day.

> Various spots in the kernel seem to assert that v4 implies StrongARM,
> which is not the case here.

Which spots are these?  As far as I am aware, the only places which v3/v4
matter are in arch/arm/Makefile and arch/arm/mm/proc-*.S.

The correct way to handle this problem would be to create another
proc-*.S, rather than breaking the ARM710 support (which, incidentally
is v3).

> with the MMU differences.  Suggestions?

See above.  In later kernels (can't remember which version atm but I think it's
v2.3), the proc-*.S files are selectively compiled in, so you don't have to
have all the different processors compiled in.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.linux.org.uk/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |

---

From: Ben Williamson <[email-masked]>
Date: Fri, 12 Nov 1999 10:24:02 +1000 (EST)

> proc-*.S, rather than breaking the ARM710 support (which, incidentally

Right.  To this end I put #ifdef CONFIG_ARCH_ARMV4 around my changes in
proc-arm6,7.S.  Here's a relevant bit of patch:

--- ep7211/linux/arch/arm/mm/proc-arm6,7.S:1.1.1.1	Sat Nov  6 10:10:18 1999
+++ ep7211/linux/arch/arm/mm/proc-arm6,7.S	Tue Nov  9 13:02:58 1999
@@ -22,7 +22,7 @@
  */
 _arm6_7_flush_cache:
 		mov	r0, #0
-		mcr	p15, 0, r0, c7, c0, 0		@ flush cache
+		mcr	p15, 0, r0, c7, c7, 0		@ flush cache (v3 or v4)
 _arm6_7_null:
 		mov	pc, lr
 
@@ -33,7 +33,11 @@
  */
 _arm6_7_flush_tlb_all:
 		mov	r0, #0
-		mcr	p15, 0, r0, c5, c0, 0		@ flush TLB
+#ifdef CONFIG_ARCH_ARMV4
+		mcr	p15, 0, r0, c8, c7, 0		@ flush TLB (v4)
+#else
+		mcr	p15, 0, r0, c5, c0, 0		@ flush TLB (v3)
+#endif
 		mov	pc, lr

Does this look sufficient, or do you want it in a seperate file so that
one kernel could support both ARM7v3 and ARM7v4?

> have all the different processors compiled in.

Cool, then I won't mess around with this too much until I get onto 2.3.

Thanks,

- Ben.