OpenEmbedded: Setting up the Bluetechnix OE Framework: Unterschied zwischen den Versionen

Aus BECOM Systems Support
Zur Navigation springen Zur Suche springen
en>Peter
K (1 Version importiert)
 
K (1 Version importiert)
 
(kein Unterschied)

Aktuelle Version vom 31. Oktober 2023, 09:03 Uhr

Development workstation setup

We recommend to use Ubuntu 10.04 LTS (Lucid Lynx) on your Linux development workstation. For other Linux distributions and versions of Ubuntu, things may be a little different.

Shell

Ubuntu uses dash as the preferred shell. However, we want bash. So, reconfigure /bin/sh to point to /bin/bash instead of /bin/dash:

sudo dpkg-reconfigure dash

Select no when asked if it should link dash to /bin/sh.

Set mmap_min_addr

sudo bash 
echo 'vm.mmap_min_addr = 0' >> /etc/sysctl.conf
exit

Important: You have to RESTART your PC afterwards.

Creating the development directory

The Bluetechnix OpenEmbedded overlay assumes that all repositories which are going to be checked out during this introduction are stored in a common directory, so we suggest creating this directory now, e.g.:

robert@bltLinux:~$ mkdir ~/oe
robert@bltLinux:~$ cd ~/oe

You can use any path. We will use $HOME/oe in this documentation.

Package installation

Additional Packages

First, please install the following packages. We have already found out that these are required for correct OpenEmbedded builds.

sudo apt-get install git-core python python-dev python-psyco ccache patch quilt m4 sed docbook \
bison make subversion libc6-dev git-core build-essential texinfo gawk help2man texi2html \
gawk libncurses5 libncurses5-dev lrzsz libtool chrpath cvs libwmf-dev

There's also a web site about OpenEmbedded software requirements that you can check against.

BitBake

BitBake is, at its simplest, a tool for executing tasks and managing metadata. As such, its similarities to GNU make and other build tools are readily apparent. It was inspired by Portage, the package management system used by the Gentoo Linux distribution. BitBake is the basis of the OpenEmbedded project, which is being used to build and maintain a number of embedded Linux distributions... (Description from here)

There are 3 ways how to install BitBake:

  • If bitbake is provided by your Linux distribution's package database, install it straightforward:
sudo apt-get install bitbake
  • If not, you may download a package file for your distribution, e.g.
wget https://oss.leggewie.org/oe/deb/bitbake_1.8.18-1_all.deb
sudo dpkg -i bitbake_1.8.18-1_all.deb
  • You may check out the BitBake sources via GIT:
cd ~/oe/
git clone git://git.openembedded.org/bitbake.git
cd bitbake

You may check out stable branch 1.8 or 1.10:

git checkout remotes/origin/1.10 -b 1.10

or

git checkout remotes/origin/1.8 -b 1.8

Independently of the way chosen, check that the installed version is 1.8.12 (higher versions are ok).

If your distribution doesn't offer BitBake at the required version, you can follow the instructions in the OpenEmbedded User Manual on getting a copy yourself, but don't forget to update your path so that it can be executed by simply writing bitbake at the shell prompt, as it is assumed in this document. We recommend to place BitBake into the oe/ directory, so that the BitBake's executable is in oe/bitbake/bin/ in such a case.

Getting the sources

The instructions below were written as general as possible. They are valid for all our GIT/OpenEmbedded based software distributions. Depending on your board you will have to substitute the paths given below. The following is a list of available GIT repositories, sorted by board type.

We recommend to start development with something stable - see here for a list of releases. For each of these releases, there's exactly one GIT tag that identifies the exact commit in all repositories. Note that the HEAD revision is where we develop, so there may be problems while building.

To view all available GIT tags in a repository, type

git tag

Repositories

Access to the software source is granted through our GIT repositories. Please note that although most parts are bound to license agreements defined by the GPL, there are some packages which are licensed with Freescale proprietary licenses or other license models. When applicable, the license agreement can be found in the according bitbake recipe. Bluetechnix does not guarantee that the list of licenses is exhaustive or complete. By connecting to our GIT repositories, you agree to the terms and conditions outlined above.

SBC-i.MX51

URL name URL Branch name
openembedded-url git://git.becom-group.com/git/openembedded.git btmxc-dev
btmxc-url git://git.becom-group.com/git/btmxc.git i.fly
redboot-url git://git.becom-group.com/git/redboot_i.fly.git master
btmxc-linux-url git://git.becom-group.com/git/btmxc-linux.git i.fly

CM-i.MX27

URL name URL Branch
openembedded-url git://git.becom-group.com/git/openembedded.git btmxc
btmxc-url git://git.becom-group.com/git/btmxc.git btmxc27
redboot-url git://git.becom-group.com/git/redboot_mx27.git master
btmxc-linux-url git://git.becom-group.com/git/btmxc-linux.git btmxc27


Getting OpenEmbedded

Get the OpenEmbedded repository:

robert@bltLinux:~/oe$ git clone openembedded-url 
Initialized empty Git repository in /home/robert/oe/openembedded/.git/
remote: Counting objects: 280338, done.
remote: Compressing objects: 100% (89402/89402), done.
remote: Total 280338 (delta 187534), reused 275117 (delta 183978)
Receiving objects: 100% (280338/280338), 93.85 MiB | 962 KiB/s, done.
Resolving deltas: 100% (187534/187534), done.
Checking out files: 100% (18652/18652), done.
robert@bltLinux:~/oe$ ls
openembedded

After this you will be on our btmxc branch:

robert@bltLinux:~/oe/openembedded$ git branch -a
* btmxc
origin/HEAD
origin/btmxc
origin/org.openembedded.dev
origin/stable/2009

If you want the btmxc-dev branch, get it via

harald@ubuntu:~/oe/openembedded$ git checkout btmxc-dev
Branch btmxc-dev set up to track remote branch btmxc-dev from origin.
Switched to a new branch 'btmxc-dev'
harald@ubuntu:~/oe/openembedded$ git branch
  btmxc
* btmxc-dev
harald@ubuntu:~/oe/openembedded$

If you want to check out a stable version, remember the right GIT tag, and type

git checkout [tag] -b [branchname]

All Bluetechnix specific development is supposed to happen on this branch.

Getting the Bluetechnix overlay

You can get a basic local configuration by cloning the btmxc git repos from the git server:

robert@bltLinux:~/oe$ git clone btmxc-url
Initialized empty Git repository in /home/robert/oe/btmxc/.git/
remote: Counting objects: 53, done.
remote: Compressing objects: 100% (49/49), done.
remote: Total 53 (delta 14), reused 0 (delta 0)
Receiving objects: 100% (53/53), 9.24 KiB, done.
Resolving deltas: 100% (14/14), done.
robert@bltLinux:~/oe$ ls
btmxc openembedded

There are branches for every machine Bluetechnix supports, check out the branch listed in the table above

robert@bltLinux:~/oe/btmxc$ git checkout -b branchname origin/branchname
Branch branchname set up to track remote branch refs/remotes/origin/branchname.
Switched to a new branch "branchname"

If you want to check out a stable version, remember the right GIT tag, and type

git checkout [tag] -b [branchname]

Getting the Linux Kernel

You can clone our kernel by:

robert@bltLinux:~/oe$ git clone btmxc-linux-url
Initialized empty Git repository in /home/robert/oe/btmxc-linux/.git/
remote: Counting objects: 506654, done.
remote: Compressing objects: 100% (90789/90789), done.
remote: Total 506654 (delta 416495), reused 504873 (delta 415082)
Receiving objects: 100% (506654/506654), 136.70 MiB | 10346 KiB/s, done.
Resolving deltas: 100% (416495/416495), done.
Checking out files: 100% (23007/23007), done.
robert@bltLinux:~/oe$ ls
btmxc btmxc-linux openembedded

Checkout the branch you need:

robert@bltLinux:~/oe/btmxc-linux$ git checkout -b branchname origin/branchname
Branch branchname set up to track remote branch refs/remotes/origin/branchname.
Switched to a new branch "branchname"

If you want to check out a stable version, remember the right GIT tag, and type

git checkout [tag] -b branchname

Getting the Boot Loader

Clone the Redboot boot loader by running

robert@bltLinux:~/oe$ git clone redboot-url

You will automatically be on the master branch. This is where development takes place for the boot loader.

If you want to check out a stable version, remember the right GIT tag, and type

git checkout [tag] -b [branchname]