aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-06-25 12:40:23 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-07-17 12:18:05 -0400
commitc417fbce98722ad7e384caa8ba6f2e7c5f8672d9 (patch)
tree4fb1d144fccb0ea5c70c2e01029d76fd853d7910
parentb56e5355091d799d58ce8b40fdf62dc9c2159981 (diff)
kbuild: move bin2c back to scripts/ from scripts/basic/
Commit 8370edea81e3 ("bin2c: move bin2c in scripts/basic") moved bin2c to the scripts/basic/ directory, incorrectly stating "Kexec wants to use bin2c and it wants to use it really early in the build process. See arch/x86/purgatory/ code in later patches." Commit bdab125c9301 ("Revert "kexec/purgatory: Add clean-up for purgatory directory"") and commit d6605b6bbee8 ("x86/build: Remove unnecessary preparation for purgatory") removed the redundant purgatory build magic entirely. That means that the move of bin2c was unnecessary in the first place. fixdep is the only host program that deserves to sit in the scripts/basic/ directory. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-rw-r--r--arch/powerpc/purgatory/Makefile3
-rw-r--r--arch/s390/purgatory/Makefile3
-rw-r--r--arch/x86/purgatory/Makefile3
-rw-r--r--kernel/Makefile2
-rw-r--r--scripts/.gitignore1
-rw-r--r--scripts/Makefile1
-rw-r--r--scripts/basic/.gitignore1
-rw-r--r--scripts/basic/Makefile1
-rw-r--r--scripts/bin2c.c (renamed from scripts/basic/bin2c.c)0
-rw-r--r--security/tomoyo/Makefile2
10 files changed, 7 insertions, 10 deletions
diff --git a/arch/powerpc/purgatory/Makefile b/arch/powerpc/purgatory/Makefile
index 30e05decbb4c..4314ba5baf43 100644
--- a/arch/powerpc/purgatory/Makefile
+++ b/arch/powerpc/purgatory/Makefile
@@ -6,9 +6,8 @@ LDFLAGS_purgatory.ro := -e purgatory_start -r --no-undefined
6$(obj)/purgatory.ro: $(obj)/trampoline.o FORCE 6$(obj)/purgatory.ro: $(obj)/trampoline.o FORCE
7 $(call if_changed,ld) 7 $(call if_changed,ld)
8 8
9CMD_BIN2C = $(objtree)/scripts/basic/bin2c
10quiet_cmd_bin2c = BIN2C $@ 9quiet_cmd_bin2c = BIN2C $@
11 cmd_bin2c = $(CMD_BIN2C) kexec_purgatory < $< > $@ 10 cmd_bin2c = $(objtree)/scripts/bin2c kexec_purgatory < $< > $@
12 11
13$(obj)/kexec-purgatory.c: $(obj)/purgatory.ro FORCE 12$(obj)/kexec-purgatory.c: $(obj)/purgatory.ro FORCE
14 $(call if_changed,bin2c) 13 $(call if_changed,bin2c)
diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile
index 1ace023cbdce..445c4603ce02 100644
--- a/arch/s390/purgatory/Makefile
+++ b/arch/s390/purgatory/Makefile
@@ -27,9 +27,8 @@ KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
27$(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE 27$(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE
28 $(call if_changed,ld) 28 $(call if_changed,ld)
29 29
30CMD_BIN2C = $(objtree)/scripts/basic/bin2c
31quiet_cmd_bin2c = BIN2C $@ 30quiet_cmd_bin2c = BIN2C $@
32 cmd_bin2c = $(CMD_BIN2C) kexec_purgatory < $< > $@ 31 cmd_bin2c = $(objtree)/scripts/bin2c kexec_purgatory < $< > $@
33 32
34$(obj)/kexec-purgatory.c: $(obj)/purgatory.ro FORCE 33$(obj)/kexec-purgatory.c: $(obj)/purgatory.ro FORCE
35 $(call if_changed,bin2c) 34 $(call if_changed,bin2c)
diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile
index 81a8e33115ad..3cf302b26332 100644
--- a/arch/x86/purgatory/Makefile
+++ b/arch/x86/purgatory/Makefile
@@ -28,9 +28,8 @@ $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE
28 28
29targets += kexec-purgatory.c 29targets += kexec-purgatory.c
30 30
31CMD_BIN2C = $(objtree)/scripts/basic/bin2c
32quiet_cmd_bin2c = BIN2C $@ 31quiet_cmd_bin2c = BIN2C $@
33 cmd_bin2c = $(CMD_BIN2C) kexec_purgatory < $< > $@ 32 cmd_bin2c = $(objtree)/scripts/bin2c kexec_purgatory < $< > $@
34 33
35$(obj)/kexec-purgatory.c: $(obj)/purgatory.ro FORCE 34$(obj)/kexec-purgatory.c: $(obj)/purgatory.ro FORCE
36 $(call if_changed,bin2c) 35 $(call if_changed,bin2c)
diff --git a/kernel/Makefile b/kernel/Makefile
index 04bc07c2b42a..7a63d567fdb5 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -123,7 +123,7 @@ targets += config_data.gz
123$(obj)/config_data.gz: $(KCONFIG_CONFIG) FORCE 123$(obj)/config_data.gz: $(KCONFIG_CONFIG) FORCE
124 $(call if_changed,gzip) 124 $(call if_changed,gzip)
125 125
126 filechk_ikconfiggz = (echo "static const char kernel_config_data[] __used = MAGIC_START"; cat $< | scripts/basic/bin2c; echo "MAGIC_END;") 126 filechk_ikconfiggz = (echo "static const char kernel_config_data[] __used = MAGIC_START"; cat $< | scripts/bin2c; echo "MAGIC_END;")
127targets += config_data.h 127targets += config_data.h
128$(obj)/config_data.h: $(obj)/config_data.gz FORCE 128$(obj)/config_data.h: $(obj)/config_data.gz FORCE
129 $(call filechk,ikconfiggz) 129 $(call filechk,ikconfiggz)
diff --git a/scripts/.gitignore b/scripts/.gitignore
index 0442c06eefcb..12d302d70128 100644
--- a/scripts/.gitignore
+++ b/scripts/.gitignore
@@ -1,6 +1,7 @@
1# 1#
2# Generated files 2# Generated files
3# 3#
4bin2c
4conmakehash 5conmakehash
5kallsyms 6kallsyms
6pnmtologo 7pnmtologo
diff --git a/scripts/Makefile b/scripts/Makefile
index 25ab143cbe14..59c21ec49b84 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -10,6 +10,7 @@
10 10
11HOST_EXTRACFLAGS += -I$(srctree)/tools/include 11HOST_EXTRACFLAGS += -I$(srctree)/tools/include
12 12
13hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c
13hostprogs-$(CONFIG_KALLSYMS) += kallsyms 14hostprogs-$(CONFIG_KALLSYMS) += kallsyms
14hostprogs-$(CONFIG_LOGO) += pnmtologo 15hostprogs-$(CONFIG_LOGO) += pnmtologo
15hostprogs-$(CONFIG_VT) += conmakehash 16hostprogs-$(CONFIG_VT) += conmakehash
diff --git a/scripts/basic/.gitignore b/scripts/basic/.gitignore
index 9528ec9e5adc..a776371a3502 100644
--- a/scripts/basic/.gitignore
+++ b/scripts/basic/.gitignore
@@ -1,2 +1 @@
1fixdep fixdep
2bin2c
diff --git a/scripts/basic/Makefile b/scripts/basic/Makefile
index 0372b33febe5..af49b446f17d 100644
--- a/scripts/basic/Makefile
+++ b/scripts/basic/Makefile
@@ -9,7 +9,6 @@
9# fixdep: Used to generate dependency information during build process 9# fixdep: Used to generate dependency information during build process
10 10
11hostprogs-y := fixdep 11hostprogs-y := fixdep
12hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c
13always := $(hostprogs-y) 12always := $(hostprogs-y)
14 13
15# fixdep is needed to compile other host programs 14# fixdep is needed to compile other host programs
diff --git a/scripts/basic/bin2c.c b/scripts/bin2c.c
index c3d7eef3ad06..c3d7eef3ad06 100644
--- a/scripts/basic/bin2c.c
+++ b/scripts/bin2c.c
diff --git a/security/tomoyo/Makefile b/security/tomoyo/Makefile
index b7c6a7ffc058..cca5a3012fee 100644
--- a/security/tomoyo/Makefile
+++ b/security/tomoyo/Makefile
@@ -4,7 +4,7 @@ obj-y = audit.o common.o condition.o domain.o environ.o file.o gc.o group.o load
4targets += builtin-policy.h 4targets += builtin-policy.h
5define do_policy 5define do_policy
6echo "static char tomoyo_builtin_$(1)[] __initdata ="; \ 6echo "static char tomoyo_builtin_$(1)[] __initdata ="; \
7$(objtree)/scripts/basic/bin2c <$(firstword $(wildcard $(obj)/policy/$(1).conf $(srctree)/$(src)/policy/$(1).conf.default) /dev/null); \ 7$(objtree)/scripts/bin2c <$(firstword $(wildcard $(obj)/policy/$(1).conf $(srctree)/$(src)/policy/$(1).conf.default) /dev/null); \
8echo ";" 8echo ";"
9endef 9endef
10quiet_cmd_policy = POLICY $@ 10quiet_cmd_policy = POLICY $@