Skip to contentSkip to conversation

s390x: Add binary generation to makefile

PATCH David Hildenbrand 1 participant 1 message Jan 10, 2019 1 message not in the archive s390

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

David Hildenbrand

author Reviewed-by
#1 lore raw
Quoted 31 lines · Thomas Huth
Quoted 30 lines · Janosch Frank

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

---
 s390x/Makefile | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
s390x/Makefile +3 -1
index ede2961..82c4f15 100644
@@ -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 $@
 
Quoted 8 lines

s390x/Makefile FLATLIBS = $(libcflat) · line 61

Quoted 2 lines
s390x/Makefile +2 -0
+%.bin: %.elf
+	objcopy -O binary  $< $@

Please use $(OBJCOPY) instead, otherwise this won't work when cross-compiling.

Thomas

With that

Signature · 3 lines
Thanks,

David / dhildenb