Difference between revisions of "Building OpenEmbedded (Beta)"

From Chumby Wiki
Jump to: navigation, search
(Change "console-image" to "chumby-starter-image")
Line 4: Line 4:
 
Re-imaging a device requires access to the internal micro-SD port.  You will also need a USB micro-SD reader of some sort.  These can be obtained very cheaply, and sometimes can be found bundled with micro-SD media.
 
Re-imaging a device requires access to the internal micro-SD port.  You will also need a USB micro-SD reader of some sort.  These can be obtained very cheaply, and sometimes can be found bundled with micro-SD media.
  
A previous version of this page can be found at http://wiki.chumby.com/index.php?title=Building_OpenEmbedded_(Beta)&oldid=2903 and contains information relevant to Silvermoon-based devices.
+
A previous version of this page can be found at http://wiki.chumby.com/index.php?title=Building_OpenEmbedded_(Beta)&oldid=2903 and contains information relevant to Silvermoon-based devices.  Silvermoon support for this new image-generation mechanism is pending.
  
 
==Setting up the Environment==
 
==Setting up the Environment==

Revision as of 10:00, 10 April 2011

Overview

OpenEmbedded is a build environment that contains a large number of packages. It's possible to use OpenEmbedded to build a bootable image for certain chumby devices, such as the Falconwing-series of devices. These instructions assume you're using Ubuntu 10.04 LTE, though they can be adapted to work on different platforms.

Re-imaging a device requires access to the internal micro-SD port. You will also need a USB micro-SD reader of some sort. These can be obtained very cheaply, and sometimes can be found bundled with micro-SD media.

A previous version of this page can be found at http://wiki.chumby.com/index.php?title=Building_OpenEmbedded_(Beta)&oldid=2903 and contains information relevant to Silvermoon-based devices. Silvermoon support for this new image-generation mechanism is pending.

Setting up the Environment

This assumes you're using Ubuntu 10.04 LTE

  1. Install prerequisites
    • sudo aptitude install sed wget cvs subversion git-core coreutils unzip texi2html texinfo docbook-utils gawk python-pysqlite2 diffstat help2man make gcc build-essential g++ desktop-file-utils chrpath libxml2-utils xmlto screen python-ply libxml2-utils xsltproc python-progressbar python-psyco
  2. Make /bin/sh not be part of dash
    • sudo dpkg-reconfigure dash # Select "No" at the prompt
  3. Fix mmap_min_addr
    • sudo sh -c 'echo 0 > /proc/sys/vm/mmap_min_addr'
    • sudo sh -c 'echo "vm.mmap_min_addr = 0" >> /etc/sysctl.conf'
  4. Download OpenEmbedded
  5. Setup OpenEmbedded - This command must be run each time you log on
    • source setup-chumby.sh # Change TOPDIR in this file if you're installing somewhere other than ~/chumby-oe
  6. If desired, customize the build process.

Building with OpenEmbedded

Valid image files can be found in openembedded/recipes/images/and meta-chumby/recipes/images and a full build from scratch can take ten hours or more.

bitbake chumby-starter-image # As an example, build chumby-starter-image

Writing images to disk

Built images go in output-angstrom-.9/deploy/eglibc/images/. Full, bootable ROM images are named rom-chumby-falconwing-IMAGENAME.img. Other interesting files, such as the bootloader, boot shell, kernel, and boot graphics are also present in this directory.

To write a ROM file to disk, use dd, or on Windows use win32-image-writer. If you're working on a remote system, use SCP or SFTP to download the image file locally. Then write the file out to an SD card:

  • Linux
    1. Determine what drive letter your SD card is. After inserting the card, run "dmesg" and note the drive name. For example, it might be "sdb" or "sdc" depending on how many hard drives your system has.
    2. Unmount the drives
      • for i in $(ls -1 /dev/sdb*); do sudo umount $i; done
    3. Write the ROM image out
      • sudo dd if=rom-chumby-silvermoon-chumby-starter-image.img of=/dev/sdX bs=8M
  • Windows
    1. Download win32-image-writer from https://launchpad.net/win32-image-writer


Where /dev/sdX is the device of the SD card, and bs=8M helps speed up the write dramatically. Note that you write to the raw device, /dev/sdX, and not the partitions /dev/sdX1, because the image as generated contains an MBR that it will replace on the target drive.