Commit | Line | Data |
---|---|---|
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 | # | |
16 | HV_GATE=/net/cpubringup/export/bringup/niagara/hypervisor/ | |
17 | OBP_GATE=/net/openboot.sfbay/export/sources/fpga-parent/obp4.x-clone | |
18 | LEGION_GATE=/net/cpubringup/export/bringup/niagara/legion/legion-ws/sim | |
19 | ||
20 | DATE='date' | |
21 | SNAPSHOTDIR=snapshot-$DATE | |
22 | mkdir $SNAPSHOTDIR; cd $SNAPSHOTDIR | |
23 | mkdir gates; cd gates | |
24 | GATEHOME=`pwd` | |
25 | ||
26 | # | |
27 | # bringover and build legion | |
28 | # | |
29 | cd $GATEHOME | |
30 | bringover -p $LEGION_GATE -w legion-ws . | |
31 | cd legion-ws | |
32 | ws $PWD | |
33 | mkdir build | |
34 | cd build | |
35 | sh ../src/configure | |
36 | ||
37 | # | |
38 | # set your path | |
39 | # | |
40 | PATH=/net/cpubringup.sfbay/export/bringup/niagara/tools/bin:/pkg/gnu/bin:$PATH | |
41 | export PATH | |
42 | ||
43 | gmake | |
44 | cp sim $SNAPSHOTDIR/sim.debug | |
45 | cp -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 | ||
58 | gmake | |
59 | cp sim $SNAPSHOTDIR/sim | |
60 | cp -r plugins $SNAPSHOTDIR/plugins | |
61 | ||
62 | ||
63 | # | |
64 | # bringover and build hypervisor | |
65 | # | |
66 | cd $GATEHOME | |
67 | bringover -p $HV_GATE -w hypervisor src | |
68 | cd $GATEHOME/hypervisor | |
69 | ws $PWD | |
70 | cd src/niagara/hypervisor/ | |
71 | make | |
72 | cp q.bin $SNAPSHOTDIR | |
73 | cd ../dumbreset | |
74 | make | |
75 | cp reset.bin $SNAPSHOTDIR | |
76 | ||
77 | # | |
78 | # make pds and legion conf file | |
79 | # | |
80 | cd $GATEHOME/hypervisor/src/niagara/hypervisor/configs | |
81 | make | |
82 | ----1p source files-------------- | |
83 | 1up.conf | |
84 | 1up.pdesc | |
85 | 1up.hdesc | |
86 | common.pdesc | |
87 | common.hdesc | |
88 | ----1p binary/conf files-------------- | |
89 | cp 1uph-pd.bin $SNAPSHOTDIR | |
90 | cp 1upp-pd.bin $SNAPSHOTDIR | |
91 | cp 1up.conf $SNAPSHOTDIR | |
92 | cp common.hdesc $SNAPSHOTDIR | |
93 | ||
94 | -----32p source files-------- | |
95 | 1g32p.conf | |
96 | 1g32p.hdesc | |
97 | 1g32p.pdesc | |
98 | common.pdesc | |
99 | common.hdesc | |
100 | -----32p binary/conf files-------- | |
101 | cp 1g32p.conf $SNAPSHOTDIR | |
102 | cp 1g32ph-pd.bin $SNAPSHOTDIR | |
103 | cp 1g32pp-pd.bin $SNAPSHOTDIR | |
104 | cp common.hdesc $SNAPSHOTDIR | |
105 | ||
106 | ||
107 | cd $SNAPSHOTDIR | |
108 | chmod 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 | ||
115 | mkfile 8k nvram1 | |
116 | chmod 777 nvram1 | |
117 | ||
118 | ||
119 | # | |
120 | # bringover and build openboot (do this on openboot.sfbay) | |
121 | # | |
122 | rsh openboot.sfbay | |
123 | cd $GATEHOME | |
124 | bringover -p $OBP_GATE -w obp4.x-clone . | |
125 | ||
126 | NOTE: DO NOT RUN WS COMMAND WHEN BUILDING OBP | |
127 | ||
128 | cd $GATEHOME/obp4.x-clone/obp/arch/sun4v | |
129 | make | |
130 | cp fireball-fio/release/openboot.bin $SNAPSHOTDIR |