How to add a custom toolchain in toolchain.py script for a specific machine

2 messages Options
Embed this post
Permalink
Arsalan

How to add a custom toolchain in toolchain.py script for a specific machine

Reply Threaded More More options
Print post
Permalink
Hi, I am trying to build and simulate OKL4 for any mips platform that it supports, but I am unable to find a way to tell the build.py script which toolchain to use.

Thanks
Gabi Voiculescu

Re: How to add a custom toolchain in toolchain.py script for a specific machine

Reply Threaded More More options
Print post
Permalink
Hello Arsalan.

I think mips was supported back in the old days of okl4-1.5.2 (are more before when the okl4 project was a student project called iguana/kenge at the ERTOS / Nicta Australia).

You were evasive about your actual problem so I can't help you a lot.
Your problem might come from the fact you do not have all/any of the support built in okl4-3.0. The public stuff doesn't.
If you do, which is more interesting, then it's simple a tools/toolchains.py edit job followed by a correct pistachio.TOOLCHAIN =... TOOLCHAIN=...  parameter set in the command line.

Your biggest problems with MIPS builds should be:
  • to find a suitable (set of) toolchain(s) for mips.
  • to import the mips support at the architecture and platform level in okl4 3-0 (unless you have the older public releases as a starting point for your project)

I can help you with part of that, in finding part of the necessary pieces, but they might not compile together from first try.

If you want okl4 3 on mips, you'll need to digg.
If you do not, then you could simply start at the (now unsupported, but still public okl4-1.5.2 which already has all you need to create mips binary on u4600 emulated platform).

My experience is with Arm cpus (so not mips) but I can say the following:
  • about the mips support at the architectural and platform level ...
    • It is not there in okl4-3.0 (the last the public release). They renounced at providing okl4 support for mips gradually.
    • But it used to be in older public releases of okl4 (in okl4-2.1.0, okl4-1.5.2)
    • Get okl4-2.1; that version still had the mips support in it - presence of arch/mips folder is a dead indication of MIPS support: http://wiki.ok-labs.com/PreviousReleases. You need to know that there have been some changes in the okl4 API from 2.1 to 3.0 and you'll need to fill the blanks yourself otherwise apps won't build on top of the kernel. 
    • Looks like there is no platform support in 2.1 (no platform/<mips-board> as far as I can see).
    • I do see a platform/u4600/ with mips64 support in the okl-1.5.2. tarbal.
  • - you will need two toolchains:
    • one to build the kernel (currently a gcc-3.4 based toolchain works, as long as you force it to use the toolchain's gcc instead of the okl4 libs/gcc). For arm targets, this toolchain has been the same since the nicta days. If you don't have one you could go here and check out if this one still works:
      http://www.ertos.nicta.com.au/software/prebuilt/binaries.pml
    • another toolchain to build apps on top of okl4 (gcc-4.2.4 based is provided on the okl4 website wiki). This is a new requirement/feature in okl4 3.0. Not sure what you can do here, to get mips toolchain binaries, but when you do please tell us too on the mailing list.
  • There was mips support in okl4 3 once. You can still find rudiments of it's existance in the scripts.
    • If you know python you can check out the tools/toolchains.py that you can find in the okl4 3.0 tarball (not sure if it's in the tarballs for the sdks as well). I see a variable gnu_mips32_toolchain that was probably used in the past to specify prefix for the toolchain to use to build okl4 binaries.
  • Again, for okl4-3, arm platform, the rule is to manually specify what toolchain to use
    •  for the kernel (via pistachio.TOOLCHAIN=<one of those variables from the tools/toolchains.py that identifies the toolchain prefix>)
    • for everything else via TOOLCHAIN=<another one of these python variables>
  • once you piece in the
    • arch/mips/ 
    • platform/mips-platform-of-your-choice-or-u4600-from-okl4-1-5-2,
    • Sconscript support (build script support for mips) - which should be easier to port on okl4 3 from okl4-152 where there is mips support in the right places (except places with "cell" which are okl4 3.0 specific)

If you have any more questions or if you want to keep us informed of your progress, please email the mailing list some more. You are not the first guy to ask about mips in okl4.

Good luck,
Gabi Voiculescu


--- On Sat, 10/10/09, Arsalan <[hidden email]> wrote:

From: Arsalan <[hidden email]>
Subject: [okl4-developer] How to add a custom toolchain in toolchain.py script for a specific machine
To: [hidden email]
Date: Saturday, October 10, 2009, 10:02 AM


Hi, I am trying to build and simulate OKL4 for any mips platform that it
supports, but I am unable to find a way to tell the build.py script which
toolchain to use.

Thanks
--
View this message in context: http://n2.nabble.com/How-to-add-a-custom-toolchain-in-toolchain-py-script-for-a-specific-machine-tp3798831p3798831.html
Sent from the OKL4 Community Forum mailing list archive at Nabble.com.

_______________________________________________
Developer mailing list
Developer@...
https://lists.okl4.org/mailman/listinfo/developer


_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer