Difference between revisions of "Kovan firmware"

From Studio Kousagi Wiki
Jump to: navigation, search
Line 8: Line 8:
  
 
==Setting up the environment==
 
==Setting up the environment==
 +
 +
To set up the environment, first you must fetch the repos, then you must perform initial,  one-time configuration.  All of these steps only need to be run the first time you set up your build environment.
 +
 +
===Fetching source code===
  
 
There are two approaches you can take to set up the environment: From-scratch, or with a quickstart package.  The quickstart method should save you a day or two, as downloading the kernel and webkit sources can take a very long time – on the order of days.
 
There are two approaches you can take to set up the environment: From-scratch, or with a quickstart package.  The quickstart method should save you a day or two, as downloading the kernel and webkit sources can take a very long time – on the order of days.
  
===From scratch===
+
====From scratch====
  
 
Note that these steps are very similar to the generic [http://www.angstrom-distribution.org/building-angstrom Building Angstrom] steps.
 
Note that these steps are very similar to the generic [http://www.angstrom-distribution.org/building-angstrom Building Angstrom] steps.
  
# Check out setup-scripts from git
 
 
#* git clone https://github.com/sutajiokousagi/setup-scripts oe
 
#* git clone https://github.com/sutajiokousagi/setup-scripts oe
 
#* cd oe
 
#* cd oe
# Configure OE
 
#* ./oebb.sh config kovan
 
#* ./oebb.sh update
 
  
===Quickstart===
+
====Quickstart====
  
 
# Download [http://netv.bunnie-bar.com/build/kovan-debug/quickstart.zip quickstart.zip].
 
# Download [http://netv.bunnie-bar.com/build/kovan-debug/quickstart.zip quickstart.zip].
Line 29: Line 29:
 
#* unzip quickstart.zip
 
#* unzip quickstart.zip
 
#* cd oe
 
#* cd oe
 +
 +
===Configure the build environment===
 +
 +
First, perform initial setup.  This creates an environment file you'll use every time you want to do development.
 +
 
# Configure OE
 
# Configure OE
 
#* ./oebb.sh config kovan
 
#* ./oebb.sh config kovan
 
#* ./oebb.sh update
 
#* ./oebb.sh update
 +
 +
Next, edit conf/local.conf.  Particularly important variables you might want to changeg are:
 +
 +
* PARALLEL_MAKE – This tells "make" how many threads to spawn.  A good rule of thumb is 1.5 times the number of cores present.  Be sure to include "-j" before the number.
 +
* BB_NUMBER_THREADS – This tells bitbake how many tasks to run at parallel.  Set this equal to around the number of cores present.
  
 
==Building an image==
 
==Building an image==

Revision as of 12:07, 3 May 2012

Kovan uses a newer, overlay-based version of OpenEmbedded than NeTV. Because of this, recipes tend to be more scattered, however it makes compilation much faster as you can leave out overlays that you do not use.

Before you begin

The build environment should not be on an encrypted partition. These tend to have much lower path lengths, which can break the build in mysterious and hard-to-track-down ways.

You should not use have a symlink in the path of the build system. This can also break things.

Setting up the environment

To set up the environment, first you must fetch the repos, then you must perform initial, one-time configuration. All of these steps only need to be run the first time you set up your build environment.

Fetching source code

There are two approaches you can take to set up the environment: From-scratch, or with a quickstart package. The quickstart method should save you a day or two, as downloading the kernel and webkit sources can take a very long time – on the order of days.

From scratch

Note that these steps are very similar to the generic Building Angstrom steps.

Quickstart

  1. Download quickstart.zip.
  2. Extract it to the location where you want your build system to reside. It expands into a directory called "oe".
    • unzip quickstart.zip
    • cd oe

Configure the build environment

First, perform initial setup. This creates an environment file you'll use every time you want to do development.

  1. Configure OE
    • ./oebb.sh config kovan
    • ./oebb.sh update

Next, edit conf/local.conf. Particularly important variables you might want to changeg are:

  • PARALLEL_MAKE – This tells "make" how many threads to spawn. A good rule of thumb is 1.5 times the number of cores present. Be sure to include "-j" before the number.
  • BB_NUMBER_THREADS – This tells bitbake how many tasks to run at parallel. Set this equal to around the number of cores present.

Building an image

Set up your session by sourcing the OE environment file:

. ~/.oe/environment-oecore

There are many images available. To list them all, run:

find sources/meta-* sources/openembedded-core -name '*image*.bb'

There is a Kovan bringup image that contains many useful system tools for determining system performance, communicating with various peripherals, and generally bringing up the system. To build this image, run:

bitbake kovan-bringup-image

Writing an image to a card

When an image is built, various files are added to the deploy/images/kovan/ directory. The image name is embedded within the resulting compressed ROM file. For example, the image for kovan-bringup-image is located at oe/build/tmp-angstrom_2010_x-eglibc/deploy/images/kovan/rom-kovan-hw-bringup.img.gz.