]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mips: decompressor: do not copy source files while building
authorMasahiro Yamada <masahiroy@kernel.org>
Fri, 5 Nov 2021 02:38:14 +0000 (11:38 +0900)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Wed, 10 Nov 2021 18:45:06 +0000 (19:45 +0100)
As commit 963c493d6585 ("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>
Tested-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/boot/compressed/.gitignore [deleted file]
arch/mips/boot/compressed/Makefile
arch/mips/boot/compressed/ashldi3.c [new file with mode: 0644]
arch/mips/boot/compressed/bswapdi.c [new file with mode: 0644]
arch/mips/boot/compressed/bswapsi.c [new file with mode: 0644]
arch/mips/boot/compressed/uart-ath79.c [new file with mode: 0644]
scripts/remove-stale-files

diff --git a/arch/mips/boot/compressed/.gitignore b/arch/mips/boot/compressed/.gitignore
deleted file mode 100644 (file)
index d358395..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-ashldi3.c
-bswapsi.c
index 9112bdb86be4586d9f76b41ab49fe7ea330b43b4..2861a05c2e0c046cacc665c4ce5c89d92309e0f7 100644 (file)
@@ -50,26 +50,10 @@ 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
 
 vmlinuzobjs-$(CONFIG_KERNEL_ZSTD) += $(obj)/bswapdi.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)
-
-extra-y += bswapdi.c
-$(obj)/bswapdi.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 (file)
index 0000000..f7bf6a7
--- /dev/null
@@ -0,0 +1,2 @@
+// SPDX-License-Identifier: GPL-2.0-only
+#include "../../../../lib/ashldi3.c"
diff --git a/arch/mips/boot/compressed/bswapdi.c b/arch/mips/boot/compressed/bswapdi.c
new file mode 100644 (file)
index 0000000..acb28ae
--- /dev/null
@@ -0,0 +1,2 @@
+// SPDX-License-Identifier: GPL-2.0-only
+#include "../../lib/bswapdi.c"
diff --git a/arch/mips/boot/compressed/bswapsi.c b/arch/mips/boot/compressed/bswapsi.c
new file mode 100644 (file)
index 0000000..fdb9c64
--- /dev/null
@@ -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 (file)
index 0000000..d686820
--- /dev/null
@@ -0,0 +1,2 @@
+// SPDX-License-Identifier: GPL-2.0-only
+#include "../../ath79/early_printk.c"
index c3eb81c3f7de1cca1ef45d8d761a693949937cd3..0114c41e69388bc5ea736efab52ebc601f277527 100755 (executable)
@@ -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 bswapdi.c bswapsi.c
+       do
+               rm -f arch/mips/boot/compressed/${f}
+       done
 fi