From patchwork Mon Sep 19 13:36:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Masson X-Patchwork-Id: 1679425 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; 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=2jrNGd8Z; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MWQhk3Wy5z1ypH for ; Mon, 19 Sep 2022 23:37:26 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AEA6F84C45; Mon, 19 Sep 2022 15:37:07 +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="2jrNGd8Z"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7DEAE84C2A; Mon, 19 Sep 2022 15:37:02 +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-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) (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 0777884C1B for ; Mon, 19 Sep 2022 15:37:00 +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-wr1-x430.google.com with SMTP id n10so16978875wrw.12 for ; Mon, 19 Sep 2022 06:37:00 -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; bh=g9pe1+/knD9NGYe5ZWhanh7d2jF9o16ZxegZdTC1ZvA=; b=2jrNGd8ZkD38m/YMa9+fldc9r0wLrE7ktfHF/6eCqpGCMdce+SlWj4ZyGahtCg0VrK 7VFOwwRlcxUMreHCrK4Q4zsg4vBzfia8MedtGFwP6EU5FfGAQG/npwpdxMB7oV/AuGFW Db2gea3unauTiih5HxfwNVuhwQtz0RDR2QC6uN531yRPFE8f+37vuKS6FEtf0FE+R8F/ HorD0a82ykpBjA2M1QE/ApCOwlbij5QPuit1lZOI+A6H+G9Quq1axcYr5QXar+LKqVsI s51FfDjcmjJ38dwd6Lz4ZmP2981smUswz2y/qvDfPGI90WT4zHGJdY+ZCmEq2bue2qx4 rC+A== 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; bh=g9pe1+/knD9NGYe5ZWhanh7d2jF9o16ZxegZdTC1ZvA=; b=7R22UBHw2D2zTxH9cUzuE5O+mqsfk5mqYT9UDo+yoz0pwsD2bnSwBDGK/eL3DkTDry i/0fZiqMudY4ovpb7KXy2JR4ucItR8O2N8fiNLRRQ9VXBA3Fu7iDfpuWDXpzWCxntw+u D7WNMHupuC8OuivtqJ49gTUWWoEi9BATSPVgxTehSGkRszGhlteP8GrziblAfBW06I5r FuiBUBc3OEtyvKcwUS4+ueiIA+SiEIF0SNut8cItnnD6mjdXnGmnEDJyhwtn3WPrTGNZ pMNWlfJ3hykkI4gizgRe/HBvCCvV9ULllf9HPVy9PMec2+wEUXuRURsE2Fm5XWh4rhDK J4eQ== X-Gm-Message-State: ACrzQf2z5OtWwMIMeTmxDSHj5V+bF82WJuWCtIbDGuanN7bE0uakRGxt uJw5DomwKSPkjeTAI7pP1Dnj3jrtS0Qf/w== X-Google-Smtp-Source: AMsMyM6IfnsXMFbyFTeij5WByrKISiTa3T73TeMNb6/hWQTA/0GzABZZykubFDPeOjRCQlSI3G6N9Q== X-Received: by 2002:adf:f4cf:0:b0:228:63bd:da33 with SMTP id h15-20020adff4cf000000b0022863bdda33mr10715748wrp.181.1663594619182; Mon, 19 Sep 2022 06:36:59 -0700 (PDT) Received: from localhost (atoulouse-654-1-345-94.w90-55.abo.wanadoo.fr. [90.55.184.94]) by smtp.gmail.com with ESMTPSA id r13-20020a5d4e4d000000b0022ae4f8395dsm8967695wrt.96.2022.09.19.06.36.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Sep 2022 06:36:58 -0700 (PDT) From: Julien Masson To: u-boot@lists.denx.de Cc: Subject: [PATCH 2/2] splash: get devpart from environment variable In-Reply-To: <87k05zo58p.fsf@baylibre.com> Date: Mon, 19 Sep 2022 15:36:58 +0200 References: <87k05zo58p.fsf@baylibre.com> Message-ID: <87h713o58l.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 ``` Signed-off-by: Julien Masson --- common/splash_source.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/splash_source.c b/common/splash_source.c index c512aa0196..a7764ff16f 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; 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)