Friday, November 24, 2017

Raspbian Stretch and Cross Toolchain for Linux and Mac OS

Raspbian Stretch is out for Raspberry Pi. I needed a cross toolchain with the same exact version used to build the system so I built my own. As I had my script ready, I also tried to build one for Mac OS and it seems to work for the moment. I tested these cross toolchains for my projects and seemed to be able to build everything that I tried: Qt libs, apps, omxplayer, ffmpeg etc...

Download Linux x64 cross toolchain GCC 6.3.0 for Stretch here.
Download Mac OS cross toolchain GCC 6.3.0 for Stretch here.

NOTE: The Mac OS version requires some packages to be installed from macports.
NOTE: The toolchain is built to crossbuild for armv7-a. I could also build for armv8 but not sure if it also works for armv6.

Have fun! Bye! ;-)

11 comments:

  1. Good job!!!
    I hope next POT version with LGPL license....
    Your implementation based on omxplayer is better than oficial Qt gstreamer-omx LGPL plugin

    ReplyDelete
    Replies
    1. I think you can use it with closed source anyway if that is what you need. You can't distribute, but you can use it.

      Delete
  2. Hello Luca, great job.

    I have a simple question:
    Why are you building your own cross-compiler?
    a prebuilded linaro cros-compiler can be a good choice?
    https://releases.linaro.org/components/toolchain/binaries/6.3-2017.05/arm-linux-gnueabihf/

    ReplyDelete
    Replies
    1. And g++-arm-linux-gnueabihf debian cross compiler not is a good choice too?
      apt install g++-arm-linux-gnueabihf

      Delete
    2. It depends on how it was configured. 4.9.4 was ok for Jessie, don't know about this one.

      Delete
    3. I tested the one from Ubuntu once but I could not build Qt. It is probably built with a different setup. No idea about the specific one you refer to. I prefer to configure one properly myself and avoid weird errors during complex builds that are difficult to track down.

      Delete
  3. Do you possibly have a link that is easily used with f.i. wget ?

    ReplyDelete
  4. Hello Luca,
    can you post some information or linw about how to build our own crosscompiler for
    debian strech in Ubuntu 18.04?
    regards

    ReplyDelete
  5. I'm trying to use this for compiling for a R Pi Zero (ARMv6), but I get a segfault trying to run even the simplest hello-world prog... :(

    ReplyDelete
    Replies
    1. Sorry, never tried to build for armv6 with this toolchain.

      Delete