[PATCH 1/7] examples: generate demo.bin

mhorne at FreeBSD.org mhorne at FreeBSD.org
Tue Apr 21 00:34:12 CEST 2020


From: Mitchell Horne <mhorne at FreeBSD.org>

The CONFIG_API option builds the example program, examples/api/demo, as
an ELF file. The make logic exists to create a binary as well, so add
the target to do so.

Signed-off-by: Mitchell Horne <mhorne at FreeBSD.org>
---
 examples/api/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/examples/api/Makefile b/examples/api/Makefile
index ca4eb1f71a..9ff793206f 100644
--- a/examples/api/Makefile
+++ b/examples/api/Makefile
@@ -20,7 +20,7 @@ endif
 endif
 
 # Resulting ELF and binary exectuables will be named demo and demo.bin
-extra-y = demo
+extra-y = demo demo.bin
 
 # Source files located in the examples/api directory
 OBJ-y += crt0.o
@@ -56,7 +56,6 @@ cmd_link_demo = $(LD) --gc-sections -Ttext $(LOAD_ADDR) -o $@ $(filter-out $(PHO
 $(obj)/demo: $(OBJS) FORCE
 	$(call if_changed,link_demo)
 
-# demo.bin is never genrated. Is this necessary?
 OBJCOPYFLAGS_demo.bin := -O binary
 $(obj)/demo.bin: $(obj)/demo FORCE
 	$(call if_changed,objcopy)
-- 
2.26.1



More information about the U-Boot mailing list