History

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.

Masahiro Yamada committed 8 years ago

Commit c417fbc1 parent b56e53510 files · +7 −10Browse files

Showing the changes to scripts/basic (3 of 10 files). Show all

Unified · Split

3 files
  1. scripts/basic/.gitignore +0 −1
  2. scripts/basic/Makefile +0 −1
  3. scripts/basic/bin2c.c +0 −36
scripts/basic/.gitignore+0−1
@@ -1,2 +1 @@
11 fixdep
2−bin2c
scripts/basic/Makefile+0−1
@@ -9,7 +9,6 @@ · 8 unmodified lines
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
scripts/basic/bin2c.c+0−36
@@ -1,36 +0,0 @@
1−/*
2− * Unloved program to convert a binary on stdin to a C include on stdout
3− *
4− * Jan 1999 Matt Mackall <mpm@selenic.com>
5− *
6− * This software may be used and distributed according to the terms
7− * of the GNU General Public License, incorporated herein by reference.
8− */
9−
10−#include <stdio.h>
11−
12−int main(int argc, char *argv[])
13−{
14− int ch, total = 0;
15−
16− if (argc > 1)
17− printf("const char %s[] %s=\n",
18− argv[1], argc > 2 ? argv[2] : "");
19−
20− do {
21− printf("\t\"");
22− while ((ch = getchar()) != EOF) {
23− total++;
24− printf("\\x%02x", ch);
25− if (total % 16 == 0)
26− break;
27− }
28− printf("\"\n");
29− } while (ch != EOF);
30−
31− if (argc > 1)
32− printf("\t;\n\n#include <linux/types.h>\n\nconst size_t %s_size = %d;\n",
33− argv[1], total);
34−
35− return 0;
36−}