94
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 Running FreeCalypso Magnetite firmware on the Pirelli DP-L10
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 ============================================================
|
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3
|
253
|
4 The Pirelli DP-L10 is a neat target for playing with FreeCalypso for a few
|
97
|
5 reasons:
|
|
6
|
|
7 1. It has a USB port connected to one of Calypso's UARTs through a built-in
|
|
8 CP2102 USB-serial adapter, eliminating the need for headset jack serial
|
|
9 cables.
|
|
10
|
|
11 2. The huge RAM on this phone (8 MiB) makes it possible to run experimental GSM
|
|
12 firmware images entirely in RAM without flashing - and we have successfully
|
|
13 implemented this capability in FC Magnetite similarly to Citrine.
|
|
14
|
253
|
15 3. Running an experimental firmware image on the Pirelli requires nothing more
|
|
16 than a laptop, a phone and a USB cable, and can therefore be done under
|
|
17 less-than-ideal conditions while away from your proper FreeCalypso hardware
|
|
18 lab with an FCDEV3B setup.
|
|
19
|
97
|
20 There is, however, one difference between our Citrine and Magnetite firmwares
|
|
21 when it comes to running on the Pirelli without flashing: Citrine uses a
|
|
22 RAM-based fake FFS, whereas Magnetite always requires a real FFS in flash, even
|
|
23 when the firmware code image itself is entirely RAM-based. However, just like
|
|
24 on the C139, we do NOT use the same FFS which is used by Pirelli's official
|
|
25 firmwares - the latter contains nothing of use to our fw, hence it is best for
|
|
26 us to use our own separate FreeCalypso Magnetite FFS.
|
|
27
|
|
28 The flash location that's been chosen for Magnetite FFS on the Pirelli is
|
|
29 0x02480000 through 0x025FFFFF, i.e., offsets 0x480000 through 0x5FFFFF in the
|
|
30 second flash bank. Pirelli's official firmwares use this flash area as
|
|
31 temporary storage during OTA (over-the-air, probably WLAN in this case) fw
|
|
32 reloads and leave it untouched at all other times, therefore as long as you are
|
|
33 not doing firmware reloads over WLAN while in the "official mode", you can use
|
|
34 your Pirelli phone for FreeCalypso experiments via fc-xram and go back to the
|
|
35 regular fw in between, and the Magnetite FFS in the flash will be preserved
|
|
36 from one fc-xram session to the next, not disturbed by Pirelli's fw.
|
|
37
|
|
38 Compiling
|
|
39 =========
|
|
40
|
223
619a33e8425e
doc/Pirelli-Howto: update for the availability of the hybrid config
Mychaela Falconia <falcon@freecalypso.org>
diff
changeset
|
41 When compiling our Magnetite firmware for the Pirelli target, you can select
|
619a33e8425e
doc/Pirelli-Howto: update for the availability of the hybrid config
Mychaela Falconia <falcon@freecalypso.org>
diff
changeset
|
42 one of two configurations: l1reconst or hybrid; see the Modem-configs article
|
619a33e8425e
doc/Pirelli-Howto: update for the availability of the hybrid config
Mychaela Falconia <falcon@freecalypso.org>
diff
changeset
|
43 for the explanation. In both cases the phone will act as an AT-command-
|
619a33e8425e
doc/Pirelli-Howto: update for the availability of the hybrid config
Mychaela Falconia <falcon@freecalypso.org>
diff
changeset
|
44 controlled pseudo-modem: the LCD will stay dark and the buttons will do nothing,
|
619a33e8425e
doc/Pirelli-Howto: update for the availability of the hybrid config
Mychaela Falconia <falcon@freecalypso.org>
diff
changeset
|
45 and you will need to control the GSM MS from your PC or other host system.
|
97
|
46
|
223
619a33e8425e
doc/Pirelli-Howto: update for the availability of the hybrid config
Mychaela Falconia <falcon@freecalypso.org>
diff
changeset
|
47 Run './configure.sh pirelli l1reconst' or './configure.sh pirelli hybrid'
|
619a33e8425e
doc/Pirelli-Howto: update for the availability of the hybrid config
Mychaela Falconia <falcon@freecalypso.org>
diff
changeset
|
48 depending on which configuration you would like to play with, then run
|
619a33e8425e
doc/Pirelli-Howto: update for the availability of the hybrid config
Mychaela Falconia <falcon@freecalypso.org>
diff
changeset
|
49 'make ram' in the build directory created by the configure script - see the
|
619a33e8425e
doc/Pirelli-Howto: update for the availability of the hybrid config
Mychaela Falconia <falcon@freecalypso.org>
diff
changeset
|
50 Compiling write-up for more details.
|
97
|
51
|
223
619a33e8425e
doc/Pirelli-Howto: update for the availability of the hybrid config
Mychaela Falconia <falcon@freecalypso.org>
diff
changeset
|
52 Because we have not yet produced a configuration with FAX_AND_DATA and GPRS
|
619a33e8425e
doc/Pirelli-Howto: update for the availability of the hybrid config
Mychaela Falconia <falcon@freecalypso.org>
diff
changeset
|
53 disabled, your Magnetite fw build will include those components. In the
|
619a33e8425e
doc/Pirelli-Howto: update for the availability of the hybrid config
Mychaela Falconia <falcon@freecalypso.org>
diff
changeset
|
54 FreeCalypso environment where we are not doing WAP or MMS this functionality
|
619a33e8425e
doc/Pirelli-Howto: update for the availability of the hybrid config
Mychaela Falconia <falcon@freecalypso.org>
diff
changeset
|
55 can only be exercised on targets that bring out a classic modem UART with the
|
619a33e8425e
doc/Pirelli-Howto: update for the availability of the hybrid config
Mychaela Falconia <falcon@freecalypso.org>
diff
changeset
|
56 classic AT command interface to the external host, but the Pirelli is not one
|
619a33e8425e
doc/Pirelli-Howto: update for the availability of the hybrid config
Mychaela Falconia <falcon@freecalypso.org>
diff
changeset
|
57 of those targets - hence on this target all FAX_AND_DATA and GPRS code is
|
253
|
58 nothing but dead weight. Now that we have deblobbed all of L1 with the
|
|
59 exception of GPRS-specific modules, we could try building a hybrid config with
|
|
60 GPRS and FAX_AND_DATA excluded, specifically for the benefit of Mot C1xx and
|
|
61 Pirelli targets, but these legacy hardware targets are no longer a priority for
|
|
62 the FreeCalypso family of projects.
|
97
|
63
|
|
64 Running on the target
|
|
65 =====================
|
|
66
|
|
67 1. Connect a USB cable from your GNU/Linux PC/laptop to the phone. If the
|
|
68 phone was off but the battery is present, it will go through a charger-plug
|
|
69 power-on event; if the flash contains Pirelli's original fw, it will boot in
|
|
70 the charging mode. If the battery is not present, the Calypso won't power
|
|
71 on (it needs VBAT and can't run on VCHG power instead), but the /dev/ttyUSBx
|
|
72 device will still show up, as the CP2102 USB-serial chip inside the phone is
|
|
73 powered strictly from the USB side.
|
|
74
|
|
75 2. Run a command like the following:
|
|
76
|
|
77 fc-xram -h pirelli /dev/ttyUSB0 ramimage.srec rvinterf
|
|
78
|
|
79 Adjust the paths to your /dev/ttyUSBx device and your ramimage.srec as
|
|
80 appropriate, and add rvinterf logging or other options as desired.
|
|
81 Specifying rvinterf on the fc-xram command line directs fc-xram to exec
|
|
82 rvinterf and pass the serial channel to it immediately as soon as the code
|
|
83 image has been loaded into target RAM and jumped to; this direct passing of
|
|
84 the serial channel from fc-xram to rvinterf is appropriate because the
|
|
85 loaded fw will immediately start emitting binary trace packets in TI's RVTMUX
|
|
86 format.
|
|
87
|
|
88 3. Induce the phone to execute its Calypso boot path: if the battery was
|
|
89 removed, insert it now; if Pirelli's regular fw is running, execute its
|
|
90 power-off sequence.
|
|
91
|
|
92 Once the Calypso chip in the Pirelli phone executes its boot path with fc-xram
|
|
93 running, the boot path will be diverted and our experimental firmware will be
|
|
94 loaded into target device RAM and jumped to. Our fw will now run, and the
|
|
95 rvinterf process on the host will maintain communication with it.
|
|
96
|
|
97 FFS initialization
|
|
98 ==================
|
|
99
|
|
100 When our Magnetite firmware boots, it will examine the state of the flash
|
|
101 sectors in the area we have allocated for our aftermarket FFS. If this flash
|
|
102 area is completely blank the first time Magnetite boots, as it should be if you
|
|
103 have a "virgin" Pirelli phone, the FFS code in our fw will automatically perform
|
|
104 what TI called the "preformat" operation: write undifferentiated FFS block
|
|
105 headers (0xBF in the flags byte) into each flash sector. However, it won't
|
|
106 automatically perform the "format" operation - instead you'll need to run
|
|
107 fc-fsio to do the format and to populate this FFS with some necessary content.
|
|
108 If you are not sure of the state of the Magnetite FFS flash area on your
|
|
109 Pirelli, you can also run fc-fsio to examine it - so run fc-fsio either way.
|
|
110 Run fc-fsio WITHOUT -p: let it connect to the rvinterf process you should
|
|
111 already have running from fc-xram.
|
|
112
|
253
|
113 [NOTE: you need to be running FreeCalypso host tools from the fc-host-tools-r5
|
|
114 release or later; earlier versions of fc-fsio won't work as described.]
|
97
|
115
|
|
116 Once you are in fc-fsio, check the status of your FFS like this:
|
|
117
|
|
118 fsio> ls -l /
|
|
119
|
|
120 If the FFS is already formatted, you will get a listing of the root directory;
|
|
121 if it is not formatted, you'll get an error like this:
|
|
122
|
|
123 opendir: FFS error 4 (EFFS_NOFORMAT: ffs not formatted)
|
|
124
|
|
125 To format and initialize your Pirelli Magnetite FFS, issue the following
|
|
126 commands:
|
|
127
|
|
128 fsio> format /
|
|
129 fsio> pirelli-magnetite-init
|
|
130
|
|
131 If you already have a formatted FFS from before, it is safe to rerun the
|
|
132 pirelli-magnetite-init command, but not format. The format command will *not*
|
|
133 work on an already formatted FFS; if you have a messed-up FFS and you would
|
|
134 like to restart from a clean slate, erase the Magnetite FFS sectors with
|
|
135 fc-loadtool:
|
|
136
|
|
137 loadtool> flash2 erase 480000 180000
|
|
138
|
|
139 Exercising the GSM functionality
|
|
140 ================================
|
|
141
|
|
142 Once your FFS is good, open another terminal window on your driving PC/laptop
|
|
143 and run fc-shell. This program will connect to the already running rvinterf
|
|
144 process via a local socket, and it will enable you to send various commands to
|
|
145 the running fw on the target, the most important ones being standard AT
|
|
146 commands. Send the following sequence of AT commands to bring up GSM
|
|
147 functionality:
|
|
148
|
|
149 AT+CMEE=2 -- enable verbose error responses
|
|
150 AT+CFUN=1 -- enable radio and SIM interfaces
|
|
151 AT+COPS=0 -- register to the default GSM network
|
|
152
|
|
153 When you are done playing with our experimental fw, you can either yank the
|
|
154 battery and kill the host side rvinterf and fc-shell processes, or you can
|
|
155 issue a 'tgtreset' command at the fc-shell prompt. The latter will cause the
|
|
156 target to reset and boot back into its regular firmware.
|