Author Topic: About To Set Up Oe... Maybe  (Read 13712 times)

koan

  • Sr. Member
  • ****
  • Posts: 370
    • View Profile
    • http://www.lyndonhill.com
About To Set Up Oe... Maybe
« on: April 21, 2009, 11:28:13 am »
Hi

I want to set up a Zaurus dev environment on my Intel Mac (10.5, Leopard).
I need to target the Sharp ROM and would prefer to be able to target any distribution.

OE seems like a good solution but the instructions on the OE website say that
few people (if any) have set it up for Mac. I am new to Mac and I am not a Linux wizard;
I can't afford to spend a long time fixing problems but I'm willing to give it a go if
the problems are small.

Is OE the way or should I be looking at another method ?

Thanks
Zocalo Feed Reader : Thai on Zaurus : Dictionaries for zbedic : Sharp ROM package feed
HELUX Handheld Embedded Linux Blog
SL-C3200 Multiboot : SL-C750  Sharp ROM

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
About To Set Up Oe... Maybe
« Reply #1 on: April 21, 2009, 02:49:04 pm »
I'm not sure of any other method to build a Zaurus OS. I never got PdaXrom's builder to work (both the old one and the new).

I'd say that if you're new to both Linux and Mac, attempting something that others haven't done yet is a poor idea. I'd also advise simply making a Linux partition/VM and using OE/BitBake from that. Note that you'll need a fair amount of space for the temp build files/packages/OE data/whatever. I ran out of space on a 10GB partition, but that was a while ago, and I believe they've reduced the space somewhat since then.

I think that OE has Sharp ROM-compatible settings, but I haven't tried them, so YMMV.

OE definitely can't target all distributions. Things might work on distros other than Angstrom, but it's not guaranteed.

Anyway, I hope that answers your questions.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

koan

  • Sr. Member
  • ****
  • Posts: 370
    • View Profile
    • http://www.lyndonhill.com
About To Set Up Oe... Maybe
« Reply #2 on: April 21, 2009, 07:19:48 pm »
Hi Fish,

I don't mean I want to build an OS, I just want a dev environment so I can create applications.
For example, I wrote Zocalo for the Sharp ROM as a QT/QTe application. I would like to continue
development and build a release for other distributions such as Angstrom, Debian, Zubuntu etc.

OE seems to have Sharp ROM settings but it is vague now whether these work. There is a thread
https://www.oesf.org/forum/index.php?showtopic=14566, but it does not seem to report success.

I'm not new to Linux but I am not a master hacker - it will take me time to suss out things that some
people will be able to do in seconds.

Thanks
Zocalo Feed Reader : Thai on Zaurus : Dictionaries for zbedic : Sharp ROM package feed
HELUX Handheld Embedded Linux Blog
SL-C3200 Multiboot : SL-C750  Sharp ROM

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
About To Set Up Oe... Maybe
« Reply #3 on: April 22, 2009, 07:19:10 pm »
Well, building with the OE/Angstrom toolchain should create binaries that can run on all of the distros, library incompatibilities aside.

I'm not aware of any Zaurus dev environments (OE is just a build system for OS images and packages). I'd suggest just working/testing on your primary box, then (cross-)compiling for the Zaurus when you need to.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

dhns

  • Hero Member
  • *****
  • Posts: 699
    • View Profile
    • http://www.goldelico.com
About To Set Up Oe... Maybe
« Reply #4 on: April 24, 2009, 01:58:29 am »
Quote from: koan
Hi

I want to set up a Zaurus dev environment on my Intel Mac (10.5, Leopard).
I need to target the Sharp ROM and would prefer to be able to target any distribution.

OE seems like a good solution but the instructions on the OE website say that
few people (if any) have set it up for Mac. I am new to Mac and I am not a Linux wizard;
I can't afford to spend a long time fixing problems but I'm willing to give it a go if
the problems are small.

Is OE the way or should I be looking at another method ?

