-
Notifications
You must be signed in to change notification settings - Fork 0
/
HOWTO
105 lines (83 loc) · 4.23 KB
/
HOWTO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
This howto describes building the GEMS simulator and getting RTEMS to
run with GEMS.
It assumes that Simics is already installed on this machine with an
appropriate license, that a copy of the RTEMS sources is on this machine
(with appropriate patches or modifications), and that the
sparc64-rtems4.11 tools are installed and in your path.
== BUILDING GEMS ==
In order to successfully install GEMS, the Simics license must be
available. So connect to your license server.
Select or create a copy of the gems-2.1.1 folder. This howto will
use the gems-2.1.1-gedare folder.
Enter gems-2.1.1-gedare
$> cd gems-2.1.1-gedare
Compile GEMS and create the basic GEMS Simics workspace by using the
setup-gems.sh script. It takes as argument the directory at which Simics
is installed. Make sure to use an absolute path.
$> ../scripts/setup-gems.sh ${HOME}/work/simics/simics-3.0.31
This script should finish with the following output in your terminal:
echo "Finished."
Finished.
And Opal and Ruby should have been built successfully. If there are errors
while running this script, be sure that the Simics install point is correct,
that the license server is reachable (run ../scripts/license-tunnel.sh),
and that all of the pre-requisite tools have been installed. See
doc/GEMS-Ubuntu.pdf for some hints on which tools you may need. Before
re-running the setup-gems.sh script, you should see CLEANING UP GEMS.
== CLEANING UP GEMS ==
If you need to re-build gems after making modifications to ruby or opal
source code, it is suggested to undo the setup-gems.sh script.
Do this by entering the gems-2.x.y.z-XXX directory and running
the cleanup script.
$> cd gems-2.1.1-gedare
$> ../scripts/clean-gems.sh
clean-gems.sh will undo the steps of setup-gems.sh, except it will leave the
simics_3_workspace in place. This way any modifications in the workspace
will persist across builds of GEMS. To recreate the simics_3_workspace,
simply delete it manually.
If clean-gems.sh is not run between uses of setup-gems.sh, then the
setup-gems.sh script will only attempt to re-build Ruby and Opal.
== SETTING UP A SIMICS GEMS RTEMS WORKSPACE ==
At this point, GEMS will be compiled and installed to the simics subdirectory,
which is a soft-link to simics_3_workspace. Each GEMS installation has
its own simics workspace.
The next step is to setup scripts to help build and run RTEMS on GEMS.
Enter the GEMS Simics workspace and run the setup-rtems-workspace.sh
script, which takes as argument the top-level directory of this repository
(which you are currently in) and the directory of the RTEMS source code.
Make sure to use absolute paths.
$> cd simics
$> ../../scripts/setup-rtems-workspace.sh ~/work/simics/gems/ \
~/work/rtems/rtems/
If the setup-rtems-workspace.sh script does not produce output, then
it successfully completed its job.
Now it is time to build RTEMS.
$> cd build-sparc64/
$> cd rtems/
$> ./bootstrap
$> cd ..
$> ./build-b-usiiicvs.sh
The build-b-usiiicvs.sh script will by default only configure and build the
RTEMS testsuites/samples. To build all of the tests, comment the current
configure line and uncomment the appropriate line you need.
Finally, create the image.iso file that is read by Simics in order to
boot RTEMS for the sparc64.
$> cd boot
$> ./build-usiii.sh
If you built all of the RTEMS testsuite tests, it can take a long time to
put all of the tests into an image.iso. So the build-usiii.sh is set to
'short-circuit' the packaging. If more tests are needed, we suggest
selecting the tests you need and placing them before the short-circuit.
The image.iso file is hard-linked to the workspace that was set up for RTEMS.
Return to that directory, and you should be able to run RTEMS applications
on Simics Serengeti machine with or without GEMS.
$> cd ../../
$> ./gems-quicktest.sh samples hello
$> ./usiii-quicktest.sh samples hello
The helper scripts generate a temp.simics file, which you can modify
to suit your needs.
This concludes the howto. Note that the scripts/build-all.sh script will
run all of the steps described in this howto. Simply run it from within
a gems-2.1.1-XXX directory and provide it with an absolute path to where
Simics is installed and an absolute path to the RTEMS source code you want
to build and run.