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 X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 569E7C48BE8 for ; Fri, 18 Jun 2021 13:27:50 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 323D960FDC for ; Fri, 18 Jun 2021 13:27:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 323D960FDC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E26BF82B89; Fri, 18 Jun 2021 15:27:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.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=kernel.org header.i=@kernel.org header.b="SXihQhTt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E76DA82BBC; Fri, 18 Jun 2021 15:27:43 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E146182B64 for ; Fri, 18 Jun 2021 15:27:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id 5AD71613F0; Fri, 18 Jun 2021 13:27:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624022859; bh=An0KA/ZgWkETB9EtVeZ+D2EDslymAwG9jSOM4eTje50=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SXihQhTtefK/4KMoQB2vyCtY5NZsbiqFFkED/LLARGvYJ39UV5REAEdA0Ep0xxFF5 5K14M5+4NUwtvB+l8KGj+N+5nali/AmN6GdeXclIH97AaK3jZTyMqQeAmWe1HNmcFk tuhrybJiLS4MmUbvr4QdRNmoCm/hn7t5/tlJNavEr8rn3zSAouomzie57Yish7piRy Fqb+rXrWwGOkCgv9HYeIlVfen7rHkZui5hmt7MwNjSBPwBBpc7hp33ysi8VqoDl/jy OhvcpKcxffJpxqDstyE/DjpD9X56661rXLVQJMuArGOMhYbY5rLspFU05RpdET5TIq bNIu5t6PR11AA== Received: by pali.im (Postfix) id 8111EB0B; Fri, 18 Jun 2021 15:27:37 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Lokesh Vutla Cc: Ivaylo Dimitrov , Merlijn Wajer , maemo-leste@lists.dyne.org, u-boot@lists.denx.de Subject: [PATCH 2/2] Nokia RX-51: Load bootmenu also from uSD card Date: Fri, 18 Jun 2021 15:27:04 +0200 Message-Id: <20210618132704.32066-2-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210618132704.32066-1-pali@kernel.org> References: <20210618132704.32066-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean By default bootmenu is loaded only from eMMC. After this change U-Boot first tries to load bootmenu from uSD card and if it fails then fallback to eMMC. People want to boot alternative OS from removable uSD without need to modify eMMC content. So this backward compatible change allows it. Part of this change is also optimization of trymmc* macros so they can be used in preboot macro for loading bootmenu. Signed-off-by: Pali Rohár --- include/configs/nokia_rx51.h | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h index 742c1a646545..7ef25ea8389c 100644 --- a/include/configs/nokia_rx51.h +++ b/include/configs/nokia_rx51.h @@ -138,23 +138,10 @@ int rx51_kp_getc(struct stdio_dev *sdev); "setenv setup_omap_atag 1;" \ "bootm ${attkernaddr} || bootz ${attkernaddr};" \ "setenv setup_omap_atag\0" \ - "trymmcscriptboot=if run switchmmc; then " \ - "if run scriptload; then " \ - "run scriptboot;" \ - "fi;" \ - "fi\0" \ - "trymmckernboot=if run switchmmc; then " \ - "if run kernload; then " \ - "run kernboot;" \ - "fi;" \ - "fi\0" \ - "trymmckerninitrdboot=if run switchmmc; then " \ - "if run initrdload; then " \ - "if run kernload; then " \ - "run kerninitrdboot;" \ - "fi;" \ - "fi; " \ - "fi\0" \ + "trymmcscriptboot=run switchmmc && run scriptload && run scriptboot\0" \ + "trymmckernboot=run switchmmc && run kernload && run kernboot\0" \ + "trymmckerninitrdboot=run switchmmc && run initrdload && " \ + "run kernload && run kerninitrdboot\0" \ "trymmcpartboot=setenv mmcscriptfile boot.scr; run trymmcscriptboot;" \ "setenv mmckernfile uImage; run trymmckernboot;" \ "setenv mmckernfile zImage; run trymmckernboot\0" \ @@ -170,15 +157,11 @@ int rx51_kp_getc(struct stdio_dev *sdev); "fi\0" \ "emmcboot=setenv mmcnum 1; run trymmcboot\0" \ "sdboot=setenv mmcnum 0; run trymmcboot\0" \ - "preboot=setenv mmcnum 1; setenv mmcpart 1;" \ - "setenv mmcscriptfile bootmenu.scr;" \ - "if run switchmmc; then " \ - "setenv mmctype fat;" \ - "if run scriptload; then run scriptboot; else " \ - "setenv mmctype ext4;" \ - "if run scriptload; then run scriptboot; fi;" \ - "fi;" \ - "fi;" \ + "trymmcbootmenu=setenv mmctype fat && run trymmcscriptboot || " \ + "setenv mmctype ext4 && run trymmcscriptboot\0" \ + "preboot=setenv mmcpart 1; setenv mmcscriptfile bootmenu.scr;" \ + "setenv mmcnum 0 && run trymmcbootmenu || " \ + "setenv mmcnum 1 && run trymmcbootmenu;" \ "if run slide; then true; else " \ "setenv bootmenu_delay 0;" \ "setenv bootdelay 0;" \ -- 2.20.1