]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Makefile: Generate a symbol file for u-boot-spl
authorSimon Glass <sjg@chromium.org>
Mon, 26 Oct 2020 02:38:30 +0000 (20:38 -0600)
committerSimon Glass <sjg@chromium.org>
Thu, 29 Oct 2020 20:42:18 +0000 (14:42 -0600)
Add a rule to generate u-boot-spl.sym so that pytest can discover the
available unit tests.

Signed-off-by: Simon Glass <sjg@chromium.org>
scripts/Makefile.spl

index 2e3a443035cd1d0b110a325c283b65c3a1f73293..9f1f7445d71123c1f78f0942cc95df959e63d416 100644 (file)
@@ -214,7 +214,7 @@ spl/boot.bin: $(obj)/$(SPL_BIN)-align.bin FORCE
        $(call if_changed,mkimage)
 endif
 
-INPUTS-y       += $(obj)/$(SPL_BIN).bin
+INPUTS-y       += $(obj)/$(SPL_BIN).bin $(obj)/$(SPL_BIN).sym
 
 ifdef CONFIG_SAMSUNG
 INPUTS-y       += $(obj)/$(BOARD)-spl.bin
@@ -408,6 +408,11 @@ MKIMAGEFLAGS_u-boot-spl-mtk.bin = -T mtk_image \
 $(obj)/u-boot-spl-mtk.bin: $(obj)/u-boot-spl.bin FORCE
        $(call if_changed,mkimage)
 
+quiet_cmd_sym ?= SYM     $@
+      cmd_sym ?= $(OBJDUMP) -t $< > $@
+$(obj)/$(SPL_BIN).sym: $(obj)/$(SPL_BIN) FORCE
+       $(call if_changed,sym)
+
 # Rule to link u-boot-spl
 # May be overridden by arch/$(ARCH)/config.mk
 quiet_cmd_u-boot-spl ?= LD      $@