2 # This Makefile snippet takes care of linking the firmware.
5 pci
: $(PCICOMMON
) $(PCIMACHDEP
)
10 $(LDSCRIPT
) : $(LDSCRIPT_TEMPLATE
)
11 $(GCPP
) -P
$(GENLDFLAGS
) $(LDSCRIPT_TEMPLATE
) $(LDSCRIPT
)
13 cfe cfe.bin
: $(CRT0OBJS
) $(BSPOBJS
) $(LIBCFE
) cfe.lds
14 $(GLD
) -o cfe
-Map cfe.map
$(LDFLAGS
) $(CRT0OBJS
) $(BSPOBJS
) -L.
-lcfe
$(LDLIBS
)
15 $(OBJDUMP
) -d cfe
> cfe.dis
16 $(OBJCOPY
) -O binary
-R .reginfo
-R .note
-R .comment
-R .mdebug
-S cfe cfe.bin
17 $(OBJCOPY
) --input-target
=binary
--output-target
=srec cfe.bin cfe.srec
18 @if
[ "$(CFE_MAXSIZE)" != "" ]; then \
19 if
[ "`wc -c < cfe.bin`" -gt
"$(CFE_MAXSIZE)" ]; then \
20 if
[ "$(CFE_INTERNAL)" != "" ]; then \
21 echo
"*** WARNING *** : cfe.bin bootrom image size: `wc -c < cfe.bin` exceeds limit: $(CFE_MAXSIZE)"; \
23 echo
"*** ERROR *** : cfe.bin bootrom image size: `wc -c < cfe.bin` exceeds limit: $(CFE_MAXSIZE)"; \
29 $(OBJCOPY
) --input-target
=binary
--output-target
=swapmif cfe.bin cfe.mem
32 $(OBJCOPY
) --output-target
=swapqt
--addr-bits
20 --qt-len
1 cfe cfe.qt
34 cfe.flash
: cfe.bin mkflashimage
35 .
/mkflashimage
-v
${ENDIAN} -B
${CFG_BOARDNAME} -V
${CFE_VER_MAJ}.
${CFE_VER_MIN}.
${CFE_VER_ECO} cfe.bin cfe.flash
36 $(OBJCOPY
) --input-target
=binary
--output-target
=srec cfe.flash cfe.flash.srec
40 rm -f
*.o
*~ cfe cfe.bin cfe.dis cfe.map cfe.srec cfe.lds
41 rm -f makereg
${CPU}_socregs.inc mkpcidb pcidevs_data2.h mkflashimage
44 rm -f cfe.flash cfe.flash.srec
$(CLEANOBJS
)