Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / legion / docs / readmes / README.create_snapshot
CommitLineData
920dae64
AT
1/*
2 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
4 */
5#pragma ident "@(#)README.create_snapshot 1.1 05/03/14 SMI"
6#
7# Info on what's needed to build a simulation snapshot
8#
9###########################################################
10
11#
12# You can copy and paste most of the commands below (assuming you
13# are runnign a real shell like bash). Otherwisejust use this as
14# a guideline
15#
16HV_GATE=/net/cpubringup/export/bringup/niagara/hypervisor/
17OBP_GATE=/net/openboot.sfbay/export/sources/fpga-parent/obp4.x-clone
18LEGION_GATE=/net/cpubringup/export/bringup/niagara/legion/legion-ws/sim
19
20DATE='date'
21SNAPSHOTDIR=snapshot-$DATE
22mkdir $SNAPSHOTDIR; cd $SNAPSHOTDIR
23mkdir gates; cd gates
24GATEHOME=`pwd`
25
26#
27# bringover and build legion
28#
29cd $GATEHOME
30bringover -p $LEGION_GATE -w legion-ws .
31cd legion-ws
32ws $PWD
33mkdir build
34cd build
35sh ../src/configure
36
37#
38# set your path
39#
40PATH=/net/cpubringup.sfbay/export/bringup/niagara/tools/bin:/pkg/gnu/bin:$PATH
41export PATH
42
43gmake
44cp sim $SNAPSHOTDIR/sim.debug
45cp -r plugins $SNAPSHOTDIR/plugins.debug
46
47# Edit GNUmakefile to select non-debug build (debug is the default)
48# This will create a new sim and a new set of plugins (debug and
49# non-debug plugins will overwrite each other so move the debug
50# before making the non-debug)
51#
52// # Non Debug Build
53// CFLAGS=-xildoff -xspace -xO3 -fast -xarch=v9 -v -mt
54//
55// # Debug Build
56// #CFLAGS=-xildoff -xO0 -g -xarch=v9 -v -mt
57
58gmake
59cp sim $SNAPSHOTDIR/sim
60cp -r plugins $SNAPSHOTDIR/plugins
61
62
63#
64# bringover and build hypervisor
65#
66cd $GATEHOME
67bringover -p $HV_GATE -w hypervisor src
68cd $GATEHOME/hypervisor
69ws $PWD
70cd src/niagara/hypervisor/
71make
72cp q.bin $SNAPSHOTDIR
73cd ../dumbreset
74make
75cp reset.bin $SNAPSHOTDIR
76
77#
78# make pds and legion conf file
79#
80cd $GATEHOME/hypervisor/src/niagara/hypervisor/configs
81make
82----1p source files--------------
831up.conf
841up.pdesc
851up.hdesc
86common.pdesc
87common.hdesc
88----1p binary/conf files--------------
89cp 1uph-pd.bin $SNAPSHOTDIR
90cp 1upp-pd.bin $SNAPSHOTDIR
91cp 1up.conf $SNAPSHOTDIR
92cp common.hdesc $SNAPSHOTDIR
93
94-----32p source files--------
951g32p.conf
961g32p.hdesc
971g32p.pdesc
98common.pdesc
99common.hdesc
100-----32p binary/conf files--------
101cp 1g32p.conf $SNAPSHOTDIR
102cp 1g32ph-pd.bin $SNAPSHOTDIR
103cp 1g32pp-pd.bin $SNAPSHOTDIR
104cp common.hdesc $SNAPSHOTDIR
105
106
107cd $SNAPSHOTDIR
108chmod a+w *.conf
109# edit your .conf files so that they pick up your q.bin, reset.bin and
110# openboot.bin from the current directory
111// load +0x0 "reset.bin";
112// load +0x10000 "q.bin";
113// load +0x80000 "openboot.bin";
114
115mkfile 8k nvram1
116chmod 777 nvram1
117
118
119#
120# bringover and build openboot (do this on openboot.sfbay)
121#
122rsh openboot.sfbay
123cd $GATEHOME
124bringover -p $OBP_GATE -w obp4.x-clone .
125
126NOTE: DO NOT RUN WS COMMAND WHEN BUILDING OBP
127
128cd $GATEHOME/obp4.x-clone/obp/arch/sun4v
129make
130cp fireball-fio/release/openboot.bin $SNAPSHOTDIR