Difference between revisions of "Verdex Git Repository"

From Gumstix User Wiki
Jump to: navigation, search
Line 4: Line 4:
 
# This repository is unstable and the kernel may be missing features---use at your own risk.
 
# This repository is unstable and the kernel may be missing features---use at your own risk.
 
# U-Boot has not yet been updated and the default kernels are larger than 1MB so flashing them to memory won't work.  You'll need to run off a microSD card.
 
# U-Boot has not yet been updated and the default kernels are larger than 1MB so flashing them to memory won't work.  You'll need to run off a microSD card.
 +
#* The point above is no longer strictly true.  U-Boot 1.2.0 has been moved from the old gumstix-buildroot repository so it is possible to build and test. See [http://old.nabble.com/Buildable-U-boot-available-for-VerdexPRO-td28298831.html this thread] for more information.
  
 
==The Straight Dope==
 
==The Straight Dope==

Revision as of 15:52, 23 April 2010

An experimental version of the OpenEmbedded (OE) repository is available for the Verdex. This repository brings a more recent Linux kernel (2.6.31) to Verdex compared with those available in the older Subversion (SVN) repository. As well, the most recent code from the OE repository is now available for Verdex-Pro COMs and the building process reflects that used on the Overo boards.

Disclaimers:

  1. This repository is unstable and the kernel may be missing features---use at your own risk.
  2. U-Boot has not yet been updated and the default kernels are larger than 1MB so flashing them to memory won't work. You'll need to run off a microSD card.
    • The point above is no longer strictly true. U-Boot 1.2.0 has been moved from the old gumstix-buildroot repository so it is possible to build and test. See this thread for more information.

The Straight Dope

Follow the basic instructions for setting up an OE repository for Overo but replace this instruction:

$ git checkout --track -b overo origin/overo
$ git checkout --track -b verdex origin/verdex

Your repository will now be tracking the Verdex branch of the Gumstix OE Git repository. Your machine type should be gumstix-verdex set in build/conf/auto.conf

Four images are available:

  • verdex-console-image
  • verdex-palmtop-image
  • verdex-desktop-image
  • verdex-gnome-image

Step by Step

These instructions assume you are using a recent release of Ubuntu where you have sudo permissions. For information about installing OpenEmbedded on other distributions, see here.

  1. Configure your system and get required and recommended software packages.
    $ sudo apt-get update
    $ sudo apt-get install -y git-core subversion build-essential help2man diffstat texi2html texinfo libncurses5-dev cvs gawk python-dev python-pysqlite2 unzip python-psyco
    $ sudo ln -sf bash /bin/sh 
    $ sudo sh -c 'echo -e "vm.vdso_enabled=0\nvm.mmap_min_addr=0" >> /etc/sysctl.conf' 
    $ sudo sysctl -p 
  2. Download the Verdex repository and the bitbake tool into a verdex-oe directory in your home folder.
    $ mkdir -p ~/overo-oe 
    $ cd ~/verdex-oe 
    $ git clone git://gitorious.org/gumstix-oe/mainline.git org.openembedded.dev 
    $ cd org.openembedded.dev 
    $ git checkout --track -b verdex origin/verdex 
    $ cd ~/verdex-oe 
    $ git clone git://git.openembedded.net/bitbake bitbake 
    $ cd bitbake 
    $ git checkout 1.8.18 
    $ cd ~/verdex-oe 
    $ cp -r org.openembedded.dev/contrib/gumstix/build . 
  3. Set up the environment variables. You can do this manually each time you open a terminal:
    $ source ~/verdex-oe/build/profile
    Or set your .bash_profile to load them automatically every time you open a console.
    $ cat ~/verdex-oe/build/profile >> ~/.bash_profile 
  4. (Optional) Some tweaks...
    • If you are building on a multi-core machine, uncomment the PARALLEL_MAKE and BB_NUMBER_THREADS variables in the ~/verdex-oe/build/conf/site.conf file. Some people recommend setting these variables to n-1 where n is the number of threads contexts or cores you have.
    • If you have already downloaded much of the required source code for OE (i.e. you use OpenEmbedded already for another machine like Overo or via the older SVN repository), point bitbake to your old sources directory by editing the DL_DIR in the ~/verdex-oe/build/conf/site.conf
    • Create a symbolic link into the directory where the verdex images will be built for easy access.
      $ ln -sf ~/verdex-oe/tmp/deploy/glibc/images/gumstix-verdex/ ~/verdex-oe/images
    • Get rid of a warning about a missing user.collection directory. Either make a user.collections/recipes directory
      $ mkdir -p ~/verdex-oe/user.collection/recipes
      Or, untar the Open Embedded 'helloworld' tutorial tutorial which may be useful if you want to learn more about OE. See this page for more details.
      $ tar -xzf myhelloworld.tar.gz -C ~/verdex-oe
  5. Now you are set to build a new kernel and root file system. Note, this step may take up to 6 hours depending on your internet connection and your machine. The -k argument asks bitbake to continue building despite errors; it is useful for long, unattended builds.
    $ bitbake -k verdex-console-image
  6. Create a microSD card with a small (50MB is more than large enough) FAT partition and an Ext3 partition large enough to hold your untarred root file system. See this page for instructions. Note: It isn't necessary to follow the Installing the Boot Files instructions.
  7. Remount the card. This assumes /dev/sde1 is the FAT partition and /dev/sde2 is the Ext3 partition.
    $ sudo mkdir /media/card_fat 
    $ sudo mkdir /media/card_ext 
    $ sudo mount /dev/sde1 /media/card_fat 
    $ sudo mount /dev/sde2 /media/card_ext 
  8. Copy your kernel to the FAT partition of the microSD and untar your rootfs to the Ext3 partition. Also, we've assumed you've created a symbolic link to called images to the directory where the images are located as described in the optional steps above.
    $ sudo cp ~/verdex-oe/images/uImage-gumstix-verdex-bin /media/card_fat/uimage 
    $ sudo tar -xzf ~/verdex-oe/images/verdex-console-image-verdex.tar.gz -C /media/card_ext/ 
  9. Insert your microSD into your Verdex and boot it. By default, the gumstix-factory-script will try to boot from a microSD card but if your new kernel isn't loading, interrupt U-Boot on startup and issue the following commands.
    > mmcinit 
    > fatload mmc 0 a2000000 uimage 
    > setenv bootargs console=ttyS0,115200n8 root=/dev/mmcblk0p2 rw rootdelay=1 
    > bootm a2000000
    Note, unless you saveenv, you'll need to do this each time you boot.

Future Plans

Once this repository has become more stable, it will supersede the older SVN repository as the main source of code for the Verdex COMs. This should include updated kernels and U-Boot as well as updated OE code pulled from (and eventually merged into) the Overo branch. Documentation will be refined based on this wiki page.

Problems? Improvements?

  • bug reports and, better yet, bug fixes are always welcome. Send mail to the Gumstix users mailing list and copy Ash (ash (at) gumstix (dot) com).
  • make changes to this wiki page to highlight known issues and suggest improvements