Subject: Hello. I have a question about dev. tool target name.

From: 차현준 <[email-masked]>
Date: Fri, 10 Mar 2000 04:22:32 +0900

Hello, all.

I'm a newbie Korean linuxer - specifically to arm linux.

Since I'm working on the embedded linux project for ARM, I have to build cross toolchains.

After lots of trouble I've built it successfully with many advices from 

http://inkvine.fluff.org/~chris/arm-tools.html

Yes. I could build the Linux kernel 2.2.14 with patch-rmk4 successfully.

But the vmlinux image was elf-32littlearm format and the evaluation board engineer said that I have to build a big-endian image.

So I've fiddled out Makefiles and Rules.make to add  -mbig-endian switch to gcc and -EB switch to ld.

And finally got error about arch/arm/lib/extractconstants.pl with objdump output of big-endian compiled objects.

I've been reaching big-endian kernel image ( Yes, It's the goal ) ...

But I had a doubt that "Is this kind of things right? If I have a toolchain configured to support big-endian default?"

So I returned to web-life, finding any information... then I've got information from the web page mentioned at the beginning.

It's the target name.

In "Picking a target name" section from the web page...

Not only arm, but armv4l and armv4b are also target names.

I've tried it on binutils-2.9.5.0.29 first, but got errors like this.

-----------------------------------------------------------
[root@fraser binutils-2.9.5.0.29]# pwd
/home/cross-compiler/object_dir/binutils-2.9.5.0.29
[root@fraser binutils-2.9.5.0.29]# /home/cross-compiler/source_dir/binutils-2.9
.5.0.29/configure --target=armv4b-linux --prefix=/usr/cross-compiler/tool_dir/h
ost/sparc-sun-solaris-for-arm/
Configuring for a sparc-sun-solaris2.6 host.
Invalid configuration `armv4b-linux': machine `armv4b' not recognized
Unrecognized target system name armv4b-linux.
------------------------------------------------------------

What's the point of problem? Are there any patches to support armv4b? Is the word "armv4b" badly located?

Please answer.

Thanks in advance. 

Have a nice day.

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

---

From: Erik Mouw <[email-masked]>
Date: Thu, 9 Mar 2000 21:45:10 +0100 (MET)

On Fri, 10 Mar 2000 04:22:32 +0900, wvfH9sHY wrote:
> But the vmlinux image was elf-32littlearm format and the evaluation board
> engineer said that I have to build a big-endian image.

[...]

> I've tried it on binutils-2.9.5.0.29 first, but got errors like this.

It's bad practice to use the root account for such silly things as
compiling a toolchain. Use the root account as less as possible.

> Unrecognized target system name armv4b-linux.

Chris' webpage is not completely correct: if you want to use a big endian
system, you have to specify a _complete_ system name, not an alias. The 
target name "arm-linux" is an aliasfor "arm-unknown-linux-gnu". The
configure script feeds the target name through config.sub to find out the
complete name. If the config.sub script doesn't know the alias, it will
issue the error you encountered:

  erikm@thorgal:~/build/binutils-2.9.5.0.22 >./config.sub armv4b-linux
  Invalid configuration `armv4b-linux': machine `armv4b' not recognized

So you'll have to help it a bit. First find out the "default" alias:

   erikm@thorgal:~/build/binutils-2.9.5.0.22 >./config.sub arm-linux
   arm-unknown-linux-gnu

Now modify this to see if it recognizes the big-endian part:

  erikm@thorgal:~/build/binutils-2.9.5.0.22 >./config.sub armv4b-unknown-linux-gnu
  armv4b-unknown-linux-gnu

Yes, it does. Try to build everything with target name
"armv4b-unknown-linux-gnu".

BTW: AFAIK all ARM CPUs support little-endian. Is there a specific reason
that you have to use big-endian? Choosing for big-endian will most
certainly give you a lot of problems, because the configure script used by
many packages doesn't seem to support the idea of a big-endian ARM system
(it does for PowerPC CPUs). Otherwise just do what all others do and use
little-endian. (Someone please correct me if I'm wrong)

Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2785859  Fax: +31-15-2781843  Email [email-masked]
WWW: http://www-ict.its.tudelft.nl/~erik/

---

From: Scott Bambrough <[email-masked]>
Date: Thu, 09 Mar 2000 16:18:08 -0500

> little-endian. (Someone please correct me if I'm wrong)

Are there big endian ARM Linux systems.  I thought the kernel required little
endian.  If it doesn't we may have to revisit the tools, as I am not sure they
will all function correctly.  GDB will need some work for sure.

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