Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1506662pxb; Tue, 26 Oct 2021 10:13:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJws8cNfjXQTH3PkGvXA/txebJWzdBHoh9H4mtCzKJwEwMk8mL4q9aPt/tdQWqoU0JyKlQ+l X-Received: by 2002:a17:90a:49:: with SMTP id 9mr44927987pjb.80.1635268418300; Tue, 26 Oct 2021 10:13:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635268418; cv=none; d=google.com; s=arc-20160816; b=PLv8ytlRHFOiDZXuaaYCNQ1OFD5bqYjA/2k5vV7yQpaG7Tvy6N+EVoFbX1lzuwuciw frxRzjBbDtAE8C2e3SQYTOzYJYnsANAE/irR1eANRBdH6tmU+oN4T0FFieBg3M086mm8 DiMUFDv5cYbKqGKOJ3O8I18TZa0hVLoKiZAvku7V2DbfX4kw+Vj9ou4QCxNcM/acK3NL st90sdJWSCVhWdQKp6g0JvJhLJM4Mkk96NPddiOvb/rkZvVj1RuUkQzqbdjum2O2k4b2 m6IybYXw8ieYjTXc7Ck7YsYivx6eQSnXSoVUfj2KcJ5O03DLK0cyKvNjO/UPtkKarrNu JLEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=+owGRk2K2XJM11FKU0eBDvesCC++J8T6K6tMBm43bF0=; b=RD9cziYCxIGvmXQ8v6zGZeOAfC+UbnGNDGHT+cupz1ryPOC7DbNSq7EiPgALlGhChr eLQ+GHQEOptMXqsK3ABEqOxfNPhc88cP0oodbypi3kJmo1qSAXu6WyiYtRYYF7pOIvAK /cvuGxZj6k7/jxuqUolxLgr0uCrYXu9pBEj9fuGNyuamzjAJf1AJQBgM2/A/UEmNDFp0 Z52I2VTrWmk1yHkteZLso7buPKtmI7ejDGU84kCYtqUqg+vIGYKPHbjwLZpSc1khas1R rjW+2Mz2FHXsAR4CnU70gZcTrS5Xv7/lbFqnrxfBJHGmBmUF9s+KDO/DNDVWN01nSAMm Mh5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x11si28778413pgr.189.2021.10.26.10.13.19; Tue, 26 Oct 2021 10:13:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234804AbhJZNu6 (ORCPT + 99 others); Tue, 26 Oct 2021 09:50:58 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:39369 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233751AbhJZNu5 (ORCPT ); Tue, 26 Oct 2021 09:50:57 -0400 Received: from localhost (mailhub3.si.c-s.fr [192.168.12.233]) by localhost (Postfix) with ESMTP id 4HdtSv29bWz9s33; Tue, 26 Oct 2021 15:48:31 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jEubgNQj05Kl; Tue, 26 Oct 2021 15:48:31 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (unknown [192.168.203.149]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by pegase1.c-s.fr (Postfix) with ESMTPS id 4HdtSs65MJz9s2p; Tue, 26 Oct 2021 15:48:29 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.16.1/8.16.1) with ESMTPS id 19QDmTSo008371 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 26 Oct 2021 15:48:29 +0200 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.16.1/8.16.1/Submit) id 19QDmTEb008370; Tue, 26 Oct 2021 15:48:29 +0200 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v3] powerpc/boot: Set LC_ALL=C in wrapper script Date: Tue, 26 Oct 2021 15:48:29 +0200 Message-Id: X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Developer-Signature: v=1; a=ed25519-sha256; t=1635256108; l=2449; s=20211009; h=from:subject:message-id; bh=xZ0rGjGP56sOdSPMSs1kgCpiDc1GM8DbeevvhKq0/uE=; b=Z6mpj2Pdaog41vslEG+aG0Glmbja4AIHN4KNRNegZIhSvulWH0b0+YxZESRB38O7+h8pcjoseybB xsrpqvRBDIzhGd5dpG3sqXAewXx0CmSmsyOZ07EpKG6FkFATAWe4 X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While trying to build a simple Image for ACADIA platform, I got the following error: WRAP arch/powerpc/boot/simpleImage.acadia INFO: Uncompressed kernel (size 0x6ae7d0) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x700000) powerpc64-linux-gnu-ld : mode d'émulation non reconnu : -T Émulations prises en charge : elf64ppc elf32ppc elf32ppclinux elf32ppcsim elf64lppc elf32lppc elf32lppclinux elf32lppcsim make[1]: *** [arch/powerpc/boot/Makefile:424 : arch/powerpc/boot/simpleImage.acadia] Erreur 1 make: *** [arch/powerpc/Makefile:285 : simpleImage.acadia] Erreur 2 Trying again with V=1 shows the following command powerpc64-linux-gnu-ld -m -T arch/powerpc/boot/zImage.lds -Ttext 0x700000 --no-dynamic-linker -o arch/powerpc/boot/simpleImage.acadia -Map wrapper.map arch/powerpc/boot/fixed-head.o arch/powerpc/boot/simpleboot.o ./zImage.3278022.o arch/powerpc/boot/wrapper.a The argument of '-m' is missing. This is due to the wrapper script calling 'objdump -p vmlinux' and looking for 'file format', whereas the output of objdump is: vmlinux: format de fichier elf32-powerpc En-tête de programme: LOAD off 0x00010000 vaddr 0xc0000000 paddr 0x00000000 align 2**16 filesz 0x0069e1d4 memsz 0x006c128c flags rwx NOTE off 0x0064591c vaddr 0xc063591c paddr 0x0063591c align 2**2 filesz 0x00000054 memsz 0x00000054 flags --- Add LC_ALL=C at the beginning of the wrapper script in order to get the output expected by the script: vmlinux: file format elf32-powerpc Program Header: LOAD off 0x00010000 vaddr 0xc0000000 paddr 0x00000000 align 2**16 filesz 0x0069e1d4 memsz 0x006c128c flags rwx NOTE off 0x0064591c vaddr 0xc063591c paddr 0x0063591c align 2**2 filesz 0x00000054 memsz 0x00000054 flags --- Signed-off-by: Christophe Leroy --- v3: Also change patch's subject: v2: Use LC_ALL=C per Segher --- arch/powerpc/boot/wrapper | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index 1cd82564c996..9184eda780fd 100755 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper @@ -26,6 +26,8 @@ # Stop execution if any command fails set -e +export LC_ALL=C + # Allow for verbose output if [ "$V" = 1 ]; then set -x -- 2.31.1