All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH v6 10/11] s390x: Add binary generation to makefile
@ 2019-01-18 11:42 Janosch Frank
  0 siblings, 0 replies; only message in thread
From: Janosch Frank @ 2019-01-18 11:42 UTC (permalink / raw)
  To: linux-s390, kvm

"make test_cases_binary" will now generate binaries that can be booted
from disk or as a non ELF kernel boot.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
 s390x/Makefile | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/s390x/Makefile b/s390x/Makefile
index ed6ef0b..af40fd4 100644
--- a/s390x/Makefile
+++ b/s390x/Makefile
@@ -10,10 +10,12 @@ tests += $(TEST_DIR)/cmm.elf
 tests += $(TEST_DIR)/vector.elf
 tests += $(TEST_DIR)/gs.elf
 tests += $(TEST_DIR)/iep.elf
+tests_binary = $(patsubst %.elf,%.bin,$(tests))
 
-all: directories test_cases
+all: directories test_cases test_cases_binary
 
 test_cases: $(tests)
+test_cases_binary: $(tests_binary)
 
 CFLAGS += -std=gnu99
 CFLAGS += -ffreestanding
@@ -55,8 +57,11 @@ FLATLIBS = $(libcflat)
 	$(RM) $(@:.elf=.aux.o)
 	@chmod a-x $@
 
+%.bin: %.elf
+	$(OBJCOPY) -O binary  $< $@
+
 arch_clean: asm_offsets_clean
-	$(RM) $(TEST_DIR)/*.{o,elf} $(TEST_DIR)/.*.d lib/s390x/.*.d
+	$(RM) $(TEST_DIR)/*.{o,elf,bin} $(TEST_DIR)/.*.d lib/s390x/.*.d
 
 generated-files = $(asm-offsets)
 $(tests:.elf=.o) $(cstart.o) $(cflatobjs): $(generated-files)
-- 
2.14.3

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-01-18 11:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-18 11:42 [kvm-unit-tests PATCH v6 10/11] s390x: Add binary generation to makefile Janosch Frank

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.