From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1A785C43334 for ; Fri, 10 Jun 2022 23:56:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6AF31843F2; Sat, 11 Jun 2022 01:56:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="LiGOln43"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 066F7843BF; Sat, 11 Jun 2022 01:56:18 +0200 (CEST) Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D660F843BF for ; Sat, 11 Jun 2022 01:56:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pg1-x535.google.com with SMTP id 184so530189pga.12 for ; Fri, 10 Jun 2022 16:56:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=U84cT37MNbQ3B8tFDDiYyn2vedK/ZxKficVReRE911I=; b=LiGOln43tboirRVx8WtuosRSysfQYz5ytQuQc1YBeAzdHpQ9CAFdr7C1ZsZj87YpKM wRvg+I9Io1Rvr8Ur1dJeEa7+IkZP6EVDTjJJ6b/tlJb/K9gpKMExP97wTeRDxkyWhe79 Cy/BSpuQDZ4qnYUdJyWMllnUWhxteay6Q/j/LztNUAPZIP0wGPwJFXFT7oURVc7srQHI siL+aq81JjErgcMid+rJcjCgPqZBMuBMJHChexpUhpKPiZ6ofX/D539s3bhoDX2Ga/om jnHRGdtLIqjd2b+aU+YebbC2/eoMTgO6lAMZfpPpwyXiB0UMcAsYhiBs5KqP+JOExIpi gVTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=U84cT37MNbQ3B8tFDDiYyn2vedK/ZxKficVReRE911I=; b=AJ7EEJSmrXFH4opISWdWyxwao+TdVMxfGP/ZxYQ18709s7bQaW5N9drHBuEg55GjK4 AU8WlCAZaDUXnG/rTR9a5pVPti8gTCovCuOgg0QImUX8H/e4p2r+be0ShKv7Zf6VbOz7 qv91gEs8puGdEYSlpI66UAq1Bp9UHXsSOiFK/XZN3H6OwsbQha4NK2XBYbUaX9+8pm8i Lhci7J9Kk0jBZoBeUK3KwpFFalUvRuviVJzUkzRNAOIKx7worelCg2/RjXVqxrOtptoc m7wWDVz32B6kbXJpv4tFTsUIYmvplZZRn92CNYug9/v+OoFQJzwiEOqiNp8C8+lXAvp2 cqEg== X-Gm-Message-State: AOAM531hdyAVJJhmP5pcxBhAmNvmg7ML7ohOMjbE3+dJqWRLuTUWNep+ kwCHqusJydYO4ejhRcE99nAL+A== X-Google-Smtp-Source: ABdhPJz7gTDpqaO6Ts5UnuX7NDfMp8yHbG1Dmf5QZBE0P/SwN8MR6989mrXgSARho5k7jluIAjlTJA== X-Received: by 2002:a63:28b:0:b0:401:b84d:780f with SMTP id 133-20020a63028b000000b00401b84d780fmr6620751pgc.187.1654905373041; Fri, 10 Jun 2022 16:56:13 -0700 (PDT) Received: from laputa ([2400:4050:c3e1:100:2c45:7ce:9457:cc7c]) by smtp.gmail.com with ESMTPSA id d133-20020a63368b000000b003fe2b87cf03sm216724pga.80.2022.06.10.16.56.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jun 2022 16:56:12 -0700 (PDT) Date: Sat, 11 Jun 2022 08:56:09 +0900 From: AKASHI Takahiro To: Heinrich Schuchardt Cc: u-boot@lists.denx.de, Vagrant Cascadian , Masahisa Kojima , Vagrant Cascadian Subject: Re: [PATCH 1/1] efi_loader: correctly identify binary name Message-ID: <20220610235609.GA35720@laputa> Mail-Followup-To: AKASHI Takahiro , Heinrich Schuchardt , u-boot@lists.denx.de, Vagrant Cascadian , Masahisa Kojima , Vagrant Cascadian References: <20220610185524.12702-1-heinrich.schuchardt@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220610185524.12702-1-heinrich.schuchardt@canonical.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On Fri, Jun 10, 2022 at 08:55:24PM +0200, Heinrich Schuchardt wrote: > Only on the sandbox the default EFI binary name (e.g. BOOTX64.EFI) must > match the host architecture. > > In all other cases we must use the target architecture. So most of the new code, particularly else clause of "#ifdef CONFIG_SANDBOX", is the same as the *original* commit in my (or rather Kojima-san's) patch. Please retain the original copyright. [1] https://lists.denx.de/pipermail/u-boot/2022-April/482711.html -Takahiro Akashi > Use #elif where appropriate. > > Reported-by: Vagrant Cascadian > Signed-off-by: Heinrich Schuchardt > --- > include/efi_default_filename.h | 40 +++++++++++++++++++++------------- > 1 file changed, 25 insertions(+), 15 deletions(-) > > diff --git a/include/efi_default_filename.h b/include/efi_default_filename.h > index 13b9de8754..fc46e386a6 100644 > --- a/include/efi_default_filename.h > +++ b/include/efi_default_filename.h > @@ -14,32 +14,42 @@ > > #undef BOOTEFI_NAME > > +#ifdef CONFIG_SANDBOX > + > #if HOST_ARCH == HOST_ARCH_X86_64 > #define BOOTEFI_NAME "BOOTX64.EFI" > -#endif > - > -#if HOST_ARCH == HOST_ARCH_X86 > +#elif HOST_ARCH == HOST_ARCH_X86 > #define BOOTEFI_NAME "BOOTIA32.EFI" > -#endif > - > -#if HOST_ARCH == HOST_ARCH_AARCH64 > +#elif HOST_ARCH == HOST_ARCH_AARCH64 > #define BOOTEFI_NAME "BOOTAA64.EFI" > -#endif > - > -#if HOST_ARCH == HOST_ARCH_ARM > +#elif HOST_ARCH == HOST_ARCH_ARM > #define BOOTEFI_NAME "BOOTARM.EFI" > -#endif > - > -#if HOST_ARCH == HOST_ARCH_RISCV32 > +#elif HOST_ARCH == HOST_ARCH_RISCV32 > #define BOOTEFI_NAME "BOOTRISCV32.EFI" > +#elif HOST_ARCH == HOST_ARCH_RISCV64 > +#define BOOTEFI_NAME "BOOTRISCV64.EFI" > +#else > +#error Unsupported UEFI architecture > #endif > > -#if HOST_ARCH == HOST_ARCH_RISCV64 > +#else > + > +#if defined(CONFIG_ARM64) > +#define BOOTEFI_NAME "BOOTAA64.EFI" > +#elif defined(CONFIG_ARM) > +#define BOOTEFI_NAME "BOOTARM.EFI" > +#elif defined(CONFIG_X86_64) > +#define BOOTEFI_NAME "BOOTX64.EFI" > +#elif defined(CONFIG_X86) > +#define BOOTEFI_NAME "BOOTIA32.EFI" > +#elif defined(CONFIG_ARCH_RV32I) > +#define BOOTEFI_NAME "BOOTRISCV32.EFI" > +#elif defined(CONFIG_ARCH_RV64I) > #define BOOTEFI_NAME "BOOTRISCV64.EFI" > +#else > +#error Unsupported UEFI architecture > #endif > > -#ifndef BOOTEFI_NAME > -#error Unsupported UEFI architecture > #endif > > #endif > -- > 2.36.1 >