OSDN Git Service

parisc: decompressor: do not copy source files while building
authorMasahiro Yamada <masahiroy@kernel.org>
Mon, 13 Dec 2021 03:09:15 +0000 (12:09 +0900)
committerHelge Deller <deller@gmx.de>
Wed, 5 Jan 2022 00:22:13 +0000 (01:22 +0100)
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>
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/boot/compressed/.gitignore
arch/parisc/boot/compressed/Makefile
arch/parisc/boot/compressed/firmware.c [new file with mode: 0644]
arch/parisc/boot/compressed/real2.S [new file with mode: 0644]
scripts/remove-stale-files

index b9853a3..a5839aa 100644 (file)
@@ -1,6 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0-only
-firmware.c
-real2.S
 sizes.h
 vmlinux
 vmlinux.lds
index bf4f289..116bd5c 100644 (file)
@@ -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 (file)
index 0000000..16a0713
--- /dev/null
@@ -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 (file)
index 0000000..cdc6a4d
--- /dev/null
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#include "../../kernel/real2.S"
index 0114c41..03e431e 100755 (executable)
@@ -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