[kvm-unit-tests PATCH v3 09/13] s390x: Add binary generation to makefile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



make bin will now generate binaries that can be booted from this or as
a non ELF kernel boot.

Signed-off-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
---
 s390x/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/s390x/Makefile b/s390x/Makefile
index ede2961..eaad18c 100644
--- a/s390x/Makefile
+++ b/s390x/Makefile
@@ -10,9 +10,11 @@ tests += $(TEST_DIR)/cmm.elf
 tests += $(TEST_DIR)/vector.elf
 tests += $(TEST_DIR)/gs.elf
 tests += $(TEST_DIR)/iep.elf
+test_bins = $(patsubst %.elf,%.bin,$(tests))
 
 all: directories test_cases
 
+bin: $(test_bins)
 test_cases: $(tests)
 
 CFLAGS += -std=gnu99
@@ -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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux