From: Pali Rohár <pali@kernel.org>
Date: Sun, 4 Sep 2022 01:29:02 +0000 (+0200)
Subject: Nokia RX-51: Call bootm in test script only when image is valid
X-Git-Tag: v2025.01-rc5-pxa1908~1263^2~14^2~4
X-Git-Url: http://git.dujemihanovic.xyz/img/static/%7B%7B%20%24.Site.BaseURL%20%7D%7Dposts/html/index.html?a=commitdiff_plain;h=7506965885fe5eea4945c9706377a679a2974aa7;p=u-boot.git

Nokia RX-51: Call bootm in test script only when image is valid

When reading of image fails then do not call bootm. This prevents false
positive test result in case something bootable is present in memory.

Signed-off-by: Pali Rohár <pali@kernel.org>
---

diff --git a/test/nokia_rx51_test.sh b/test/nokia_rx51_test.sh
index abd1712fd7..d2417a98bf 100755
--- a/test/nokia_rx51_test.sh
+++ b/test/nokia_rx51_test.sh
@@ -180,7 +180,7 @@ EOF
 
 # Generate bootmenu for OneNAND booting
 cat > bootmenu_nand << EOF
-setenv bootmenu_0 'uImage-2.6.28-omap1 from OneNAND=mtd read initfs \${kernaddr}; setenv bootargs; setenv setup_omap_atag 1; bootm \${kernaddr}';
+setenv bootmenu_0 'uImage-2.6.28-omap1 from OneNAND=setenv bootargs; setenv setup_omap_atag 1; mtd read initfs \${kernaddr} && bootm \${kernaddr}';
 setenv bootmenu_1;
 setenv bootmenu_delay 1;
 setenv bootdelay 1;