comparison rvinterf/etmsync/fsio.help @ 24:2323849a5a91

rvinterf/etmsync/fsio.help written
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 23 Oct 2016 00:50:49 +0000
parents
children a9bd4b15f502
comparison
equal deleted inserted replaced
23:10b71f01f4ff 24:2323849a5a91
1 === main
2 === all
3 The following commands are available:
4
5 cpout Copy content out of device FFS to host file system
6 cpout-file Copy out a single file
7 delete Delete FFS object
8 dieid Retrieve Calypso die ID via ETM query
9 exec Execute a command script
10 exit Exit from fc-fsio
11 fd Low level file descriptor operations
12 ffs2ver TMFFS2 version query
13 format Format FFS on device (dangerous!)
14 fwrite Write a file into device FFS
15 hd Hex dump of a file in FFS
16 ls Directory listing
17 ll Shorthand for ls -l
18 memdump Dump a target memory region via ETM command
19 omemdump Dump a target memory region via TM3 command
20 mkdir Create a directory in device FFS
21 mk-std-dirs Create standard set of FFS directories
22 pirelli-get-imei Retrieve factory IMEI on Pirelli DP-L10
23 pirelli-magnetite-init Initialize FFS for FC Magnetite fw on Pirelli target
24 preformat Preformat FFS on device (dangerous!)
25 readlink Raw interface to ffs_readlink() API call
26 set-imeisv Write /etc/IMEISV or /pcm/IMEI file
27 set-pcm-string Write /pcm/CGxx files
28 set-rfcap Write /gsm/com/rfcap file
29 stat Raw interface to ffs_xlstat() API call
30 symlink Create a symlink in device FFS
31 upload-file Upload a file into device FFS
32 upload-fs Upload a complete file system tree into device FFS
33 upload-subtree Upload a subtree into device FFS
34
35 To get help on any command, type help and the command keyword.
36
37 The RTOS environment inside GSM device firmwares with which this utility
38 communicates has no notion of a current directory, hence all target side
39 FFS pathnames must be absolute.
40
41 === cpout
42 cpout target-pathname host-pathname
43
44 This command copies a single file, a directory subtree or the complete device
45 file system tree from the target device FFS to your Unix host file system.
46
47 === cpout-file
48 cpout-file target-pathname host-pathname
49
50 This command is like regular cpout, but assumes that the target pathname refers
51 to a single file and not a directory, and skips the pathname validation and
52 xlstat query steps toward that end.
53
54 === delete
55 delete ffs-pathname
56
57 This command deletes the named object in the device FFS, which must be a regular
58 file, an empty directory or a symlink.
59
60 Note that in classic UNIX there are two different "delete file system object"
61 elementary operations: unlink for regular files or symlinks and rmdir for empty
62 directories, but TI's FFS implementation provides a single ffs_remove() API call
63 instead for deleting all 3 object types; our delete command is the interface to
64 this ffs_remove() API call.
65
66 === dieid
67 This command sends an ETM query for the Calypso die ID to the running firmware
68 on the target and displays the returned result.
69
70 === exec
71 exec script-filename
72
73 This command executes an fc-fsio command script; each line in the script file
74 is interpreted and executed as an fc-fsio command.
75
76 If the execution of any command in the script file encounters an error, the
77 processing of the script is stopped and the following commands won't be
78 executed.
79
80 === exit
81 This command is self-explanatory.
82
83 === fd
84 fd open ffs-pathname flags
85 fd read tfd nbytes
86 fd close tfd
87
88 These low-level debug commands provide a raw interface to FFS file descriptor
89 operations ffs_open(), ffs_read() and ffs_close(); they are intended for deep
90 developers only.
91
92 === ffs2ver
93 This command sends a TMFFS2 version query ETM packet to the running firmware
94 on the target and displays the returned result.
95
96 === format
97 format format-name
98
99 This command requests the GSM device firmware to format its flash file system.
100 The "format name" argument must begin with a forward slash and will be stored
101 in the root inode of the newly created FFS; it can also contain some FFS tuning
102 settings - see the FFS firmware component source code for the details. It is
103 usually sufficient to set the "format name" aka the root inode name to just /,
104 although some production lines (TI and Openmoko) have set it to /ffs-root.
105
106 The FFS component in the firmware will normally accept this command only when
107 the FFS is in the unformatted state; if instead you wish to blow away an
108 existing format, see the preformat command.
109
110 === fwrite
111 fwrite ffs-pathname ascii "ASCII string content"
112 fwrite ffs-pathname hex "xx xx xx xx ..."
113 fwrite ffs-pathname file host-filename
114
115 This command creates a file or overwrites an existing file in the device FFS,
116 using an ASCII string, a binary string given as hex bytes or a host file as the
117 content to be written.
118
119 === hd
120 hd ffs-pathname
121
122 This command displays a hex dump of the named file in FFS, which must be a
123 regular file. It will only work if the size of the file is 254 bytes or less;
124 to examine larger FFS files, you will need to read them out with the cpout or
125 cpout-file command.
126
127 === ls
128 ls [-l] ffs-pathname
129
130 This command works much like the classic UNIX ls command, but on the flash file
131 system of a GSM device. In the basic form (without -l) the named FFS object
132 must be a directory, and the operation of the ls command is limited to ETM
133 packet exchanges corresponding to ffs_opendir() and ffs_readdir() API calls.
134 In the long form (with -l) the named FFS object may be of any type (file,
135 directory or symlink), and the operation of the ls command involves additional
136 ETM packet exchanges corresponding to the ffs_xlstat() API call, as well as some
137 FFS pathname validation and manipulation inside the fc-fsio utility itself.
138
139 === ll
140 ll ffs-pathname
141
142 This command is a shorthand for ls -l on the given FFS pathname.
143
144 === memdump
145 memdump addr length
146
147 This command requests a read of a target memory address range via the ETM
148 memory read command, and displays the returned bytes as a hex dump.
149 Both arguments are always interpreted as hexadecimal, and the length may not
150 exceed 0xEE (238 decimal) - the limit for the ETM memory read command.
151
152 === omemdump
153 omemdump addr length
154
155 This command requests a read of a target memory address range via the TM3
156 memory read command, and displays the returned bytes as a hex dump.
157 Both arguments are always interpreted as hexadecimal, and the length may not
158 exceed 0x7C (124 decimal) - the limit for the TM3 memory read command.
159
160 === mkdir
161 mkdir ffs-pathname
162
163 This command creates a directory object in the target device FFS at the
164 specified pathname. If the named directory already exists, it is not an error,
165 but it is an error if a non-directory object exists at that pathname.
166
167 === mk-std-dirs
168 This command creates the standard set of FFS directories, or rather the set
169 deemed as standard for our FreeCalypso firmware projects based on or inspired
170 by TI's TCS211. This set currently consists of:
171
172 /gsm
173 /gsm/com
174 /gsm/rf
175 /gsm/rf/rx
176 /gsm/rf/tx
177 /pcm
178 /sys
179 /mmi
180 /var
181 /var/dbg
182 /aud
183 /etc
184
185 Each directory is created as if by our mkdir command, i.e., it is not an error
186 if that directory already exists, but it is an error if a non-directory object
187 exists at that pathname.
188
189 === pirelli-get-imei
190 This command works only if the GSM device with whose firmware fc-fsio is
191 communicating is a Pirelli DP-L10, and only if that fw is either one of
192 Foxconn/Pirelli's official versions or FC Magnetite - it will not work against
193 FC Citrine firmware. When run against a Pirelli phone with a compatible fw
194 version, this command will retrieve and display Pirelli's factory IMEI.
195
196 === pirelli-magnetite-init
197 This command may only be run against FC Magnetite firmware running on the
198 Pirelli DP-L10 target, and never against any other target/firmware combination.
199 See FreeCalypso Magnetite firmware documentation for the details.
200
201 === preformat
202 This command requests the GSM device firmware to blow away its flash file system
203 and prepare for a new format. DO NOT issue this command unless you really wish
204 to blow away your FFS, and if you really do wish to perform this drastic
205 operation, the firmware should be fully quiescent with GSM off as in AT+CFUN=0.
206
207 === readlink
208 readlink ffs-pathname
209
210 This command provides raw access to the ffs_readlink() API call and displays
211 the returned response as a hex dump. Use ls -l (or ll) as a more user-friendly
212 interface.
213
214 === set-imeisv
215 set-imeisv fc XXXXXXXX-YYYYYY-ZZ # write /etc/IMEISV
216 set-imeisv pcm XXXXXXXX-YYYYYY-ZZ # write /pcm/IMEI
217
218 This command sets the IMEISV to be used for GSM operation and stores it either
219 in /etc/IMEISV (one format) or /pcm/IMEI (a different format) depending on the
220 "fc" or "pcm" keyword argument. Please refer to the doc/IMEI article in the
221 FreeCalypso host tools source package for the explanation as to when you should
222 use which.
223
224 For the IMEISV argument 16 decimal digits must always be given; punctuation is
225 optional and may be placed anywhere.
226
227 === set-pcm-string
228 set-pcm-string CGxx "ASCII string content"
229
230 This command writes the /pcm/CGxx files whose content is displayed by AT+CGxx
231 commands; CGxx must be one of CGMI, CGMM, CGMR or CGSN. The length of these
232 ASCII string files is limited to 20 characters by TI's firmware design.
233
234 === set-rfcap
235 This command writes the /gsm/com/rfcap file to communicate the hardware RF band
236 configuration to the firmware as follows:
237
238 set-rfcap dual-eu # 900/1800 MHz single-region dual-band
239 set-rfcap dual-us # 850/1900 MHz single-region dual-band
240 set-rfcap tri900 # 900/1800/1900 MHz triband
241 set-rfcap tri850 # 850/1800/1900 MHz triband
242 set-rfcap quad # All 4 bands
243
244 === stat
245 stat ffs-pathname
246
247 This command provides raw access to the ffs_xlstat() API call; the information
248 returned by this call and displayed by this command is similar to what you would
249 get with the lstat system call in classic UNIX.
250
251 Use ls -l (or ll) as a more user-friendly interface.
252
253 === symlink
254 symlink link-target-pathname link-object-pathname
255
256 This command creates a symlink object in the FFS; the 2nd argument is the
257 pathname at which the object is to be created and the 1st argument is the link
258 target string to be written into this symlink object - the order of the
259 arguments matches the classic UNIX symlink system call.
260
261 Note that although TI's FFS implementation supports symlinks, it appears that
262 no production configuration has ever used them.
263
264 === upload-file
265 upload-file host-file target-file
266
267 This command uploads a single regular file from your Unix host file system into
268 the target device FFS.
269
270 === upload-fs
271 upload-fs host-dir
272
273 This command uploads an entire file system tree from the given host location
274 into the target device FFS at the root level.
275
276 === upload-subtree
277 upload-subtree host-dir target-dir
278
279 This command uploads a directory subtree from your Unix host file system into
280 the given non-root directory in the target device FFS.
281