Changes between Version 9 and Version 10 of OSSIEBeagleboard_BitBake
- Timestamp:
- 02/17/11 13:51:49 (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OSSIEBeagleboard_BitBake
v9 v10 6 6 [[PageOutline]] 7 7 == Getting Started With !OpenEmbedded == 8 Note: If you have already set up !OpenEmbedded and would just like to !BitBake OSSIE you may skip to the Building OSSIEsection.8 Note: If you have already set up !OpenEmbedded and would just like to !BitBake OSSIE you may skip to the [http://ossie.wireless.vt.edu/trac/wiki/OSSIEBeagleboard_BitBake#BuildingOSSIE Building OSSIE] section. 9 9 10 Note: This section is adopted from the !OpenEmbedded Wiki: [http://wiki.openembedded.org/index.php/Getting_started ].10 Note: This section is adopted from the !OpenEmbedded Wiki: [http://wiki.openembedded.org/index.php/Getting_started OE Getting Started]. Please read [http://www.openembedded.org/index.php/OEandYourDistro OE and Your Distro] for advice on how to configure your operating system. 11 11 12 12 === Prerequisites === 13 Before starting, make sure you have the following before preceding (see your distributions documentation on how to install software):13 Before starting, make sure you have the following software before preceding (see your distributions documentation on how to install software): 14 14 1. Git 15 15 2. SVN 16 3. CVS 17 4. C++ Compiler (e.g. g++) 18 5. diffstat 19 6. texi2html 20 7. GNU Autotools (specifically autoconf, automake and libtool) 21 8. makeinfo 22 9. chrpath 23 10. qemu (may not be necessary on some systems) 16 24 25 Other software may be required, but most distributions already include it. 17 26 18 27 === Getting The Toolchain === 19 28 First, create your directory structure. I recommend creating an OE directory in your home folder: 20 29 {{{ 21 $mkdir -p $HOME/OE/build/conf22 $cd $HOME/OE30 mkdir -p $HOME/OE/build/conf 31 cd $HOME/OE 23 32 }}} 24 33 25 34 Now, get the lastest !BitBake (1.10.1 as of this writing, to find the latest version visit http://download.berlios.de/bitbake/), and unpack it: 26 35 {{{ 27 $wget http://download.berlios.de/bitbake/bitbake-1.10.1.tar.gz # Download the BitBake package28 $tar zxvf bitbake-1.10.1.tar.gz # Extract it29 $mv bitbake{-1.10.1,} # Rename the directory to bitbake36 wget http://download.berlios.de/bitbake/bitbake-1.10.1.tar.gz # Download the BitBake package 37 tar zxvf bitbake-1.10.1.tar.gz # Extract it 38 mv bitbake{-1.10.1,} # Rename the directory to bitbake 30 39 }}} 31 40 32 Now that we have !BitBake, we need to get !OpenEmbedded. Before simply checking out !OpenEmbedded trunk, let's look for a recently tested tag here: http://git.openembedded.org/cgit.cgi/openembedded/refs/tags. As of this writing, the newest tested tag is "tested_2010-10-29". Be sure to check the commit log to ensure that a "beagleboard angstrom-2008.1" build was at least tested with a simple console-image. To get !OpenEmdedd run (this may take a while depending on your connection speed):41 Now that we have !BitBake, we need to get !OpenEmbedded. Before simply checking out !OpenEmbedded trunk, let's look for a recently tested tag (or even better, a recent release) here: http://git.openembedded.org/cgit.cgi/openembedded/refs/tags. As of this writing, the newest tested tag is "tested_2010-10-29". Be sure to check the commit log to ensure that a "beagleboard angstrom-2008.1" build was at least tested with a simple console-image. To get !OpenEmdedd run (this may take a while depending on your connection speed): 33 42 {{{ 34 $git clone git://git.openembedded.org/openembedded35 $cd openembedded43 git clone git://git.openembedded.org/openembedded 44 cd openembedded 36 45 # Replace "tested_2010-10-29" with the tag/branch you want 37 $git checkout tested_2010-10-2946 git checkout tested_2010-10-29 38 47 }}} 39 48 … … 41 50 Before configuring !BitBake, we should set some environment variables. There are many places to do this, including at build time, but we recommend placing the following lines at the end of your .bashrc file: 42 51 {{{ 43 $ cat >> $HOME/.bashrc << EOF 52 cat >> $HOME/.bashrc << EOF 53 44 54 # OpenEmbedded Environment Setup 45 export OEBASE= $HOME/OE46 export PATH= $OEBASE/bitbake/bin:$PATH47 export BBPATH= $OEBASE/build:$OEBASE/openembedded55 export OEBASE=\$HOME/OE 56 export PATH=\$OEBASE/bitbake/bin:\$PATH 57 export BBPATH=\$OEBASE/build:\$OEBASE/openembedded 48 58 export BB_ENV_EXTRAWHITE="OEBASE" 49 59 EOF 50 $. $HOME/.bashrc # Update environment60 . $HOME/.bashrc # Update environment 51 61 }}} 52 62 … … 55 65 Now that we have the toolchain and OSSIE recipes, we need to set up our configuration. Copy a sample configuration and edit it to fit our needs: 56 66 {{{ 57 $cd $HOME/OE/58 $cp openembedded/conf/local.conf.sample build/conf/local.conf59 $vim build/conf/local.conf # Use your favorite text-editor67 cd $HOME/OE/ 68 cp openembedded/conf/local.conf.sample build/conf/local.conf 69 vim build/conf/local.conf # Use your favorite text-editor 60 70 }}} 61 71 … … 80 90 DISTRO = "angstrom-2008.1" 81 91 ... 92 # These lines may be necessary depending on your build system 93 ENABLE_BINARY_LOCALE_GENERATION = "0" 94 ASSUME_PROVIDED += "qemu-native" 95 GLIBC_GENERATE_LOCALES = "en_US.UTF-8" # Add any locales you may need 96 ... 82 97 IMAGE_FSTYPES = " tar.bz2 " 83 98 ... … … 85 100 }}} 86 101 87 Other options that may be of interest are PARALLEL_MAKE and BB_NUMBER_THREADS especially for multi- coreor multi-processor build systems.102 Other options that may be of interest are PARALLEL_MAKE and BB_NUMBER_THREADS especially for multi-threaded, multi-core and/or multi-processor build systems. 88 103 89 104 === Building a Console Image === 90 105 This step is not required but recommended to ensure that your setup is working properly before you try to build the OSSIE recipes. We will build task-base and console-image. For more information on what exactly is happening here, see the !OpenEmbedded documentation. Together, these can take hours on a standard machine. We recommend you let it run over night. 91 106 {{{ 92 $ cd $HOME/OE/build93 $bitbake task-base && bitbake console-image107 cd $OEBASE/build 108 bitbake task-base && bitbake console-image 94 109 }}} 95 110 If both builds succeed (run the bitbake command again to ensure success) then you will have a kernel image located at: [[br]] … … 103 118 The OSSIE recipes are located in the OSSIE SVN repository. 104 119 {{{ 105 $ cd $HOME/OE/ 106 $svn --username anon --password ossiesdr co \120 cd $OEBASE 121 svn --username anon --password ossiesdr co \ 107 122 https://ossie.wireless.vt.edu/repos/ossie/ossiedev/branches/jawil06/recipes ossie-recipes 108 123 }}} 109 Note: if you skipped the instructions on setting up !OpenEmbedded, you must add ossie-recipes to BBFILESin your local.conf.124 Note: if you skipped the instructions on setting up !OpenEmbedded, you must add ossie-recipes to the BBFILES variable in your local.conf. 110 125 111 126 === omniORBpy Workarounds === … … 114 129 First, modify the omniORB-native recipe to stage all of the necessary header files: 115 130 {{{ 116 $ vim $OEHOME/openembedded/recipes/omniorb/omniorb_4.1.4.bb # Use your favorite text-editor131 vim $OEBASE/openembedded/recipes/omniorb/omniorb_4.1.4.bb # Use your favorite text-editor 117 132 # Add the following to the bottom of the file 118 133 TODO: what needs to be added? … … 121 136 Finally, !BitBake the modified recipe. 122 137 {{{ 123 $ cd $OEHOME/build124 $bitbake omniorb-native # This could take some time138 cd $OEBASE/build 139 bitbake omniorb-native # This could take some time 125 140 }}} 126 141 … … 128 143 This will create a console image with all the necessary development files to build other OSSIE components and tools for which there is not already a recipe natively on the !BeagleBoard 129 144 {{{ 130 $ cd $HOME/OE/build131 $bitbake ossie-dev-console-image145 cd $OEBASE/build 146 bitbake ossie-dev-console-image 132 147 }}}