Thanks
I don't know if OE has now been fixed but approx. 2 years ago there was no chance to run it natively on Mac OS since it has tons of assumptions about system tools and command line options that only exist on Linux.

So the easiest way is to install some virtualization (Virtual Box) and install e.g. Debain in that box. Works quite smooth.

Another option is to use the SharpROM compatible toolchain from here:

http://www.quantum-step.com/wiki.php?page=Compiler

Nikolaus
SL5500G, C860, C3100, WLAN, RTM8000, Powerbook G4, and others...
http://www.handheld-linux.com
http://www.quantum-step.com

koan

  • Sr. Member
  • ****
  • Posts: 370
    • View Profile
    • http://www.lyndonhill.com
About To Set Up Oe... Maybe
« Reply #5 on: April 27, 2009, 08:13:55 am »
Hi Nikolaus,

I've got some problems with the Quantum Step compiler:
I've pieced together a suitable dev-arm-qpe.sh, tmake.conf and found some missing files I need
for Zaurus (sharp_char.h for example).

Unfortunately all of the QT tools and Qtopia have been built for Linux - qvfb, qpe, moc etc
so I can't finish a compile. Shouldn't they have been compiled as Mac native or am I missing
something here ?
Zocalo Feed Reader : Thai on Zaurus : Dictionaries for zbedic : Sharp ROM package feed
HELUX Handheld Embedded Linux Blog
SL-C3200 Multiboot : SL-C750  Sharp ROM

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
About To Set Up Oe... Maybe
« Reply #6 on: April 28, 2009, 01:48:01 pm »
Unless you're trying to build them for the Mac, they SHOULD be ARM libraries/binaries, since that's the architecture that's going to link to them.

I might be way off, though, as I haven't looked at the link or anything.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

koan

  • Sr. Member
  • ****
  • Posts: 370
    • View Profile
    • http://www.lyndonhill.com
About To Set Up Oe... Maybe
« Reply #7 on: April 28, 2009, 07:59:38 pm »
Quote from: Capn_Fish
Unless you're trying to build them for the Mac, they SHOULD be ARM libraries/binaries, since that's the architecture that's going to link to them.

I might be way off, though, as I haven't looked at the link or anything.

If you want to build QT/Qtopia apps, you need the moc (meta object compiler) to be a Mac binary.

If you want to emulate, you need qvfb and qpe to be Mac binaries. It's also nice to have all the other Qtopia apps as Mac binaries so you can see a full Qtopia environment. Qtopia is supplied with QuantumStep tools but the files are compiled
for Linux, which seems to be a mistake to me:

Code: [Select]
$ file Qtopia/bin/qpe
bin/qpe: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.0.0, dynamically linked (uses shared libs), for GNU/Linux 2.0.0, not stripped

You don't need ARM binaries - they are already on the Zaurus and can be produced by the cross compiler.
« Last Edit: April 28, 2009, 08:04:51 pm by koan »
Zocalo Feed Reader : Thai on Zaurus : Dictionaries for zbedic : Sharp ROM package feed
HELUX Handheld Embedded Linux Blog
SL-C3200 Multiboot : SL-C750  Sharp ROM

dhns

  • Hero Member
  • *****
  • Posts: 699
    • View Profile
    • http://www.goldelico.com
About To Set Up Oe... Maybe
« Reply #8 on: April 29, 2009, 11:38:23 am »
Quote from: koan
Quote from: Capn_Fish
Unless you're trying to build them for the Mac, they SHOULD be ARM libraries/binaries, since that's the architecture that's going to link to them.

I might be way off, though, as I haven't looked at the link or anything.

If you want to build QT/Qtopia apps, you need the moc (meta object compiler) to be a Mac binary.

If you want to emulate, you need qvfb and qpe to be Mac binaries. It's also nice to have all the other Qtopia apps as Mac binaries so you can see a full Qtopia environment. Qtopia is supplied with QuantumStep tools but the files are compiled
for Linux, which seems to be a mistake to me:

