annotate README @ 39:d63f8505bf0c

l1_cmplx.c compiles in the l1_ext pass, l1_cmplx_intram still fails
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Wed, 28 Oct 2015 05:44:43 +0000
parents c7df31a89935
children 53d8cb470dc7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18
3f44bb6108b9 README written for tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 13
diff changeset
1 The purpose of this Hg tree (derived from leo2moko-debug) is to facilitate an
3f44bb6108b9 README written for tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 13
diff changeset
2 attempt at reconstructing an L1 source that would match the binary object
3f44bb6108b9 README written for tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 13
diff changeset
3 version we got with our TCS211 semi-src delivery from Sotovik.
12
da79bf85bd73 README added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
4
31
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
5 The idea is to deblob TCS211 L1 one module or small group of modules at a time.
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
6 Take individual C modules from the LoCosto L1 source and get them to compile
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
7 in the TCS211 environment with TCS211 versions of all include files, producing
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
8 new from-source objects that would serve as candidate replacements for the ones
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
9 we got as blobs. An absolutely essential aspect of this approach is
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
10 incrementality: we should be able to deblob just a few L1 objects (replace them
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
11 with build-from-source versions) while keeping the original blobs for all other
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
12 parts of L1 we haven't reached yet, and regression-test at each step to ensure
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
13 that the firmware still works.
18
3f44bb6108b9 README written for tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 13
diff changeset
14
31
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
15 TI's build system for this fw does not provide very fine granularity as far as
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
16 compiling each individual module from source or taking it as a delivered blob.
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
17 Instead it operates on the granularity of libs, or sometimes (as in the case of
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
18 L1) groups of libs. In the case of L1, this tree has the build system set up
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
19 to rebuild l1_ext.lib and l1_int.lib from source, which necessarily includes
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
20 _everything_ that goes into these libs. We are nowhere close to having a
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
21 working reconstructed source for every module in these two libs, thus we have
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
22 dummies in the place of most of them to appease BuSyB. Therefore, if you
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
23 simply run ./winebuild.sh to build this fw version, the link step will fail.
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
24
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
25 Instead this fw has to be built in a somewhat convoluted way:
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
26
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
27 1. Run ./winebuild.sh initially to compile everything leading up to the link
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
28 step, and let it fail.
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
29
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
30 2. Go into g23m/__out__/gsm*/obj/l1_ext, and copy in original blob objects for
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
31 all those modules which have not been source-reconstructed yet. Do likewise
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
32 for l1_int.
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
33
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
34 3. Run ./winebuild.sh again. As long as the dummy C files have not been
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
35 touched and the copied-in objects have newer timestamps, the dummies won't
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
36 be recompiled and the copied-in objects won't get blown away. TI's make
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
37 will rerun the ar packaging step to produce l1_ext.lib and l1_int.lib from
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
38 the mix of objects (some compiled from source, others copied-in blobs) in
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
39 the obj directories, and then the final link should succeed.
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
40
c7df31a89935 tcs211-l1-reconst README updated
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 18
diff changeset
41 The development process is as follows:
12
da79bf85bd73 README added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
42
18
3f44bb6108b9 README written for tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 13
diff changeset
43 1. Choose an individual L1 C module to work on.
3f44bb6108b9 README written for tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 13
diff changeset
44
3f44bb6108b9 README written for tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 13
diff changeset
45 2. Copy the source for the chosen module from the LoCosto source in the place
3f44bb6108b9 README written for tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 13
diff changeset
46 of the dummy in this tree.
12
da79bf85bd73 README added
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
47
18
3f44bb6108b9 README written for tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 13
diff changeset
48 3. Run ./winebuild.sh in the g23m directory and examine the output in
3f44bb6108b9 README written for tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 13
diff changeset
49 report.txt. If the imported C module fails to compile, massage it until it
3f44bb6108b9 README written for tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 13
diff changeset
50 passes compilation.
13
3e89489a43b3 using patched version of frame_na7_db_ir.lib:
Space Falcon <falcon@ivan.Harhan.ORG>
parents: 12
diff changeset
51
18
3f44bb6108b9 README written for tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 13
diff changeset
52 4. Once compilation passes, look at the generated COFF object in
3f44bb6108b9 README written for tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 13
diff changeset
53 g23m/__out__/gsm*/obj/l1_{ext,int}. Disassemble it with the tiobjd tool
3f44bb6108b9 README written for tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 13
diff changeset
54 from freecalypso-reveng, and compare against the disassembly of the
3f44bb6108b9 README written for tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 13
diff changeset
55 original ("official") binary blob version we got. Massage the reconstructed
3f44bb6108b9 README written for tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 13
diff changeset
56 source until it compiles into object code that matches the original.