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 67B9EC433F5 for ; Thu, 14 Apr 2022 08:30:24 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B841283B3A; Thu, 14 Apr 2022 10:30:21 +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="n8q0JsY7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6C64C83B3A; Thu, 14 Apr 2022 10:30:19 +0200 (CEST) Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) (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 1C12E83046 for ; Thu, 14 Apr 2022 10:30: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-pl1-x62c.google.com with SMTP id j8so4052454pll.11 for ; Thu, 14 Apr 2022 01:30: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=a6TEZY/RONIlliQA0kcLbuctAOZ4qDFiAPgxAVMNyGU=; b=n8q0JsY7a+GWXl2xaLa/EwBuVkvVOOznOZpVjacvWW8RdLvb0r9PLqtURiuoiWjfEj HNFeVbFjFnwsjn49v7bdsosFT8+Egu+BxlG5+3AoLoS2+MblANj/Et1EJL6MFoxUe+Ks mOpG1MuI2wv+Xaw+RcUbLoX2o+T+5RaQwGDYSlohVEUhrqrvd59qowPlH6xl4fgZohxe FDOrbUgC7Ho3gDc1xd8Rw/jgVzBWwMPJfj5jPOgHDT1IwQl/18MbRenij8Ccv2A9LQqW sTrC7V8viKPRGWk+lUNZRW1ZHAJWTWEWz4MVJbSKCykS75ky0IJyaxZAt8L/0yG6QhMK KVSA== 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=a6TEZY/RONIlliQA0kcLbuctAOZ4qDFiAPgxAVMNyGU=; b=VrP9cjAHerwiJYcCWjb6Vzpgy5bZApVPiC5fqQFQAqyaqoHt/ZDxKv9KPbRULXXPe8 wrVGU9yV1/bc0VWNjecjA6jwTetvqtxWQwjUsrhM7xomlmGtjUjR4sZJA3ZzNyUMcLSl TE5w1M9qB5aJfJC5G7V6Rt8bx2fC9oT5htSUYtY/egQkmrNtCfDS41OqehxM1DbD57Bv 1W6FCzeeQ8M75wWSMbeHT5joRFVC/+he3/SrZD5npCvq4Hol9MSw8q7FeJsWffS761MD Zu2W+UPBvCooU6XXid6IjbK2nClpt5jHEvzptTP9IZXAhK4JbjnX3bcLV57QENhu2szM xKBw== X-Gm-Message-State: AOAM531P9TJHWi+UD+PTT8zAf2yK9Ql6c9kw48Evw6ImtSPx8Nyas0tY y/Jt6NpkBourAMn/iMN30PL1HQ== X-Google-Smtp-Source: ABdhPJybf82w2DWFF8BlhuEibbUNkRGKdBGNQDnAqYwW4yYbJR8F7MWsQG2LlEqfkyd+MuDiMoY9XQ== X-Received: by 2002:a17:902:c410:b0:158:8a80:5087 with SMTP id k16-20020a170902c41000b001588a805087mr11681228plk.28.1649925012460; Thu, 14 Apr 2022 01:30:12 -0700 (PDT) Received: from laputa ([2400:4050:c3e1:100:71b6:233e:407:5693]) by smtp.gmail.com with ESMTPSA id 196-20020a6300cd000000b0039940fd184dsm1289825pga.9.2022.04.14.01.30.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Apr 2022 01:30:12 -0700 (PDT) Date: Thu, 14 Apr 2022 17:30:08 +0900 From: AKASHI Takahiro To: Simon Glass Cc: U-Boot Mailing List , Tom Rini , Heinrich Schuchardt , Patrick Delaunay , Wolfgang Denk Subject: Re: [PATCH 1/5] disk: Add an option for partitions in SPL Message-ID: <20220414083008.GF32435@laputa> Mail-Followup-To: AKASHI Takahiro , Simon Glass , U-Boot Mailing List , Tom Rini , Heinrich Schuchardt , Patrick Delaunay , Wolfgang Denk References: <20220311191005.364540-1-sjg@chromium.org> <20220311191005.364540-2-sjg@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220311191005.364540-2-sjg@chromium.org> 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 Hi Simon, On Fri, Mar 11, 2022 at 12:10:01PM -0700, Simon Glass wrote: > In some cases we do not want to enable partition support in SPL. Add an > option to allow this. > > Signed-off-by: Simon Glass > --- > > disk/Kconfig | 24 ++++++++++++++++++++---- > disk/Makefile | 6 +++--- > drivers/block/blk-uclass.c | 2 +- > 3 files changed, 24 insertions(+), 8 deletions(-) > > diff --git a/disk/Kconfig b/disk/Kconfig > index cee16a80bc2..13700322e97 100644 > --- a/disk/Kconfig > +++ b/disk/Kconfig > @@ -4,10 +4,6 @@ menu "Partition Types" > config PARTITIONS > bool "Enable Partition Labels (disklabels) support" > default y > - select SPL_SPRINTF if SPL > - select TPL_SPRINTF if TPL > - select SPL_STRTO if SPL > - select TPL_STRTO if TPL > help > Partition Labels (disklabels) Supported: > Zero or more of the following: > @@ -23,6 +19,26 @@ config PARTITIONS > you must configure support for at least one non-MTD partition type > as well. > > +config SPL_PARTITIONS > + bool "Enable Partition Labels (disklabels) support in SPL" > + default y if PARTITIONS > + select SPL_SPRINTF > + select SPL_STRTO > + help > + Enable this for base partition support in SPL. The required > + partition table types shold be enabled separately. This add a > + small amount of size to SPL, typically 500 bytes. Despite of you aim here, this option doesn't work. As I mentioned in https://lists.denx.de/pipermail/u-boot/2022-April/481258.html phycore-rk3288_defconfig, for instance, compiles disk/part.o (and disk/disk-uclass.o) in SPL image. Basically, I think that CONFIG_(SPL_)PARTITIONS should not be user-selectable. Instead, it should be implicitly selected by any of CONFIG_(SPL_)XXX_PARTITION's. -Takahiro Akashi > + > +config TPL_PARTITIONS > + bool "Enable Partition Labels (disklabels) support in TPL" > + default y if PARTITIONS > + select TPL_SPRINTF > + select TPL_STRTO > + help > + Enable this for base partition support in SPL. The required > + partition table types shold be enabled separately. This add a > + small amount of size to SPL, typically 500 bytes. > + > config MAC_PARTITION > bool "Enable Apple's MacOS partition table" > depends on PARTITIONS > diff --git a/disk/Makefile b/disk/Makefile > index ec37b74f5f4..ffd7b07f867 100644 > --- a/disk/Makefile > +++ b/disk/Makefile > @@ -5,9 +5,9 @@ > > #ccflags-y += -DET_DEBUG -DDEBUG > > -obj-$(CONFIG_PARTITIONS) += part.o > -ifdef CONFIG_$(SPL_)BLK > -obj-$(CONFIG_PARTITIONS) += disk-uclass.o > +obj-$(CONFIG_$(SPL_TPL_)PARTITIONS) += part.o > +ifdef CONFIG_$(SPL_TPL_)BLK > +obj-$(CONFIG_$(SPL_TPL_)PARTITIONS) += disk-uclass.o > endif > obj-$(CONFIG_$(SPL_)MAC_PARTITION) += part_mac.o > obj-$(CONFIG_$(SPL_)DOS_PARTITION) += part_dos.o > diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c > index 58dc74e71f1..bcd18ed38b2 100644 > --- a/drivers/block/blk-uclass.c > +++ b/drivers/block/blk-uclass.c > @@ -712,7 +712,7 @@ int blk_unbind_all(int if_type) > > static int blk_post_probe(struct udevice *dev) > { > - if (IS_ENABLED(CONFIG_PARTITIONS) && > + if (CONFIG_IS_ENABLED(PARTITIONS) && > IS_ENABLED(CONFIG_HAVE_BLOCK_DEVICE)) { > struct blk_desc *desc = dev_get_uclass_plat(dev); > > -- > 2.35.1.723.g4982287a31-goog >