[coreboot] Patch set updated for filo: 348f295 makefile: create filo.map in separate step

Mathias Krause (mathias.krause@secunet.com) gerrit at coreboot.org
Wed Mar 7 16:41:47 CET 2012

Mathias Krause (mathias.krause at secunet.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/743


commit 348f295d107eeabab00f80dbe371838a355b3e3d
Author: Mathias Krause <mathias.krause at secunet.com>
Date:   Tue Mar 6 09:42:18 2012 +0100

    makefile: create filo.map in separate step
    Instead of copying files around and creating files make is not aware of,
    use a dedicated target and rule to create filo.map. Also skip piping the
    result through sort as nm has an option to sort the symbols.
    Also drop the bogus dependency to libpayload as filo.elf is only the
    striped version of filo.
    Change-Id: If010b4ce269a47a99de06db16e0290c3fd90b559
    Signed-off-by: Mathias Krause <mathias.krause at secunet.com>
 Makefile |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 6603612..3461614 100644
--- a/Makefile
+++ b/Makefile
@@ -133,11 +133,9 @@ $(obj)/filo: $(OBJS) libpayload
 	printf "  LD      $(subst $(shell pwd)/,,$(@))\n"
 	$(LD) -N -T $(ARCHDIR-y)/ldscript -o $@ $(OBJS) $(LIBPAYLOAD) $(LIBGCC)
-$(TARGET): $(obj)/filo libpayload
-	cp $(obj)/filo $@
-	$(NM) $(obj)/filo | sort > $(obj)/filo.map
+$(TARGET): $(obj)/filo $(obj)/filo.map
 	printf "  STRIP   $(subst $(shell pwd)/,,$(@))\n"
-	$(STRIP) -s $@
+	$(STRIP) -s $< -o $@
 include util/kconfig/Makefile
@@ -153,6 +151,10 @@ $(obj)/%.S.o: $(src)/%.S
 	printf "  AS      $(subst $(shell pwd)/,,$(@))\n"
 	$(AS) $(ASFLAGS) -o $@ $<
+$(obj)/%.map: $(obj)/%
+	printf "  SYMS    $(subst $(shell pwd)/,,$(@))\n"
+	$(NM) -n $< > $@
 $(obj)/version.h: FORCE

More information about the coreboot mailing list