From patchwork Wed Oct 12 11:38:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Masson X-Patchwork-Id: 1689105 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=dNyWIuZx; 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 4MnW0Y5XhCz23jn for ; Wed, 12 Oct 2022 22:39:57 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4294784F00; Wed, 12 Oct 2022 13:39:34 +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="dNyWIuZx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A323584E57; Wed, 12 Oct 2022 13:39:00 +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-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) (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 8381A84E4E for ; Wed, 12 Oct 2022 13:38:56 +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-x435.google.com with SMTP id b4so25836507wrs.1 for ; Wed, 12 Oct 2022 04:38:56 -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=6lMdC/jmUHfnOU/5xHN37SBc/jfnz4uqoEOm2sjc3NE=; b=dNyWIuZxJPJU+U8CgV9+e+bIUICK0AC5W6axlyJluPGg3cLSjEmgoNhoUuLJJb2yez 7uWPiBnaQ7TakLsZGShc3ikBb3fug1tnWLgvIa7cv6uPLW/vVGFnrR9RnP1coLdLKfyC 9JYasfe+GaWIGliHsO0MqgfCA33fRT/CXuaWQHHsT36yPPc8353nljEUqjLWMXSFI24V wDjpdlqmHVrUev5/WHCokIjCzHa9dXW157jQeoczVStr8x5OcWOWwTkHyT+2vmbXxydy KIrMEA6fzmr5D1RrxCh3O4KQwXGn0PZ11OcQRxC7371y6YPeEWDJeBXGwDelm/HXlZ6A KaXQ== 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=6lMdC/jmUHfnOU/5xHN37SBc/jfnz4uqoEOm2sjc3NE=; b=4eC6YL18D8gVcFVImKegCdcI7iCnoV80/S2OI5Md09SAS8OxYk0bvcH5Q8psGhgH7b /GjpVgULHcx0RDcSdCFPajvw8nxdIiylQaMhoCkCVs46t/WJJH9VwW5jP5uyJbt4fH4p sroh3MOq5ma7AK+Aus6TsGbykLQIBJXP8+LnUbhhHpu/+LJukooykriwmjr3hLsePm4k cjKYqT8+FseJ+14dImGM6KzSeTU6U27GJs1PRCrAAZBt74RYQ7pOANI5+z7+7xICcWl+ zOhkSU/OdeHVJp/smJRJGfA/AfrHszgIwUUxeL2LCcQEaMxj6r4hEfjsH+1JpcgpFJ2F CAdw== X-Gm-Message-State: ACrzQf2EUsFC9fyL/SDC36CU+vUOa/JXEwDT7C76nM+Y4q4sQ+YdgBqW dJWnXXF3s/4Gbzu4i43iVVi5nK/ao9m5Dg== X-Google-Smtp-Source: AMsMyM5icwAmOm+DHFggG6ad1Ha9vROJxAQJvwNnEYo/PswIIOYXrPP2incaCT2Iz+QlruWBodHXLQ== X-Received: by 2002:a05:6000:711:b0:22e:7b01:db9f with SMTP id bs17-20020a056000071100b0022e7b01db9fmr18710239wrb.38.1665574735878; Wed, 12 Oct 2022 04:38:55 -0700 (PDT) Received: from localhost (lfbn-tou-1-1062-54.w90-76.abo.wanadoo.fr. [90.76.131.54]) by smtp.gmail.com with ESMTPSA id c3-20020a1c3503000000b003a6125562e1sm1526038wma.46.2022.10.12.04.38.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Oct 2022 04:38:55 -0700 (PDT) From: Julien Masson To: u-boot@lists.denx.de Cc: Simon Glass Subject: [RESEND PATCH 2/2] splash: get devpart from environment variable In-Reply-To: <87a661clvc.fsf@baylibre.com> Date: Wed, 12 Oct 2022 13:38:54 +0200 References: <87a661clvc.fsf@baylibre.com> Message-ID: <877d15clv5.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 Reviewed-by: Simon Glass --- common/splash_source.c | 5 +++++ 1 file changed, 5 insertions(+) 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; 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)