Building Systems

Introduction

Why building a customize system :
-> to optimize energy consumption
-> optimize memory utilization

.

There are quite a few build systems that you can use:

.

Embedded Linux Build Systems
http://www.embarcados.com.br/embedded-linux-build-systems/


OpenWRT

https://openwrt.org/

OpenWrt is described as a Linux distribution for embedded devices.

 


Yocto Project

“I recently had the opportunity to use Yocto. I already practiced quite a lot with OpenEmbedded before. You can see Yocto as a project derived from OpenEmbedded even it is a bit more than that.” from  http://free-electrons.com/blog/experiment-with-yocto/

“Amongst other things, the Yocto Project uses the OpenEmbedded build system, which is based on the Poky project, to construct complete Linux images.”
http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#intro

http://lwn.net/Articles/430576/

Quick Start  https://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html

http://ti.com/yoctoproject

http://www.yoctoproject.org/

https://www.youtube.com/watch?v=LtfybKG5Y8A&hd=1

The Yocto Project is an open-source collaboration under Linux Foundation and composed of hardware manufacturers as well as open source operating system suppliers. The project is made up of several sub-projects, including various tools, methods, meta-packages of executable code and, perhaps most importantly, a comprehensive framework for building embedded Linux software distributions. Texas Instruments and other companies joined the Yocto Project™ because it gives their adapters the ability to focus more on advancing and differentiating their own products and systems by improving the productivity of open-source software development programs.

The Yocto Project Eclipse plug-in – ELCE 2011:  https://www.youtube.com/watch?v=MUr5WDZtx7s&hd=1

.

Configuring a host system

1. installing Poky on Debian
$ sudo apt-get install gawk wget git-core diffstat unzip texinfo build-essential chrpath

if our host system has graphics support, run the followwing command:
$ sudo apt-get install libsdl1.2-dev xterm

Downloading the poky source code
$ git clone git://git.yoctoproject.org/poky –branch daisy

After the download is complete, inside the poky directory there is a script oe-init-build-env, which should be used to set up the build environment.
$ source poky/oe-init-build-env  [build-directory]
Here, [build-directory] is an optional parameter for the name of the directory where the environment is set; in case it is not given, it defaults to build. The build-directory is the place where we perform the builds. It is very convenient to use different build directories. we can work on distinct projects in parallel or different experimental setups without affecting our other builds.

Learn more about GIT  http://git-scm.com/
https://git.yoctoproject.org/

local.conf file

when we initialize a build environment, it creates a file called build/conf.local.conf, which is a powerful tool that can configure almost every aspect of the build process. We can set the machine we are building for, choose the toolchain host architecture to be used for a custom cross-toolchain, optimize options for maximum build time reduction, and so on. The comments inside the build/conf/local.conf file are very good documentation and reference of possible variables, and their defaults. The minimal set of variables we probably want to change from the default is the following :

BB_NUMBER_THREADS ?= “${@oe.utils.cpu_count()}”
PARALEL_MAKE ?= “-j ${@oe.utils.cpu_count()}”MACHINE ??= “qemux86”

Board Support Packages (BSPs)

you can download package for several board :

https://www.yoctoproject.org/downloads

if you do not find your board on the list, you can write your own using the BSP developper’s guide :

https://www.yoctoproject.org/docs/current/bsp-guide/bsp-guide.html

.

Raspberry Pi + Yocto

A comunidade desenvolveu o Raspbian, que é o Debian modificado para rodar na Raspberrypi. Porém esta distribuição é para uso de propósito geral e dependendo da aplicação/produto que se queira desenvolver com a Rpi, o processamento e consumo de memória e energia podem ficar comprometidos. Portanto é mais recomendado que se construa uma distribuição Linux customizada afim de atender a esses requisitos.

http://www.embarcados.com.br/raspberrypi-yocto/

http://www.cnx-software.com/2013/07/05/12mb-minimal-image-for-raspberry-pi-using-the-yocto-project/

.

BeagleBone Black + Yocto

https://www.yoctoproject.org/downloads   -> Board Support Packages (BSPs)  -> Select ARM

http://www.embarcados.com.br/beaglebone-black-yocto/

.

 


Angstrom on BeagleBone

How To Build Custom Angstrom Build for BeagleBone with Ubuntu or Debian

http://cwraig.id.au/?p=507    ver mais posts nesta pagina


 

Angstrom on BeagleBoard-XM

The Ångström distribution is a Linux distribution for a variety of embedded devices.
The distribution is the result of a unification of developers from the OpenZaurus, OpenEmbedded (OE) , and OpenSIMpad projects.

