From patchwork Mon Oct 17 08:33:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Masson X-Patchwork-Id: 1690696 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=JeEnuIqe; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MrVdk5Z1lz23jp for ; Mon, 17 Oct 2022 19:34:02 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3A75184F7E; Mon, 17 Oct 2022 10:33:38 +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="JeEnuIqe"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0D83284F78; Mon, 17 Oct 2022 10:33:29 +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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (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 373B684F6D for ; Mon, 17 Oct 2022 10:33:25 +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-x32d.google.com with SMTP id y10so8196037wma.0 for ; Mon, 17 Oct 2022 01:33:25 -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:references:date:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=ok65PijNDBnsCtux213WNtApSDEjBixR/Mi4In7cSnc=; b=JeEnuIqe7bMJrYm0qAOI2Zylq8USudvCdyTloln8XTZrmkmboMBPEhmJek/NQZGpz0 y45I7sAEYS/VKmOLQIc8f3wzfDVnMgDQs15KJPzwgD63GOA5fnUcRFpb8xF5CzPusoX9 dD2kzap0iW5PsgJuQnxCui22poDj7bhpTL0Nj4kC3qJZIATWp5EtI477k9pNWHmj8m7G 3IVYEbXwH4iYLy+JxUPDk2PjPg0xn7DkZSC//3HZfxXknI3ugYcABTZRtjrcR71yDmZP /mnG2XUZqB6W3c4cGXThp2FsdfgSTaSkdWhTGe1iXiUBDbYjgy7Zba2/U1jMT6Zih5cs 0epg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:references:date:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ok65PijNDBnsCtux213WNtApSDEjBixR/Mi4In7cSnc=; b=szcvkXEaP4QHcdvC0s9CaXJ9VgPtFWMLXBvo8qiu4pbOzQAJBnZj7YJ1kRjvoPC2Tx JqTTwK2HSgBhhAR7IqgCCVKZCSx8gGVCRZxTWz7B1opZ3xOlURknVgbfPy1VWbEye8K4 6rErbvqdwsC+WZklj8EHIW8VRBJpeU8/GgsTqprvpcvED8OHjB/WuBBy+e62tUnqPofN hzeS4KS4b7NFTK+H7fzbK5R73ZcPDoas2X7COgnNh+pfyFbp2xGvZnD9SK2bFo+hjJPV O4ijkNsEJee/sXGELdTYJDDFH1yQYOnhWEPMSP5JhXO+NmgfEe7UA9e486yOmR1B/CYW 7bKw== X-Gm-Message-State: ACrzQf0BNMtVezKDRECsOFEn+I2Fe3gKeK5DjsPG+yrCLopaH6gC234E yHXOLKtah6BUnqzSOiouvlK6OcjzJqlQGQ== X-Google-Smtp-Source: AMsMyM7k4tnODt3yLZMU+08hDFvyaJI1yJlfGUmCkMogvSoD1OKvTXRoLiVbwIXGyydDkA/ehTulCw== X-Received: by 2002:a05:600c:4b95:b0:3c4:5806:103d with SMTP id e21-20020a05600c4b9500b003c45806103dmr18482983wmp.26.1665995604500; Mon, 17 Oct 2022 01:33:24 -0700 (PDT) Received: from localhost (atoulouse-654-1-345-205.w90-55.abo.wanadoo.fr. [90.55.184.205]) by smtp.gmail.com with ESMTPSA id g15-20020adfe40f000000b00226dfac0149sm7729189wrm.114.2022.10.17.01.33.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 01:33:24 -0700 (PDT) From: Julien Masson To: u-boot@lists.denx.de Cc: Simon Glass Subject: [PATCH v2 2/2] splash: get devpart from environment variable In-Reply-To: <87fsfm6e9d.fsf@baylibre.com> Date: Mon, 17 Oct 2022 10:33:22 +0200 References: <87fsfm6e9d.fsf@baylibre.com> Message-ID: <87czaq6e99.fsf@baylibre.com> 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.6 at phobos.denx.de X-Virus-Status: Clean 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 ``` Reviewed-by: Simon Glass Signed-off-by: Julien Masson Reviewed-by: Simon Glass --- Changes in v2: - rename local var env_splashdevpart_value to devpart common/splash_source.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/splash_source.c b/common/splash_source.c index 68c9fa371b..a260137619 100644 --- a/common/splash_source.c +++ b/common/splash_source.c @@ -448,6 +448,7 @@ int splash_source_load(struct splash_location *locations, uint size) { struct splash_location *splash_location; char *env_splashimage_value; + char *devpart; u32 bmp_load_addr; env_splashimage_value = env_get("splashimage"); @@ -464,6 +465,10 @@ int splash_source_load(struct splash_location *locations, uint size) if (!splash_location) return -EINVAL; + devpart = env_get("splashdevpart"); + if (devpart) + splash_location->devpart = devpart; + if (splash_location->flags == SPLASH_STORAGE_RAW) return splash_load_raw(splash_location, bmp_load_addr); else if (splash_location->flags == SPLASH_STORAGE_FS)