openrisc: Add vmlinux.bin target
PATCH v2 1/1 openrisc: Add vmlinux.bin target
Build it by default. This is commonly used by fpga targets.
---
v2: Address review from Masahiro
- Add vmlinux.bin to phony target
- simplfy vmlinux.bin rule
- add cleanup rule
- add vmlinux.bin to targets
- Add gitignore
--- arch/openrisc/Makefile | 12 ++++++++++++ arch/openrisc/boot/.gitignore | 2 ++ arch/openrisc/boot/Makefile | 10 ++++++++++ 3 files changed, 24 insertions(+) create mode 100644 arch/openrisc/boot/.gitignore create mode 100644 arch/openrisc/boot/Makefile
arch/openrisc/Makefile +12 -0
@@ -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)
arch/openrisc/boot/.gitignore new file +2 -0
@@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 +vmlinux.bin
arch/openrisc/boot/Makefile new file +10 -0
@@ -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)
Signature · 1 line
2.29.2
Quoted 4 lines · Joel Stanley
Build it by default. This is commonly used by fpga targets.
Signed-off-by Joel Stanley <[email protected]>
Quoted 8 lines
---
v2: Address review from Masahiro- Add vmlinux.bin to phony target
- simplfy vmlinux.bin rule
- add cleanup rule
- add vmlinux.bin to targets
- Add gitignore
---
Best Regards
Masahiro Yamada
Stafford Horne
maintainerQuoted 8 lines · Masahiro Yamada
Quoted 7 lines · Joel Stanley
Build it by default. This is commonly used by fpga targets.
Signed-off-by Joel Stanley <[email protected]>---
v2: Address review from Masahiro
Quoted 9 lines
Quoted 5 lines
- Add vmlinux.bin to phony target
- simplfy vmlinux.bin rule
- add cleanup rule
- add vmlinux.bin to targets
- Add gitignoreReviewed-by Masahiro Yamada <[email protected]>
Thanks, I will queue this. I am just wondering if I should wait for 5.12 or just go ahead an send it in 5.11 as a fix.
-Stafford