Skip to content

Commit

Permalink
s390/purgatory: Omit use of bin2c
Browse files Browse the repository at this point in the history
Omit use of script/bin2c hack. Directly include into assembler file instead.

Signed-off-by: Philipp Rudo <[email protected]>
Signed-off-by: Martin Schwidefsky <[email protected]>
  • Loading branch information
Philipp Rudo authored and Martin Schwidefsky committed Apr 29, 2019
1 parent 61f3f8f commit 4c0f032
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
9 changes: 3 additions & 6 deletions arch/s390/purgatory/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ OBJECT_FILES_NON_STANDARD := y

purgatory-y := head.o purgatory.o string.o sha256.o mem.o

targets += $(purgatory-y) purgatory.lds purgatory purgatory.ro kexec-purgatory.c
targets += $(purgatory-y) purgatory.lds purgatory purgatory.ro
PURGATORY_OBJS = $(addprefix $(obj)/,$(purgatory-y))

$(obj)/sha256.o: $(srctree)/lib/sha256.c FORCE
Expand Down Expand Up @@ -34,10 +34,7 @@ OBJCOPYFLAGS_purgatory.ro += --remove-section='.note.*'
$(obj)/purgatory.ro: $(obj)/purgatory FORCE
$(call if_changed,objcopy)

quiet_cmd_bin2c = BIN2C $@
cmd_bin2c = $(objtree)/scripts/bin2c kexec_purgatory < $< > $@

$(obj)/kexec-purgatory.c: $(obj)/purgatory.ro FORCE
$(call if_changed,bin2c)
$(obj)/kexec-purgatory.o: $(obj)/kexec-purgatory.S $(obj)/purgatory.ro FORCE
$(call if_changed_rule,as_o_S)

obj-$(CONFIG_ARCH_HAS_KEXEC_PURGATORY) += kexec-purgatory.o
14 changes: 14 additions & 0 deletions arch/s390/purgatory/kexec-purgatory.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* SPDX-License-Identifier: GPL-2.0 */

.section .rodata, "a"

.align 8
kexec_purgatory:
.globl kexec_purgatory
.incbin "arch/s390/purgatory/purgatory.ro"
.Lkexec_purgatroy_end:

.align 8
kexec_purgatory_size:
.globl kexec_purgatory_size
.quad .Lkexec_purgatroy_end - kexec_purgatory

0 comments on commit 4c0f032

Please sign in to comment.