Skip to content

Commit

Permalink
openrisc: Add vmlinux.bin target
Browse files Browse the repository at this point in the history
Build it by default. This is commonly used by fpga targets.

Signed-off-by: Joel Stanley <[email protected]>
Reviewed-by: Masahiro Yamada <[email protected]>
Signed-off-by: Stafford Horne <[email protected]>
  • Loading branch information
shenki authored and stffrdhrn committed Jan 1, 2021
1 parent 5c8fe58 commit 472ab9e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions arch/openrisc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 changes: 2 additions & 0 deletions arch/openrisc/boot/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SPDX-License-Identifier: GPL-2.0
vmlinux.bin
10 changes: 10 additions & 0 deletions arch/openrisc/boot/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# 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)

0 comments on commit 472ab9e

Please sign in to comment.