Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+7 -10
+1 -2
arch/powerpc/purgatory/Makefile
··· 6 6 $(obj)/purgatory.ro: $(obj)/trampoline.o FORCE 7 7 $(call if_changed,ld) 8 8 9 - CMD_BIN2C = $(objtree)/scripts/basic/bin2c 10 9 quiet_cmd_bin2c = BIN2C $@ 11 - cmd_bin2c = $(CMD_BIN2C) kexec_purgatory < $< > $@ 10 + cmd_bin2c = $(objtree)/scripts/bin2c kexec_purgatory < $< > $@ 12 11 13 12 $(obj)/kexec-purgatory.c: $(obj)/purgatory.ro FORCE 14 13 $(call if_changed,bin2c)
+1 -2
arch/s390/purgatory/Makefile
··· 27 27 $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE 28 28 $(call if_changed,ld) 29 29 30 - CMD_BIN2C = $(objtree)/scripts/basic/bin2c 31 30 quiet_cmd_bin2c = BIN2C $@ 32 - cmd_bin2c = $(CMD_BIN2C) kexec_purgatory < $< > $@ 31 + cmd_bin2c = $(objtree)/scripts/bin2c kexec_purgatory < $< > $@ 33 32 34 33 $(obj)/kexec-purgatory.c: $(obj)/purgatory.ro FORCE 35 34 $(call if_changed,bin2c)
+1 -2
arch/x86/purgatory/Makefile
··· 28 28 29 29 targets += kexec-purgatory.c 30 30 31 - CMD_BIN2C = $(objtree)/scripts/basic/bin2c 32 31 quiet_cmd_bin2c = BIN2C $@ 33 - cmd_bin2c = $(CMD_BIN2C) kexec_purgatory < $< > $@ 32 + cmd_bin2c = $(objtree)/scripts/bin2c kexec_purgatory < $< > $@ 34 33 35 34 $(obj)/kexec-purgatory.c: $(obj)/purgatory.ro FORCE 36 35 $(call if_changed,bin2c)
+1 -1
kernel/Makefile
··· 123 123 $(obj)/config_data.gz: $(KCONFIG_CONFIG) FORCE 124 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;") 127 127 targets += config_data.h 128 128 $(obj)/config_data.h: $(obj)/config_data.gz FORCE 129 129 $(call filechk,ikconfiggz)
+1
scripts/.gitignore
··· 1 1 # 2 2 # Generated files 3 3 # 4 + bin2c 4 5 conmakehash 5 6 kallsyms 6 7 pnmtologo
+1
scripts/Makefile
··· 10 10 11 11 HOST_EXTRACFLAGS += -I$(srctree)/tools/include 12 12 13 + hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c 13 14 hostprogs-$(CONFIG_KALLSYMS) += kallsyms 14 15 hostprogs-$(CONFIG_LOGO) += pnmtologo 15 16 hostprogs-$(CONFIG_VT) += conmakehash
-1
scripts/basic/.gitignore
··· 1 1 fixdep 2 - bin2c
-1
scripts/basic/Makefile
··· 9 9 # fixdep: Used to generate dependency information during build process 10 10 11 11 hostprogs-y := fixdep 12 - hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c 13 12 always := $(hostprogs-y) 14 13 15 14 # fixdep is needed to compile other host programs
scripts/basic/bin2c.c scripts/bin2c.c
+1 -1
security/tomoyo/Makefile
··· 4 4 targets += builtin-policy.h 5 5 define do_policy 6 6 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); \ 8 8 echo ";" 9 9 endef 10 10 quiet_cmd_policy = POLICY $@