Difference between revisions of "BBench-gem5"

From gem5
Jump to: navigation, search
m
m
Line 23: Line 23:
 
== Building Your Own Android File System and Kernel ==
 
== Building Your Own Android File System and Kernel ==
 
This section gives step-by-step instructions for building a gem5 compatible Ice Cream Sandwich (ICS) disk image.
 
This section gives step-by-step instructions for building a gem5 compatible Ice Cream Sandwich (ICS) disk image.
# [http://source.android.com/source/initializing.html Initialize]your build environment and download the Android source.
+
# [http://source.android.com/source/initializing.html Initialize] your build environment and [http://source.android.com/source/downloading.html download] the Android source.
 +
# Get a copy of the [http://linux-arm.org/LinuxKernel/LinuxAndroidPlatform Armdroid] patches using the following command: <code>git clone git://linux-arm.org/armdroid.git</code>.
 +
# Copy the arm device files into the Android device folder: <code>cp path_to_armdroid/fs/src/IceCreamSandwich/Android-ICS-device-arm.tar.bz2 path_to_android_src/device/</code>. Then, untar it.
 +
# Copy the Armdroid patches to the appropriate Android source directory. This can be inferred from the patch file itself.
 +
# Apply those patches by changing to the directories in which the patches were copied and running the command: <code>git apply *.patch</code>.
 +
# Change into the Android source root directory and build using: <code>make PRODUCT-armboard_v7a-eng -jn</code>.
 +
# Create a blank image using the gem5img.py utility: <code>./gem5img.py init android_ics_arm.img 1024</code>.
 +
# Mount the image: <code>sudo mount -o loop,offset=32256 android_ics_arm.img /mnt
 +
# Copy the root/ and system/ folders to the mounted image:
 +
## <code>cp -a path_to_android_src/out/target/product/armboard_v7a/root /mnt</code>
 +
## <code>cp -a path_to_android_src/out/target/product/armboard_v7a/system /mnt/system</code>
 +
# Unmount the image: <code>sudo umount /mnt</code>
 +
 
 +
Now the image should be ready to run.
  
 
== Publications ==
 
== Publications ==

Revision as of 16:14, 4 June 2012

This page provides everything you need to get Android, and BBench, working on gem5. BBench is a new web-page rendering benchmark; you can read about it here: BBench. We have provided pre-compiled disk images and an Android kernel, as well as step-by-step instructions on how to get Android running on gem5 using the ARM ISA.

Running BBench on Android with gem5

Everything required to run BBench on gem5 is provided in the next section. You will need the kernel and the disk image (containing BBench).

  1. Get gem5 from the Repository
  2. Download the basic full system files from the Download page and build gem5 for the ARM ISA according to these instructions Compiling_M5
  3. Point the M5_PATH environment variable to this location. E.g, type export M5_PATH=/path_to_gem5_system/system/
  4. Download and uncompress the ARM/Android Kernel and place it in the /path_to_gem5_system/system/binaries directory
  5. Download and uncompress the Android Disk Image and place it in the /path_to_gem5_system/system/disks directory
  6. Run /path_to_gem5_root/build/ARM/m5.fast configs/example/fs.py -b bbench --kernel=vmlinux.smp.mouse.arm to run BBench on Android using ARM. Invoke from /path_to_gem5_root.

Note: These instructions and images are only for Android on the ARM ISA.

Android Full-System Files

These files contain everything you need to get Android, and BBench, up and running on gem5.

  • Kernel -- Pre-compiled Android kernel and config file.
  • Disk Image -- Disk image with a pre-compiled Android Gingerbread file system. This disk image contains all of the files generated during initial boot, as well as a self-terminating version of BBench and BusyBox.
  • Clean Disk Image -- Disk image containing only the pre-compiled Android Gingerbread file system. This disk image contains no benchmarks and has never been booted.

Building Your Own Android File System and Kernel

This section gives step-by-step instructions for building a gem5 compatible Ice Cream Sandwich (ICS) disk image.

  1. Initialize your build environment and download the Android source.
  2. Get a copy of the Armdroid patches using the following command: git clone git://linux-arm.org/armdroid.git.
  3. Copy the arm device files into the Android device folder: cp path_to_armdroid/fs/src/IceCreamSandwich/Android-ICS-device-arm.tar.bz2 path_to_android_src/device/. Then, untar it.
  4. Copy the Armdroid patches to the appropriate Android source directory. This can be inferred from the patch file itself.
  5. Apply those patches by changing to the directories in which the patches were copied and running the command: git apply *.patch.
  6. Change into the Android source root directory and build using: make PRODUCT-armboard_v7a-eng -jn.
  7. Create a blank image using the gem5img.py utility: ./gem5img.py init android_ics_arm.img 1024.
  8. Mount the image: sudo mount -o loop,offset=32256 android_ics_arm.img /mnt
  9. Copy the root/ and system/ folders to the mounted image:
    1. <code>cp -a path_to_android_src/out/target/product/armboard_v7a/root /mnt
    2. cp -a path_to_android_src/out/target/product/armboard_v7a/system /mnt/system
  10. Unmount the image: sudo umount /mnt

Now the image should be ready to run.

Publications

If you use BBench in your work please cite our IISWC 2011 paper:

A. Gutierrez, R.G. Dreslinski, T.F. Wenisch, T. Mudge, A. Saidi, C. Emmons, and N. Paver. Full-System Analysis and Characterization of Interactive Smartphone Applications. IEEE International Symposium on Workload Characterization, pages 81-90, Austin, TX, November 2011.