Classic Setting Up Build Environment

From AragoWiki

(Difference between revisions)
Jump to: navigation, search
(Add SCRATCH area setup and TI RHEL4 paths setup)
(14 intermediate revisions not shown)
Line 1: Line 1:
Create a new directory for the build environment:
Create a new directory for the build environment:
-
$ mkdir $HOME/oe
+
{{Box Output|Create the directory|
-
$ cd $HOME/oe
+
<pre>
-
 
+
$ mkdir $HOME/oe
-
To be able to download sources from the net, it may be required to configure [[Proxy Settings]].
+
$ cd $HOME/oe
 +
</pre>
 +
}}
Now check out the following repositories:
Now check out the following repositories:
-
$ git clone git://arago-project.org/git/arago.git
+
{{Box Output|Clone Arago repositories|
-
$ git clone git://arago-project.org/git/arago-oe-dev.git
+
<pre>
-
$ git clone git://arago-project.org/git/arago-bitbake.git
+
$ git clone git://arago-project.org/git/arago.git
 +
$ git clone git://arago-project.org/git/arago-oe-dev.git
 +
$ git clone git://arago-project.org/git/arago-bitbake.git
 +
</pre>
 +
}}
Replace "git" protocol with "http" or "ssh", depending on the required access.
Replace "git" protocol with "http" or "ssh", depending on the required access.
 +
 +
{{Box Note|To be able to download sources from the net, it may be required to configure [[Proxy Settings]].}}
 +
 +
{{Box Note|If you know what you are doing, you can try using Arago overlay with [[Use Upstream OE and BitBake|upstream OpenEmbedded and BitBake]] repositories.}}
The directory should now be populated with 3 subdirectories – <code>arago</code>, <code>arago-oe-dev</code> and <code>arago-bitbake</code>.
The directory should now be populated with 3 subdirectories – <code>arago</code>, <code>arago-oe-dev</code> and <code>arago-bitbake</code>.
 +
 +
Arago repository comes with samples of <code>arago/setenv</code> and <code>arago/conf/local.conf</code> files, which you can use as a starting point, by copying them into their actual names (without <code>.sample</code> extension) and modifying to suit your needs:
 +
 +
{{Box Output|Copy setup/config files|
 +
<pre>
 +
$ cp arago/setenv.sample arago/setenv
 +
$ cp arago/conf/local.conf.sample arago/conf/local.conf
 +
</pre>
 +
}}
Edit <code>arago/setenv</code> file and make sure environment variables are set properly. <code>OEBASE</code> should point to the directory you’ve created in the beginning:
Edit <code>arago/setenv</code> file and make sure environment variables are set properly. <code>OEBASE</code> should point to the directory you’ve created in the beginning:
-
export OEBASE=$HOME/oe
+
{{Box File|arago/setenv|
 +
<pre>
 +
export OEBASE=$HOME/oe
 +
</pre>
 +
}}
Also, in order to use a separate "scratch" area outside of home directory, you may want to enable <code>SCRATCH</code> variable and point it appropriately:
Also, in order to use a separate "scratch" area outside of home directory, you may want to enable <code>SCRATCH</code> variable and point it appropriately:
-
export SCRATCH=/sim/scratch_AID
+
{{Box File|arago/setenv|
 +
<pre>
 +
export SCRATCH=/sim/scratch_AID
 +
</pre>
 +
}}
Now, source this file to set the environment variables:
Now, source this file to set the environment variables:
-
$ . arago/setenv
+
{{Box Output|Set the environment variables|
 +
<pre>
 +
$ . arago/setenv
 +
</pre>
 +
}}
Or alternatively (which is the same, but maybe required if using other shell than bash):
Or alternatively (which is the same, but maybe required if using other shell than bash):
-
$ source arago/setenv
+
{{Box Output|Set the environment variables|
 +
<pre>
 +
$ source arago/setenv
 +
</pre>
 +
}}
-
TI Note: Users of TI RHEL4 systems should also source the <code>arago/ti-rhel4-setenv</code> to set additional paths.
+
<!-- Make sure your <code>arago/conf/local.conf</code> points to the CodeSourcery toolchain:
-
Make sure your <code>arago/conf/local.conf</code> points to the CodeSourcery toolchain (refer to [[Getting CodeSourcery Toolchain]] for obtaining one):
+
SDK_PATH=/opt/arm-2007q3
 +
-->
 +
