gcc 5 cross-compiler for diablo
Further to my previous thread about GCC 4.9, I've now built a GCC 5 toolchain which runs on Debian Jessie x86_64 and builds binaries for Maemo Diablo. The goal is still the same as my GCC 4.9 toolchain - allow a modern C++ toolchain to be used to build binaries which run on the stock Diablo OS.
With this update, I'm providing the rootstrap in a separate package to the compiler. There's also an additional package to make it easy to install additional development packages into the rootstrap. Here's a quick walkthrough describing how to get started with this toolchain. First we'll install the compiler and make a trivial "Hello world" console program. Then we'll install gtkmm development libraries, and build a minimal gtkmm program. Familiarity with GCC, C++, make and apt-get is assumed. 1. Add the repository and install GCC. Add a new apt source with the following repository: Code:
$ cat /etc/apt/sources.list.d/diablo-hacking.list Code:
$ sudo apt-get install diablo-gcc-5 The compiler installs under /opt/diablo/gcc-5/bin, and the binary names are all prefixed with arm-none-linux-gnueabi-. Let's compile a trivial program just to check that we can make working binaries. Code:
$ cat hello.cpp Code:
Nokia-N800-23-14:~# ./hello The diablo-root package (which was installed as a pre-requisite when we installed diablo-gcc-5) contains a development sysroot, installed at /opt/diablo/root. Initially this only contains the very basics - the standard C and C++ libraries. To compile a graphical application, we're going to need more development libraries. I've made a diablo-package-tools package which helps here. This package contains versions of apt-get and dpkg which can be used to install Diablo packages into our sysroot. Code:
$ sudo apt-get install diablo-package-tools Let's install the gtkmm development packages into our sysroot: Code:
$ sudo /opt/diablo/bin/apt-get update For the purpose of the next example, you need pkg-config and make installed on your host system. Use apt-get to install those if you don't already have them. This is about the simplest gtkmm program which does something: Code:
$ cat simple.cpp Code:
$ cat Makefile A future improvement to this toolchain would be to integrate it with tools for creating deb packages which can be installed on the N800. For now, I'm happy with being able to compile C++11 binaries and not having to mess around with scratchbox. I'd be interested to know if this toolchain is useful to anyone else. |
Re: gcc 5 cross-compiler for diablo
Useful?
Simply put.. This is fabulous... I can't wait to mess with it. |
Re: gcc 5 cross-compiler for diablo
Yay! something new to play with :D Thankyou toojays!
|
Re: gcc 5 cross-compiler for diablo
Toojays..
I think what you are doing is brilliant. Anything that doesn't deal with scratch is grand in my books. My only prob. is ...I'm a carver/ painter/ graphic artist ...so my brain is more geared to a graphical interface than text.. Whatever you can come up with to integrate as many goodies for jessie ...the better. Really truly... (As an aside; If only there was someone doing development on the 770 ...it would make things easier for me..) At present I have your fabulous work here installed and running on (one of my) LMDE2Betsy x64 Mate distros I'm using .. I was going to have simply 1 distro with everything for the 770, 8x0, and 900 ..but it is just too much for a live distributable iso. So I've got 3 separate Betsy's running with devel. enviros in varying states (so far) And I am looking into other methods as well of running without scratch... I'd prefer to have scratchless development if possible for us all... consequently I have done some digging..because I remembered seeing something very specific..after hunting..found this: http://rbelem.info/2010/01/14/maemo-...ut-scratchbox/ haven't tried it yet for fremantle..it has been 5 years since this post....hopefully it ends up being snarl-free. If it is feasible to adapt instructions to diablo and bora (for 770 hacker edition 2007) then this would be a huge headache gone. Anyway ..tell me what you think..regarding all the muddle I've mentioned above. If you aren't interested in doing anymore (now or in the future) such work as you've done here ..cause you have had enough..just let me know and I'll make sure not to hold back any live distributable iso's waiting for more goodies from you to pack it with... |
Re: gcc 5 cross-compiler for diablo
Quote:
I tried something similar about a year ago. schroot makes some of this easier. I couldn't get the graphical environment to come up because of dbus problems. However, the blog post you reference bind-mounts /var/lib/dbus into the schroot. I'm pretty sure I didn't do that. So that may make the difference. However, even if this works, don't we run into the problem where modern Xephyr doesn't work for us? I forget the detail, but last time I tried to run a maemo app on my x86 box I needed to run Xephyr in an ancient Ubuntu VM. Do you have a solution for that problem? |
Re: gcc 5 cross-compiler for diablo
yeah ..I have noticed that current xephyr is an issue...
...I've been trying to "think round corners" (so-to-speak) lately ... on a few things...that being one... from my pov... whatever we can do to get past that "ancient" (ubuntu vm) wall as you so aptly put it... to bring maemo development into the present ..(if at all possible)..in whatever ways we can. I don't think any ideas or methods should be off the table. since anything that works, partially works, or doesn't.. may work.. if approached in a different way..applied in a different fashion your new jessie toolchain is a fabulous improvement . New approaches, new ideas are welcome Worst case we just end up with some live distributable rolling-release iso's .. containing vmbox'd ... antiquated 'buntu os... containing scratch... containing sdk's... containing everything we need... which is truly a great amount of bloody luggage to carry around... like a freakin' Ukrainian doll-within-a-doll-within-a-doll...etc. It's getting ridiculous. (qtsdk 1.1.1 is a superb, elegant and sublime piece of work in compare...but that was done by team(s), a company, money, and a decade of work leading up to it...behind them) So yeah...the more I look at the picture I'm dealing with...(and actually we all are dealing with) ...particularly concerning making thing easier, simpler, more current and updatable...the more I'm looking at obtuse and oblique methods of approach to reach that goal. In short you could say.. I'm " wingin' " it in a squirrel-suit .. that the disgruntled -ex I dumped years ago... sewed for me last night ... off too-short a building .. I'm not sure how anything is going to turn out. or if it's going to turn into anything I was aiming at in the first place. One thing that is a certainty... I will land on the ground... well "land" may be a generous word. |
Re: gcc 5 cross-compiler for diablo
Quote:
|
Re: gcc 5 cross-compiler for diablo
Why do you need to use an ancient version of Ubuntu? I'm sure the last time I used scratchbox it was with Debian LXDE, which isn't so ancient. The only problem I had was that it had to run on a 32bit setup.
|
Re: gcc 5 cross-compiler for diablo
lxde works...yup.
I'm working on LMDE2Betsy getting the kinks out and packing it up and turning it into a click and go live distributable rolling release with everything preinstalled...that way it can simply be updated instead of ditched in a few years due to cyclical releases... |
All times are GMT. The time now is 05:57. |
vBulletin® Version 3.8.8