[PATCH] powerpc/boot: allow wrapper to work on non-english system

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE3914d

2 messages, 2 authors, 2015-11-26 · open the first message on its own page

[PATCH] powerpc/boot: allow wrapper to work on non-english system

From: Laurent Vivier <hidden>
Date: 2015-11-05 11:31:53

if the language is not english objdump output is not parsed correctly
and format is "". Later, "ld -m $format" fails.

This patch adds "LANG=C" to force english output for objdump.

Signed-off-by: Laurent Vivier <redacted>
---
 arch/powerpc/boot/wrapper | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 3f50c27..1c0b6ec 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -137,7 +137,7 @@ if [ -z "$kernel" ]; then
     kernel=vmlinux
 fi
 
-elfformat="`${CROSS}objdump -p "$kernel" | grep 'file format' | awk '{print $4}'`"
+LANG=C elfformat="`${CROSS}objdump -p "$kernel" | grep 'file format' | awk '{print $4}'`"
 case "$elfformat" in
     elf64-powerpcle)	format=elf64lppc	;;
     elf64-powerpc)	format=elf32ppc	;;
-- 
2.5.0

Re: powerpc/boot: allow wrapper to work on non-english system

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2015-11-26 12:17:22

On Thu, 2015-05-11 at 11:31:34 UTC, Laurent Vivier wrote:
if the language is not english objdump output is not parsed correctly
and format is "". Later, "ld -m $format" fails.

This patch adds "LANG=C" to force english output for objdump.

Signed-off-by: Laurent Vivier <redacted>
Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/58531b0c800fd514f04ae42b

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help