Results 1 to 10 of 10
|
|
Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
-
05-02-2009 #1Just Joined!
- Join Date
- May 2009
- Posts
- 11
Building an Xscale Cross Compiler (problems)
I have a small linux box running very minimal gnu/linux from a flash chip. It is fully functional and I can log into it (via telnet) and I can run a tftp server and transfer files to and from it. The box has no other methods of access or file transfer. I also has no compiler, it was not set up by me. It has an arm-xscale processor. I downloaded a pre-built arm cross compiler and I can compile arm elf executables with it and run them with qemu, but when I tftp them to my xscale box, they do not run. I ran the file command on both my compiled exes and some native xscale exes to look at the differences. Mine came up as "LSB Arm version 1 ELF executable", while the native ones came up as "MSB Arm version 1 ELF executable". So I think I need either an arm-xscale cross compiler or an armeb cross compiler. However I am having extreme difficulty building my own cross compilers. Here is what I have tried and my problems.
binutils with target arm-xscale and target armeb compiles perfectly and installs perfectly.
glibc with either target fails and says that TSL is not enabled or something. (I am using gcc4.3.3 on my pc (x86))
gcc4.3.3 with either target gets a buffer overflow and fails. I can do a make install after that and some of the executable do get built, but I can not use them.
What am I doing wrong, and what else should I do? Is there a nice step by step tutorial I can follow? I've been looking and I just cant get anything to work. Crosstool also fails, no clue why.
-
05-02-2009 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
- Posts
- 14,038
Have you looked on the ARM web site for GNU tools? That would be the place to get native compilers, vs. cross-compilers I would think. And I would think that since you have the system bootstraped, that a native compiler would be preferable. I know QNX has ARM support in their version of the GNU compiler suite.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
-
05-02-2009 #3Just Joined!
- Join Date
- May 2009
- Posts
- 11
The ARM website suggests using CodeSourcery's toolchain. I haven't tried it, but I have tried the scratchbox toolchain, which created executables that would not run, CodeSourcery toolchain appears to be identical, though I could be wrong.
A native compiler probably isn't the best solution since flash memory and cpu are all very limited, but probably ok if I can get a small enough compiler, I won't be compiling any very large programs, at least at first. I would still rather a cross compiler though.
I feel like I'm almost there, but I just can't get it to work, its very annoying.
-
05-02-2009 #4Just Joined!
- Join Date
- May 2009
- Posts
- 11
A regular arm toolchain won't work, thats the issue. It needs to be an armeb toolchain or an arm-xscale toolchain (I think at least, this is all new to me).
-
05-02-2009 #5Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
- Posts
- 14,038
Well, assuming you are compiling with the correct architecture flags, then the problem is likely in the linkage. Sorry, but I don't personally have enough cross-compiler experience to say more than this at the moment...
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
-
05-02-2009 #6Just Joined!
- Join Date
- May 2009
- Posts
- 11
Well believe it or not, I think I may have just solved my own problem. I will post again soon. If it works, I will post my solution and the steps I took to building my cross-compiler, else I will be asking for more help. However, I feel I have taken a step in the right direction.
-
05-02-2009 #7Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
- Posts
- 14,038
I look forward to reading about your solution. Enquiring minds, and all that...
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
-
05-03-2009 #8Just Joined!
- Join Date
- May 2009
- Posts
- 11
I am still having problems. One of the problems I was having was that I was forgetting to add my compiled binutils to the PATH. I fixed that issue now, but I am still having problems compiling gcc. Binutils compiles fine, but gcc fails to compile. I think the issue is only a version difference. I will keep trying.
I found a nice guide I have been using for advice: <I cant post the url because I have less than 15 posts. but its on osdev.org>
-
05-04-2009 #9Just Joined!
- Join Date
- May 2009
- Posts
- 11
Well, I have succeeded somewhat. I successfully built binutils-2.16.1 --target=armeb-elf and gcc-3.4.4 --target=armeb-elf
It seems I was doing the right things before. The only thing I changed was my host compiler version. I changed to gcc-4.2 instead of the latest.
Now I am having a new problem. Before I can actually compile any executables, I need to compile glibc or newlib. newlib is a bust because it does not support the armeb-elf target, and glibc is rediculously hard to compile, so far I have never successfully compiled glibc (any version) for any arc.
-
05-04-2009 #10Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
- Posts
- 14,038
Well, as that old saying goes - if at first you don't succeed, try another compiler switch!
At least it seems you are making forward progress here. I've built gcc and stuff before, but only for the same architecture that I was using (x86), never for a different hardware platform such as ARM, et al. Have you contacted xscale to see if they might already have such a beast built?
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote