How to setup environment for ADT with 1.1 on Fedora 16

From Yocto Project
Jump to navigationJump to search

Install the cross-toolchain by adt-installer

1.1 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. 1.2 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 con-figurations 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 direc-tory 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 down-load 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-sdkimages by set-ting YOCTOADT_ROOTFS_<arch> to "minimal sato-sdk", then YOCTOADT_ROOTFS_<arch> must be set to either minimal orsato-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.