Code: [Select]
$ file Qtopia/bin/qpe
bin/qpe: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.0.0, dynamically linked (uses shared libs), for GNU/Linux 2.0.0, not stripped

You don't need ARM binaries - they are already on the Zaurus and can be produced by the cross compiler.
Well, yes and no.

You certainly need some tools to run on the Mac to develop Qt applications. These are gcc and the tools you mention.

And, some libraries/tools need to be available in ARM-ELF version on the Mac so that gcc can properly link against them. To do that, it reads the symbol table of the ELF objects.

Maybe, you also need to install the native Qt development tools and then take whichever part you need.

One more hint for cross-compiling Linux packages: sometimes, they build their own host-tools. In that case make sure that the makefiles can distinguish between (darwin-)gcc and arm-linux-gcc. This can usually be done by setting $PATH and/or some flags to ./configure or the makefile

Maybe, this page also helps (I am not at all a Qt expert):
http://www.lucid-cake.net/osx_qpe/index_en.html
http://www.lucid-cake.net/osx_qpe_tutorial/index_en.html

-- hns
SL5500G, C860, C3100, WLAN, RTM8000, Powerbook G4, and others...
http://www.handheld-linux.com
http://www.quantum-step.com

koan

  • Sr. Member
  • ****
  • Posts: 370
    • View Profile
    • http://www.lyndonhill.com
About To Set Up Oe... Maybe
« Reply #9 on: April 29, 2009, 10:43:56 pm »
Hi Nikolaus,

I am assuming that you are the person who has kindly provided the Quantum Step tool chain. Please let me know if I am wrong. I want to use QS to develop Zaurus apps but there are a few things missing.

As you suggest, I think I have to compile my own QT/embedded and Qtopia for emulation.

Quote from: dhns
Quote from: koan
You don't need ARM binaries - they are already on the Zaurus and can be produced by the cross compiler.
Well, yes and no.

You certainly need some tools to run on the Mac to develop Qt applications. These are gcc and the tools you mention.

And, some libraries/tools need to be available in ARM-ELF version on the Mac so that gcc can properly link against them. To do that, it reads the symbol table of the ELF objects.

Maybe, you also need to install the native Qt development tools and then take whichever part you need.

To develop apps I need:
  • Cross compiler toolchain (Mac)
  • OS libraries (ARM)
  • QT embedded libraries (ARM)
  • Qtopia libraries (ARM)
  • Sharp support library: libsl (ARM)
  • QT build tools, such as moc and maybe others (Mac)
  • Include files for above (system, QT, Qtopia, Sharp)
  • tmake (Perl script with configuration for Zaurus)
  • dev-arm-qpe.sh (Shell script to set paths)
QS only has the toolchain, OS libraries and system include files. I have found a suitable tmake configuration, written a dev-arm-qpe.sh script and found some of the Sharp specific includes.

Qtopia is supplied by QS, but as you can see from my post above, it is compiled for Linux i386. I can't use this to emulate on Mac and I can't use it for linking when cross compiling because it is not ARM. To be honest, I'm a bit confused about why it is included in the archive because I can't see how I can use it.

I think you should either offer the toolchain plus system includes only, or package everything in the list above plus QT embedded (Mac) and Qtopia (Mac) for emulation. If you package everything then that would be a very nice set up.

A final point: the layout of QS is confusing! Especially arm-quantumstep-linux-gnu/arm-quantumstep-linux-gnu
Zocalo Feed Reader : Thai on Zaurus : Dictionaries for zbedic : Sharp ROM package feed
HELUX Handheld Embedded Linux Blog
SL-C3200 Multiboot : SL-C750  Sharp ROM

dhns

  • Hero Member
  • *****
  • Posts: 699
    • View Profile
    • http://www.goldelico.com
About To Set Up Oe... Maybe
« Reply #10 on: May 01, 2009, 06:42:39 am »
Quote from: koan
Hi Nikolaus,

