powerpc: convert relocs_check to a shell script using grep
PATCH v3 1/1 powerpc: convert relocs_check to a shell script using grep
This runs a bit faster and removes another use of perl from the kernel build.
---
v3: use $# instead of ${#*} (thanks David Laight)
also added check on vmlinux and objdump
v2: address ShellCheck comments from Michael
arch/powerpc/Makefile | 4 +-- arch/powerpc/relocs_check.pl | 66 ------------------------------------------ arch/powerpc/relocs_check.sh | 68 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 68 deletions(-) delete mode 100755 arch/powerpc/relocs_check.pl create mode 100755 arch/powerpc/relocs_check.sh
arch/powerpc/Makefile +2 -2
@@ -248,10 +248,10 @@ boot := arch/$(ARCH)/boot ifeq ($(CONFIG_RELOCATABLE),y) quiet_cmd_relocs_check = CALL $< - cmd_relocs_check = perl $< "$(OBJDUMP)" "$(obj)/vmlinux" + cmd_relocs_check = $(CONFIG_SHELL) $< "$(OBJDUMP)" "$(obj)/vmlinux" PHONY += relocs_check -relocs_check: arch/powerpc/relocs_check.pl vmlinux +relocs_check: arch/powerpc/relocs_check.sh vmlinux $(call cmd,relocs_check) zImage: relocs_check
arch/powerpc/relocs_check.pl deleted +0 -66
66 lines not on this page · raw message
arch/powerpc/relocs_check.sh new file +68 -0
68 lines not on this page · raw message
Signature · 5 lines
2.1.4 -- Cheers, Stephen Rothwell [email protected]
Quoted 4 lines · Stephen Rothwell
This runs a bit faster and removes another use of perl from the kernel build.
Signed-off-by Stephen Rothwell <[email protected]>
I only wrote it in perl because ... lazy. Kill it with fire.
Yours Tony.
Michael Ellerman
reviewerQuoted 2 lines · Stephen Rothwell
This runs a bit faster and removes another use of perl from the kernel build.
It tells me:
$ make ARCH=powerpc CROSS_COMPILE= -s ppc64_defconfig # # configuration written to .config # $ make ARCH=powerpc CROSS_COMPILE= -s -j240 ... arch/powerpc/relocs_check.sh: objdump (objdump) is not executable make: *** [relocs_check] Error 1
I suspect because:
+if [ ! -x "$objdump" ]; then
Doesn't search the PATH.
cheers
Hi Michael,
Quoted 16 lines · On Wed, 18 Mar 2015 16:19:40 +1100 (AEDT) Michael Ellerman…
Quoted 2 lines · Stephen Rothwell
This runs a bit faster and removes another use of perl from the kernel build.
It tells me:
$ make ARCH=powerpc CROSS_COMPILE= -s ppc64_defconfig # # configuration written to .config # $ make ARCH=powerpc CROSS_COMPILE= -s -j240 ... arch/powerpc/relocs_check.sh: objdump (objdump) is not executable make: *** [relocs_check] Error 1
Quoted 5 lines
I suspect because:
+if [ ! -x "$objdump" ]; then
Doesn't search the PATH.
Rats! Trying to be too helpful :-(
I will do another version that just drops the test. If $objdump is not executable, it will become obvious fairly soon.
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]