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 DF80DC433FE for ; Thu, 13 Oct 2022 15:51:22 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3213E84DC0; Thu, 13 Oct 2022 17:51:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com 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=baylibre-com.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.b="JurdoUO5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 88BEA84DAD; Thu, 13 Oct 2022 17:51:18 +0200 (CEST) Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) (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 D317884DAD for ; Thu, 13 Oct 2022 17:51:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jmasson@baylibre.com Received: by mail-wm1-x334.google.com with SMTP id n9so1482073wms.1 for ; Thu, 13 Oct 2022 08:51:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=xYYnV2fdrU5MP5cFkglujZ5m236K0DrBn+I0MoaEwhk=; b=JurdoUO5oAG5oxtbAe4gVQW1W4UFMEFkB/0GQdVfwvSB/1mpRGiEJ6cxcw1N+ByrWN 72sdUZ6+R263GNweDIo+tW41dH5bAeuhanafCsZmNrTWBRTgisNa7rKRPKuu+Lx5cnSQ xIPk1+xPQ+o6wwk2lIbXraG1tYPCHiXWN6euEXzFLK21uK1Br8sCVvW+BBwvv3+UeVpN LU0L9lnyYX6uKy+3KVg+H2hRJfADocewrW3uQfmtw0mTRTEcJbVl86VZR+wt3UcU1Tff 4FW89ORoALtZJYXgA42GRDY/B/gF6Le1cVV8YPhSeZje+3iGJyCrA5cAXUdYLN837ZVJ Ty1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xYYnV2fdrU5MP5cFkglujZ5m236K0DrBn+I0MoaEwhk=; b=zpmmiEvpM9K5KTRfxk/QRAsx59i7qoxb7SvJqfkS0Wrgph5b6pBlUn1A8J+SZr2xIo bRNiNX1v0xA3YV4Rng8pGIXthBmfoNllP8yZbTFnV3/tapYz6qZuKTstwGdrh+zDbaPj IBpgxpXUQVD1Bk5zlcFEOmAqNBxizbCJSZKLwl3t1quu2lvvAT7oHK3ew6mfB11zWipT LX1k9HwKVboijCVHZNzWqJoNhj/HY/jGd+xtugWxbS/0rlW71WTLicWGfBqbbkwLb+mc evFgvynlKMRDuNaPxmgLH2HOoOE47a1XLVDFtGqR82psdyIY4KK/zIETqNhrwApkCLYl mMWw== X-Gm-Message-State: ACrzQf0E/dVzGIvIt3277vyBonE6ahL8V2k3vbkjzduE58GrNqmILT8S ErEFhQOTzo2dKhkJ0Ypa1yTLeA== X-Google-Smtp-Source: AMsMyM6U+cZmewJuC8Hyk2FWunE6i7qckwh6cQRsuzxYHYHqTwRzu6tLVoPSqGirYS9Juv48Sp1JOg== X-Received: by 2002:a05:600c:4e51:b0:3c0:55e0:7719 with SMTP id e17-20020a05600c4e5100b003c055e07719mr352127wmq.3.1665676275366; Thu, 13 Oct 2022 08:51:15 -0700 (PDT) Received: from localhost ([82.66.159.240]) by smtp.gmail.com with ESMTPSA id q128-20020a1c4386000000b003a6a3595edasm5073400wma.27.2022.10.13.08.51.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 08:51:14 -0700 (PDT) From: Julien Masson To: Simon Glass Cc: Subject: Re: [RESEND PATCH 2/2] splash: get devpart from environment variable In-Reply-To: Date: Thu, 13 Oct 2022 17:51:13 +0200 Message-ID: <877d13zpqm.fsf@fedora.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: text/plain 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.6 at phobos.denx.de X-Virus-Status: Clean Hi Simon, Thanks for the review. On Thu 13 Oct 2022 at 17:44, Simon Glass wrote: > Hi Julien, > > On Wed, 12 Oct 2022 at 05:38, Julien Masson wrote: >> >> By default several types of splash locations are supported and the >> user can select one of them through environment var (splashsource). >> >> However the devpart is still hardcoded and we cannot change it from >> the environment. >> >> This patch add the support of "splashdevpart" which allow the user to >> set the devpart though this environment variable. >> >> Example: image located in splashscreen partition (MMC as raw) >> ``` >> splashsource=mmc_raw >> splashdevpart=0#splashscreen >> ``` >> >> Signed-off-by: Julien Masson >> --- >> common/splash_source.c | 5 +++++ >> 1 file changed, 5 insertions(+) > > Reviewed-by: Simon Glass >> >> diff --git a/common/splash_source.c b/common/splash_source.c >> index b4bf6f1336..1f99f44f78 100644 >> --- a/common/splash_source.c >> +++ b/common/splash_source.c >> @@ -451,6 +451,7 @@ int splash_source_load(struct splash_location *locations, uint size) >> { >> struct splash_location *splash_location; >> char *env_splashimage_value; >> + char *env_splashdevpart_value; > > How about just 'devpar' as it is shorter and easier to read? > Yes I initially follow the same "syntax" of splashimage var but I agree it can be shorter, what name would you prefer: - char *devpart - char *env_devpart - char *env_devpart_value ? >> u32 bmp_load_addr; >> >> env_splashimage_value = env_get("splashimage"); >> @@ -467,6 +468,10 @@ int splash_source_load(struct splash_location *locations, uint size) >> if (!splash_location) >> return -EINVAL; >> >> + env_splashdevpart_value = env_get("splashdevpart"); >> + if (env_splashdevpart_value) >> + splash_location->devpart = env_splashdevpart_value; >> + >> if (splash_location->flags == SPLASH_STORAGE_RAW) >> return splash_load_raw(splash_location, bmp_load_addr); >> else if (splash_location->flags == SPLASH_STORAGE_FS) >> -- >> 2.37.3 >> > > Regards, > Simon -- Julien Masson