From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-mips@vger.kernel.org, Alexander Lobakin <alobakin@pm.me>,
Arnd Bergmann <arnd@arndb.de>,
Paul Cercueil <paul@crapouillou.net>,
Xingxing Su <suxingxing@loongson.cn>,
linux-kernel@vger.kernel.org, zhaoxiao <zhaoxiao@uniontech.com>
Subject: Re: [PATCH] mips: decompressor: do not copy source files while building
Date: Wed, 10 Nov 2021 09:49:27 +0100 [thread overview]
Message-ID: <20211110084927.GA5976@alpha.franken.de> (raw)
In-Reply-To: <20211105023815.85784-1-masahiroy@kernel.org>
On Fri, Nov 05, 2021 at 11:38:14AM +0900, 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 mips to clean up the Makefile and .gitignore.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> arch/mips/boot/compressed/.gitignore | 3 ---
> arch/mips/boot/compressed/Makefile | 12 ------------
> arch/mips/boot/compressed/ashldi3.c | 2 ++
> arch/mips/boot/compressed/bswapsi.c | 2 ++
> arch/mips/boot/compressed/uart-ath79.c | 2 ++
> scripts/remove-stale-files | 5 +++++
> 6 files changed, 11 insertions(+), 15 deletions(-)
> delete mode 100644 arch/mips/boot/compressed/.gitignore
> create mode 100644 arch/mips/boot/compressed/ashldi3.c
> create mode 100644 arch/mips/boot/compressed/bswapsi.c
> create mode 100644 arch/mips/boot/compressed/uart-ath79.c
>
> diff --git a/arch/mips/boot/compressed/.gitignore b/arch/mips/boot/compressed/.gitignore
> deleted file mode 100644
> index d358395614c9..000000000000
> --- a/arch/mips/boot/compressed/.gitignore
> +++ /dev/null
> @@ -1,3 +0,0 @@
> -# SPDX-License-Identifier: GPL-2.0-only
> -ashldi3.c
> -bswapsi.c
> diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
> index 3548b3b45269..e6584dab2360 100644
> --- a/arch/mips/boot/compressed/Makefile
> +++ b/arch/mips/boot/compressed/Makefile
> @@ -50,20 +50,8 @@ vmlinuzobjs-$(CONFIG_MIPS_ALCHEMY) += $(obj)/uart-alchemy.o
> vmlinuzobjs-$(CONFIG_ATH79) += $(obj)/uart-ath79.o
> endif
>
> -extra-y += uart-ath79.c
> -$(obj)/uart-ath79.c: $(srctree)/arch/mips/ath79/early_printk.c
> - $(call cmd,shipped)
> -
> vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o
>
> -extra-y += ashldi3.c
> -$(obj)/ashldi3.c: $(obj)/%.c: $(srctree)/lib/%.c FORCE
> - $(call if_changed,shipped)
> -
> -extra-y += bswapsi.c
> -$(obj)/bswapsi.c: $(obj)/%.c: $(srctree)/arch/mips/lib/%.c FORCE
> - $(call if_changed,shipped)
> -
> targets := $(notdir $(vmlinuzobjs-y))
>
> targets += vmlinux.bin
> diff --git a/arch/mips/boot/compressed/ashldi3.c b/arch/mips/boot/compressed/ashldi3.c
> new file mode 100644
> index 000000000000..f7bf6a7aae31
> --- /dev/null
> +++ b/arch/mips/boot/compressed/ashldi3.c
> @@ -0,0 +1,2 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +#include "../../../../lib/ashldi3.c"
> diff --git a/arch/mips/boot/compressed/bswapsi.c b/arch/mips/boot/compressed/bswapsi.c
> new file mode 100644
> index 000000000000..fdb9c6476904
> --- /dev/null
> +++ b/arch/mips/boot/compressed/bswapsi.c
> @@ -0,0 +1,2 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +#include "../../lib/bswapsi.c"
> diff --git a/arch/mips/boot/compressed/uart-ath79.c b/arch/mips/boot/compressed/uart-ath79.c
> new file mode 100644
> index 000000000000..d686820921be
> --- /dev/null
> +++ b/arch/mips/boot/compressed/uart-ath79.c
> @@ -0,0 +1,2 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +#include "../../ath79/early_printk.c"
> diff --git a/scripts/remove-stale-files b/scripts/remove-stale-files
> index eb630ee287c3..c534fe1eac16 100755
> --- a/scripts/remove-stale-files
> +++ b/scripts/remove-stale-files
> @@ -28,4 +28,9 @@ if [ -n "${building_out_of_srctree}" ]; then
> do
> rm -f arch/arm/boot/compressed/${f}
> done
> +
> + for f in uart-ath79.c ashldi3.c bswapsi.c
> + do
> + rm -f arch/mips/boot/compressed/${f}
> + done
hmm, isn't this the wrong action now that these files have been added
to git ?
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
next prev parent reply other threads:[~2021-11-10 8:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-05 2:38 [PATCH] mips: decompressor: do not copy source files while building Masahiro Yamada
2021-11-09 12:10 ` Paul Cercueil
2021-11-09 16:57 ` Masahiro Yamada
2021-11-09 20:28 ` Paul Cercueil
2021-11-10 8:49 ` Thomas Bogendoerfer [this message]
2021-11-10 17:02 ` Masahiro Yamada
2021-11-10 18:52 ` Thomas Bogendoerfer
2021-11-11 2:58 ` Masahiro Yamada
2021-11-11 7:55 ` Masahiro Yamada
2021-11-11 8:14 ` Thomas Bogendoerfer
2021-11-11 8:24 ` Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211110084927.GA5976@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=alobakin@pm.me \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=paul@crapouillou.net \
--cc=suxingxing@loongson.cn \
--cc=zhaoxiao@uniontech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.