From: Janosch Frank <frankja@linux.ibm.com>
To: linux-s390@vger.kernel.org, kvm@vger.kernel.org
Subject: [kvm-unit-tests PATCH v6 10/11] s390x: Add binary generation to makefile
Date: Fri, 18 Jan 2019 11:42:03 +0000 [thread overview]
Message-ID: <20190118114204.147868-11-frankja@linux.ibm.com> (raw)
"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
reply other threads:[~2019-01-18 11:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190118114204.147868-11-frankja@linux.ibm.com \
--to=frankja@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.