From patchwork Mon Apr 20 22:34:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mitchell Horne X-Patchwork-Id: 238132 List-Id: U-Boot discussion From: mhorne at FreeBSD.org (mhorne at FreeBSD.org) Date: Mon, 20 Apr 2020 18:34:12 -0400 Subject: [PATCH 1/7] examples: generate demo.bin In-Reply-To: <20200420223418.117186-1-mhorne@FreeBSD.org> References: <20200420223418.117186-1-mhorne@FreeBSD.org> Message-ID: <20200420223418.117186-2-mhorne@FreeBSD.org> From: Mitchell Horne 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 Reviewed-by: Bin Meng --- 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)