Author Topic: Zgcc For Oz  (Read 6568 times)

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Zgcc For Oz
« on: September 21, 2006, 09:45:17 am »
I build a cramfs image with a working gcc and g++ compiler so that you can just mount the image and start compiling stuff on the Zaurus.

I have found that simply installing gcc and related packages wont give you a working c compiler. I had to tweak several environment variables and create a few extra symbolic links to get it all working.

At the moment, I can compile helloworld, but I am working on adding more dev packages so that the image will be ready to use for building X applications similar to the gcc compiler image in pdaXrom. I  have build a shell script to automate building this gcc cramfs image. With this image I will be able to recompile some apps and compile new ones with iwmmxt optimisations.
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

koen

  • Hero Member
  • *****
  • Posts: 1008
    • View Profile
    • http://dominion.thruhere.net/koen/cms/
Zgcc For Oz
« Reply #1 on: September 21, 2006, 10:52:17 am »
Quote
I have found that simply installing gcc and related packages wont give you a working c compiler. I had to tweak several environment variables and create a few extra symbolic links to get it all working.

ipkg install gcc-symlinks binutils-symlinks g++-symlinks cpp-symlinks  ?

Quote
With this image I will be able to recompile some apps and compile new ones with iwmmxt optimisations.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=141965\"][{POST_SNAPBACK}][/a][/div]

No you won't, *fpa is incompatible with iwmmxt.
Forums are not bugtrackers!!! Smart questions
Ångström release team
iPAQ h2210, iPAQ h5550, iPAQ hx4700, Zaurus SL-C700, Nokia 770, all running some form of GPE
My blog

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Zgcc For Oz
« Reply #2 on: September 21, 2006, 11:15:54 am »
Quote
I have found that simply installing gcc and related packages wont give you a working c compiler. I had to tweak several environment variables and create a few extra symbolic links to get it all working.

Could you let us know which ones please?

Thanks,


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

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Zgcc For Oz
« Reply #3 on: September 21, 2006, 11:48:02 pm »
Quote
Quote
I have found that simply installing gcc and related packages wont give you a working c compiler. I had to tweak several environment variables and create a few extra symbolic links to get it all working.

Could you let us know which ones please?

Thanks,


Si
[div align=\"right\"][a href=\"index.php?act=findpost&pid=141976\"][{POST_SNAPBACK}][/a][/div]

ok, I didn't have cpp-symlinks so there's one less to be done, but from memory I had to symlink libgcc_s.so.1 from /lib to /usr/lib and I had to modify libc.so since ld complained about some parsing error. There was some additional stuff in libc.so that ld didn't like so I had to remove it. All the other symlinks I had to create were related to me moving all the files to /mnt/zgcc


koen: now I am confused about the *fpa being incompatible with iwmmxt. can you please clarify what you mean? I thought that Sharp/Cacko were using hard float which is fpa? and OpenZaurus uses soft float which is soft-vfp ? Also, the most significant iwmmxt optimised binary I know off is mplayer 1.1 by atty which was compiled for Sharp/Cacko but also works on pdaXrom.
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
Zgcc For Oz
« Reply #4 on: September 22, 2006, 02:26:16 am »
the exceptions for fpa instructions are the same used for iwmmxt, so unless you are using eabi for everything you will run into problems

thats the only way i can express it, but basically they are mutually exsclusive under the current abi

anyway, i second the gcc issue, just installing the ipkgs dosent produce a working toolchain even if following the avalible infomation to the letter
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/
Zgcc For Oz
« Reply #5 on: September 22, 2006, 05:31:42 am »
Quote
I thought that Sharp/Cacko were using hard float which is fpa? and OpenZaurus uses soft float which is soft-vfp ?

No, fpa and vfp are two types of soft-float implementation, OZ uses fpa, pdaX uses vfp. See here: https://www.oesf.org/forums/index.php?showt...ndpost&p=124036


Si
« Last Edit: September 22, 2006, 05:32:06 am by lardman »
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

koen

  • Hero Member
  • *****
  • Posts: 1008
    • View Profile
    • http://dominion.thruhere.net/koen/cms/
Zgcc For Oz
« Reply #6 on: September 22, 2006, 05:40:41 am »
Quote
anyway, i second the gcc issue, just installing the ipkgs dosent produce a working toolchain even if following the avalible infomation to the letter
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]

