Preparing a development environment for the distribution
- A Pelion Device Management account.
- A GitHub account with access to private Arm Mbed repositories (supplied by Arm to users enrolled in the preview).
To build MBL, you need:
A PC running Ubuntu.
We tested on Ubuntu 16.04. You can work on any Linux-based OS that supports Docker, but you may need to install other packages.
Full internet access (because the build process downloads packages from the internet).
The ability to connect to GitHub with SSH, so you can clone private repositories noninteractively during the build process. See the GitHub documentation on connecting with SSH for more information.
And the following software:
A few software packages that support building and developing on MBL:
Install these packages with:
sudo apt-get install bmap-tools curl git minicom python-pip
Optionally, to be able to use Minicom without
sudo, you can add your user to the
dialoutgroup by running:
sudo usermod -a -G dialout $USER
To make this group membership apply to your current shell session, see the instructions below.
Check out the relevant branch from the repository (in this example, we use
$ git clone firstname.lastname@example.org:ARMmbed/mbl-tools.git --branch mbl-os-0.5
Tip: The mbl-tools repository provides a collection of tools and recipes for building and testing MBL.
The Device Management manifest tool:
pip install --user -U git+ssh://email@example.com/ARMmbed/manifest-tool.git#egg=manifest-tool pip install --user mbed-cloud-sdk
Make sure your GitHub SSH key is valid.
See the manifest tool documentation for more information.
Docker CE, to use
build-mblscript from the
mbl-toolsrepository to build MBL. Download and install from the Docker website.
You must add yourself to the
dockergroup to be able to run the Docker build environment. See instructions in the Docker Linux documentation. To make this group membership apply to your current shell session, see the instructions below.
Using virtual machines
Building open embedded distributions requires the compilation of hundreds of different packages. Using virtual machines on a laptop to build Mbed Linux OS will take a very long time - it could be 8 hours or more for the first build; you need a powerful machine to build in under an hour.
For our own builds, we use:
- Intel Xeon W2145 Processor 8 Core (11 MB Cache, 3.70 GHz).
- 32 GB RAM.
- 2 TB hard drive, 7200RPM, 3.5", SATA.
- 2.5" 256 GB SATA Solid State Drive.
- 256 GB SSD PCIe.
USB mass storage
There can be USB pass-through issues from host to the virtual machine.
For example, on VirtualBox, the WaRP7 did not come up as a mass storage device after running the u-boot command to sync the USB bridge (detailed below) - it needed an additional reset. The full process to see the mass storage device is:
- On the WaRP7's console, perform the USB mass storage u-boot command:
ums 0 mmc 0.
- In the virtual machine's settings, under Ports > USB, click the Add new USB filter button and select the FSL USB download gadget.
- Reset the WaRP7.
- Perform the
Updating your shell process's group memberships
When you add your user to a new group with the
usermod command, your current shell process's group membership is not automatically updated. To see the effect of the
usermod command in your current shell session, you need to log in again. You can do this by running:
exec sudo login