Coder Social home page Coder Social logo

koudis / toolchain-container Goto Github PK

View Code? Open in Web Editor NEW

This project forked from moto-timo/toolchain-container

0.0 0.0 0.0 15 KB

Docker toolchain container which sets up cross compilation environment for either SDK or build tree toolchain

Shell 7.71% Python 79.86% Dockerfile 12.43%

toolchain-container's Introduction

Toolchain Container

This repo provides a toolchain container which sets up cross compilation environment for either SDK or build tree toolchain by automatically loading the environment-setup-* script.

Running with SDK Toolchain

  • Install SDK Toolchain

    By default this container assumes SDK is located in /sdk. The SDK needs to be installed separately using the --url option.

    • Linux

      docker run --rm -it -v /home/user/sdk:/sdk <repo>/toolchain --url http://someserver/sdk_installer.sh
      
    • Windows/Mac

      docker run --rm -it -v sdkvolume:/sdk <repo>/toolchain --url http://someserver/sdk_installer.sh
      

    You should now see:

    Attempting to download http://someserver/sdk_installer.sh
    ######################################################################## 100.0%
    Poky (Yocto Project Reference Distro) SDK installer version 2.5+snapshot
    ========================================================================
    You are about to install the SDK to "/sdk". Proceed[Y/n]? Y
    Extracting SDK........................................................................................................done
    Setting it up...done
    SDK has been successfully set up and is ready to be used.
    Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
     $ . /sdk/environment-setup-i586-poky-linux
    sdkuser@ubuntu:~$
    
  • Build with SDK Toolchain

    The following instructions assume /workdir is mounted with the location of source tree which needs to be compiled using SDK toolchain.

    • Linux

      docker run --rm -it -v /home/user/sdk:/sdk -v /home/user/workdir:/workdir <repo>/toolchain
      
    • Windows/Mac

      docker run --rm -it -v sdkvolume:/sdk -v myvolume:/workdir <repo>/toolchain
      

Running with Build Tree Toolchain

  • Prepare Build Tree Toolchain

    Follow instructions on https://github.com/crops/poky-container to setup a crops/poky container, then follow the Yocto Project Quick Build manual (https://www.yoctoproject.org/docs/latest/brief-yoctoprojectqs/brief-yoctoprojectqs.html) to clone the poky repo and run bitbake meta-ide-support to prepare the build tree toolchain.

  • Build with Build Tree Toolchain

    The following assumes /workdir/poky/build/tmp (TMPDIR prepared by crops/poky container) has been populated with build tree toolchain. Set the --toolchain option to the build tree toolchain location containing environment-setup-* script.

    • Linux

      docker run --rm -it -v /home/user/workdir:/workdir <repo>/toolchain --toolchain /workdir/poky/build/tmp
      
    • Windows/Mac

      docker run --rm -it -v myvolume:/workdir <repo>/toolchain --toolchain /workdir/poky/build/tmp
      

Examples

  • CMake

    To build a CMake project mounted on /workdir using SDK toolchain:

    • Linux

      docker run --rm -it -v /home/user/sdk:/sdk -v /home/user/workdir:/workdir <repo>/toolchain --cmd "cmake . && make"
      
    • Windows/Mac

      docker run --rm -it -v sdkvolume:/sdk <repo>/toolchain -v myvolume:/workdir <repo>/toolchain --cmd "cmake . && make"
      
  • Autotools

    To build an autotools project mounted on /workdir using SDK toolchain:

    • Linux

      docker run --rm -it -v /home/user/sdk:/sdk -v /home/user/workdir:/workdir <repo>/toolchain --cmd "./configure \$CONFIGURE_FLAGS && make"
      
    • Windows/Mac

      docker run --rm -it -v sdkvolume:/sdk <repo>/toolchain -v myvolume:/workdir <repo>/toolchain --cmd "./configure \$CONFIGURE_FLAGS && make"
      

toolchain-container's People

Contributors

cheeyanglee avatar chinhuatang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.