Difference between revisions of "Setting up a build environment for overo-oe"

From PaparazziUAV
Jump to navigation Jump to search
 
(6 intermediate revisions by 4 users not shown)
Line 2: Line 2:


http://www.gumstix.net/Documentation/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/109.html
http://www.gumstix.net/Documentation/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/109.html
(you need a lot of space to reduce the amount of space needed insert
INHERIT += "rm_work"
to overo-oe/build/conf/local.conf)


when you are at the command:
when you are at the command:
Line 12: Line 18:
....expat_2.0.1.bb do_unpack failed  
....expat_2.0.1.bb do_unpack failed  


2 solution to this error:
solution to this error:
 
http://old.nabble.com/Development-Machine-Build-Environment-Setup---Help!-td28539560.html
 
or


http://www.facebook.com/note.php?note_id=398968379361
http://www.facebook.com/note.php?note_id=398968379361
Line 22: Line 24:
follow instructions of ERROR#1
follow instructions of ERROR#1


== patching the kernel for spidev
== patching the kernel for spidev ==




Line 29: Line 31:
Work is in progress to offer a pre-compiled cross compilation toolchain.
Work is in progress to offer a pre-compiled cross compilation toolchain.


For the moment compiling omap-console-image will generate the cross compiler and libs you need. You also need to compile libevent which is not compiled by omap-console-image (  bitbake build libevent )
For the moment compiling omap-console-image will generate the cross compiler and libs you need. You also need to compile libevent which is not compiled by omap-console-image (  [[bitbake libevent]] )


  -patching the kernel for spidev
patching the kernel for spidev -- look where kernel comes from in
    look where kernel comes from in /overo-oe/org.openembedded.dev/recipes/linux/linux-omap3_2.6.32.bb
  /overo-oe/org.openembedded.dev/recipes/linux/linux-omap3_2.6.32.bb


         git clone git://www.sakoman.com/git/linux-omap-2.6.git
         git clone git://www.sakoman.com/git/linux-omap-2.6.git
Line 38: Line 40:
         git checkout d434b954906c4f3e356d64d6b49675c601456f51
         git checkout d434b954906c4f3e356d64d6b49675c601456f51


         git diff >  /overo-oe/org.openembedded.dev/recipes/linux/linux-omap3-2.6.32/overo/add-spidev-for-mcspi1.patch
         place the following patch into /overo-oe/org.openembedded.dev/recipes/linux/linux-omap3-2.6.32/overo/add-spidev-for-mcspi1.patch
 
 
  diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
  index 165b6bd..fbe3be4 100644
  --- a/arch/arm/mach-omap2/board-overo.c
  +++ b/arch/arm/mach-omap2/board-overo.c
  @@ -625,6 +625,14 @@ static struct spi_board_info overo_spi_board_info[] __initdata = {
                    .mode                        = SPI_MODE_3,
            },
    #endif
  +    {
  +              .modalias      = "spidev",
  +              .max_speed_hz  = 48000000, //48 Mbps
  +              .bus_num        = 1,
  +              .chip_select    = 1,
  +              .mode          = SPI_MODE_1,
  +              //              .controller_data        = &spidev_mcspi_config,
  +      },
    };
    static int __init overo_spi_init(void)
 
 


         remove ads and lgphillips from /overo-oe/org.openembedded.dev/recipes/linux/linux-omap3/overo/defconfig
         remove ads and lgphillips from /overo-oe/org.openembedded.dev/recipes/linux/linux-omap3/overo/defconfig
Line 55: Line 80:
       the defconfig I changed is in  
       the defconfig I changed is in  
       /overo-oe/tmp/work/overo-angstrom-linux-gnueabi/linux-omap3-2.6.32-r51/
       /overo-oe/tmp/work/overo-angstrom-linux-gnueabi/linux-omap3-2.6.32-r51/
[[Category:Software]] [[Category:Developer_Documentation]]

Latest revision as of 14:21, 10 March 2011

follow the instructions on his page:

http://www.gumstix.net/Documentation/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/109.html

(you need a lot of space to reduce the amount of space needed insert

INHERIT += "rm_work"

to overo-oe/build/conf/local.conf)

when you are at the command:

$ bitbake omap3-console-image (when you are in a virtual box environment it will take long 12 hours at least)

and build it on Ubuntu 10.04 LTS - the Lucid Lynx - release you will get this error:

ERROR: ....expat_2.0.1.bb do_unpack failed

solution to this error:

http://www.facebook.com/note.php?note_id=398968379361

follow instructions of ERROR#1

patching the kernel for spidev

You can follow the instructions on gumstix's website to build a complete cross development environment. Paparazzi's Makefile will default to look for it in /overo-oe

Work is in progress to offer a pre-compiled cross compilation toolchain.

For the moment compiling omap-console-image will generate the cross compiler and libs you need. You also need to compile libevent which is not compiled by omap-console-image ( bitbake libevent )

patching the kernel for spidev -- look where kernel comes from in

  /overo-oe/org.openembedded.dev/recipes/linux/linux-omap3_2.6.32.bb
       git clone git://www.sakoman.com/git/linux-omap-2.6.git
       git checkout d434b954906c4f3e356d64d6b49675c601456f51
       place the following patch into /overo-oe/org.openembedded.dev/recipes/linux/linux-omap3-2.6.32/overo/add-spidev-for-mcspi1.patch


  diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
  index 165b6bd..fbe3be4 100644
  --- a/arch/arm/mach-omap2/board-overo.c
  +++ b/arch/arm/mach-omap2/board-overo.c
  @@ -625,6 +625,14 @@ static struct spi_board_info overo_spi_board_info[] __initdata = {
                   .mode                        = SPI_MODE_3,
           },
   #endif
  +     {
  +               .modalias       = "spidev",
  +               .max_speed_hz   = 48000000, //48 Mbps
  +               .bus_num        = 1,
  +               .chip_select    = 1,
  +               .mode           = SPI_MODE_1,
  +               //               .controller_data        = &spidev_mcspi_config,
  +      },
   };

   static int __init overo_spi_init(void)


       remove ads and lgphillips from /overo-oe/org.openembedded.dev/recipes/linux/linux-omap3/overo/defconfig
       really in  /overo-oe/org.openembedded.dev/recipes/linux/linux-omap3-2.6.32/overo/
       edit /overo-oe/org.openembedded.dev/recipes/linux/linux-omap3_2.6.32.bb 
        SRC_URI_append = " \
          file://${BOOT_SPLASH} \
          file://add-spidev-for-mcspi1.patch;patch=1 \
          "


      bitbake -c clean linux-omap3
      bitbake -c configure linux-omap3
      bitbake -c rebuild linux-omap3
      the defconfig I changed is in 
      /overo-oe/tmp/work/overo-angstrom-linux-gnueabi/linux-omap3-2.6.32-r51/