Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / legion / docs / readmes / README.create_snapshot
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "@(#)README.create_snapshot 1.1 05/03/14 SMI"
#
# Info on what's needed to build a simulation snapshot
#
###########################################################
#
# You can copy and paste most of the commands below (assuming you
# are runnign a real shell like bash). Otherwisejust use this as
# a guideline
#
HV_GATE=/net/cpubringup/export/bringup/niagara/hypervisor/
OBP_GATE=/net/openboot.sfbay/export/sources/fpga-parent/obp4.x-clone
LEGION_GATE=/net/cpubringup/export/bringup/niagara/legion/legion-ws/sim
DATE='date'
SNAPSHOTDIR=snapshot-$DATE
mkdir $SNAPSHOTDIR; cd $SNAPSHOTDIR
mkdir gates; cd gates
GATEHOME=`pwd`
#
# bringover and build legion
#
cd $GATEHOME
bringover -p $LEGION_GATE -w legion-ws .
cd legion-ws
ws $PWD
mkdir build
cd build
sh ../src/configure
#
# set your path
#
PATH=/net/cpubringup.sfbay/export/bringup/niagara/tools/bin:/pkg/gnu/bin:$PATH
export PATH
gmake
cp sim $SNAPSHOTDIR/sim.debug
cp -r plugins $SNAPSHOTDIR/plugins.debug
# Edit GNUmakefile to select non-debug build (debug is the default)
# This will create a new sim and a new set of plugins (debug and
# non-debug plugins will overwrite each other so move the debug
# before making the non-debug)
#
// # Non Debug Build
// CFLAGS=-xildoff -xspace -xO3 -fast -xarch=v9 -v -mt
//
// # Debug Build
// #CFLAGS=-xildoff -xO0 -g -xarch=v9 -v -mt
gmake
cp sim $SNAPSHOTDIR/sim
cp -r plugins $SNAPSHOTDIR/plugins
#
# bringover and build hypervisor
#
cd $GATEHOME
bringover -p $HV_GATE -w hypervisor src
cd $GATEHOME/hypervisor
ws $PWD
cd src/niagara/hypervisor/
make
cp q.bin $SNAPSHOTDIR
cd ../dumbreset
make
cp reset.bin $SNAPSHOTDIR
#
# make pds and legion conf file
#
cd $GATEHOME/hypervisor/src/niagara/hypervisor/configs
make
----1p source files--------------
1up.conf
1up.pdesc
1up.hdesc
common.pdesc
common.hdesc
----1p binary/conf files--------------
cp 1uph-pd.bin $SNAPSHOTDIR
cp 1upp-pd.bin $SNAPSHOTDIR
cp 1up.conf $SNAPSHOTDIR
cp common.hdesc $SNAPSHOTDIR
-----32p source files--------
1g32p.conf
1g32p.hdesc
1g32p.pdesc
common.pdesc
common.hdesc
-----32p binary/conf files--------
cp 1g32p.conf $SNAPSHOTDIR
cp 1g32ph-pd.bin $SNAPSHOTDIR
cp 1g32pp-pd.bin $SNAPSHOTDIR
cp common.hdesc $SNAPSHOTDIR
cd $SNAPSHOTDIR
chmod a+w *.conf
# edit your .conf files so that they pick up your q.bin, reset.bin and
# openboot.bin from the current directory
// load +0x0 "reset.bin";
// load +0x10000 "q.bin";
// load +0x80000 "openboot.bin";
mkfile 8k nvram1
chmod 777 nvram1
#
# bringover and build openboot (do this on openboot.sfbay)
#
rsh openboot.sfbay
cd $GATEHOME
bringover -p $OBP_GATE -w obp4.x-clone .
NOTE: DO NOT RUN WS COMMAND WHEN BUILDING OBP
cd $GATEHOME/obp4.x-clone/obp/arch/sun4v
make
cp fireball-fio/release/openboot.bin $SNAPSHOTDIR