Difference between revisions of "BBench-gem5"

From gem5
Jump to: navigation, search
(Running BBench on Android with gem5)
(Running BBench on Android with gem5)
Line 3: Line 3:
 
== Running BBench on Android with gem5 ==
 
== Running BBench on Android with gem5 ==
 
Everything required to run BBench on gem5 is provided in the next section. You will need the kernel, the disk image (containing BBench), and the rcS script.
 
Everything required to run BBench on gem5 is provided in the next section. You will need the kernel, the disk image (containing BBench), and the rcS script.
 
+
# Get gem5 from the [[Repository]]
# Create a directory where you will place your gem5 full-system files, call this directory ''system''. Inside this directory create two separate directories, one called ''binaries'' and the other called ''disks''. This can be the same directory in which you already have gem5 full-system files that you downloaded from the [[Download]] page.
+
# Download the basic full system files from the [[Download]] page  
# Point the <code>M5_PATH</code> environment variable to this location. E.g, type <code>export M5_PATH=path_to_gem5_system/system/</code>
+
# Point the <code>M5_PATH</code> environment variable to this location. E.g, type <code>export M5_PATH=/path_to_gem5_system/system/</code>
# Place the kernel in the <code>path_to_gem5_system/system/binaries/</code> directory
+
# Place the kernel downloaded below in the /path_to_gem5_system/system/binaries directory was created by untaring the full-system files above in step 2
# Place the disk image in the <code>path_to_gem5_system/system/disks/</code> directory
+
# Place 
 +
# Place the kernel in the <code>/path_to_gem5_system/system/binaries/</code> directory
 +
# Place the disk image in the <code>/path_to_gem5_system/system/disks/</code> directory
 
# Build the ARM bootloader and place it in the same directory as the kernel. The code for the bootloader is typically in <code>path_to_gem5_root/system/arm/simple_bootloader/</code>. Simply type <code>make</code> in this directory and the bootloader will be compiled. Copy the resulting <code>boot.arm</code> file to the same directory where you kernel is located. E.g., <code>path_to_gem5_system/system/binaries/</code>. Note this is also available within the ARM Full system files on the [[Download]] page.
 
# Build the ARM bootloader and place it in the same directory as the kernel. The code for the bootloader is typically in <code>path_to_gem5_root/system/arm/simple_bootloader/</code>. Simply type <code>make</code> in this directory and the bootloader will be compiled. Copy the resulting <code>boot.arm</code> file to the same directory where you kernel is located. E.g., <code>path_to_gem5_system/system/binaries/</code>. Note this is also available within the ARM Full system files on the [[Download]] page.
 
# The default gem5 scripts look for a kernel called <code>vmlinux.arm.smp.fb.2.6.38.8</code> and a disk image called <code>android-mbr.img</code>. You will have to either rename the files or create softlinks to them once you have downloaded and untarred them.
 
# The default gem5 scripts look for a kernel called <code>vmlinux.arm.smp.fb.2.6.38.8</code> and a disk image called <code>android-mbr.img</code>. You will have to either rename the files or create softlinks to them once you have downloaded and untarred them.

Revision as of 23:33, 14 December 2011

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, the disk image (containing BBench), and the rcS script.

  1. Get gem5 from the Repository
  2. Download the basic full system files from the Download page
  3. Point the M5_PATH environment variable to this location. E.g, type export M5_PATH=/path_to_gem5_system/system/
  4. Place the kernel downloaded below in the /path_to_gem5_system/system/binaries directory was created by untaring the full-system files above in step 2
  5. Place
  6. Place the kernel in the /path_to_gem5_system/system/binaries/ directory
  7. Place the disk image in the /path_to_gem5_system/system/disks/ directory
  8. Build the ARM bootloader and place it in the same directory as the kernel. The code for the bootloader is typically in path_to_gem5_root/system/arm/simple_bootloader/. Simply type make in this directory and the bootloader will be compiled. Copy the resulting boot.arm file to the same directory where you kernel is located. E.g., path_to_gem5_system/system/binaries/. Note this is also available within the ARM Full system files on the Download page.
  9. The default gem5 scripts look for a kernel called vmlinux.arm.smp.fb.2.6.38.8 and a disk image called android-mbr.img. You will have to either rename the files or create softlinks to them once you have downloaded and untarred them.
  10. The bbench.rcS file should be placed wherever you keep your rcS scripts. This is typically path_to_gem5_root/configs/boot/.
  11. You will also need to modify your Benchmarks.py file to include bbench, i.e., include a line like the following: 'bbench': [SysConfig('bbench.rcS', '256MB', 'ARMv7a-Gingerbread-Android.SMP.mouse.nolock.img')]
  12. Assuming you have followed the steps above, and built a full-system version of gem5 for ARM, you should be able to type /path_to_gem5_root/build/ARM_FS/m5.fast configs/example/fs.py -b bbench --vmlinux=vmlinux.smp.mouse.arm to run BBench on Android using ARM.

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.
  • rcS Script -- Script for automating a BBench run on gem5. The disk images above contain modified startup scripts that load and execute rcS scripts.

Building Your Own Android File System and Kernel

Coming Soon!

Publications

If you use BBench or any of our benchmarks 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.