I am assuming that you are the person who has kindly provided the Quantum Step tool chain. Please let me know if I am wrong. I want to use QS to develop Zaurus apps but there are a few things missing.
Yes... Approx. 3 or 4 years ago since gcc 2.95.3 is really old technology.
Quote
As you suggest, I think I have to compile my own QT/embedded and Qtopia for emulation.

To develop apps I need:
  • Cross compiler toolchain (Mac)
  • OS libraries (ARM)
  • QT embedded libraries (ARM)
  • Qtopia libraries (ARM)
  • Sharp support library: libsl (ARM)
  • QT build tools, such as moc and maybe others (Mac)
  • Include files for above (system, QT, Qtopia, Sharp)
  • tmake (Perl script with configuration for Zaurus)
  • dev-arm-qpe.sh (Shell script to set paths)
QS only has the toolchain, OS libraries and system include files. I have found a suitable tmake configuration, written a dev-arm-qpe.sh script and found some of the Sharp specific includes.

Qtopia is supplied by QS, but as you can see from my post above, it is compiled for Linux i386. I can't use this to emulate on Mac and I can't use it for linking when cross compiling because it is not ARM. To be honest, I'm a bit confused about why it is included in the archive because I can't see how I can use it.
I have just incuded that as recommended by lucid-cake.net but never used it...

So I can't help you there with any experience.

Quote
I think you should either offer the toolchain plus system includes only, or package everything in the list above plus QT embedded (Mac) and Qtopia (Mac) for emulation. If you package everything then that would be a very nice set up.

A final point: the layout of QS is confusing! Especially arm-quantumstep-linux-gnu/arm-quantumstep-linux-gnu
That is quite normal for gcc to have such strange looking subdirectory structures. The main reason is to provide to install several toolchains in parallel. If you write a script that defines a "TOOCHAIN=..." shell variable it becomes quite easy to use $TOOLCHAIN/bin.

Nikolaus
SL5500G, C860, C3100, WLAN, RTM8000, Powerbook G4, and others...
http://www.handheld-linux.com
http://www.quantum-step.com

koan

  • Sr. Member
  • ****
  • Posts: 370
    • View Profile
    • http://www.lyndonhill.com
About To Set Up Oe... Maybe
« Reply #11 on: May 03, 2009, 11:55:53 am »
Quote from: dhns
I have just incuded that as recommended by lucid-cake.net but never used it...

He wasn't recommending to include Linux binaries. He built QT using gcc 2.95 as a native Mac binary.

I can see now that what I need is gcc 2.95. I tried applying the
patches by Andre
to make it as a normal compiler, but I still can't build it,
the tm.h is looking for openstep.h but his patch introduces xm-openstep.h. It's not trivial to rename it as
that causes other problems.

I'd really have to dig into how to set up gcc for Mac properly to do this but afterwards it should be quite easy
to build a QT emulation environment. Unfortunately I am a complete beginner at Mac/BSD.
Zocalo Feed Reader : Thai on Zaurus : Dictionaries for zbedic : Sharp ROM package feed
HELUX Handheld Embedded Linux Blog
SL-C3200 Multiboot : SL-C750  Sharp ROM

dhns

  • Hero Member
  • *****
  • Posts: 699
    • View Profile
    • http://www.goldelico.com
About To Set Up Oe... Maybe
« Reply #12 on: May 03, 2009, 04:32:07 pm »
Quote from: koan
Quote from: dhns
I have just incuded that as recommended by lucid-cake.net but never used it...

He wasn't recommending to include Linux binaries. He built QT using gcc 2.95 as a native Mac binary.

I can see now that what I need is gcc 2.95. I tried applying the
patches by Andre
to make it as a normal compiler, but I still can't build it,
the tm.h is looking for openstep.h but his patch introduces xm-openstep.h. It's not trivial to rename it as
that causes other problems.

