Author Topic: Iwmmxt Cross-compiler Setup  (Read 6895 times)

spartan

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Iwmmxt Cross-compiler Setup
« on: October 29, 2005, 03:40:36 pm »
Is there an English how-to for compiling any version of GCC that supports iWMMXt (not 2.95.3) for Tetsu's C1000/3000/3100 kernels for Sharp Rom?  I'm using a clean Debian installation and have tried everything from Atty's walk-through to Crosstool. Nothing works, and it seems like there are an infinite number of patches to apply.
C3000 with Tetsu v18d Special Kernel and Sharp 1.11JP ROM
1GB Lexmark SD, 2GB Mini SD, Socket Revision H Bluetooth, Ambicom Wi-Fi

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
Iwmmxt Cross-compiler Setup
« Reply #1 on: October 30, 2005, 06:51:27 am »
Open embedded builds its own tool chain if i am not mistaken, and cross tools should automate the process after a bit of text file hackery.

i had a problem with cross tools but it was a gcc problem and not the script (i belive, got a build failed)

lets see if we can get the cross tools stuff working, what exactly didnt work?
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware

maslovsky

  • Hero Member
  • *****
  • Posts: 1426
    • View Profile
    • http://my-zaurus.narod.ru
Iwmmxt Cross-compiler Setup
« Reply #2 on: November 01, 2005, 01:06:24 am »
Quote
Is there an English how-to for compiling any version of GCC that supports iWMMXt (not 2.95.3) for Tetsu's C1000/3000/3100 kernels for Sharp Rom?  I'm using a clean Debian installation and have tried everything from Atty's walk-through to Crosstool. Nothing works, and it seems like there are an infinite number of patches to apply.
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]

Here is the toolchain, which can build Tetsu kernel with iwmmx patches.

