From patchwork Tue Apr 19 01:01:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 563285 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp2858102map; Mon, 18 Apr 2022 18:02:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFZrzCnfJ+WGU9wM/aT9b17cBtxsqrHYsLBniBTzELNjymJbGsiSOKPcGxfpaxn3kVML7A X-Received: by 2002:a05:6402:524c:b0:419:4d8c:e959 with SMTP id t12-20020a056402524c00b004194d8ce959mr14944774edd.398.1650330149089; Mon, 18 Apr 2022 18:02:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650330149; cv=none; d=google.com; s=arc-20160816; b=tSEiUGnA7OgOXCaxds2h23Dvw6UUy6bz5hXqXd1uVCCzej5VADRPtNo8J+dZDfjSQ2 cD0aYmZ7Yi73yOnOP3SJ/KJyywRZkuHFPJbKGORVj1bVmcSWxSt12hbMrSEmAQWZim74 jFKpM+DkgI5FBbBhGJOEGmEyF79j1p+UeMiygW6SRh6KT1idyx471ZxVyj4nt4XT4yWU v9vfq7CQngXw2l2f1nHgxuy0CDON9vpecfqV3dtjlhTxLCZVVj/oumvCL7pycdwSulJR 6T0NFXiF8m3wowI0anMe72eD7M79r31uT8zSKAPY/LzeoKD7mgvEr3Un/+EXuF9ooW7u 94xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=Z+QrdvDRnMps3gADsXlApes7O98abvtzjKO4MnvDhCA=; b=KjO6DK6/r+JCxDsnZYHixiEEB+NfBG+n8xVXrB6LvmlodGTxadUAgKM7ebZw6lc45+ /tKfOl7RwgDLvEjZLBV3Yg9Qe3d/e06jgEZ94xO2yfloOLoYyGTbgBC3IzvICFKb0h7p ib2AAkIg+flsCaSeljSUxi5jJJee06WlQGRTYt8dfIpYR1AUGjJBZ1WG97iLZ/PDcJSF AU6oQ15xCFkSZ5eWvqOdY7yGbA3VR2lzOpcL4s1KtY6T+64jcVdsFzil1euJTqT2jBbP Oo352BhPZ0aQE9wCGP0TQaFEG31y8w0PFkhmQBWrUWPeiCPXTq/2al8T7VS16QnSskLe WZew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JtLFVwdr; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id bc1-20020a056402204100b0041d7a82605csi7136817edb.480.2022.04.18.18.02.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Apr 2022 18:02:29 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JtLFVwdr; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A744F837C9; Tue, 19 Apr 2022 03:02:24 +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="JtLFVwdr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6F2D383ABE; Tue, 19 Apr 2022 03:02:22 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) (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 9B61480A4F for ; Tue, 19 Apr 2022 03:02:18 +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-pl1-x630.google.com with SMTP id be5so13700178plb.13 for ; Mon, 18 Apr 2022 18:02:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Z+QrdvDRnMps3gADsXlApes7O98abvtzjKO4MnvDhCA=; b=JtLFVwdr+lNL4xmT4lC1+BRzRN0kg3f7w/oWKWUJ4ValbPQQ9QXXn4HttCFHgrzrU7 0ryTZ6q3WlCs0iTEvUsNVyyLjavUu5tIH6Uoe0H9WKnQP4cNn0oXMZfXBafX0cJseC6P MNZ/F2JXk+vTSOewvJCpuYHDW17Aykz0K42rhMDzvnP6YuD6adwzEvVLzNPzeiexRMUV 6JncyjkTKzbpsrKy4G6dch6FjyzuFvXWS4GU+7hAmyBE/2i6fMVg4X5LwifwFIwc5xSr A5hoE6xye15lCiOt9Wl75g0jQisaQGAsk0jWtU0hINYyIHbIQlJGWHPWs5fOXMWXg2hg tYdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Z+QrdvDRnMps3gADsXlApes7O98abvtzjKO4MnvDhCA=; b=genh5jDtEiUyIkIYPrd+Xz0GlnftnG/Iw/pErpi8Z6ON6+sUeJGjoEBfJY5KP/WGaw 12YeuVLjQzSrabhXZzioJXHYphJ0WfnGi+xTOdDWqA1VmbemZI4FnTEPcw2bxNTnB735 IxgwS4KD1rSur+UYHDefLTuL/6ckbbJf2AKCH93c/1APoG9q3y73Kl8qEHHuboFsVSGb 03uNc5jtRxe10VshELLUIk7pVOtwrwR6EU9FtpyEwGqIXSKwJKXfPSm7ZwQ0coE+3Ayt wCZYIijEWHY/YcA3sS3qm7tS6PNwg19LPIkNyBaOKbbAQ++8rg+uffHRF+nw2+baq5o0 hWfQ== X-Gm-Message-State: AOAM530aO7czlvEcnjaRl0PNk41/9jL5cm4E1hMa1uvDGSGBHQvc9wWz llcXbW8m8CmgfJSOpvURcHIeUQ== X-Received: by 2002:a17:90a:df8f:b0:1ce:88eb:443c with SMTP id p15-20020a17090adf8f00b001ce88eb443cmr21251271pjv.25.1650330136342; Mon, 18 Apr 2022 18:02:16 -0700 (PDT) Received: from localhost.localdomain ([2400:4050:c3e1:100:5858:d3a6:5cad:ceeb]) by smtp.gmail.com with ESMTPSA id l2-20020a056a0016c200b004f7e3181a41sm14791729pfc.98.2022.04.18.18.02.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Apr 2022 18:02:15 -0700 (PDT) From: AKASHI Takahiro To: trini@konsulko.com, sjg@chromium.org, xypron.glpk@gmx.de Cc: u-boot@lists.denx.de, AKASHI Takahiro Subject: [PATCH 0/7] disk: don't compile in partition support for spl/tpl if not really necessary Date: Tue, 19 Apr 2022 10:01:51 +0900 Message-Id: <20220419010158.47034-1-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 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 This is a reworked version of my RFC[1]. When my patch[2] is applied, the size of SPL code on some platform might exceed the limit of ROM size due to partition support code (disk/*) being built in even if none of partition table types (CONFIG_*_PARTITION) is enabled on that particular platform. This is generally inconvenient and should be fixed. The patch#7 is a core part to fix the issue and the rest of patches are to fix related build errors revealed/caused by this change. [1] https://lists.denx.de/pipermail/u-boot/2022-April/481531.html [2] https://lists.denx.de/pipermail/u-boot/2022-April/481532.html Test: ===== * Azure CI passed[3] [3] https://dev.azure.com/u-boot/u-boot/_build/results?buildId=4092&view=results Change history: =============== v1 (Apr, 18, 2022) * split the original RFC into a set of patches * remove hunks against CMD_PART and cortina_presidio-asic-emmc_defconfig which are no longer needed. * use 'imply' rather than 'select' for dependency of PARTITION_UUIDS at EFI_LOADER, dropping DOS_PARTITON (patch#5) * compile efi_disk.c even if BLK without PARTITION (patch#6) RFC (Apr 15, 2021) * initial RFC AKASHI Takahiro (7): disk: include errno.h explicitly in part.h disk: enable function prototypes in part.h for SPL/TPL disk: define nullified functions for !PARTITIONS sandbox: move a function prototype efi_loader: PARTITION_UUIDS should be optional efi_loader: disk: compile efi_disk when CONFIG_BLK disk: don't compile in partition support for spl/tpl if not really necessary disk/Kconfig | 37 ++++++++++++++++---------------- include/part.h | 15 ++++++++++--- include/sandboxblockdev.h | 2 ++ lib/efi_loader/Kconfig | 2 +- lib/efi_loader/Makefile | 2 +- lib/efi_loader/efi_device_path.c | 11 +++++++++- 6 files changed, 45 insertions(+), 24 deletions(-)