Commit Graph

4 Commits

Author SHA1 Message Date
Masahiro Yamada
9cd9f31cf2 UPSTREAM: kheaders: include only headers into kheaders_data.tar.xz
Currently, kheaders_data.tar.xz contains some build scripts as well as
headers. None of them is needed in the header archive.

For ARCH=x86, this commit excludes the following from the archive:

  arch/x86/include/asm/Kbuild
  arch/x86/include/uapi/asm/Kbuild
  include/asm-generic/Kbuild
  include/config/auto.conf
  include/config/kernel.release
  include/config/tristate.conf
  include/uapi/asm-generic/Kbuild
  include/uapi/Kbuild
  kernel/gen_kheaders.sh

This change is actually motivated for the planned header compile-testing
because it will generate more build artifacts, which should not be
included in the archive.

Change-Id: I688e041842740216cace0373ca9f358bc7704809
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
(cherry picked from commit 7199ff7d74003b5aad1e6328bf6128cd8ceea735)
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
2020-04-16 18:00:25 +00:00
Masahiro Yamada
667cbc0e2a UPSTREAM: kheaders: remove meaningless -R option of 'ls'
The -R option of 'ls' is supposed to be used for directories.

   -R, --recursive
          list subdirectories recursively

Since 'find ... -type f' only matches to regular files, we do not
expect directories passed to the 'ls' command here.

Giving -R is harmless at least, but unneeded.

Change-Id: I73588f18e40824ccecc4149fbc467015b5c5e142
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
(cherry picked from commit b60b7c2ea9b7f854d457fefd592c77f621a86580)
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
2020-04-16 18:00:19 +00:00
Joel Fernandes (Google)
dace9a3409 BACKPORT: kheaders: Do not regenerate archive if config is not changed
Linus reported an issue that doing an allmodconfig was causing the
kheaders archive to be regenerated even though the config is the same.
This patch fixes the issue by ignoring the config-related header files
for "knowing when to regenerate based on timestamps".  Instead, if the
CONFIG_X_Y option really changes, then we there are the
include/config/X/Y.h which will already tells us "if a config really
changed". So we don't really need these files for regeneration detection
anyway, and ignoring them fixes Linus's issue.

(cherry picked from commit 1457dc9ed8da871fbbc0a2ebdaed0405eeeed0cf)
Bug: 78013494
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Change-Id: Ieab28efee4218660acaa79f914c0e33dbfd7bb15
2019-06-12 12:35:31 +00:00
Joel Fernandes (Google)
b727e0a089 BACKPORT: kheaders: Move from proc to sysfs
The kheaders archive consisting of the kernel headers used for compiling
bpf programs is in /proc. However there is concern that moving it here
will make it permanent. Let us move it to /sys/kernel as discussed [1].

[1] https://lore.kernel.org/patchwork/patch/1067310/#1265969

(cherry picked from commit f7b101d33046a837c2aa4526cef28a3c785d7af2)
Bug: 78013494
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Change-Id: I3bf86d0b0f2b73094c2ed29bfda1a57436f9d956
2019-06-12 12:33:54 +00:00