* [PATCH v2] openrisc: Add vmlinux.bin target
@ 2020-12-22 7:07 Joel Stanley
2020-12-22 7:22 ` Masahiro Yamada
0 siblings, 1 reply; 3+ messages in thread
From: Joel Stanley @ 2020-12-22 7:07 UTC (permalink / raw)
To: Jonas Bonn, Stefan Kristiansson, Stafford Horne
Cc: openrisc, linux-kernel, Mateusz Holenko, Karol Gugala, Masahiro Yamada
Build it by default. This is commonly used by fpga targets.
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
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
diff --git a/arch/openrisc/Makefile b/arch/openrisc/Makefile
index bf10141c7426..b13404f1f8bd 100644
--- a/arch/openrisc/Makefile
+++ b/arch/openrisc/Makefile
@@ -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)
diff --git a/arch/openrisc/boot/.gitignore b/arch/openrisc/boot/.gitignore
new file mode 100644
index 000000000000..007d6fea3145
--- /dev/null
+++ b/arch/openrisc/boot/.gitignore
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0
+vmlinux.bin
diff --git a/arch/openrisc/boot/Makefile b/arch/openrisc/boot/Makefile
new file mode 100644
index 000000000000..5b28538f4dd1
--- /dev/null
+++ b/arch/openrisc/boot/Makefile
@@ -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)
--
2.29.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] openrisc: Add vmlinux.bin target
2020-12-22 7:07 [PATCH v2] openrisc: Add vmlinux.bin target Joel Stanley
@ 2020-12-22 7:22 ` Masahiro Yamada
2020-12-22 13:18 ` Stafford Horne
0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2020-12-22 7:22 UTC (permalink / raw)
To: Joel Stanley
Cc: Jonas Bonn, Stefan Kristiansson, Stafford Horne, openrisc,
Linux Kernel Mailing List, Mateusz Holenko, Karol Gugala
On Tue, Dec 22, 2020 at 4:07 PM Joel Stanley <joel@jms.id.au> wrote:
>
> Build it by default. This is commonly used by fpga targets.
>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
> 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
Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
---
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] openrisc: Add vmlinux.bin target
2020-12-22 7:22 ` Masahiro Yamada
@ 2020-12-22 13:18 ` Stafford Horne
0 siblings, 0 replies; 3+ messages in thread
From: Stafford Horne @ 2020-12-22 13:18 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Joel Stanley, Jonas Bonn, Stefan Kristiansson, openrisc,
Linux Kernel Mailing List, Mateusz Holenko, Karol Gugala
On Tue, Dec 22, 2020 at 04:22:16PM +0900, Masahiro Yamada wrote:
> On Tue, Dec 22, 2020 at 4:07 PM Joel Stanley <joel@jms.id.au> wrote:
> >
> > Build it by default. This is commonly used by fpga targets.
> >
> > Signed-off-by: Joel Stanley <joel@jms.id.au>
> > ---
> > 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
>
>
> Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
>
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-22 13:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-22 7:07 [PATCH v2] openrisc: Add vmlinux.bin target Joel Stanley
2020-12-22 7:22 ` Masahiro Yamada
2020-12-22 13:18 ` Stafford Horne
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).