Difference between revisions of "Dummies Guide to Building Angstrom Linux for MinnnowBoard"

From eLinux.org
Jump to: navigation, search
m (Procedure)
m (Procedure)
 
(29 intermediate revisions by the same user not shown)
Line 4: Line 4:
  
 
=Summary=
 
=Summary=
This guide explains building the Embedded Linux distribution - [http://www.angstrom-distribution.org/ Angstrom] in a beginner friendly manner.   
+
This guide explains building the Embedded Linux distribution - [http://www.angstrom-distribution.org/ Angstrom] from source in a beginner friendly manner.   
  
 
==Important Notes==
 
==Important Notes==
Line 15: Line 15:
 
=Procedure=
 
=Procedure=
  
1. Install the pre-requisites by typing the command below in the terminal:
 
  
sudo apt-get install gawk wget git-core diffstat unzip build-essential chrpath libsdl1.2-dev xterm unzip texinfo \
+
'''Step-1:'''
git texi2html subversion ncurses-dev sed cvs git-core coreutils docbook-utils python-pysqlite2 help2man make \
 
gcc g++ desktop-file-utils chrpath dosfstools kpartx bitbake
 
  
2. Change the default shell in Ubuntu from dash to bash typing the command below in the terminal::
+
Install the pre-requisites by typing the command below in the terminal:
 +
 
 +
sudo apt-get install gawk wget git diffstat unzip build-essential chrpath libsdl1.2-dev xterm unzip texinfo \
 +
git texi2html subversion ncurses-dev sed cvs coreutils docbook-utils python-pysqlite2 help2man make \
 +
gcc g++ desktop-file-utils chrpath dosfstools kpartx
 +
 
 +
''Note:- '''DO NOT''' install a distro-packaged version of bitbake. The metadata included in various yocto layers only works with a particular version of bitbake. Angstrom and Yocto will ensure the correct version is included when you check out the code.''
 +
 
 +
 
 +
[[File:Angstroms8.png|1026px]]
 +
 
 +
 
 +
'''Step-2:'''
 +
 
 +
Change the default shell in Ubuntu from dash to bash typing the command below in the terminal::
  
 
  sudo dpkg-reconfigure bash
 
  sudo dpkg-reconfigure bash
  
3. Make the necessary changes to the local.conf file as shown below:
+
[[File:Angstroms6.png|1026px]]
 +
 
 +
[[File:Angstroms7.png|1026px]]
 +
 
 +
 
 +
'''Step-3:'''
 +
 
 +
The next step is to download the [https://github.com/Angstrom-distribution/setup-scripts Angstrom setup scripts] which will help us prepare a development environment for building the Angstrom image. Type the following command in your terminal:
 +
 
 +
git clone git://github.com/Angstrom-distribution/setup-scripts.git
 +
 
 +
[[File:Angstroms1.png|1026px]]
 +
 
 +
 
 +
'''Step-4:'''
 +
 
 +
By default the git branch you will be working with will be ''master'' . Since the '''master''' continuously undergoing changes and bug fixes it can sometimes lead to unsuccessful build generation. So, it is better to switch to a stable branch. To see which branch you are currently working with type the commands below:
 +
 
 +
cd setup-scripts/
 +
git branch -a
 +
 
 +
[[File:Angstroms2.png|1026px]]
 +
 
 +
 
 +
Now type the command below to switch to a stable branch of your choice:
 +
 
 +
git checkout -b <stable branch name>
 +
 
 +
The command in our case becomes
 +
 +
git checkout -b remotes/origin/angstrom-v2013.06-yocto1.4
 +
 
 +
[[File:Angstroms3.png|1026px]]
 +
 
 +
 
 +
'''Step-5:'''
 +
 
 +
Make the necessary changes to the local.conf file as shown below. This file can be found in ~/setup-scripts/conf/local.conf .
 +
 
 +
[[File:Angstroms5.png|1026px]]
  
 
  # Add this to the bottom:
 
  # Add this to the bottom:
MACHINE ?= "minnow"
 
 
  LICENSE_FLAGS_WHITELIST = "license_emgd-driver-bin commercial"  
 
  LICENSE_FLAGS_WHITELIST = "license_emgd-driver-bin commercial"  
 
  NOISO = "1"
 
  NOISO = "1"
  
4. Setup the necessary environment for MinnowBoard by typing the command below in the terminal:
+
'''Explanation:'''
 +
* LICENSE_FLAGS_WHITELIST = "license_emgd-driver-bin commercial" : This is required to prevent the resulting image from
 +
  including anything that might violate the license terms of the packages used to implement the video acceleration feature,
 +
  such as gst-ffmpeg and ffmpeg.
 +
* NOISO = "1" : Due to a bug in ISO generation when building for EFI-only machines, it is necessary to include this line in
 +
  your local.conf:
 +
 
 +
 
 +
'''Step-6:'''
 +
 
 +
Setup the necessary environment for MinnowBoard by typing the command below in the terminal:
  
 
  MACHINE=minnow ./oebb.sh config minnow
 
  MACHINE=minnow ./oebb.sh config minnow
 +
 +
[[File:Angstroms4.png|1026px]]
 +
 
   
 
   
5. Build the image by typing the following command in the terminal:
+
'''Step-7:'''
 +
 
 +
When it comes to building the Angstrom image you have lots of options and recipes to choose from, each resulting in a different configuration and packages. The typical command would be:
 +
 
 +
  MACHINE=minnow ./oebb.sh bitbake <IMAGE NAME>
 +
 
 +
Few examples of the types of Image you can build are ''systemd-image'' (minimalistic and perfect for embedded developers) or the ''systemd-gnome-image'' (With gnome2 desktop environment)
 +
 
 +
Let us finally build the image now:
 +
 
 +
MACHINE=minnow ./oebb.sh bitbake systemd-gnome-image
 +
 
 +
[[File:Angstroms9.png|1026px]]
 +
 
 +
 
 +
'''Step-8:'''
 +
 
 +
In my case the resulting image was located in ''/setup-scripts/deploy/eglibc/images/minnow''
 +
 
 +
[[File:Angstroms10.png|1026px]]
 +
 
 +
=Writing the Angstrom Image to an external storage device=
 +
 
 +
Now that we have successfully built an Angstrom image from source, the next step is to write the image to an external storage device(microSD card, HDD etc.) and test it on the MinnowBoard. Depending on which type of storage device you are planning to write the image to, please select an appropriate link from below:
 +
 
 +
*[http://elinux.org/Installing_Angstrom_on_a_Hard_Disk Installing Angstrom on a Hard Disk]
 +
 
 +
*[http://elinux.org/Minnowboard:Preparing_microSD_Card Installing Angstrom on a microSD card]
 +
 
 +
=Troubleshooting=
  
MACHINE=minnow ./oebb.sh bitbake systemd-image
+
==Starting Over==
  
6. The resulting image will be located in ~/setup-scripts/build/tmp-angstrom_v2012_12-eglibc/deploy/images/minnow/
+
==Deleting past images to free up space==
  
 
[[Category: MinnowBoard]]
 
[[Category: MinnowBoard]]

Latest revision as of 14:12, 13 January 2014

Mlogo.png Back to the MinnowBoard home page


Angstrom os logo.png

Summary

This guide explains building the Embedded Linux distribution - Angstrom from source in a beginner friendly manner.

Important Notes

1. These instructions have been documented using Ubuntu 12.04 LTS as the reference operating system. It is advised that you also have the same setup.

2. Please make sure that you have at least 18GB of free space available as the source code can take up a lot of space.

3. It took 8 hours to build a systemd-image on a dual core I7 machine with 8GB RAM and only two(out of the possible 4) threads used.

Procedure

Step-1:

Install the pre-requisites by typing the command below in the terminal:

sudo apt-get install gawk wget git diffstat unzip build-essential chrpath libsdl1.2-dev xterm unzip texinfo \
git texi2html subversion ncurses-dev sed cvs coreutils docbook-utils python-pysqlite2 help2man make \
gcc g++ desktop-file-utils chrpath dosfstools kpartx 

Note:- DO NOT install a distro-packaged version of bitbake. The metadata included in various yocto layers only works with a particular version of bitbake. Angstrom and Yocto will ensure the correct version is included when you check out the code.


Angstroms8.png


Step-2:

Change the default shell in Ubuntu from dash to bash typing the command below in the terminal::

sudo dpkg-reconfigure bash

Angstroms6.png

Angstroms7.png


Step-3:

The next step is to download the Angstrom setup scripts which will help us prepare a development environment for building the Angstrom image. Type the following command in your terminal:

git clone git://github.com/Angstrom-distribution/setup-scripts.git

Angstroms1.png


Step-4:

By default the git branch you will be working with will be master . Since the master continuously undergoing changes and bug fixes it can sometimes lead to unsuccessful build generation. So, it is better to switch to a stable branch. To see which branch you are currently working with type the commands below:

cd setup-scripts/
git branch -a

Angstroms2.png


Now type the command below to switch to a stable branch of your choice:

git checkout -b <stable branch name>

The command in our case becomes

git checkout -b remotes/origin/angstrom-v2013.06-yocto1.4

Angstroms3.png


Step-5:

Make the necessary changes to the local.conf file as shown below. This file can be found in ~/setup-scripts/conf/local.conf .

Angstroms5.png

# Add this to the bottom:
LICENSE_FLAGS_WHITELIST = "license_emgd-driver-bin commercial" 
NOISO = "1"
Explanation:
* LICENSE_FLAGS_WHITELIST = "license_emgd-driver-bin commercial" : This is required to prevent the resulting image from 
  including anything that might violate the license terms of the packages used to implement the video acceleration feature, 
  such as gst-ffmpeg and ffmpeg.
* NOISO = "1" : Due to a bug in ISO generation when building for EFI-only machines, it is necessary to include this line in 
  your local.conf:


Step-6:

Setup the necessary environment for MinnowBoard by typing the command below in the terminal:

MACHINE=minnow ./oebb.sh config minnow

Angstroms4.png


Step-7:

When it comes to building the Angstrom image you have lots of options and recipes to choose from, each resulting in a different configuration and packages. The typical command would be:

 MACHINE=minnow ./oebb.sh bitbake <IMAGE NAME>

Few examples of the types of Image you can build are systemd-image (minimalistic and perfect for embedded developers) or the systemd-gnome-image (With gnome2 desktop environment)

Let us finally build the image now:

MACHINE=minnow ./oebb.sh bitbake systemd-gnome-image

Angstroms9.png


Step-8:

In my case the resulting image was located in /setup-scripts/deploy/eglibc/images/minnow

Angstroms10.png

Writing the Angstrom Image to an external storage device

Now that we have successfully built an Angstrom image from source, the next step is to write the image to an external storage device(microSD card, HDD etc.) and test it on the MinnowBoard. Depending on which type of storage device you are planning to write the image to, please select an appropriate link from below:

Troubleshooting

Starting Over

Deleting past images to free up space