How to setup environment for ADT with 1.1 on Fedora 16: Difference between revisions

From Yocto Project
Jump to navigationJump to search
Line 10: Line 10:
We use the ADT Installer Script as an example to install ADT below.
We use the ADT Installer Script as an example to install ADT below.


=Getting the ADT Installer Tartall=
==Getting the ADT Installer Tartall==
The ADT Installer is contained in the ADT Installer tarball. You can download the tarball of version 1.1 into any directory from http://downloads.yoctoproject.org/releases/yocto/yocto-1.1/adt_installer.
The ADT Installer is contained in the ADT Installer tarball. You can download the tarball of version 1.1 into any directory from http://downloads.yoctoproject.org/releases/yocto/yocto-1.1/adt_installer.



Revision as of 03:19, 27 February 2012

Installing the ADT

There are three method to install the ADT, which includes the cross-toolchain. Regardless of the installation you choose, you must source the cross-toolchain environment setup script before you use the toolchain.

  • Use the ADT Installer Script: This method is the recommended way to install the ADT because it automates much of the process for you. For example, you can configure the installation to install the QEMU emulator and the user-space NFS, specify which root filesystem profiles to download, and define the target sysroot location.
  • Use an Existing Toolchain Tarball: Using this method, you select and download an architecture-specific toolchain tarball and then hand-install the toolchain. If you use this method, you just get the cross-toolchain and QEMU - you do not get any of the other mentioned benefits had you run the ADT Installer script.
  • Use the Toolchain from within a Yocto Project Build Tree: If you already have a Yocto Project build tree, you can build the cross-toolchain within tree. However, like the previous method mentioned, you only get the cross-toolchain and QEMU - you do not get any of the other benefits without taking separate steps.

We use the ADT Installer Script as an example to install ADT below.

Getting the ADT Installer Tartall

The ADT Installer is contained in the ADT Installer tarball. You can download the tarball of version 1.1 into any directory from http://downloads.yoctoproject.org/releases/yocto/yocto-1.1/adt_installer.

Configuring and Running the ADT Installer Script

Before running the ADT Installer script, you need to unpack the tarball. You can unpack the tarball in any directory you wish. Unpacking it creates the directory adt-installer, which contains the ADT Installer script (adt-installer) and its configuration file is adt_installer.conf. Before you run the script, however, you should examine the ADT Installer configuration file and be sure you are going to get what you want. Your configurations determine which kernel and filesystem image are downloaded. The following list describes the configurations you can define for the ADT Installer. For configuration values and restrictions, see the comments in the adt-installer.conf file:

  • YOCTOADT_REPO: This area includes the IPKG-based packages and the root filesystem upon which the installation is based. If you want to set up your own IPKG repository pointed to by YOCTOADT_REPO, you need to be sure that the directory structure follows the same layout as the reference directory set up at http://adtrepo.yoctoproject.org. Also, your repository needs to be accessible through HTTP.
  • YOCTOADT_TARGETS: The machine target architectures for which you want to set up cross-development environments.
  • YOCTOADT_QEMU: Indicates whether or not to install the emulator QEMU.
  • YOCTOADT_NFS_UTIL: Indicates whether or not to install user mode NFS. If you plan to use the Yocto Eclipse IDE plug-in against QEMU, you should in-stall NFS.
  • YOCTOADT_ROOTFS_<arch>: The root filesystem images you want to download from the YOCTOADT_IPKG_REPO repository.
  • YOCTOADT_TARGET_SYSROOT_IMAGE_<arch>: The particular root filesystem used to extract and create the target sysroot. The value of this variable must have been specified with YOCTOADT_ROOTFS_<arch>. For example, if you downloaded both minimal and sato-sdk images by setting YOCTOADT_ROOTFS_<arch> to "minimal sato-sdk", then YOCTOADT_ROOTFS_<arch> must be set to either minimal or sato-sdk.
  • YOCTOADT_TARGET_SYSROOT_LOC_<arch>: The location on the development host where the target sysroot is created.

