GithubHelp home page GithubHelp logo

coldnew / docker-yocto Goto Github PK

View Code? Open in Web Editor NEW
37.0 5.0 30.0 30 KB

My docker environment to build the yocto project

Makefile 1.25% Shell 76.94% Dockerfile 21.81%
yocto docker build-environment petalinux

docker-yocto's Introduction

docker-yocto

About

This repo contains docker image I use for building the yocto images.

I use the script yocto-build.sh to switch yocto building environment so I can use docker to build the Yocto project instad of install a ubuntu as VM.

Setting up

First download the yocto-build.sh as ~/bin/yocto-build

mkdir -p ~/bin
curl https://raw.githubusercontent.com/coldnew/docker-yocto/master/yocto-build.sh > ~/bin/yocto-build
chmod +x ~/bin/yocto-build

Add following line to the ~/.bashrc file to ensure that the ~/bin folder is in you PATH variable.

export PATH=~/bin:$PATH

Basic Usage

First time to use the yocto-build command, you need to tell it where is the workdir we build the yocto image.

For example, if I want to build yocto at /home/coldnew/poky then:

yocto-build --workdir /home/coldnew/poky

After this command, we'll create a container named yocto-build, which is the environment we used to build the yocto image. Now you'll find your current shell is switch to the container and the /home/coldnew/poky is mounted to /yocto.

Spawn a new shell

If you want to spawn a new shell in another terminal, you can use

yocto-build --shell

This will spawn a new shell if you already specify a workdir.

Remove the container

This script only support ONLY ONE CONTAINER, so If you want to change the workdir, you should remove it first, remove a container is easy, just use following command:

yocto-build --rm

Then you can setup a new workdir you want.

Upgrade script

Upgrade this script is easy, just type

yocto-build --upgrade

Pull new docker container

To pull new docker image, just type

yocto-build --pull

docker-yocto's People

Contributors

coldnew avatar huypq6 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docker-yocto's Issues

Running script no output logs from yocto-build.sh

sshpass -p "??" ssh -t -o StrictHostKeyChecking=no ???@??? << EOF
echo " before docker"
pwd
cd DEBUG_BSP_7.2
echo " yocto-build"
bash yocto-build.sh -w
log=all.log
echo " inside docker"
pwd
echo " update" | tee -a $log
#make update
echo " security" | tee -a $log
#make security
echo " package" | tee -a $log
#make package
echo " bye" | tee -a $log
exit
echo " exit1" | tee -a $log
exit
echo " exit2" | tee -a $log
EOF

Error creating user on entrypoint.sh

The execution of entrypoint.sh fails on my system, so no user is created. And yocto can't compile as root user.

Found and solved the problem replacing line #39 of the script with the following line:
groupadd ${USER} --gid ${USER_GID} > /dev/null 2>&1

Details on my system:
Debian 10 - UserID and GroupID 2001

If you could fix your repository and docker image, I'll glad to upgrade without fork the github project and create my own image on docker hub.

Thanks,
Ivan

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.