Skip to content

Commit f78b25e

Browse files
masahir0ytsbogend
authored andcommitted
mips: decompressor: do not copy source files while building
As commit 7ae4a78 ("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 <[email protected]> Tested-by: Paul Cercueil <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent e2f4b3b commit f78b25e

File tree

7 files changed

+13
-19
lines changed

7 files changed

+13
-19
lines changed

arch/mips/boot/compressed/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

arch/mips/boot/compressed/Makefile

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,26 +50,10 @@ vmlinuzobjs-$(CONFIG_MIPS_ALCHEMY) += $(obj)/uart-alchemy.o
5050
vmlinuzobjs-$(CONFIG_ATH79) += $(obj)/uart-ath79.o
5151
endif
5252

53-
extra-y += uart-ath79.c
54-
$(obj)/uart-ath79.c: $(srctree)/arch/mips/ath79/early_printk.c
55-
$(call cmd,shipped)
56-
5753
vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o
5854

5955
vmlinuzobjs-$(CONFIG_KERNEL_ZSTD) += $(obj)/bswapdi.o
6056

61-
extra-y += ashldi3.c
62-
$(obj)/ashldi3.c: $(obj)/%.c: $(srctree)/lib/%.c FORCE
63-
$(call if_changed,shipped)
64-
65-
extra-y += bswapsi.c
66-
$(obj)/bswapsi.c: $(obj)/%.c: $(srctree)/arch/mips/lib/%.c FORCE
67-
$(call if_changed,shipped)
68-
69-
extra-y += bswapdi.c
70-
$(obj)/bswapdi.c: $(obj)/%.c: $(srctree)/arch/mips/lib/%.c FORCE
71-
$(call if_changed,shipped)
72-
7357
targets := $(notdir $(vmlinuzobjs-y))
7458

7559
targets += vmlinux.bin

arch/mips/boot/compressed/ashldi3.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// SPDX-License-Identifier: GPL-2.0-only
2+
#include "../../../../lib/ashldi3.c"

arch/mips/boot/compressed/bswapdi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// SPDX-License-Identifier: GPL-2.0-only
2+
#include "../../lib/bswapdi.c"

arch/mips/boot/compressed/bswapsi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// SPDX-License-Identifier: GPL-2.0-only
2+
#include "../../lib/bswapsi.c"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// SPDX-License-Identifier: GPL-2.0-only
2+
#include "../../ath79/early_printk.c"

scripts/remove-stale-files

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,9 @@ if [ -n "${building_out_of_srctree}" ]; then
2828
do
2929
rm -f arch/arm/boot/compressed/${f}
3030
done
31+
32+
for f in uart-ath79.c ashldi3.c bswapdi.c bswapsi.c
33+
do
34+
rm -f arch/mips/boot/compressed/${f}
35+
done
3136
fi

0 commit comments

Comments
 (0)