Difference between revisions of "Verdex Git Repository"

From Gumstix User Wiki
Jump to: navigation, search
(Instructions for building a kernel and rootfs from the Gumstix Verdex Git Repository)
 
(Problems? Improvements?)
 
(16 intermediate revisions by 7 users not shown)
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==
Line 20: Line 21:
  
 
==Step by Step==
 
==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 [http://wiki.openembedded.net/index.php/OEandYourDistro here].
+
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 [http://wiki.openembedded.net/index.php?title=OEandYourDistro here].
  
 
# Configure your system and get required and recommended software packages.
 
# Configure your system and get required and recommended software packages.
#:<pre>sudo apt-get update</pre>
+
#:<pre>$ sudo apt-get update</pre>
#:<pre>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</pre>  
+
#:<pre>$ 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</pre>  
#:<pre>sudo ln -sf bash /bin/sh </pre>
+
#:<pre>$ sudo ln -sf bash /bin/sh </pre>
#:<pre>sudo sh -c 'echo -e "vm.vdso_enabled=0\nvm.mmap_min_addr=0" >> /etc/sysctl.conf' </pre>
+
#:<pre>$ sudo sh -c 'echo -e "vm.vdso_enabled=0\nvm.mmap_min_addr=0" >> /etc/sysctl.conf' </pre>
#:<pre>sudo sysctl -p </pre>
+
#:<pre>$ sudo sysctl -p </pre>
 
# Download the Verdex repository and the bitbake tool into a ''verdex-oe'' directory in your home folder.
 
# Download the Verdex repository and the bitbake tool into a ''verdex-oe'' directory in your home folder.
#:<pre>mkdir -p ~/overo-oe </pre>
+
#:<pre>$ mkdir -p ~/verdex-oe </pre>
#:<pre> cd ~/verdex-oe </pre>
+
#:<pre>$ cd ~/verdex-oe </pre>
#:<pre>git clone git://gitorious.org/gumstix-oe/mainline.git org.openembedded.dev </pre>
+
#:<pre>$ git clone git://gitorious.org/gumstix-oe/mainline.git org.openembedded.dev </pre>
#:<pre>cd org.openembedded.dev </pre>
+
#:<pre>$ cd org.openembedded.dev </pre>
#:<pre>git checkout --track -b verdex origin/verdex </pre>
+
#:<pre>$ git checkout --track -b verdex origin/verdex </pre>
#:<pre>cd ~/verdex-oe </pre>
+
#:<pre>$ cd ~/verdex-oe </pre>
#:<pre>git clone git://git.openembedded.net/bitbake bitbake </pre>
+
#:<pre>$ git clone git://git.openembedded.org/bitbake bitbake </pre>
#:<pre>cd bitbake </pre>
+
#:<pre>$ cd bitbake </pre>
#:<pre>git checkout 1.8.18 </pre>
+
#:<pre>$ git checkout 1.8.18 </pre>
#:<pre>cd ~/verdex-oe </pre>
+
#:<pre>$ cd ~/verdex-oe </pre>
#:<pre>cp -r org.openembedded.dev/contrib/gumstix/build . </pre>
+
#:<pre>$ cp -r org.openembedded.dev/contrib/gumstix/build . </pre>
 
# Set up the environment variables.  You can do this manually each time you open a terminal:
 
# Set up the environment variables.  You can do this manually each time you open a terminal:
 
#:<pre>$ source ~/verdex-oe/build/profile</pre>
 
#:<pre>$ source ~/verdex-oe/build/profile</pre>
Line 51: Line 52:
 
#* Get rid of a warning about a missing user.collection directory.  Either make a user.collections/recipes directory
 
#* Get rid of a warning about a missing user.collection directory.  Either make a user.collections/recipes directory
 
#*:<pre>$ mkdir -p ~/verdex-oe/user.collection/recipes</pre>
 
#*:<pre>$ mkdir -p ~/verdex-oe/user.collection/recipes</pre>
#*:Or, untar the Open Embedded 'helloworld' tutorial [TODO code package] which may be useful if you want to learn more about OE.  See [http://docs.openembedded.org/usermanual/usermanual.html#recipes_helloworld_example this page] for more details.
+
#*:Or, untar the Open Embedded 'helloworld' tutorial [[HelloWorld Examples| tutorial]] which may be useful if you want to learn more about OE.  See [http://docs.openembedded.org/usermanual/usermanual.html#recipes_helloworld_example this page] for more details.
 
#*:<pre>$ tar -xzf myhelloworld.tar.gz -C ~/verdex-oe</pre>
 
#*:<pre>$ tar -xzf myhelloworld.tar.gz -C ~/verdex-oe</pre>
# 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.
+
# 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. This build will stop if there are any errors. This could be useful for build debugging as well.
 +
#:<pre>$ bitbake verdex-console-image</pre>
 +
#: Note: The ''-k'' argument can be used to tell bitbake to continue building despite errors; it is useful for long, unattended builds.
 
#:<pre>$ bitbake -k verdex-console-image</pre>
 
#:<pre>$ bitbake -k verdex-console-image</pre>
 
# 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 [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html this page] for instructions.  Note: It isn't necessary to follow the '''Installing the Boot Files''' instructions.
 
# 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 [http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html this page] for instructions.  Note: It isn't necessary to follow the '''Installing the Boot Files''' instructions.
 
# Remount the card. This assumes ''/dev/sde1'' is the FAT partition and ''/dev/sde2'' is the Ext3 partition.
 
# Remount the card. This assumes ''/dev/sde1'' is the FAT partition and ''/dev/sde2'' is the Ext3 partition.
#:<pre>$sudo mkdir /media/card_fat </pre>
+
#:<pre>$ sudo mkdir /media/card_fat </pre>
#:<pre>$sudo mkdir /media/card_ext </pre>
+
#:<pre>$ sudo mkdir /media/card_ext </pre>
#:<pre>$sudo mount /dev/sde1 /media/card_fat </pre>
+
#:<pre>$ sudo mount /dev/sde1 /media/card_fat </pre>
#:<pre>$sudo mount /dev/sde2 /media/card_ext </pre>
+
#:<pre>$ sudo mount /dev/sde2 /media/card_ext </pre>
 
#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.
 
#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.
 
#:<pre>$ sudo cp ~/verdex-oe/images/uImage-gumstix-verdex-bin /media/card_fat/uimage </pre>
 
#:<pre>$ sudo cp ~/verdex-oe/images/uImage-gumstix-verdex-bin /media/card_fat/uimage </pre>
 
#:<pre>$ sudo tar -xzf ~/verdex-oe/images/verdex-console-image-verdex.tar.gz -C /media/card_ext/ </pre>
 
#:<pre>$ sudo tar -xzf ~/verdex-oe/images/verdex-console-image-verdex.tar.gz -C /media/card_ext/ </pre>
# 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 you aren't booting your new image, interrupt U-Boot on startup and issue the following commands.
+
# 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.
#:<pre>mmcinit </pre>
+
#:<pre>> mmcinit </pre>
#:<pre>fatload mmc 0 a20000000 uimage </pre>
+
#:<pre>> fatload mmc 0 a2000000 uimage </pre>
#:<pre>setenv bootargs console=/dev/ttyS1,115200 root=/dev/mmcblk0p2 rw rootdelay=1 </pre>
+
#:<pre>> setenv bootargs console=ttyS0,115200n8 root=/dev/mmcblk0p2 rw rootdelay=1 </pre>
 +
#:<pre>> bootm a2000000</pre>
 
#:Note, unless you <tt>saveenv</tt>, you'll need to do this each time you boot.
 
#:Note, unless you <tt>saveenv</tt>, you'll need to do this each time you boot.
  
Line 74: Line 78:
  
 
==Problems? Improvements?==
 
==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).
+
* bug reports and, better yet, bug fixes are always welcome.  Send mail to the Gumstix users mailing list.
* make changes to this wiki page to highlight known issues and suggest improvements
+
* make changes to this wiki page to highlight known issues and suggest improvements.

Latest revision as of 13:32, 1 April 2016

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 ~/verdex-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.org/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. This build will stop if there are any errors. This could be useful for build debugging as well.
    $ bitbake verdex-console-image
    Note: The -k argument can be used to tell 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.
  • make changes to this wiki page to highlight known issues and suggest improvements.