Commit 472ab9ee authored by Joel Stanley's avatar Joel Stanley Committed by Stafford Horne
Browse files

openrisc: Add vmlinux.bin target



Build it by default. This is commonly used by fpga targets.

Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
Reviewed-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
parent 5c8fe583
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -24,6 +24,10 @@ LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)

KBUILD_CFLAGS	+= -pipe -ffixed-r10 -D__linux__

all: vmlinux.bin

boot := arch/$(ARCH)/boot

ifeq ($(CONFIG_OPENRISC_HAVE_INST_MUL),y)
	KBUILD_CFLAGS += $(call cc-option,-mhard-mul)
else
@@ -49,3 +53,11 @@ else
BUILTIN_DTB := n
endif
core-$(BUILTIN_DTB) += arch/openrisc/boot/dts/

PHONY += vmlinux.bin

vmlinux.bin: vmlinux
	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@

archclean:
	$(Q)$(MAKE) $(clean)=$(boot)
+2 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
vmlinux.bin
+10 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
#
# Makefile for bootable kernel images
#

targets += vmlinux.bin

OBJCOPYFLAGS_vmlinux.bin := -O binary
$(obj)/vmlinux.bin: vmlinux FORCE
	$(call if_changed,objcopy)