summaryrefslogtreecommitdiff
path: root/SoftwareBuild20050708.mdwn
blob: 55ed5befe00e859192c3424ba7ad043bf8268fa9 (plain)
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# <a name="How to Build the FC Software 200"></a> How to Build the FC Software 2005/07/08

## <a name="Step 1: Get ready"></a> Step 1: Get ready

1. Get the `c` and `java` modules out of cvs (see [[AvionicsCVSAccess]]).
2. Or, do a `cvs update`

## <a name="Step 2: Build the rocket kernel,"></a> Step 2: Build the rocket kernel, uncanny, the simulator, and other c bits

<table border=1 cellpadding=0 cellspacing=0>
  <tr>
    <td><code>cd c/linux-2.4</code></td>
    <td>
    </td>
  </tr>
  <tr>
    <td><code>make</code></td>
    <td> Make everything including the kernel and configure the kernel tree which includes the headers for uncanny </td>
  </tr>
  <tr>
    <td><code>make linux-2.4.27-adeos/.config</code></td>
    <td> To configure the kernel tree which includes the headers for uncanny only (may not work, may need to do make) </td>
  </tr>
  <tr>
    <td><code>sudo ln -s `pwd`/linux-2.4.27-adeos /usr/src/rocket-2.4.27</code></td>
    <td> Make a sym link so that uncanny can find the kernel headers </td>
  </tr>
  <tr>
    <td><code>cd ../uncanny</code></td>
    <td>
    </td>
  </tr>
  <tr>
    <td><code>make</code></td>
    <td> Make uncanny </td>
  </tr>
  <tr>
    <td><code>cd ..</code></td>
    <td>
    </td>
  </tr>
  <tr>
    <td><code>make</code></td>
    <td> A top level make to get all the sequencer and whatnot bits </td>
  </tr>
</table>

- Instructions for building and using the rocket simulator, RocketDes, are available in the source code at c/tools/cppsim/readme.txt

- If at any point the compiler complains about not being able to find the shared library (libSomeFile.so), then see if it's installed on your system:

&gt; find /usr -name 'libSomeFile.so'

- If it's found, you need to add the absolute path to the directory that contains the libraries to /etc/ld.so.conf. Finally run 'ldconfig' to add the necessary links to the libraries. Now recompile.

- If you don't have the library, then get a hold of it by installing the appropriate package or building and installing the appropriate software, and do the step above if necessary.

## <a name="Step 3: Build the java bits"></a> Step 3: Build the java bits

<table border=1 cellpadding=0 cellspacing=0>
  <tr>
    <td><code>cd ../java</code></td>
    <td>
    </td>
  </tr>
  <tr>
    <td><code>ant jar</code></td>
    <td> Build the java stuff </td>
  </tr>
  <tr>
    <td><code>java -jar dist/rocketview.jar</code></td>
    <td> run rocketview just to make sure it works </td>
  </tr>
  <tr>
    <td><code>cp src/launchcontrol/main.conf .</code></td>
    <td> Copy over main.conf so changes you make aren&#39;t committed </td>
  </tr>
  <tr>
    <td><code>ln -s src/launchcontrol/sched.conf .</code></td>
    <td> Always look at the latest sched.conf which gets updated by CVS every once in a while </td>
  </tr>
  <tr>
    <td><code>java -jar dist/rocketview.jar lc</code></td>
    <td> Run launchcontrol </td>
  </tr>
</table>

## <a name="Step 4: Connect to the rocket"></a> Step 4: Connect to the rocket

- If you have the field server, then connect to the `psas` network and the field server will use `netforward` to get you to the rocket at 10.0.0.1.
- If you don't have the field server, then you'll need an orinoco card:

<table border=1 cellpadding=0 cellspacing=0>
  <tr>
    <td><code>cd c/tools</code></td>
    <td>
    </td>
  </tr>
  <tr>
    <td> =./wireless.sh eth<n> <m> </m></n></td>
    <td> where n is your orinoco card interface address (try running <code>/sbin/ifconfig</code>) and where m is some arbitrary large number like 57 </td>
  </tr>
</table>

## <a name="Step 5: Copy stuff to the rocket"></a> Step 5: Copy stuff to the rocket

- To connect to the rocket: `ssh root@10.0.0.1`.
- Remount the compactflash disk as read-write: `mount -o remount,rw /`
- On **_your computer_**, scp over the files: `scp uncanny/can.o fcfifo/run_threads root@10.0.0.1:/tmp`

## <a name="Step 6: Run stuff on the rocket."></a> Step 6: Run stuff on the rocket.

- Edit `setbase.sh` to get you the right GPS base coordinagtes and then run it: `. setbase.sh`
- Add in the new uncanny can driver: `insmod /tmp/can.o`
- And run run\_threads _IF AND ONLY IF YOU WANT THE ANTENNAS ON!_ `DEBUG=1 ANTENNA=1 /tmp/run_threads`

## <a name="Step 7: Put good code in a more"></a><a name="Step 7: Put good code in a more "></a> Step 7: Put good code in a more permanent place

- In the `/root` directory, you'll notice direcotries with dates (e.g., `20050701`). Make one of these, and copy over all of the previous bits from the last directory.
- Overwrite your new bits into that directory.
- `rm current` and then `ln -s <yournewdirectory> current` in order to get `current` to point to your new bits.
- Remount the compactflash disk as read-only: `mount -o remount,ro /`

... and that's it. Whew!

logs are in /var/log/psas

-- [[TimWelch]] - 08 Jul 2005