Difference between revisions of "Building novena firmware"

From Studio Kousagi Wiki
Jump to: navigation, search
(Packages you may need)
(Packages you may need)
Line 9: Line 9:
 
  git
 
  git
 
  gawk
 
  gawk
 +
 +
Furthermore, you will want to change the symlink for /bin/sh to /bin/bash, instead of /bin/dash (which is the default in Ubuntu 12.04)
  
 
==Setting up the environment==
 
==Setting up the environment==

Revision as of 16:44, 15 February 2013

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.

Packages you may need

These are packages you may need over a base ubuntu 12.04 install:

git
gawk

Furthermore, you will want to change the symlink for /bin/sh to /bin/bash, instead of /bin/dash (which is the default in Ubuntu 12.04)

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 from scratch

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

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 novena
    • ./oebb.sh update

Next, edit conf/local.conf. Particularly important variables you might want to change 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-angstromv2012.05

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

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

There is a Novena 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 novena-bringup-image

Troubleshooting

  • Bitbake failure when downloading the kernel

There is an issue with the long-running git fetch that bitbake does when it first pulls down the kernel source code. The error looks like:

ERROR: Fetcher failure: Fetch command ...
Cloning into bare repository ...

To work around this, manually run the command listed and then retry the bitbake command.

Writing an image to a card

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

Making kernel changes

If you modify the linux kernel source tree, you need to bump the PR inside the buildbot recipe in order for the changes to be absorbed into the build. This is done by incrementing MACHINE_KERNEL_PR in sources/meta-kosagi/conf/machine/include/imx61.inc