[a href=\"http://dominion.kabel.utwente.nl/koen/cms/building-ooo-natively]http://dominion.kabel.utwente.nl/koen/cms/...ng-ooo-natively[/url]
Forums are not bugtrackers!!! Smart questions
Ångström release team
iPAQ h2210, iPAQ h5550, iPAQ hx4700, Zaurus SL-C700, Nokia 770, all running some form of GPE
My blog

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
Zgcc For Oz
« Reply #7 on: September 22, 2006, 09:41:26 pm »
thanks for that, i will have a look at it latter. it seems to have more infomation than the other posts i have seen, if only i had seen it 2 months ago
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

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Zgcc For Oz
« Reply #8 on: September 26, 2006, 08:39:01 am »
I finally made a working zgcc image and as a test I compiled grisbi successfully
I will upload the cramfs image and the script I used to generate it when I get a chance...

files can be found here: http://zaurus.daemons.gr/menaie/openzaurus/
« Last Edit: September 26, 2006, 10:39:33 am by Meanie »
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

koen

  • Hero Member
  • *****
  • Posts: 1008
    • View Profile
    • http://dominion.thruhere.net/koen/cms/
Zgcc For Oz
« Reply #9 on: September 26, 2006, 11:33:05 am »
Your script would be a lot simpler and foolproof if

* it would use package names instead of filenames
* it would use 'ipkg -o <dir> install <package name>' to install packages

Anyway, this script will be obsolete once o-hand.com merges their devgen-branch into OE.
Forums are not bugtrackers!!! Smart questions
Ångström release team
iPAQ h2210, iPAQ h5550, iPAQ hx4700, Zaurus SL-C700, Nokia 770, all running some form of GPE
My blog

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Zgcc For Oz
« Reply #10 on: September 26, 2006, 11:40:57 am »
Quote
* it would use package names instead of filenames

I thought it did use package names...

Quote
* it would use 'ipkg -o <dir> install <package name>' to install packages

I agree with this though, I think I'd prefer to install the apps (though the ideal method imho would probably be to create an ipk which depends on the other packages, and which does the symlinking/other fixes as a postinst. This may already exist in the form of the sdk*.ipk's)

Nevertheless, it is providing a native tool for those who are used to working with the zgcc images, so thanks for making the effort.


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

koen

  • Hero Member
  • *****
  • Posts: 1008
    • View Profile
    • http://dominion.thruhere.net/koen/cms/
Zgcc For Oz
« Reply #11 on: September 26, 2006, 12:04:58 pm »
Quote
Quote
* it would use package names instead of filenames

I thought it did use package names...

[div align=\"right\"][a href=\"index.php?act=findpost&pid=142354\"][{POST_SNAPBACK}][/a][/div]

'cpp_3.4.4-r5_armv5te.ipk' is a filename
'cpp' is a packagename

As soon as hrw adds a package update this script will break.
Forums are not bugtrackers!!! Smart questions
Ångström release team
iPAQ h2210, iPAQ h5550, iPAQ hx4700, Zaurus SL-C700, Nokia 770, all running some form of GPE
My blog

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Zgcc For Oz
« Reply #12 on: September 27, 2006, 06:40:52 am »
Ah, I see what you mean Koen.

That should be reasonably easy for Meanie to fix though.


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

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Zgcc For Oz
« Reply #13 on: September 27, 2006, 08:55:05 am »
sigh

I rather make something that works first before worrying about extensibility and updatability. I was gonna enhance it later so it can be updated easily rather than over engineer it in the first go and never get something working together....

anyways, I just found that I can actually just run apps I compiled for pdaXrom on OZ/GPE
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

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Zgcc For Oz
« Reply #14 on: September 27, 2006, 09:34:29 am »
Quote
I rather make something that works first before worrying about extensibility and updatability. I was gonna enhance it later so it can be updated easily rather than over engineer it in the first go and never get something working together....

That's fair enough, koen was just pointing out how to make the script as low-maintenance as possible.

Quote
anyways, I just found that I can actually just run apps I compiled for pdaXrom on OZ/GPE

Interesting.... I thought that pdaX had an older version of libc or have they adopted the same version of libc with the 2.6.x kernel?

In that case, I do still wonder about the compatibility between the fpa and vfp floating point systems used by the two distros.


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