The XDAndroid Project is no longer active.
This site provides archived information from while the project was under development. Some links may no longer function.

Difference between revisions of "Building and Packaging"

From The XDAndroid Project
Jump to navigation Jump to search
[checked revision][checked revision]
Line 40: Line 40:
 
Until development of the system has progressed to the point where the system can be flashed to the phone's integrated flash storage, most of the generated images are of no concern. The most interesting image is <tt>system.img</tt>, which contains the binaries generated by the compilation process.
 
Until development of the system has progressed to the point where the system can be flashed to the phone's integrated flash storage, most of the generated images are of no concern. The most interesting image is <tt>system.img</tt>, which contains the binaries generated by the compilation process.
  
If the recommendations given in [[Build Configuration]] have been followed, the filesystem images will be ext2. This is usable as-is with the current boot process that the XDAndroid project uses, and it can be renamed <tt>system.ext2</tt> and placed in the user's <tt>andboot</tt> directory for a successful boot.
+
If the recommendations given in [[Build Configuration]] have been followed, the filesystem images will be ext2. This is usable as-is with the current boot process that the XDAndroid project uses, and it can be renamed <tt>[[system.ext2]]</tt> and placed in the user's <tt>andboot</tt> directory for a successful boot.
  
 
Optionally, the system image can be repacked as a SquashFS file system, for smaller size. Instructions on completing this step will follow shortly.
 
Optionally, the system image can be repacked as a SquashFS file system, for smaller size. Instructions on completing this step will follow shortly.

Revision as of 20:47, 12 June 2011

With a configured source tree, building and packaging is a somewhat painless process. There are a couple of preliminary steps to do for optional portions of the system (such as Google apps). However, most of the time spent with the build process is waiting for compilation.

NOTE The following build procedures are for the froyo branch and newer. For eclair build procedures, please see Building and Packaging Eclair.

Before commencing with the complete build, it may be necessary to provide dependencies for the system.

Build Dependencies

XDAndroid runs on hardware similar to the HTC G1 and Android Dev Phone. As a result, XDAndroid takes advantage of the similarities by using certain proprietary libraries as provided by the reference system for the Dev Phone. Before building the system, download the Dev Phone system image, signed-dream_devphone_userdebug-ota-14721.zip, from HTC Developer Center. Place the zip file in the root of your XDAndroid source tree and do not extract it.

Hardware-accelerated 3D graphics are also available using a proprietary driver originally developed for the HTC Dream. A new driver compatible with gingerbread and later releases, supporting OpenGL-ES version 1.1, is available for download. Place that zip in the root of your XDAndroid source tree and do not extract it.

Camera support requires a modified proprietary binary library, and the system will not build without this library. A zip file containing the library is available as liboemcamera.zip. Place that zip in the root of your XDAndroid source tree and do not extract it.

Additionally, XDAndroid optionally allows installation of Google's proprietary programs. These programs provide the most popular common features of Android systems. It is usually recommended to install these. A script, located in the device/xdandroid repository of the AOSP build tree, will automatically download the currently-supported Google Apps package, then extract it and configure the build tree to use it.

With the needed packages stored in the XDAndroid root, run a script to automatically extract the files and configure the build system:

$ cd device/xdandroid/msm
$ ./unzip-files.sh -g # Use -g to download the Google Apps package.

The files will be extracted and available to the build system.

Building the System

This highly convoluted step will eventually spit out a number of filesystem images, including one containing the XDAndroid system.

To build the system, execute the following extremely complicated command from the root directory of the XDAndroid source tree...

$ make -j4 # A -jX argument based on the number of CPUs available, plus one, is recommended.
NOTE When building a froyo image, it may be necessary to add /sbin to your PATH, if building ext2 filesystem images. If so, use the following command instead: PATH="${PATH}:/sbin" make -j4

After several weeks, the build will be complete and the system is ready for packaging.

Packaging the System

The Android build system, which hopefully went off without a hitch, will have generated a number of filesystem images in out/target/product/msm under the root directory of the source tree.

Until development of the system has progressed to the point where the system can be flashed to the phone's integrated flash storage, most of the generated images are of no concern. The most interesting image is system.img, which contains the binaries generated by the compilation process.

If the recommendations given in Build Configuration have been followed, the filesystem images will be ext2. This is usable as-is with the current boot process that the XDAndroid project uses, and it can be renamed system.ext2 and placed in the user's andboot directory for a successful boot.

Optionally, the system image can be repacked as a SquashFS file system, for smaller size. Instructions on completing this step will follow shortly.