From: Igor Opaniuk <igor.opaniuk@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH v1 5/9] colibri-imx6ull: use preboot for fdtfile evaluation
Date: Mon, 14 Sep 2020 10:51:04 +0300 [thread overview]
Message-ID: <20200914075108.14537-6-igor.opaniuk@gmail.com> (raw)
In-Reply-To: <20200914075108.14537-1-igor.opaniuk@gmail.com>
From: Igor Opaniuk <igor.opaniuk@toradex.com>
ENable and set preboot var with fdtfile evaluation.
preboot will be checked and run immediately before starting the
CONFIG_BOOTDELAY countdown and/or running the auto-boot command resp.
entering interactive mode.
This provides possibility to use different boot cmds in interactive mode
without manual setting fdtfile value, as it it's already evaluated
before entering interactive mode.
Fixes: board: 31b1e17f44("toradex: add Colibri iMX6ULL support")
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
---
configs/colibri-imx6ull_defconfig | 2 ++
include/configs/colibri-imx6ull.h | 8 +++-----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/configs/colibri-imx6ull_defconfig b/configs/colibri-imx6ull_defconfig
index 3defaf0ccc..6ef5dff2db 100644
--- a/configs/colibri-imx6ull_defconfig
+++ b/configs/colibri-imx6ull_defconfig
@@ -14,6 +14,8 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri-imx6ull/imximage.cfg,
CONFIG_BOOTDELAY=1
# CONFIG_USE_BOOTCOMMAND is not set
# CONFIG_CONSOLE_MUX is not set
+CONFIG_USE_PREBOOT=y
+CONFIG_PREBOOT="setenv fdtfile imx6ull-colibri${variant}-${fdt_board}.dtb"
CONFIG_SYS_CONSOLE_IS_IN_ENV=y
CONFIG_VERSION_VARIABLE=y
# CONFIG_DISPLAY_BOARDINFO is not set
diff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h
index 530240f069..63b3fef34c 100644
--- a/include/configs/colibri-imx6ull.h
+++ b/include/configs/colibri-imx6ull.h
@@ -35,8 +35,6 @@
#define CONFIG_NETMASK 255.255.255.0
#define CONFIG_SERVERIP 192.168.10.1
-#define FDT_FILE "imx6ull-colibri${variant}-${fdt_board}.dtb"
-
#define MEM_LAYOUT_ENV_SETTINGS \
"bootm_size=0x10000000\0" \
"fdt_addr_r=0x82100000\0" \
@@ -57,7 +55,7 @@
"setenv bootargs ${defargs} ${nfsargs} " \
"${setupargs} ${vidargs}; echo Booting from NFS...;" \
"dhcp ${kernel_addr_r} && " \
- "tftp ${fdt_addr_r} " FDT_FILE " && " \
+ "tftp ${fdt_addr_r} ${fdtfile} && " \
"run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
#define UBI_BOOTCMD \
@@ -71,8 +69,8 @@
"ubi read ${fdt_addr_r} dtb && " \
"run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
-#define CONFIG_BOOTCOMMAND "run ubiboot; " \
- "setenv fdtfile " FDT_FILE " && run distro_bootcmd;"
+/* Run Distro Boot script if ubiboot fails */
+#define CONFIG_BOOTCOMMAND "run ubiboot || run distro_bootcmd;"
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 0) \
--
2.17.1
next prev parent reply other threads:[~2020-09-14 7:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-14 7:50 [PATCH v1 0/9] toradex: Misc fixes for v2020.10 Igor Opaniuk
2020-09-14 7:51 ` [PATCH v1 1/9] colibri-imx6ull: use splashcreen value instead of legacy function Igor Opaniuk
2020-09-14 7:51 ` [PATCH v1 2/9] colibri_imx7: " Igor Opaniuk
2020-09-14 7:51 ` [PATCH v1 3/9] toradex: drop legacy show_boot_logo function and use splashscreen Igor Opaniuk
2020-09-14 7:51 ` [PATCH v1 4/9] colibri_imx7: wrap video specific funcs with ifdefs Igor Opaniuk
2020-09-14 7:51 ` Igor Opaniuk [this message]
2020-09-14 7:51 ` [PATCH v1 6/9] colibri_vf: use preboot for fdtfile evaluation Igor Opaniuk
2020-09-14 7:51 ` [PATCH v1 7/9] colibri_imx7: " Igor Opaniuk
2020-09-14 7:51 ` [PATCH v1 8/9] colibri_imx6: provide fdtfile in env instead of setting it in runtime Igor Opaniuk
2020-09-14 7:51 ` [PATCH v1 9/9] apalis_imx6: " Igor Opaniuk
2020-09-16 10:00 ` [PATCH v1 0/9] toradex: Misc fixes for v2020.10 Igor Opaniuk
2020-09-16 10:09 ` Stefano Babic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200914075108.14537-6-igor.opaniuk@gmail.com \
--to=igor.opaniuk@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox