Skip to content

Commit c417fbc

Browse files
committed
kbuild: move bin2c back to scripts/ from scripts/basic/
Commit 8370ede ("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 bdab125 ("Revert "kexec/purgatory: Add clean-up for purgatory directory"") and commit d6605b6 ("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 <[email protected]>
1 parent b56e535 commit c417fbc

File tree

10 files changed

+7
-10
lines changed

10 files changed

+7
-10
lines changed

arch/powerpc/purgatory/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ LDFLAGS_purgatory.ro := -e purgatory_start -r --no-undefined
66
$(obj)/purgatory.ro: $(obj)/trampoline.o FORCE
77
$(call if_changed,ld)
88

9-
CMD_BIN2C = $(objtree)/scripts/basic/bin2c
109
quiet_cmd_bin2c = BIN2C $@
11-
cmd_bin2c = $(CMD_BIN2C) kexec_purgatory < $< > $@
10+
cmd_bin2c = $(objtree)/scripts/bin2c kexec_purgatory < $< > $@
1211

1312
$(obj)/kexec-purgatory.c: $(obj)/purgatory.ro FORCE
1413
$(call if_changed,bin2c)

arch/s390/purgatory/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
2727
$(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE
2828
$(call if_changed,ld)
2929

30-
CMD_BIN2C = $(objtree)/scripts/basic/bin2c
3130
quiet_cmd_bin2c = BIN2C $@
32-
cmd_bin2c = $(CMD_BIN2C) kexec_purgatory < $< > $@
31+
cmd_bin2c = $(objtree)/scripts/bin2c kexec_purgatory < $< > $@
3332

3433
$(obj)/kexec-purgatory.c: $(obj)/purgatory.ro FORCE
3534
$(call if_changed,bin2c)

arch/x86/purgatory/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE
2828

2929
targets += kexec-purgatory.c
3030

31-
CMD_BIN2C = $(objtree)/scripts/basic/bin2c
3231
quiet_cmd_bin2c = BIN2C $@
33-
cmd_bin2c = $(CMD_BIN2C) kexec_purgatory < $< > $@
32+
cmd_bin2c = $(objtree)/scripts/bin2c kexec_purgatory < $< > $@
3433

3534
$(obj)/kexec-purgatory.c: $(obj)/purgatory.ro FORCE
3635
$(call if_changed,bin2c)

kernel/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ targets += config_data.gz
123123
$(obj)/config_data.gz: $(KCONFIG_CONFIG) FORCE
124124
$(call if_changed,gzip)
125125

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;")
127127
targets += config_data.h
128128
$(obj)/config_data.h: $(obj)/config_data.gz FORCE
129129
$(call filechk,ikconfiggz)

scripts/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#
22
# Generated files
33
#
4+
bin2c
45
conmakehash
56
kallsyms
67
pnmtologo

scripts/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
HOST_EXTRACFLAGS += -I$(srctree)/tools/include
1212

13+
hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c
1314
hostprogs-$(CONFIG_KALLSYMS) += kallsyms
1415
hostprogs-$(CONFIG_LOGO) += pnmtologo
1516
hostprogs-$(CONFIG_VT) += conmakehash

scripts/basic/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
fixdep
2-
bin2c

scripts/basic/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
# fixdep: Used to generate dependency information during build process
1010

1111
hostprogs-y := fixdep
12-
hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c
1312
always := $(hostprogs-y)
1413

1514
# fixdep is needed to compile other host programs
File renamed without changes.

security/tomoyo/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ obj-y = audit.o common.o condition.o domain.o environ.o file.o gc.o group.o load
44
targets += builtin-policy.h
55
define do_policy
66
echo "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); \
88
echo ";"
99
endef
1010
quiet_cmd_policy = POLICY $@

0 commit comments

Comments
 (0)