Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp316432pxb; Tue, 19 Oct 2021 03:35:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxr3mCG3g8Y5h4eSxPwhVwi5bO/FdYQULbxNNXxwYuWC1MMrvmmk3ORi8wEzp5JtJ8L3bpR X-Received: by 2002:a17:90a:ea94:: with SMTP id h20mr5681086pjz.58.1634639745167; Tue, 19 Oct 2021 03:35:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634639745; cv=none; d=google.com; s=arc-20160816; b=xHrAjM6BCIXU5Nz6xLhLL5iNmHn7jyPbYxQ1qwyY8K3Ep4DIKoghKy6hF7O5yDNW4c xMnlp/sUdSH1DGrb39WEsaYSzjIFhlzUvmPRk7yGlsZN070kfmuMnk15EgWKlbgMR0c8 67QncGKiSWhnPvr7WCZ2wctX9q592fCh5eTjYN0/Lcou5HOfYeA7gZEFr/UGsNaMV5zO TrSm9vbFngq6RofNx8lTe5Z3xZvZ2sZlrTWRJhhXVzTvPhwNSf1kqoq7j8gG1LFr0fd2 AyEtQN04hEfNZQi5mEhGAhjJwFHEnZLzsmVb/XTNDp+zCSdaheyali+83T1oPgA8c2bt DmvQ== 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=ZLg0B17EKr+oJN+0Wtlvw+cVCV+g70dUJwMKmY4dsmw=; b=JeDn0TtajIPs02bPhB2JL7Gc/flctr9fXwo+A6REC+LihJPWXUPuqUjaYlNDSkjdS4 F16+qqwLg2BlVeeF5/BONqYA2Te/ZDDob7CnuhoICrYF7VOudbxjnOv+B1oY6eIDrSz+ SzpdJbHoAp6mgQ3RZerk9zZdZW3RC2MVUYK+6Leq1qTBDXnNMywAcMmQRAbq6alI1Sao ao0WOsw6NQrEnNnIpGHgpPLdUqLLGYfp996MN7MqgAxN7VoT0aDQJyd9xyFy7u2DRvJx LyugihiNiNxdBkXDXXBt3myscD7/eAId6zFEu46/uAbf6eo5SaI6SSRzatzx028xdz9L y+4w== 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 v15si12484066pgj.38.2021.10.19.03.35.33; Tue, 19 Oct 2021 03:35:45 -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 S235167AbhJSKfs (ORCPT + 99 others); Tue, 19 Oct 2021 06:35:48 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:52034 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230123AbhJSKfr (ORCPT ); Tue, 19 Oct 2021 06:35:47 -0400 X-Greylist: delayed 381 seconds by postgrey-1.27 at vger.kernel.org; Tue, 19 Oct 2021 06:35:47 EDT Received: from localhost (mailhub3.si.c-s.fr [192.168.12.233]) by localhost (Postfix) with ESMTP id 4HYVKr2r5bz9s3J; Tue, 19 Oct 2021 12:27:12 +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 7iKP7iS616PV; Tue, 19 Oct 2021 12:27:12 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (unknown [192.168.203.83]) (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 4HYVKr0XW5z9s3G; Tue, 19 Oct 2021 12:27:12 +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 19JAK6rX3281019 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 19 Oct 2021 12:20:06 +0200 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.16.1/8.16.1/Submit) id 19JAK4eo3281018; Tue, 19 Oct 2021 12:20:04 +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] powerpc/boot: Set LANG=C in wrapper script Date: Tue, 19 Oct 2021 12:20:01 +0200 Message-Id: <6a103cc4bb5ada724f893711e35ae6c459f95f3e.1634638790.git.christophe.leroy@csgroup.eu> 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=1634638800; l=2377; s=20211009; h=from:subject:message-id; bh=J6dXEsofym7EtEBxI/CSPyYHggX1yrammQlt+eY4z2k=; b=1GDtEu59IqFZOB2XQd802PwgL84gwPuzTEZk3L1TUuoQw1eqmka8tn1oTLyrC2+3hsuEOTU+CNQv rW0KJSvWA04vP5Sudk334x4+riayHJdAvwTMYeqsX9Q9KIObooT9 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 LANG=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 --- arch/powerpc/boot/wrapper | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index 1cd82564c996..59fafa1cf897 100755 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper @@ -26,6 +26,8 @@ # Stop execution if any command fails set -e +export LANG=C + # Allow for verbose output if [ "$V" = 1 ]; then set -x -- 2.31.1