If not done before, set the <code>PATH</code> variable to point to the CodeSourcery toolchain (refer to [[Getting CodeSourcery Toolchain]] for obtaining one):
-
SDK_PREFIX=/opt/arm-2007q3
+
{{Box Output|Point to CSL toolchain|
 +
<pre>
 +
$ export PATH=/opt/arm-2009q1/bin:$PATH
 +
</pre>
 +
}}
-
If not done before, set the <code>PATH</code> variable to point to the CodeSourcery toolchain:
+
Now it should be ready to start a build of the minimal filesystem image:
-
$ export PATH=/opt/arm-2007q3/bin:$PATH
+
{{Box Output|Build a minimal base filesystem|
 +
<pre>
 +
$ bitbake arago-base-image
 +
</pre>
 +
}}
-
Extract the <code>arago-csl-sdk.tar.bz2</code> from http://arago-project.org/files/short-term/extras/ on top of the CodeSourcery toolchain (that may require root permissions, depending where CS toolchain was installed):
+
Or to build a bigger filesystem with more applications, libraries and tools:
-
# tar -jxvf arago-sdk-bins/arago-csl-sdk.tar.bz2 -C /opt/arm-2007q3
+
{{Box Output|Build a "demo" filesystem for OMAP3 EVM|
 +
<pre>
 +
$ MACHINE=omap3evm bitbake arago-console-image
 +
</pre>
 +
}}
-
Now it should be ready to start the build of the minimal filesystem image:
+
To build a kernel, use the following command. Please note, that currently only PSP and [http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=summary linux-omap] linux kernels for OMAP3 EVM and BeagleBoard are supported. DaVinci platforms use [http://git.kernel.org/?p=linux/kernel/git/khilman/linux-davinci.git linux-davinci] kernels and also can use [http://arago-project.org/git/people/?p=sneha/linux-davinci-staging.git;a=summary linux-davinci-staging], which is a staging area for upcoming features.
-
$ bitbake arago-base-image
+
{{Box Output|Build different kernels for supported platforms|
 +
<pre>
 +
$ MACHINE=omap3evm bitbake virtual/kernel
 +
$ MACHINE=beagleboard bitbake virtual/kernel
 +
$ MACHINE=dm6446-evm bitbake virtual/kernel
 +
$ MACHINE=dm355-evm bitbake virtual/kernel
 +
</pre>
 +
}}
-
To build the kernel, use the following command. Please note, that currently only PSP linux kernels for OMAP3 EVM are supported. In the future, it should be possible to build kernels for DaVinci platforms.
+
Resulting images and packages will be placed under <code>arago-deploy</code> directory - <code>images</code> for the filesystem, kernel and bootloader; and <code>ipk</code> for binary IPK packages, respectively.
-
$ MACHINE=omap3evm bitbake virtual/kernel
+
{{Box Output|High-level hierarchy of arago-deploy directory|
 +
<pre>
 +
arago-deploy
 +
|-- images
 +
|  |-- arago
 +
|  |-- dm355-evm
 +
|  |-- dm6446-evm
 +
|  `-- omap3evm
 +
|-- ipk
 +
|  |-- all
 +
|  |-- arago
 +
|  |-- armv5te
 +
|  |-- armv7a
 +
|  |-- dm355-evm
 +
|  |-- dm6446-evm
 +
|  |-- i686
 +
|  |-- i686-armv5te-sdk
 +
|  |-- i686-armv7a-sdk
 +
|  `-- omap3evm
 +
`-- sdk
 +
</pre>
 +
}}

Revision as of 00:10, 28 August 2010

Create a new directory for the build environment:

Create the directory
$ mkdir $HOME/oe
$ cd $HOME/oe

Now check out the following repositories:

Clone Arago repositories
$ git clone git://arago-project.org/git/arago.git
$ git clone git://arago-project.org/git/arago-oe-dev.git
$ git clone git://arago-project.org/git/arago-bitbake.git

Replace "git" protocol with "http" or "ssh", depending on the required access.

Note: To be able to download sources from the net, it may be required to configure Proxy Settings.
Note: If you know what you are doing, you can try using Arago overlay with upstream OpenEmbedded and BitBake repositories.

The directory should now be populated with 3 subdirectories – arago, arago-oe-dev and arago-bitbake.

Arago repository comes with samples of arago/setenv and arago/conf/local.conf files, which you can use as a starting point, by copying them into their actual names (without .sample extension) and modifying to suit your needs:

Copy setup/config files
$ cp arago/setenv.sample arago/setenv
$ cp arago/conf/local.conf.sample arago/conf/local.conf

Edit arago/setenv file and make sure environment variables are set properly. OEBASE should point to the directory you’ve created in the beginning:

File: arago/setenv
export OEBASE=$HOME/oe

Also, in order to use a separate "scratch" area outside of home directory, you may want to enable SCRATCH variable and point it appropriately:

File: arago/setenv
export SCRATCH=/sim/scratch_AID

Now, source this file to set the environment variables:

Set the environment variables
$ . arago/setenv

Or alternatively (which is the same, but maybe required if using other shell than bash):

Set the environment variables
$ source arago/setenv

If not done before, set the PATH variable to point to the CodeSourcery toolchain (refer to Getting CodeSourcery Toolchain for obtaining one):

Point to CSL toolchain
$ export PATH=/opt/arm-2009q1/bin:$PATH

Now it should be ready to start a build of the minimal filesystem image:

Build a minimal base filesystem
$ bitbake arago-base-image

Or to build a bigger filesystem with more applications, libraries and tools:

Build a "demo" filesystem for OMAP3 EVM
$ MACHINE=omap3evm bitbake arago-console-image

To build a kernel, use the following command. Please note, that currently only PSP and linux-omap linux kernels for OMAP3 EVM and BeagleBoard are supported. DaVinci platforms use linux-davinci kernels and also can use linux-davinci-staging, which is a staging area for upcoming features.

Build different kernels for supported platforms
$ MACHINE=omap3evm bitbake virtual/kernel
$ MACHINE=beagleboard bitbake virtual/kernel
$ MACHINE=dm6446-evm bitbake virtual/kernel
$ MACHINE=dm355-evm bitbake virtual/kernel

Resulting images and packages will be placed under arago-deploy directory - images for the filesystem, kernel and bootloader; and ipk for binary IPK packages, respectively.

High-level hierarchy of arago-deploy directory
arago-deploy
|-- images
|   |-- arago
|   |-- dm355-evm
|   |-- dm6446-evm
|   `-- omap3evm
|-- ipk
|   |-- all
|   |-- arago
|   |-- armv5te
|   |-- armv7a
|   |-- dm355-evm
|   |-- dm6446-evm
|   |-- i686
|   |-- i686-armv5te-sdk
|   |-- i686-armv7a-sdk
|   `-- omap3evm
`-- sdk
Personal tools