Requirements
Preparing the host system
There are some requirements to the host system.
Ubuntu 20.04.5
Tested distribution is currently Ubuntu 20.04.5 LTS. An installation-Image can be found here: https://releases.ubuntu.com/20.04/ubuntu-20.04.5-desktop-amd64.iso
This should work as virtual machine (Virtual box ...) or bare-metal installation.
Yocto related base software
Needed tools are listed in the yocto documentation.
Execute the following commands to install them:
$ sudo apt install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3 xterm python3-subunit mesa-common-dev zstd liblz4-tool curl
Docker build images
The release builds are executed on docker images based on ubuntu-20.04
.
The SECO docker images can be found in the SECO Docker Hub dedicated repository and can be pulled e.g. by doing:
$ docker pull secodocker/clea-os-builder:latest
Development tools
Additionl development tools that may be useful:
$ sudo apt install git minicom gdb-multiarch crossbuild-essential-armhf meld gedit nano cscope quilt qtcreator
Install the repo tool
If available the tool can also be installed from the distributions package manager. This directly downloads the latest version from google. See https://gerrit.googlesource.com/git-repo/.
$ mkdir ~/bin # once
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo # once
$ chmod a+x ~/bin/repo # once
$ echo "export PATH=${PATH}:~/bin" >> ~/.bashrc # once
$ source ~/.bashrc
Local Git setup:
$ git config --global user.name "Forename Name" # use your name instead
$ git config --global user.email "my.name@example.com" # use your email instead
Run a Docker container
Below the list of options to run a Docker container based on an image from SECO Docker Hub account (https://hub.docker.com/r/secodocker/clea-os-builder):
$ export docker_user="yoctouser" ;
$ export docker_workdir="workdir" ;
$ docker run --rm -it \
-v "${PWD}":/home/"${docker_user}"/"${docker_workdir}" \
-v "${HOME}"/.gitconfig:/home/"${docker_user}"/.gitconfig:ro \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v "${HOME}"/.Xauthority:/home/"${docker_user}"/.Xauthority:rw \
-v /etc/ssl/certs/:/etc/ssl/certs/:ro \
--workdir=/home/"${docker_user}"/"${docker_workdir}" \
secodocker/clea-os-builder:latest --username="${docker_user}"
Mount the .gitconfig file only if there are particular settings to import into the container. Otherwise, configure git settings directly inside the running docker container.
For internal usage, with SSH access, add the following line to the docker run command:
-v "${HOME}"/.ssh:/home/"${docker_user}"/.ssh:ro \
Beware to launch this command into the folder you want to work in because it will be mapped as
/home/${docker_user}/${docker_workdir}
inside the docker container.