From patchwork Tue Apr 19 01:01:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 563292 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp2858935map; Mon, 18 Apr 2022 18:03:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmfyE/flDB3zoBUDtu3Xmmi4JGGknb1CRtfacPGp3jA3+Y12wGFecM5SEX70NECJlKEfql X-Received: by 2002:a17:907:3e16:b0:6df:b4f0:5cc2 with SMTP id hp22-20020a1709073e1600b006dfb4f05cc2mr11457664ejc.285.1650330228484; Mon, 18 Apr 2022 18:03:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650330228; cv=none; d=google.com; s=arc-20160816; b=WJxljFb1Ob49RK7JGbu1nIv10M4G6TwNl6+7zaIGLXPdrK9tLSAU4PuW/oOjzNlQhq bF8Ffy+ff3Segsr5qlzyOduWi02U+0QTIxS4fOxEbJ55EnGdV/0qMrkULc4JuM8UJSOO F9Ab1O56EmoD08lOng7bQdAL0yocNIEBXx/a43YXMkrRsbme2omOvCIZwrXvLURKVmNt o3BeVYQatgsKgQl8K7/Svcx8N7OwxHqbk0mft/Fc4GUQa1zuqyDQY1koTSQO5lAsVCrs tXCy+7WVgahQ34aFSyhtWrbdQNDtZoqA8d6oF7fJUDOHE/Rjg4t2qssMuMVhr8L/jd2N tGnQ== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=w/SS4LUeKAts98v3pUuAg8qeDuBCnChMho5nbrHQ9Qg=; b=deq9XwIDbAxQGAFLxdDz2T+hytde6Fr2DHxbZX4zW9Tcojd4fdjXxUQtHflL+hCAhm SnsO7FaL5X0CqZGxWMfvzADsIZEUZpJuuY0WmDlYFqjONgbGHsJEQFX9utzfNbefZN/c e8nnKLIipMRxIhiVHuGGFysdkvUiFliWVpwKyDnahI7nhCVzMyvFtWG5HExiVzC9Sbda TBwjUNWKzx8eVNu5xrVtc+bz2553BiqWhGaBeXTo3zc7Bm5wOZCNGonTYuvYUDxhk4h3 6USMW9HqYP6qvo+PO0xR1uK0PHSz6jSKxIONSU/iujDLwGnX94TOv5HP363Pad0j8g7z x2UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ecsQYCOb; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id si11-20020a170906cecb00b006df76385d30si7100246ejb.464.2022.04.18.18.03.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Apr 2022 18:03:48 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ecsQYCOb; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 7AAF283C11; Tue, 19 Apr 2022 03:03: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="ecsQYCOb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AC2CE83B19; Tue, 19 Apr 2022 03:02:47 +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-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) (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 E142683B08 for ; Tue, 19 Apr 2022 03:02:40 +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-pj1-x1030.google.com with SMTP id s14-20020a17090a880e00b001caaf6d3dd1so796968pjn.3 for ; Mon, 18 Apr 2022 18:02:40 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=w/SS4LUeKAts98v3pUuAg8qeDuBCnChMho5nbrHQ9Qg=; b=ecsQYCObCeTPGewSwVDMURJYGqeTol5IiuOUI/8y+vaKZDN1KkUHERBqh6PYHrgtUi 1uOlYZCMGgEZiwa6Ltlno1P7QAfgGMLzUa3AlOXGlkuD3VxdezZPrnFiGIEjd9sMjfIC dvBUabmwMyjFYniPVKrZHpnC9ahvtfZrlUXz5O5iK7x4s+0GrWYq64Y4aMaqc9clvff1 4g3KF53wDelm6tCwH0h4dSTDoejS2wcL7JjQAekx7onnPiakvu/ggGzQUrUx+a/GsWf5 2kBhddAhjn41j/B0Cx4EzaOJN3OJd/J0Y+95o/nTTgf2+aaVzDF/ikh7p2k/5JZyLJ7m W6rw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=w/SS4LUeKAts98v3pUuAg8qeDuBCnChMho5nbrHQ9Qg=; b=Dz1xDJFKA8l8f+QvatRuuQs+M5fvy34s5IHTJZ0vJG15aJgdfZXshd6vwg1EKc8tnr w3c1qChRbSlUqgWY9HiFgeM/sOeUNjZN4BYYGwfK2KkY28i1fezwDdgq8Pf5bUgcOcHn XWXh6qr34xk8o16BxRtkfq6Gn0RSJtQQXPC0rIVAbTfMYGrFs4rmj4k4TjiKQLUdIkIt CeVH2KMOtzD0EiC1vA/kHZbzla5HCyQtBvoXtl8x3mHIOMPQ/vpomyvOYazW4hzixS3I RfnAeHfR8PYXa6W+2spDkBjddlHLdhSceXVDGi1MIRyRHa9oO+w4/loEOeMdWNjpz186 IZ/A== X-Gm-Message-State: AOAM531jTaDM8RpqZ/1miUxbIvBkVm5SsENvtU6YfZJ62/VcxoHr9ZJD yOq73DyqhrvPuwDPqkoS+zfT3g== X-Received: by 2002:a17:90b:4d0d:b0:1ce:ef5d:f1ef with SMTP id mw13-20020a17090b4d0d00b001ceef5df1efmr20869205pjb.91.1650330159302; Mon, 18 Apr 2022 18:02:39 -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.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Apr 2022 18:02:39 -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 7/7] disk: don't compile in partition support for spl/tpl if not really necessary Date: Tue, 19 Apr 2022 10:01:58 +0900 Message-Id: <20220419010158.47034-8-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220419010158.47034-1-takahiro.akashi@linaro.org> References: <20220419010158.47034-1-takahiro.akashi@linaro.org> 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 Under the current Kconfigs, disk/part.c will be compiled in even if none of partition table types are enabled. This will lead to the size growth of SPL /TPL code. With this patch, CONFIG_PARTITIONS is selected only if, at least, one of CONFIG_*_PARTITION is enabled. Signed-off-by: AKASHI Takahiro --- disk/Kconfig | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/disk/Kconfig b/disk/Kconfig index 13700322e976..359af3b27e6d 100644 --- a/disk/Kconfig +++ b/disk/Kconfig @@ -2,8 +2,7 @@ menu "Partition Types" config PARTITIONS - bool "Enable Partition Labels (disklabels) support" - default y + bool help Partition Labels (disklabels) Supported: Zero or more of the following: @@ -20,8 +19,7 @@ config PARTITIONS as well. config SPL_PARTITIONS - bool "Enable Partition Labels (disklabels) support in SPL" - default y if PARTITIONS + bool select SPL_SPRINTF select SPL_STRTO help @@ -30,8 +28,7 @@ config SPL_PARTITIONS small amount of size to SPL, typically 500 bytes. config TPL_PARTITIONS - bool "Enable Partition Labels (disklabels) support in TPL" - default y if PARTITIONS + bool select TPL_SPRINTF select TPL_STRTO help @@ -41,57 +38,61 @@ config TPL_PARTITIONS config MAC_PARTITION bool "Enable Apple's MacOS partition table" - depends on PARTITIONS + select PARTITIONS help Say Y here if you would like to use device under U-Boot which were partitioned on a Macintosh. config SPL_MAC_PARTITION bool "Enable Apple's MacOS partition table for SPL" - depends on SPL && PARTITIONS + depends on SPL default y if MAC_PARTITION + select SPL_PARTITIONS config DOS_PARTITION bool "Enable MS Dos partition table" - depends on PARTITIONS default y if DISTRO_DEFAULTS default y if x86 || CMD_FAT || USB_STORAGE + select PARTITIONS help traditional on the Intel architecture, USB sticks, etc. config SPL_DOS_PARTITION bool "Enable MS Dos partition table for SPL" - depends on SPL && PARTITIONS + depends on SPL default n if ARCH_SUNXI default y if DOS_PARTITION + select SPL_PARTITIONS config ISO_PARTITION bool "Enable ISO partition table" - depends on PARTITIONS default y if DISTRO_DEFAULTS default y if MIPS || ARCH_TEGRA + select PARTITIONS config SPL_ISO_PARTITION bool "Enable ISO partition table for SPL" - depends on SPL && PARTITIONS + depends on SPL + select SPL_PARTITIONS config AMIGA_PARTITION bool "Enable AMIGA partition table" - depends on PARTITIONS + select PARTITIONS help Say Y here if you would like to use device under U-Boot which were partitioned under AmigaOS. config SPL_AMIGA_PARTITION bool "Enable AMIGA partition table for SPL" - depends on SPL && PARTITIONS + depends on SPL default y if AMIGA_PARTITION + select SPL_PARTITIONS config EFI_PARTITION bool "Enable EFI GPT partition table" - depends on PARTITIONS default y if DISTRO_DEFAULTS default y if ARCH_TEGRA + select PARTITIONS select LIB_UUID help Say Y here if you would like to use device under U-Boot which @@ -128,9 +129,10 @@ config EFI_PARTITION_ENTRIES_OFF config SPL_EFI_PARTITION bool "Enable EFI GPT partition table for SPL" - depends on SPL && PARTITIONS + depends on SPL default n if ARCH_SUNXI default y if EFI_PARTITION + select SPL_PARTITIONS config PARTITION_UUIDS bool "Enable support of UUID for partition" @@ -143,12 +145,11 @@ config PARTITION_UUIDS config SPL_PARTITION_UUIDS bool "Enable support of UUID for partition in SPL" - depends on SPL && PARTITIONS + depends on SPL_PARTITIONS default y if SPL_EFI_PARTITION config PARTITION_TYPE_GUID bool "Enable support of GUID for partition type" - depends on PARTITIONS depends on EFI_PARTITION help Activate the configuration of GUID type