[a href=\"http://cacko.oesf.org/downloads/iwmmx/arm-cacko-linux-gnu-2.95.3-2.2.5-hardfloat-19.50_21.09.05.tar.bz2]http://cacko.oesf.org/downloads/iwmmx/arm-...1.09.05.tar.bz2[/url]

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
Iwmmxt Cross-compiler Setup
« Reply #3 on: November 01, 2005, 01:22:09 am »
Why does everyone keep using 2.95, i thoght we would be using a 3 series or even 4 by now.
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware

maslovsky

  • Hero Member
  • *****
  • Posts: 1426
    • View Profile
    • http://my-zaurus.narod.ru
Iwmmxt Cross-compiler Setup
« Reply #4 on: November 01, 2005, 01:24:03 am »
Quote
Why does everyone keep using 2.95, i thoght we would be using a 3 series or even 4 by now.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=101582\"][{POST_SNAPBACK}][/a][/div]

That's the only way to build a working 2.4.x kernel for Zaurus.

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
Iwmmxt Cross-compiler Setup
« Reply #5 on: November 01, 2005, 06:07:25 am »
so they are alright for those going to the 2.6 one right?
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Iwmmxt Cross-compiler Setup
« Reply #6 on: November 01, 2005, 06:30:05 am »
Quote
That's the only way to build a working 2.4.x kernel for Zaurus.

Though I have seen some patches floating about which might allow GCC 3.x.x to build that kernel - I don't think we don't use them in OZ though so there may be an issue with them still.

2.6.x kernels are built using GCC 3.x.x


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

maslovsky

  • Hero Member
  • *****
  • Posts: 1426
    • View Profile
    • http://my-zaurus.narod.ru
Iwmmxt Cross-compiler Setup
« Reply #7 on: November 01, 2005, 07:58:24 am »
Quote
so they are alright for those going to the 2.6 one right?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=101624\"][{POST_SNAPBACK}][/a][/div]

Sure

spartan

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Iwmmxt Cross-compiler Setup
« Reply #8 on: November 01, 2005, 06:09:34 pm »
Thanks for the replies. Sorry for the late response though: I've gone through maybe fifty compilations for something to post about.

My goal is to have a GCC compiler that outputs ARM code with iWMMXT instructions (the "--mcpu=iwmmxt" flag?), much like Atty compiles MPlayer with iWMMXT instructions. As much as I understand, the compiler outputs iWMMXT code the same way it outputs Thumb code: it expresses some C++ code as a different kind of instructions as an optimization. This precludes the need for GCC 3.4.0 or later.

I've been working on making crosstool (0.38) work, and I've tried the following configurations to no avail: GCC 3.4.0/3.4.1/3.4.2/3.4.3/3.4.4 with GLIBC 2.1.3/2.2.2 with binutils 2.15. Those configurations seem most appropriate, and while I've tried a GCC 4.0.0/GLIBC 2.2.2 configuration, it doesn't support iWMMXT without a patch, one that I can't figure out how to incorporate into the crosstool system. I've tried this in both Cygwin and a fresh Debian-Sarge installation with similar results.

As far as I know, anything GCC earlier than 3.4.0 won't optimize with iWMMXT instructions and any GLIBC later than 2.2.2/Kernel later than 2.4.6/18/20 won't work on the Zaurus. I also don't know how to make crosstool use Sharp's kernel headers (or in this case, C3000 kernel sources + Tetsu's patches) when compiling GCC.

Thanks for the help again.
C3000 with Tetsu v18d Special Kernel and Sharp 1.11JP ROM
1GB Lexmark SD, 2GB Mini SD, Socket Revision H Bluetooth, Ambicom Wi-Fi

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
Iwmmxt Cross-compiler Setup
« Reply #9 on: November 02, 2005, 07:28:48 am »
Wait for sound support under 2.6, joke aside i would be intrested to know how well gcc takes advatage of the iwmmx instructions, does it even use them at the moment you could use the arm5 instruction set but i belive you are like me and wants to put performnace at the top of you list

with cross tools cant you kill it when it gets to the compile stage, apply the patch and then when it reruns it dosent download because you have the files localy or does it always downloaad the latest version

if it does you would probely have to work out where to put a readline statment to wait for user input once it has uncompiled so that in another shell you can jump in and apply the patch
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
Iwmmxt Cross-compiler Setup
« Reply #10 on: November 10, 2005, 05:36:49 am »
found a fix, compile once using demo-arm-iwmmx.sh wait for it to bail, go to the directory with the broken file, edit the file in question (version-*.h) to fix delete the " that are on the line by themselves, then add \n\n" to the lines that dont end in a " and then compile

however leve a terminal in that directory so it cant be deleted, as the begining of each recompilation deltes everything. this will keep your changes but allow you to compile

have fun im in the middle of compile the tool chain now scince i didnt have much luck with OE
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware

spartan

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Iwmmxt Cross-compiler Setup
« Reply #11 on: November 11, 2005, 06:52:58 pm »
Thanks,

I've checked the build matrix, so my question now is how late of a GLIBC version is functional on the Zaurus? Meaning, will 2.2.5 or 2.3.5 work?
C3000 with Tetsu v18d Special Kernel and Sharp 1.11JP ROM
1GB Lexmark SD, 2GB Mini SD, Socket Revision H Bluetooth, Ambicom Wi-Fi

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Iwmmxt Cross-compiler Setup
« Reply #12 on: November 11, 2005, 11:48:00 pm »
Quote
Thanks,

I've checked the build matrix, so my question now is how late of a GLIBC version is functional on the Zaurus? Meaning, will 2.2.5 or 2.3.5 work?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=103385\"][{POST_SNAPBACK}][/a][/div]

It depends on which Z distro you are targetting. Stock SHARP ROM uses 2.2.2, pdaXrom has moved on a bit but still is on the 2.2.x version. OZ is prolly on 2.3.x somewhere but I haven't checked. Debian arm is on 2.3.2. Not sure what the other distros are using...
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
Iwmmxt Cross-compiler Setup
« Reply #13 on: November 12, 2005, 12:20:19 am »
ran into another problem that needs a patch, once ive compiled it i should have a 4.0.1 toolchain with glib 2.3.2 ready for compiling the 2.6.14 kernel tree. once that is done im posting it here so no one else has to go throgh the horrors i have to get it working

basically crosstool is not as easy to use as they make it out to be, everytime you run the script it deletes the files and starts again, meaning you have to redo any manually done patches, this is not normally a problem if everything goes right however if you are like me and everything goes wrong then this means you end up compiling the stuff that works 10 or more times and get stuck on the last thing to compile which forces you to start over agian

so i am thinking of compiling it by hand, more news in a couple of days, hopefully this works and my sanity dosent leave me
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
Iwmmxt Cross-compiler Setup
« Reply #14 on: November 12, 2005, 05:11:38 am »
ok finally after about 20 attempts and a total combind time of 12 hours (at least, including faliures) i have a cross compiling toolchain, --with-cpu=iwmmxt gave some problems

at the moment its gcc 4.0.1 with glib 2.3.2 this means you cant compile the 2.4 kernels far zaures's you will need a 2.95 gcc which is avalible

file size is 41MB bzip2'ed and 28MB bzip2'ed and strip --strip-unneeded to remove debugging and other uneeded symodols, this means if you get an error dont even try to debug the toolchain, all i ahve to do is find somewhere to put it then i will post the links for the 2 versions, download the one that fits you download limit most approriatly
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware