linux-kernel-mentees.lists.linuxfoundation.org archive mirror
 help / color / mirror / Atom feed
* [Linux-kernel-mentees] [PATCH v2 0/2] use interpreters to invoke scripts
@ 2020-10-12 17:06 Ujjwal Kumar
  2020-10-12 17:06 ` [Linux-kernel-mentees] [PATCH v2 1/2] kconfig: " Ujjwal Kumar
  2020-10-12 17:06 ` [Linux-kernel-mentees] [PATCH v2 2/2] kbuild: " Ujjwal Kumar
  0 siblings, 2 replies; 10+ messages in thread
From: Ujjwal Kumar @ 2020-10-12 17:06 UTC (permalink / raw)
  To: Masahiro Yamada, Michal Marek
  Cc: linux-ia64, Kees Cook, linux-kbuild, Nick Desaulniers,
	linux-kernel, Ujjwal Kumar, clang-built-linux, Nathan Chancellor,
	linux-kernel-mentees, Andrew Morton, linux-arm-kernel

This patch series aims at removing the dependency on execute
bit of the scripts in the kbuild system.

If not working with fresh clone of linux-next, clean the srctree:
make distclean
make tools/clean

To test the dependency on execute bits, I tried building the
kernel after removing x-bits for all files in the repository.
Removing execute bits:
for i in $(find -executable -type f); do chmod -x $i; done

Any attempts to configure (or build) the kernel fail because of
'Permission denied' on scripts with the following error:
$ make allmodconfig
sh: ./scripts/gcc-version.sh: Permission denied
init/Kconfig:34: syntax error
init/Kconfig:33: invalid statement
init/Kconfig:34: invalid statement
sh: ./scripts/ld-version.sh: Permission denied
init/Kconfig:39: syntax error
init/Kconfig:38: invalid statement
sh: ./scripts/clang-version.sh: Permission denied
init/Kconfig:49: syntax error
init/Kconfig:48: invalid statement
make[1]: *** [scripts/kconfig/Makefile:71: allmodconfig] Error 1
make: *** [Makefile:606: allmodconfig] Error 2

Changes:
  - Adds specific interpreters (in Kconfig) to invoke
    scripts.

After this patch I could successfully do a kernel build
without any errors.

  - Again, adds specific interpreters to other parts of
    kbuild system.

I could successfully perform the following make targets after
applying the PATCH 2/2:
make headerdep
make kselftest-merge
make rpm-pkg
make perf-tar-src-pkg
make ARCH=ia64 defconfig
ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make prepare

Following changes in PATCH 2/2 are not yet tested:
arch/arm64/kernel/vdso32/Makefile
arch/nds32/kernel/vdso/Makefile
scripts/Makefile.build

---
Changes in v2:

  - Changes suggested by Masahiro Yamada
    $($(CONFIG_SHELL)    ->  $(shell $(CONFIG_SHELL)


Ujjwal Kumar (2):
  kconfig: use interpreters to invoke scripts
  kbuild: use interpreters to invoke scripts

 Makefile                          |  4 ++--
 arch/arm64/kernel/vdso/Makefile   |  2 +-
 arch/arm64/kernel/vdso32/Makefile |  2 +-
 arch/ia64/Makefile                |  4 ++--
 arch/nds32/kernel/vdso/Makefile   |  2 +-
 init/Kconfig                      | 16 ++++++++--------
 scripts/Makefile.build            |  2 +-
 scripts/Makefile.package          |  4 ++--
 8 files changed, 18 insertions(+), 18 deletions(-)


base-commit: 2cab4ac556258c14f6ec8d2157654e95556bbb31
--
2.25.1

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-10-13 16:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12 17:06 [Linux-kernel-mentees] [PATCH v2 0/2] use interpreters to invoke scripts Ujjwal Kumar
2020-10-12 17:06 ` [Linux-kernel-mentees] [PATCH v2 1/2] kconfig: " Ujjwal Kumar
2020-10-13 16:16   ` Masahiro Yamada
2020-10-12 17:06 ` [Linux-kernel-mentees] [PATCH v2 2/2] kbuild: " Ujjwal Kumar
2020-10-12 18:20   ` Lukas Bulwahn
2020-10-12 18:42     ` Ujjwal Kumar
2020-10-12 18:52       ` Lukas Bulwahn
2020-10-12 18:54       ` Bernd Petrovitsch
2020-10-12 21:48         ` Ujjwal Kumar
2020-10-13 16:02         ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).