http://en.wikipedia.org/wiki/%C3%85ngstr%C3%B6m_distribution

http://en.wikipedia.org/wiki/User:WillWare/Angstrom_and_Beagleboard

http://www.angstrom-distribution.org/

 

Option 1 : Narcissus Angström

you can generate your custom build at

http://narcissus.angstrom-distribution.org/

Select: BeagleBoard (the original BeagleBoard and BeagleBoard-xM both use the same build); simple; and console only.
Now in the “additional packages” section, make sure you select the following :
– Toolchain
– Native u-boot mkimage
– All kernel modules
– Ffmpeg
– Bootloader Files (x-load/u-boot/scripts) in the “Platform specific packages section”
Now click on ‘build me!’ which will generate a “*.tar.gz”. Download this “*.tar.gz” in your working directory.

All install steps at pdf file :  Angstrom_on_beagle

.

Option 2 : Install Angtröm distribution in BeagleBoard XM by command lines

Two PDF reference files  (Portuguese ) :

01 Compilação dos boot loaders e criação do sistema de ficheiros

01 Criação da distribuição Ångström Linux_   ( part 1.3.1 was not executed )

URL references :

http://wp.angstrom-distribution.org/?page_id=53     + + + + +

https://www.yoctoproject.org/download/texas-instruments-arm-cortex-a8-development-board-beagleboard    + + +  + +

( Angström  -> Open Embedded )

Teacher : Nuno Peixoto / IPCA

Antes de se iniciar o processo de criação da distribuição Ångström Linux é necessário instalar uma série de aplicações e bibliotecas de software em modo administrador (sudo). Estas aplicações instalam-se com recurso ao gestor de pacotes do Linux Ubuntu através do comando apt-get install.
Estas aplicações são aconselhadas no manual de utilizador da framework Open Embedded.

Command line to install the needed software for Ångström Linux distribution :

$ sudo apt-get install git-core quilt help2man gawk wget texi2html texinfo build-essential unzip
diffstat subversion texinfo cvs chrpath libsdl1.2-dev xterm

apt-get install : ferramenta de alto nivel, faz a instalação/compilação completa.
git-core : permite ir buscar código C desenvolvido
diffstat : faz comparação entre ficheiros C
wget : web get
etc….

.

antes de clonar a diretoria setup-scripts é necessário executar o seguinte comando :

$ sudo dpkg-reconfigure dash    ( Debian command line )

select option NO in the window menu that will opened.

bash : born again shell , dash é o nome da shell

.

Todo o processo daqui em diante é baseado primordialmente nos recursos do sítio http://www.angstrom-distribution.org/ em conjunto com recursos de outros sítios da web : www
Para criar a estrutura de diretorias efetuar o seguinte comando :
$ git clone git://github.com/Angstrom-distribution/setup-scripts.git   ( .vb recipes na pasta source ?? )

the folder setup-scripts will be cloned. folder created in home

(ver  https://github.com/Angstrom-distribution/setup-scripts )

.

cd setup-scripts , that where there is the  shell file oebb.sh

.

$ ./oebb.sh config beagleboard
De seguida faz-se uma atualização ao OpenEmbedded com o seguinte comando:
$ ./oebb.sh update

.

if not installed…

$ sudo apt-get install libncurses5-dev    ( biblioteca para modo “gráfico”, por exemplo : menuconfig. dash em modo gráfico )

.

still have to be here :   ..\setup-scripts   !  ???

$ . environment-angstrom-v2013.06    or    $ source environment-angstrom-v2013.06

atenção : existe um “espaço” entre “.” e “environment…”
diz onde está executável, librarias,…

.

$ bitbake -–c menuconfig virtual/kernel

bitbake : aplicação escrita em python
ficheiros recipes.bb dizem onde ir buscar o código fonte ( .c .h makefiles ) -> caminhos URL´s

.

Linux-mainline configuration   ( GUI config )

.

encontro setup-scripts/deploy mas não na pasta que o prof indica

.

Começa-se por abrir o ficheiro console-image.bb na diretoria /setup-scripts/sources/meta-angstrom/recipes-images/angstrom. Acrescenta-se de seguida as seguintes aplicações e bibliotecas da lista que se segue em IMAGE_INSTALL.
IMAGE_INSTALL += “packagegroup-base-extended \
                                           gdbserver \
                                           lightpd \
                                           lighttpd-module-cgi \
                                           lighttpd-module-alias \
                                           cronie \
                                           libcrypto \
                                           libxext \
                                           libsm \
                                           libstdc++ \
                                        “

.

.

$ . environment-angstrom-v2013.06

$ bitbake console-image    esta operação pode demorar várias horas

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

Leave a comment