* [PATCH] parisc: decompressor: do not copy source files while building
@ 2021-12-13 3:09 Masahiro Yamada
2021-12-14 10:45 ` Helge Deller
0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2021-12-13 3:09 UTC (permalink / raw)
To: linux-parisc
Cc: linux-kernel, Masahiro Yamada, Helge Deller,
James E.J. Bottomley, Rich Felker, Thomas Bogendoerfer
As commit 7ae4a78daacf ("ARM: 8969/1: decompressor: simplify libfdt
builds") stated, copying source files during the build time may not
end up with as clean code as expected.
Do similar for parisc to clean up the Makefile.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
arch/parisc/boot/compressed/.gitignore | 2 --
arch/parisc/boot/compressed/Makefile | 8 --------
arch/parisc/boot/compressed/firmware.c | 2 ++
arch/parisc/boot/compressed/real2.S | 2 ++
scripts/remove-stale-files | 5 +++++
5 files changed, 9 insertions(+), 10 deletions(-)
create mode 100644 arch/parisc/boot/compressed/firmware.c
create mode 100644 arch/parisc/boot/compressed/real2.S
diff --git a/arch/parisc/boot/compressed/.gitignore b/arch/parisc/boot/compressed/.gitignore
index b9853a356ab2..a5839aa16706 100644
--- a/arch/parisc/boot/compressed/.gitignore
+++ b/arch/parisc/boot/compressed/.gitignore
@@ -1,6 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-only
-firmware.c
-real2.S
sizes.h
vmlinux
vmlinux.lds
diff --git a/arch/parisc/boot/compressed/Makefile b/arch/parisc/boot/compressed/Makefile
index bf4f2891d0b7..116bd5c1873c 100644
--- a/arch/parisc/boot/compressed/Makefile
+++ b/arch/parisc/boot/compressed/Makefile
@@ -13,7 +13,6 @@ OBJECTS := head.o real2.o firmware.o misc.o piggy.o
targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2
targets += vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.lz4
targets += $(OBJECTS) sizes.h
-targets += real2.S firmware.c
KBUILD_CFLAGS := -D__KERNEL__ -O2 -DBOOTLOADER
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
@@ -42,14 +41,7 @@ $(obj)/head.o: $(obj)/sizes.h
CFLAGS_misc.o += -I$(objtree)/$(obj)
$(obj)/misc.o: $(obj)/sizes.h
-$(obj)/firmware.o: $(obj)/firmware.c
-$(obj)/firmware.c: $(srctree)/arch/$(SRCARCH)/kernel/firmware.c
- $(call cmd,shipped)
-
AFLAGS_real2.o += -DBOOTLOADER
-$(obj)/real2.o: $(obj)/real2.S
-$(obj)/real2.S: $(srctree)/arch/$(SRCARCH)/kernel/real2.S
- $(call cmd,shipped)
CPPFLAGS_vmlinux.lds += -I$(objtree)/$(obj) -DBOOTLOADER
$(obj)/vmlinux.lds: $(obj)/sizes.h
diff --git a/arch/parisc/boot/compressed/firmware.c b/arch/parisc/boot/compressed/firmware.c
new file mode 100644
index 000000000000..16a07137fe92
--- /dev/null
+++ b/arch/parisc/boot/compressed/firmware.c
@@ -0,0 +1,2 @@
+// SPDX-License-Identifier: GPL-2.0-only
+#include "../../kernel/firmware.c"
diff --git a/arch/parisc/boot/compressed/real2.S b/arch/parisc/boot/compressed/real2.S
new file mode 100644
index 000000000000..cdc6a4da3240
--- /dev/null
+++ b/arch/parisc/boot/compressed/real2.S
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#include "../../kernel/real2.S"
diff --git a/scripts/remove-stale-files b/scripts/remove-stale-files
index f0d53227fe7b..80430b8fb617 100755
--- a/scripts/remove-stale-files
+++ b/scripts/remove-stale-files
@@ -33,4 +33,9 @@ if [ -n "${building_out_of_srctree}" ]; then
do
rm -f arch/mips/boot/compressed/${f}
done
+
+ for f in firmware.c real2.S
+ do
+ rm -f arch/parisc/boot/compressed/${f}
+ done
fi
--
2.32.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] parisc: decompressor: do not copy source files while building
2021-12-13 3:09 [PATCH] parisc: decompressor: do not copy source files while building Masahiro Yamada
@ 2021-12-14 10:45 ` Helge Deller
2021-12-21 23:53 ` Masahiro Yamada
0 siblings, 1 reply; 3+ messages in thread
From: Helge Deller @ 2021-12-14 10:45 UTC (permalink / raw)
To: Masahiro Yamada, linux-parisc
Cc: linux-kernel, James E.J. Bottomley, Rich Felker, Thomas Bogendoerfer
On 12/13/21 04:09, Masahiro Yamada wrote:
> As commit 7ae4a78daacf ("ARM: 8969/1: decompressor: simplify libfdt
> builds") stated, copying source files during the build time may not
> end up with as clean code as expected.
>
> Do similar for parisc to clean up the Makefile.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Helge Deller <deller@gmx.de>
Thanks!
Helge
> ---
>
> arch/parisc/boot/compressed/.gitignore | 2 --
> arch/parisc/boot/compressed/Makefile | 8 --------
> arch/parisc/boot/compressed/firmware.c | 2 ++
> arch/parisc/boot/compressed/real2.S | 2 ++
> scripts/remove-stale-files | 5 +++++
> 5 files changed, 9 insertions(+), 10 deletions(-)
> create mode 100644 arch/parisc/boot/compressed/firmware.c
> create mode 100644 arch/parisc/boot/compressed/real2.S
>
> diff --git a/arch/parisc/boot/compressed/.gitignore b/arch/parisc/boot/compressed/.gitignore
> index b9853a356ab2..a5839aa16706 100644
> --- a/arch/parisc/boot/compressed/.gitignore
> +++ b/arch/parisc/boot/compressed/.gitignore
> @@ -1,6 +1,4 @@
> # SPDX-License-Identifier: GPL-2.0-only
> -firmware.c
> -real2.S
> sizes.h
> vmlinux
> vmlinux.lds
> diff --git a/arch/parisc/boot/compressed/Makefile b/arch/parisc/boot/compressed/Makefile
> index bf4f2891d0b7..116bd5c1873c 100644
> --- a/arch/parisc/boot/compressed/Makefile
> +++ b/arch/parisc/boot/compressed/Makefile
> @@ -13,7 +13,6 @@ OBJECTS := head.o real2.o firmware.o misc.o piggy.o
> targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2
> targets += vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.lz4
> targets += $(OBJECTS) sizes.h
> -targets += real2.S firmware.c
>
> KBUILD_CFLAGS := -D__KERNEL__ -O2 -DBOOTLOADER
> KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
> @@ -42,14 +41,7 @@ $(obj)/head.o: $(obj)/sizes.h
> CFLAGS_misc.o += -I$(objtree)/$(obj)
> $(obj)/misc.o: $(obj)/sizes.h
>
> -$(obj)/firmware.o: $(obj)/firmware.c
> -$(obj)/firmware.c: $(srctree)/arch/$(SRCARCH)/kernel/firmware.c
> - $(call cmd,shipped)
> -
> AFLAGS_real2.o += -DBOOTLOADER
> -$(obj)/real2.o: $(obj)/real2.S
> -$(obj)/real2.S: $(srctree)/arch/$(SRCARCH)/kernel/real2.S
> - $(call cmd,shipped)
>
> CPPFLAGS_vmlinux.lds += -I$(objtree)/$(obj) -DBOOTLOADER
> $(obj)/vmlinux.lds: $(obj)/sizes.h
> diff --git a/arch/parisc/boot/compressed/firmware.c b/arch/parisc/boot/compressed/firmware.c
> new file mode 100644
> index 000000000000..16a07137fe92
> --- /dev/null
> +++ b/arch/parisc/boot/compressed/firmware.c
> @@ -0,0 +1,2 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +#include "../../kernel/firmware.c"
> diff --git a/arch/parisc/boot/compressed/real2.S b/arch/parisc/boot/compressed/real2.S
> new file mode 100644
> index 000000000000..cdc6a4da3240
> --- /dev/null
> +++ b/arch/parisc/boot/compressed/real2.S
> @@ -0,0 +1,2 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +#include "../../kernel/real2.S"
> diff --git a/scripts/remove-stale-files b/scripts/remove-stale-files
> index f0d53227fe7b..80430b8fb617 100755
> --- a/scripts/remove-stale-files
> +++ b/scripts/remove-stale-files
> @@ -33,4 +33,9 @@ if [ -n "${building_out_of_srctree}" ]; then
> do
> rm -f arch/mips/boot/compressed/${f}
> done
> +
> + for f in firmware.c real2.S
> + do
> + rm -f arch/parisc/boot/compressed/${f}
> + done
> fi
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] parisc: decompressor: do not copy source files while building
2021-12-14 10:45 ` Helge Deller
@ 2021-12-21 23:53 ` Masahiro Yamada
0 siblings, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2021-12-21 23:53 UTC (permalink / raw)
To: Helge Deller
Cc: Parisc List, Linux Kernel Mailing List, James E.J. Bottomley,
Rich Felker, Thomas Bogendoerfer
On Tue, Dec 14, 2021 at 7:45 PM Helge Deller <deller@gmx.de> wrote:
>
> On 12/13/21 04:09, Masahiro Yamada wrote:
> > As commit 7ae4a78daacf ("ARM: 8969/1: decompressor: simplify libfdt
> > builds") stated, copying source files during the build time may not
> > end up with as clean code as expected.
> >
> > Do similar for parisc to clean up the Makefile.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
>
> Acked-by: Helge Deller <deller@gmx.de>
>
Can you apply it to your tree?
Thanks.
> Thanks!
> Helge
>
> > ---
> >
> > arch/parisc/boot/compressed/.gitignore | 2 --
> > arch/parisc/boot/compressed/Makefile | 8 --------
> > arch/parisc/boot/compressed/firmware.c | 2 ++
> > arch/parisc/boot/compressed/real2.S | 2 ++
> > scripts/remove-stale-files | 5 +++++
> > 5 files changed, 9 insertions(+), 10 deletions(-)
> > create mode 100644 arch/parisc/boot/compressed/firmware.c
> > create mode 100644 arch/parisc/boot/compressed/real2.S
> >
> > diff --git a/arch/parisc/boot/compressed/.gitignore b/arch/parisc/boot/compressed/.gitignore
> > index b9853a356ab2..a5839aa16706 100644
> > --- a/arch/parisc/boot/compressed/.gitignore
> > +++ b/arch/parisc/boot/compressed/.gitignore
> > @@ -1,6 +1,4 @@
> > # SPDX-License-Identifier: GPL-2.0-only
> > -firmware.c
> > -real2.S
> > sizes.h
> > vmlinux
> > vmlinux.lds
> > diff --git a/arch/parisc/boot/compressed/Makefile b/arch/parisc/boot/compressed/Makefile
> > index bf4f2891d0b7..116bd5c1873c 100644
> > --- a/arch/parisc/boot/compressed/Makefile
> > +++ b/arch/parisc/boot/compressed/Makefile
> > @@ -13,7 +13,6 @@ OBJECTS := head.o real2.o firmware.o misc.o piggy.o
> > targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2
> > targets += vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.lz4
> > targets += $(OBJECTS) sizes.h
> > -targets += real2.S firmware.c
> >
> > KBUILD_CFLAGS := -D__KERNEL__ -O2 -DBOOTLOADER
> > KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
> > @@ -42,14 +41,7 @@ $(obj)/head.o: $(obj)/sizes.h
> > CFLAGS_misc.o += -I$(objtree)/$(obj)
> > $(obj)/misc.o: $(obj)/sizes.h
> >
> > -$(obj)/firmware.o: $(obj)/firmware.c
> > -$(obj)/firmware.c: $(srctree)/arch/$(SRCARCH)/kernel/firmware.c
> > - $(call cmd,shipped)
> > -
> > AFLAGS_real2.o += -DBOOTLOADER
> > -$(obj)/real2.o: $(obj)/real2.S
> > -$(obj)/real2.S: $(srctree)/arch/$(SRCARCH)/kernel/real2.S
> > - $(call cmd,shipped)
> >
> > CPPFLAGS_vmlinux.lds += -I$(objtree)/$(obj) -DBOOTLOADER
> > $(obj)/vmlinux.lds: $(obj)/sizes.h
> > diff --git a/arch/parisc/boot/compressed/firmware.c b/arch/parisc/boot/compressed/firmware.c
> > new file mode 100644
> > index 000000000000..16a07137fe92
> > --- /dev/null
> > +++ b/arch/parisc/boot/compressed/firmware.c
> > @@ -0,0 +1,2 @@
> > +// SPDX-License-Identifier: GPL-2.0-only
> > +#include "../../kernel/firmware.c"
> > diff --git a/arch/parisc/boot/compressed/real2.S b/arch/parisc/boot/compressed/real2.S
> > new file mode 100644
> > index 000000000000..cdc6a4da3240
> > --- /dev/null
> > +++ b/arch/parisc/boot/compressed/real2.S
> > @@ -0,0 +1,2 @@
> > +/* SPDX-License-Identifier: GPL-2.0-only */
> > +#include "../../kernel/real2.S"
> > diff --git a/scripts/remove-stale-files b/scripts/remove-stale-files
> > index f0d53227fe7b..80430b8fb617 100755
> > --- a/scripts/remove-stale-files
> > +++ b/scripts/remove-stale-files
> > @@ -33,4 +33,9 @@ if [ -n "${building_out_of_srctree}" ]; then
> > do
> > rm -f arch/mips/boot/compressed/${f}
> > done
> > +
> > + for f in firmware.c real2.S
> > + do
> > + rm -f arch/parisc/boot/compressed/${f}
> > + done
> > fi
> >
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-21 23:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13 3:09 [PATCH] parisc: decompressor: do not copy source files while building Masahiro Yamada
2021-12-14 10:45 ` Helge Deller
2021-12-21 23:53 ` Masahiro Yamada
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.