For working with Eclipse, we set the parameters in adt-installer.conf as below, we just install arm arch as an example:

  YOCTOADT_VERSION=1.1
  YOCTOADT_REPO=http://adtrepo.yoctoproject.org/$YOCTOADT_VERSION
  YOCTOADT_TARGETS="arm"
  YOCTOADT_QEMU="Y"
  YOCTOADT_NFS_UTIL="Y"
  YOCTOADT_ROOTFS_arm=" sato-sdk"
  YOCTOADT_TARGET_SYSROOT_IMAGE_arm=" sato-sdk "
  YOCTOADT_TARGET_SYSROOT_LOC_arm="$HOME/xuhongna/test-yocto/arm"

After you have configured the adt_installer.conf file, run the installer using the following command: adt_installer, before you run the script, you should make sure add the sudo authority to your user account. The installation is dependent on the “Packages” section of The Tocto Project Quick Start and other two packages of python-psyco and eglibc-devel. Once the installer begins to run, you are asked whether you want to run in in-teractive or silent mode. If you want to closely monitor the installation, choose “I” for interactive mode rather than “S” for silent mode. Follow the prompts from the script to complete the installation. Once the installation completes, the ADT, which includes the cross-toolchain, is installed. You will notice environment setup files for the cross-toolchain in /opt/poky/1.1, and image tarballs in the adt-installer directory according to your installer configurations, and the target sysroot located according to the YOCTOADT_TARGET_SYSROOT_LOC_<arch> variable also in your configura-tion file.


Working with Eclipse

Setting up the Eclipse IDE

To develop within the Eclipse IDE, you need to do the following:

Install the optimal version of the Eclipse IDE

For FC 16,To install the Eclipse IDE we just run command: sudo yum install eclipse, currently it will install the version 3.7.1. Avoid Memory Error we start eclipse use this command: eclipse --vmargs --XX:PermSize=256M

Configure the Eclipse IDE

1.Start the Eclipse IDE. 2.Make sure you are in your Workbench and select "Install New Software" from the "Help" pull-down menu. 3.Select indigo - http://download.eclipse.org/releases/indigo from the "Work with:" pull-down menu, if there is no indigo you should select Add… to add the URL. 4.Expand the box next to Programming Languages and select the Autotools Support for CDT (incubation) and C/C++ Development Tools boxes. 5.Complete the installation and restart the Eclipse IDE. 6.After the Eclipse IDE restarts and from the Workbench, select "Install New Software" from the "Help" pull-down menu. 7.Click the "Available Software Sites" link. 8.Check the box next to http://download.eclipse.org/tm/updates/3.3 and click "OK". 9.Select http://download.eclipse.org/tm/updates/3.3 from the "Work with:" pull-down menu. 10.Check the box next to TM and RSE Main Features. 11.Expand the box next to TM and RSE Optional Add-ons and select every item except RSE Unit Tests and RSE WinCE Services (incuba-tion). 12.Complete the installation and restart the Eclipse IDE. 13.If necessary, select "Install New Software" from the "Help" pull-down menu so you can click the "Available Software Sites" link again. 14.After clicking "Available Software Sites", check the box next to http://download.eclipse.org/tools/cdt/releases/indigo and click "OK". 15.Select http://download.eclipse.org/tools/cdt/releases/indigo from the "Work with:" pull-down menu. 16.Check the box next to CDT Main Features. 17.Expand the box next to CDT Optional Features and select C/C++ Remote Launch and Target Communication Framework (incubation). 18.Complete the installation and restart the Eclipse IDE.

Install the Eclipse Yocto Plug-in

1.Start up the Eclipse IDE. 2.In Eclipse, select "Install New Software" from the "Help" menu. 3.Click "Add..." in the "Work with:" area. 4.Enter http://www.yoctoproject.org/downloads/eclipse-plugin/1.1 in the URL field and provide a meaningful name in the "Name" field. 5.If you want to update the version of eclipse-plugin, you may get the tarball named like org.yocto.sdk-${Release}-${Date}-archive.zip, in step 4 you just click Archive… to point the location of the tarball. 6.Click "OK" to have the entry added to the "Work with:" drop-down list. 7.Select the entry for the plug-in from the "Work with:" drop-down list. 8.Complete the remaining software installation steps and then restart the Eclipse IDE to finish the installation of the plug-in.