I'd really have to dig into how to set up gcc for Mac properly to do this but afterwards it should be quite easy
to build a QT emulation environment. Unfortunately I am a complete beginner at Mac/BSD.
Strange. I can't follow you any more what you are trying to do.

The QuantumSTEP compilers are gcc 2.95.3 and they work well for (non-Qt) projects. And are built following the instructions from lucid-cake. And since everything is built on a Mac, I don't know where you get Linux binaries from? The only part are some i386-RPMs which are required to bootstrap glibc and linuxheaders.

Maybe, can you better describe which Linux binaries you did find within the QuantumSTEP compiler package.

Nikolaus
« Last Edit: May 03, 2009, 04:33:02 pm by dhns »
SL5500G, C860, C3100, WLAN, RTM8000, Powerbook G4, and others...
http://www.handheld-linux.com
http://www.quantum-step.com

koan

  • Sr. Member
  • ****
  • Posts: 370
    • View Profile
    • http://www.lyndonhill.com
About To Set Up Oe... Maybe
« Reply #13 on: May 03, 2009, 07:54:40 pm »
I want to cross compile QT embedded applications for Zaurus (Sharp ROM) on my Mac.
As it stands, I can't build and link as there are some QT tools missing that I need as Mac binaries: moc and uic.
It is also very useful if there is an emulation environment, for that I need Mac binaries of QT embedded, Qtopia
and gcc 2.95.

QS supplies a cross compiler for Mac but no moc, uic, QT/e, Qtopia or gcc 2.95.
QS includes Qtopia compiled for Linux/i386 in /Developer/Xtoolchain/i386-apple-darwin/gcc-2.95.3-glibc-2.2.2/arm-quantumstep-linux-gnu/arm-quantumstep-linux-gnu/opt/Qtopia : apart from one of two scripts, most of this is useless for Mac developers.

I am interested in making my own tools for the above, QT etc are all so old that they will only compile with gcc 2.95. If I have gcc then it will be much easier to build these tools.

I need a Mac native binary of gcc 2.95.
Zocalo Feed Reader : Thai on Zaurus : Dictionaries for zbedic : Sharp ROM package feed
HELUX Handheld Embedded Linux Blog
SL-C3200 Multiboot : SL-C750  Sharp ROM

dhns

  • Hero Member
  • *****
  • Posts: 699
    • View Profile
    • http://www.goldelico.com
About To Set Up Oe... Maybe
« Reply #14 on: May 04, 2009, 08:16:37 am »
Quote from: koan
QS supplies a cross compiler for Mac but no moc, uic, QT/e, Qtopia or gcc 2.95.
I need a Mac native binary of gcc 2.95.
Now I begin to understand your problem.

QS provides a cross-gcc 2.95.3 but you are looking for a non-cross-gcc? That runs on Darwin creates Darwin code? Apple did drop support in MacOS X 10.2 or so and moved to gcc-3.3 and 4.x. Usually, a newer gcc can be made compatible to gcc-2.95 (unless there are workarounds for bugs).

Creating that is quite complex and I don't know if it has ever been done since ar/as/ld needs a backend to write Mach-O binaries instead of ELF.

lucid-cake writes how to install the full development environment. But to do that you should start to download the sources from some ftp.trolltech - but that server appears to have disappeared and I have no idea where these files are.

BTW: if you want to build your own cross-toolchain, follow the instructions on lucid-cake. There is one tweak that is not described - how to patch that it is built on i386-apple-darwin (everything is described for powerpc-apple-darwin).

Here is an excerpt from one of my scripts:
Code: [Select]
                echo '#include "i386/xm-i386.h"' >gcc/config/i386/xm-openstep.h
                echo '#undef USG' >>gcc/config/i386/xm-openstep.h

Sorry that I got confused... all around gcc 2.95 is quite outdated.

-- hns
« Last Edit: May 04, 2009, 08:18:27 am by dhns »
SL5500G, C860, C3100, WLAN, RTM8000, Powerbook G4, and others...
http://www.handheld-linux.com
http://www.quantum-step.com