annotate loadtools/Makefile @ 379:7b3fd0e2a352

loadtools: compalstage support implemented in fc-iram
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 09 Jun 2014 21:07:39 +0000
parents 02cb0206aa47
children 7ef814efbebe
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8
acaac9162574 loadtools modules coming along
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 CC= gcc
acaac9162574 loadtools modules coming along
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 CFLAGS= -O2
48
38664e0b7c32 fc-sertool renamed to fc-iram
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 46
diff changeset
3 PROGS= fc-iram fc-loadtool fc-xram
46
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
4 LASRC= ../target-utils/loadagent
96
57b8dbb029c2 fc-loadtool: GTA0x flash support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 84
diff changeset
5 SCRIPTS=scripts/gta02.config scripts/k5a3281.init scripts/pirelli.config \
105
02cb0206aa47 fc-loadtool help implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 99
diff changeset
6 scripts/pirelli.init loadtool.help
30
af6d763badfb loadtools: install target added
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 29
diff changeset
7 INSTBIN=/usr/local/bin
af6d763badfb loadtools: install target added
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 29
diff changeset
8 INSTSCR=/usr/local/share/freecalypso
379
7b3fd0e2a352 loadtools: compalstage support implemented in fc-iram
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 105
diff changeset
9
7b3fd0e2a352 loadtools: compalstage support implemented in fc-iram
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 105
diff changeset
10 EXTRA_OBJ= compalload.o
9
fea204bc7674 fc-sertool compiles
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 8
diff changeset
11
55
278052b6afda loadtools: started laying the foundation for flash support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 53
diff changeset
12 IRAM_OBJS= defpath.o hexdecode.o hwparam.o hwparamstubs.o romload.o \
84
ccc5161848c7 loadtools: support building for GTA0x AP
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 70
diff changeset
13 sercomm.o sertool.o srecreader.o ttypassthru.o ${EXTRA_OBJ}
8
acaac9162574 loadtools modules coming along
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14
99
b78db17bfc85 fc-loadtool: flash program-{m0,srec} implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 96
diff changeset
15 LOADTOOL_OBJS= crc32tab.o defpath.o flerase.o flprogbin.o flprogsrec.o \
b78db17bfc85 fc-loadtool: flash program-{m0,srec} implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 96
diff changeset
16 flutil.o hexdecode.o hwparam.o labaud.o ltdispatch.o ltdump.o \
105
02cb0206aa47 fc-loadtool help implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 99
diff changeset
17 ltexit.o ltflash.o lthelp.o ltmain.o ltmisc.o ltpassthru.o \
02cb0206aa47 fc-loadtool help implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 99
diff changeset
18 ltscript.o romload.o sercomm.o srecreader.o tpinterf.o \
02cb0206aa47 fc-loadtool help implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 99
diff changeset
19 tpinterf2.o tpinterf3.o ${EXTRA_OBJ}
21
67a39d8914a8 starting work on loadtool
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 17
diff changeset
20
45
16315ed6401a init-script logic implemented in fc-xram
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 42
diff changeset
21 XRAM_OBJS= chainload.o clmain.o defpath.o hexdecode.o hwparam.o \
55
278052b6afda loadtools: started laying the foundation for flash support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 53
diff changeset
22 hwparamstubs.o initscript.o labaud.o romload.o sercomm.o \
84
ccc5161848c7 loadtools: support building for GTA0x AP
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 70
diff changeset
23 srecreader.o tpinterf.o ttypassthru.o ${EXTRA_OBJ}
42
5da0cbee2b89 fc-xram tool written, compiles, now needs to be debugged
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 35
diff changeset
24
23
aca1948e9713 loadtool: initial version compiles and links
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 22
diff changeset
25 all: ${PROGS}
9
fea204bc7674 fc-sertool compiles
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 8
diff changeset
26
48
38664e0b7c32 fc-sertool renamed to fc-iram
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 46
diff changeset
27 fc-iram: ${IRAM_OBJS}
84
ccc5161848c7 loadtools: support building for GTA0x AP
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 70
diff changeset
28 ${CC} ${CFLAGS} -o $@ ${IRAM_OBJS}
8
acaac9162574 loadtools modules coming along
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
29
23
aca1948e9713 loadtool: initial version compiles and links
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 22
diff changeset
30 fc-loadtool: ${LOADTOOL_OBJS}
84
ccc5161848c7 loadtools: support building for GTA0x AP
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 70
diff changeset
31 ${CC} ${CFLAGS} -o $@ ${LOADTOOL_OBJS}
23
aca1948e9713 loadtool: initial version compiles and links
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 22
diff changeset
32
42
5da0cbee2b89 fc-xram tool written, compiles, now needs to be debugged
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 35
diff changeset
33 fc-xram: ${XRAM_OBJS}
84
ccc5161848c7 loadtools: support building for GTA0x AP
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 70
diff changeset
34 ${CC} ${CFLAGS} -o $@ ${XRAM_OBJS}
42
5da0cbee2b89 fc-xram tool written, compiles, now needs to be debugged
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 35
diff changeset
35
46
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
36 # The loadagent.srec image needs to be installed in the "system" directory
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
37 # where fc-loadtool and fc-xram will find it. However, we have a dilemma:
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
38 # loadagent is built in the ../target-utils tree with the target cross-gcc,
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
39 # but the logical place to install it is here. The following hack is our
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
40 # workaround.
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
41 #
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
42 # It is also conceivable that after the FreeCalypso project matures,
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
43 # some people will want to flash images built by others, without setting up
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
44 # their own cross-gcc environments for the ARM7TDMI target. However,
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
45 # the loadtools subpackage is something that every user will need to build
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
46 # from source on his/her "loading" machine. The planned solution is to
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
47 # package a "release" of fc-loadtools which will be the present source
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
48 # directory with a prebuilt loadagent.srec included.
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
49
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
50 loadagent.srec:
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
51 @if [ -r ${LASRC}/loadagent.srec ]; then \
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
52 true; \
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
53 else \
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
54 echo "Error: I need to install loadagent.srec in ${INSTSCR},"; \
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
55 echo "but I cannot find it: neither in . nor in ${LASRC}"; \
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
56 false; \
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
57 fi
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
58 ln -s ${LASRC}/loadagent.srec .
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
59
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
60 install: ${PROGS} ${SCRIPTS} loadagent.srec
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
61 mkdir -p ${INSTBIN}
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
62 install -c ${PROGS} ${INSTBIN}
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
63 mkdir -p ${INSTSCR}
eb97cfe5e31a finally, a real make install for loadtools and loadagent
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 45
diff changeset
64 install -c loadagent.srec ${SCRIPTS} ${INSTSCR}
30
af6d763badfb loadtools: install target added
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 29
diff changeset
65
8
acaac9162574 loadtools modules coming along
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
66 clean:
9
fea204bc7674 fc-sertool compiles
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 8
diff changeset
67 rm -f *.o *.out *errs ${PROGS}