Giter Club home page Giter Club logo

imx-docker's Introduction

This setup helps to build i.MX BSP in an isolated environment with docker.

Prerequisites

Install Docker

There are various methods of installing docker, i.e. by docker script:

$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh

Run docker without sudo

To work better with docker, without sudo, add your user to docker group.

$ sudo usermod -aG docker <your_user>

Log out and log back in so that your group membership is re-evaluated.

Set docker to work with proxy

Create a docker config file at ~/.docker/config.json and enter the following:

{
"proxies":
    {
     "default":
         {
          "httpProxy":"http://proxy.example.com:80"
         }
    }
}

Note: replace the 'example' proxy with your proxy info.

Create docker service

$ sudo mkdir -p /etc/systemd/system/docker.service.d
$ sudo vim /etc/systemd/system/docker.service.d/http-proxy.conf

add the following:

[Service]
Environment="HTTP_PROXY=http://proxy.example.com:80/"
Environment="NO_PROXY=localhost,someservices.somecompany.com"

Restart Docker

  $ sudo systemctl daemon-reload
  $ sudo systemctl restart docker

Build i.MX with docker

.
├── Dockerfile-Ubuntu-18.04
├── Dockerfile-Ubuntu-20.04
├── README.md
├── docker-build.sh
├── docker-run.sh
├── env.sh -> imx-6.1.1-1.0.0/env.sh
└── imx-6.1.1-1.0.0
    ├── env.sh
    └── yocto-build.sh

Set variables

Use env.sh to set variables for your build setup. Make sure you have created a working directory, owned by current user, on a larger partition.

Create a yocto-ready docker image

Run docker-build.sh with one argument, related to Dockerfile, corresponding to the operating system, for example the Dockerfile for Ubuntu version 20.04:

  $ ./docker-build.sh Dockerfile-Ubuntu-20.04

Build the yocto imx-image in a docker container

  $ ./docker-run.sh ${IMX_RELEASE}/yocto-build.sh

  i.e IMX_RELEASE=imx-6.1.1-1.0.0

or just go to the docker container prompt (and run the build script from there):

  $ ./docker-run.sh

When running, volumes are used to save the build artifacts on host.

  • {DOCKER_WORKDIR} as the main workspace
  • {DOCKER_WORKDIR}/${IMX_RELEASE} to make available the yocto build scripts into container
  • {HOME} to mount the current home user, to make available the user settings inside the container (ssh keys, git config, etc)

imx-docker's People

Contributors

laurenpost avatar neenareddi avatar panfir 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.