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 X-Spam-Level: X-Spam-Status: No, score=-14.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9484C48BC2 for ; Mon, 28 Jun 2021 01:48:56 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id BD9F36198A for ; Mon, 28 Jun 2021 01:48:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BD9F36198A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4FCAA82CE6; Mon, 28 Jun 2021 03:48:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="WBF0U0vU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8E60882CE9; Mon, 28 Jun 2021 03:48:50 +0200 (CEST) Received: from mail-oi1-x22a.google.com (mail-oi1-x22a.google.com [IPv6:2607:f8b0:4864:20::22a]) (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 35E198033E for ; Mon, 28 Jun 2021 03:48:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-oi1-x22a.google.com with SMTP id w127so20090379oig.12 for ; Sun, 27 Jun 2021 18:48:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bW3VQbYIdSS0ebJi9x/28pbK5lncsPhCDMgfTPZT5lA=; b=WBF0U0vUhHIf2irKhcmx+QFaVh4A7fF3ZTqGpGRnGmo0DX2loWbqYsYwJXyVwwlXT7 EWFR1k1y89z8lOgtTEOo0NrZgWLJZGHWrG84NCqZ+LUWQ5R7FEbCJa5ATuGkN//iNTw3 XsNNP3n7KtyXXH7gPFSuaSPNArAIHxac+tEf4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bW3VQbYIdSS0ebJi9x/28pbK5lncsPhCDMgfTPZT5lA=; b=OarEz53C79JXQtVCeWKyRGreIlG7Gb+VZWdFlr09ghXakxDBcL59pW7GZJbXcOcKps GMqnWpw89mHxQk7kQa/lI4dw/N4u+RrdapSK3tIMq0D6nCn/yhnOqwi6vEKboGInKsnj 8VlI0mhbI6DmWX+beSf+jpodrzseBvXJ3E6BDDssDTbFcCFcGbwDalKgBhAYxsdhMQ0v JrR9kpZP+licTM97i2fLygERvy36DHP/77kITURt+SFiQSC7kKzTeiuAkL9ArF7RqbDR HNvkGTPwflB0q0JxmTKZk2NYxLoCSKYIZKGO+Yp585VZyw4fm0zt6WkuOaf12BYMzcAj +5DA== X-Gm-Message-State: AOAM533roowfU0UT3sGol5vbGtrlcbS8JyRTRuUqV0HRXLgiw/NgfNRl UwsE1fmrMvEtwVPok84e6ciq9GIHgkpCai9M X-Google-Smtp-Source: ABdhPJz91X9e61Knk/O46OoUG2iHLzI9mUa7sXv+zZK7tQAxRJ9hrWO/rQ/DtXX8tDHr+g7+7Pk0kg== X-Received: by 2002:aca:3d03:: with SMTP id k3mr15732853oia.161.1624844924512; Sun, 27 Jun 2021 18:48:44 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id t21sm3140962otd.35.2021.06.27.18.48.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Jun 2021 18:48:43 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: =?UTF-8?q?Pali=20Roh=C3=A1r?= , Heinrich Schuchardt , Ilias Apalodimas , Tom Rini , Simon Glass , Alexander Graf , Masahiro Yamada Subject: [PATCH 0/7] efi: Various tidy-ups and drop the default Date: Sun, 27 Jun 2021 19:48:34 -0600 Message-Id: <20210628014841.501036-1-sjg@chromium.org> X-Mailer: git-send-email 2.32.0.93.g670b81a890-goog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean It has come to light that EFI_LOADER adds an extraordinary amount of code to U-Boot. For example, with nokia_rx51 the size delta is about 90KB. About 170 boards explicitly disable the option, but is is clear that many more could, thus saving image size and boot time. The current situation is affecting U-Boot's image as a svelt bootloader. EFI_LOADER is required by EBBR, a new boot standard which aims to bring in UEFI protocols to U-Boot. But EBRR is not required for booting. U-Boot already provides support for FIT, the 'bootm' command and a suitable hand-off to Linux. EBRR has made the decision to create a parallel infrastructure, e.g. does not use FIT, nor U-Boot's signing infrastructure. EBBR should be truly optional, enabled only by boards that use it. Most don't use it but it is enabled anyway. The default boot path should be one that makes use of the existing U-Boot support. To try to retify this situation, this series adds a new Kconfig option for EBBR so that the naming is more explicit. Then EFI_LOADER is updated to depend on it. For now, only sandbox enables EBBR. Other boards can be added as needed, presumably by distributions that require it. Another approach would be to add 'CONFIG_EBBR=y' to the .config before building, in the build system. That might be more friendly to U-Boot users. This series also fixes a minor issue noticed during testing. Simon Glass (7): configs: Resync with savedefconfig Makefile: Drop include/asm directory as well as symlink disk: Tidy up #ifdefs in part_efi Use LIB_UUID with ACPIGEN and FS_BTRFS Allow efi_loader header to be included always lib: Create a new Kconfig option for charset conversion efi: Make EBBR optional Makefile | 2 +- common/Kconfig.boot | 15 ++ configs/am335x_igep003x_defconfig | 1 - configs/am335x_pdu001_defconfig | 1 - configs/am64x_evm_a53_defconfig | 31 ++- configs/am64x_evm_r5_defconfig | 6 +- configs/apalis-imx8_defconfig | 1 - configs/apalis-imx8x_defconfig | 1 - configs/aristainetos2c_defconfig | 1 - configs/aristainetos2ccslb_defconfig | 1 - ...edev_cc_v1_0_ultrazedev_som_v1_0_defconfig | 1 - configs/bcm7260_defconfig | 1 - configs/bcm7445_defconfig | 1 - configs/bcm963158_ram_defconfig | 1 - configs/bcm968580xref_ram_defconfig | 1 - configs/bitmain_antminer_s9_defconfig | 1 - configs/bk4r1_defconfig | 1 - configs/brppt1_mmc_defconfig | 1 - configs/brppt1_nand_defconfig | 1 - configs/brppt1_spi_defconfig | 1 - configs/brppt2_defconfig | 1 - configs/brsmarc1_defconfig | 1 - configs/brxre1_defconfig | 1 - configs/chromebook_coral_defconfig | 1 - configs/chromebook_link_defconfig | 1 - configs/colibri-imx8x_defconfig | 1 - configs/colibri_vf_defconfig | 1 - configs/controlcenterdc_defconfig | 1 - configs/crs305-1g-4s-bit_defconfig | 1 - configs/crs305-1g-4s_defconfig | 1 - configs/crs326-24g-2s-bit_defconfig | 1 - configs/crs326-24g-2s_defconfig | 1 - configs/crs328-4c-20s-4s-bit_defconfig | 1 - configs/crs328-4c-20s-4s_defconfig | 1 - configs/deneb_defconfig | 1 - configs/draco_defconfig | 2 +- configs/dragonboard820c_defconfig | 1 - configs/efi-x86_app_defconfig | 1 - configs/etamin_defconfig | 2 +- configs/evb-ast2600_defconfig | 1 - configs/evb-px30_defconfig | 1 - configs/evb-rk3308_defconfig | 1 - configs/firefly-px30_defconfig | 1 - configs/ge_bx50v3_defconfig | 1 - configs/giedi_defconfig | 1 - configs/grpeach_defconfig | 1 - configs/imx8mm-cl-iot-gate_defconfig | 8 - configs/imx8qm_mek_defconfig | 1 - configs/imx8qm_rom7720_a1_4G_defconfig | 1 - configs/imx8qxp_mek_defconfig | 1 - configs/j7200_evm_r5_defconfig | 15 +- configs/j721e_evm_r5_defconfig | 13 +- configs/kontron_sl28_defconfig | 2 - configs/kp_imx53_defconfig | 1 - configs/ls1028aqds_tfa_SECURE_BOOT_defconfig | 1 - configs/ls1028aqds_tfa_defconfig | 1 - configs/ls1028aqds_tfa_lpuart_defconfig | 1 - configs/ls1028ardb_tfa_SECURE_BOOT_defconfig | 1 - configs/ls1028ardb_tfa_defconfig | 1 - configs/ls1043aqds_defconfig | 1 - configs/ls1043aqds_lpuart_defconfig | 1 - configs/ls1043aqds_nand_defconfig | 1 - configs/ls1043aqds_nor_ddr3_defconfig | 1 - configs/ls1043aqds_qspi_defconfig | 1 - configs/ls1043aqds_sdcard_ifc_defconfig | 1 - configs/ls1043aqds_sdcard_qspi_defconfig | 1 - configs/ls1043aqds_tfa_SECURE_BOOT_defconfig | 1 - configs/ls1043aqds_tfa_defconfig | 1 - configs/ls1043ardb_SECURE_BOOT_defconfig | 1 - configs/ls1043ardb_defconfig | 1 - configs/ls1043ardb_nand_SECURE_BOOT_defconfig | 1 - configs/ls1043ardb_nand_defconfig | 1 - .../ls1043ardb_sdcard_SECURE_BOOT_defconfig | 1 - configs/ls1043ardb_sdcard_defconfig | 1 - configs/ls1043ardb_tfa_SECURE_BOOT_defconfig | 1 - configs/ls1043ardb_tfa_defconfig | 1 - configs/ls1046aqds_SECURE_BOOT_defconfig | 1 - configs/ls1046aqds_defconfig | 1 - configs/ls1046aqds_lpuart_defconfig | 1 - configs/ls1046aqds_nand_defconfig | 1 - configs/ls1046aqds_qspi_defconfig | 1 - configs/ls1046aqds_sdcard_ifc_defconfig | 1 - configs/ls1046aqds_sdcard_qspi_defconfig | 1 - configs/ls1046aqds_tfa_SECURE_BOOT_defconfig | 1 - configs/ls1046aqds_tfa_defconfig | 1 - configs/ls1046ardb_emmc_defconfig | 1 - configs/ls1046ardb_qspi_SECURE_BOOT_defconfig | 1 - configs/ls1046ardb_qspi_defconfig | 1 - configs/ls1046ardb_qspi_spl_defconfig | 1 - .../ls1046ardb_sdcard_SECURE_BOOT_defconfig | 1 - configs/ls1046ardb_sdcard_defconfig | 1 - configs/ls1046ardb_tfa_SECURE_BOOT_defconfig | 1 - configs/ls1046ardb_tfa_defconfig | 1 - configs/ls1088aqds_qspi_SECURE_BOOT_defconfig | 1 - configs/ls1088aqds_qspi_defconfig | 1 - configs/ls1088aqds_tfa_defconfig | 1 - configs/ls1088ardb_qspi_SECURE_BOOT_defconfig | 1 - configs/ls1088ardb_qspi_defconfig | 1 - configs/ls1088ardb_tfa_SECURE_BOOT_defconfig | 1 - configs/ls1088ardb_tfa_defconfig | 1 - configs/ls2080aqds_SECURE_BOOT_defconfig | 1 - configs/ls2080aqds_defconfig | 1 - configs/ls2080aqds_nand_defconfig | 1 - configs/ls2080aqds_qspi_defconfig | 1 - configs/ls2080aqds_sdcard_defconfig | 1 - configs/ls2080ardb_SECURE_BOOT_defconfig | 1 - configs/ls2080ardb_defconfig | 1 - configs/ls2080ardb_nand_defconfig | 1 - configs/ls2081ardb_defconfig | 1 - configs/ls2088aqds_tfa_defconfig | 1 - configs/ls2088ardb_qspi_SECURE_BOOT_defconfig | 1 - configs/ls2088ardb_qspi_defconfig | 1 - configs/ls2088ardb_tfa_SECURE_BOOT_defconfig | 1 - configs/ls2088ardb_tfa_defconfig | 1 - configs/lx2160aqds_tfa_SECURE_BOOT_defconfig | 1 - configs/lx2160aqds_tfa_defconfig | 1 - configs/lx2160ardb_tfa_SECURE_BOOT_defconfig | 1 - configs/lx2160ardb_tfa_defconfig | 1 - configs/lx2160ardb_tfa_stmm_defconfig | 4 - configs/lx2162aqds_tfa_SECURE_BOOT_defconfig | 1 - configs/lx2162aqds_tfa_defconfig | 1 - .../lx2162aqds_tfa_verified_boot_defconfig | 1 - configs/mt7623n_bpir2_defconfig | 1 - configs/mt7629_rfb_defconfig | 1 - configs/mt8183_pumpkin_defconfig | 1 - configs/mt8516_pumpkin_defconfig | 1 - configs/mvebu_puzzle-m801-88f8040_defconfig | 1 - configs/mx6memcal_defconfig | 1 - configs/octeontx2_95xx_defconfig | 1 - configs/octeontx2_96xx_defconfig | 1 - configs/octeontx_81xx_defconfig | 1 - configs/octeontx_83xx_defconfig | 1 - configs/omap4_sdp4430_defconfig | 1 - configs/opos6uldev_defconfig | 1 - configs/pcm052_defconfig | 1 - configs/phycore-am335x-r2-regor_defconfig | 1 - configs/phycore-am335x-r2-wega_defconfig | 1 - configs/pxm2_defconfig | 2 +- configs/qemu-riscv32_defconfig | 2 - configs/qemu-riscv32_smode_defconfig | 2 - configs/qemu-riscv64_defconfig | 2 - configs/qemu-riscv64_smode_defconfig | 2 - configs/qemu-x86_64_defconfig | 2 - configs/qemu-x86_defconfig | 2 - configs/qemu_arm64_defconfig | 2 - configs/qemu_arm_defconfig | 2 - configs/rastaban_defconfig | 2 +- configs/roc-cc-rk3308_defconfig | 1 - configs/rock-pi-n10-rk3399pro_defconfig | 1 - configs/rock-pi-n8-rk3288_defconfig | 1 - configs/rpi_0_w_defconfig | 1 - configs/rpi_defconfig | 1 - configs/rut_defconfig | 2 +- configs/sama5d27_wlsom1_ek_mmc_defconfig | 1 - .../sama5d27_wlsom1_ek_qspiflash_defconfig | 1 - configs/sama5d2_icp_mmc_defconfig | 1 - configs/sama7g5ek_mmc1_defconfig | 1 - configs/sama7g5ek_mmc_defconfig | 1 - configs/sipeed_maix_bitm_defconfig | 1 - configs/sipeed_maix_smode_defconfig | 1 - configs/socfpga_de1_soc_defconfig | 1 - configs/somlabs_visionsom_6ull_defconfig | 1 - configs/stemmy_defconfig | 1 - configs/stm32mp15_basic_defconfig | 3 - configs/stm32mp15_trusted_defconfig | 3 - configs/tbs2910_defconfig | 1 - configs/thuban_defconfig | 2 +- configs/vf610twr_defconfig | 1 - configs/vf610twr_nand_defconfig | 1 - configs/xenguest_arm64_defconfig | 1 - configs/xilinx_versal_mini_defconfig | 1 - configs/xilinx_versal_mini_emmc0_defconfig | 1 - configs/xilinx_versal_mini_emmc1_defconfig | 1 - configs/xilinx_versal_virt_defconfig | 2 - configs/xilinx_zynqmp_mini_defconfig | 1 - configs/xilinx_zynqmp_mini_emmc0_defconfig | 1 - configs/xilinx_zynqmp_mini_emmc1_defconfig | 1 - configs/xilinx_zynqmp_mini_nand_defconfig | 1 - .../xilinx_zynqmp_mini_nand_single_defconfig | 1 - configs/xilinx_zynqmp_mini_qspi_defconfig | 1 - configs/xilinx_zynqmp_r5_defconfig | 1 - configs/xilinx_zynqmp_virt_defconfig | 9 - configs/zynq_cse_nand_defconfig | 1 - configs/zynq_cse_nor_defconfig | 1 - configs/zynq_cse_qspi_defconfig | 1 - disk/part_efi.c | 11 +- drivers/core/Kconfig | 1 + fs/btrfs/Kconfig | 1 + include/efi_loader.h | 186 +++++++++--------- lib/Kconfig | 8 + lib/Makefile | 2 +- lib/efi_loader/Kconfig | 5 +- 192 files changed, 160 insertions(+), 353 deletions(-) -- 2.32.0.93.g670b81a890-goog