]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: atmel: sama7g5ek: avoid rewriting of configured CONFIG_BOOTCOMMAND
authorEugen Hristev <eugen.hristev@microchip.com>
Thu, 19 Aug 2021 11:09:41 +0000 (14:09 +0300)
committerEugen Hristev <eugen.hristev@microchip.com>
Tue, 21 Sep 2021 07:07:04 +0000 (10:07 +0300)
Rewrite the CONFIG_BOOTCOMMAND only if it's not previously configured from
defconfig file.
This allows the user to select from defconfig/menuconfig the desired
boot command.
Adjust the current board defconfigs to reflect the default booting command
for the specific ENV configuration.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
configs/sama7g5ek_mmc1_defconfig
configs/sama7g5ek_mmc_defconfig
include/configs/sama7g5ek.h

index bd6cbccd2a3aa9f6f6fe2be78701eda07836785a..bb03db4c0f0d6d19b08c7273f320018280aa89fa 100644 (file)
@@ -19,6 +19,8 @@ CONFIG_FIT=y
 CONFIG_SD_BOOT=y
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/mmcblk1p2 rw rootwait"
+CONFIG_USE_BOOTCOMMAND=y
+CONFIG_BOOTCOMMAND="fatload mmc 1:1 0x61000000 at91-sama7g5ek.dtb; fatload mmc 1:1 0x62000000 zImage; bootz 0x62000000 - 0x61000000"
 CONFIG_MISC_INIT_R=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
index 83026ebf8fda037cb087f45293dca0f142495e8e..b5dd64c6125ee0c7f710d6ab05bc6e992bad3d1a 100644 (file)
@@ -19,6 +19,8 @@ CONFIG_FIT=y
 CONFIG_SD_BOOT=y
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait"
+CONFIG_USE_BOOTCOMMAND=y
+CONFIG_BOOTCOMMAND="fatload mmc 0:1 0x61000000 at91-sama7g5ek.dtb; fatload mmc 0:1 0x62000000 zImage; bootz 0x62000000 - 0x61000000"
 CONFIG_MISC_INIT_R=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
index ddf4f0bb330f4562f5b4feed09432f99240dedd9..9b7cc2ce4d0c9b387f1a103b6196c89f7fb81bc4 100644 (file)
@@ -24,7 +24,7 @@
         GENERATED_GBL_DATA_SIZE)
 #endif
 
-#undef CONFIG_BOOTCOMMAND
+#ifndef CONFIG_BOOTCOMMAND
 #ifdef CONFIG_SD_BOOT
 /* u-boot env in sd/mmc card */
 
 #define CONFIG_BOOTCOMMAND     "fatload mmc " CONFIG_ENV_FAT_DEVICE_AND_PART " 0x61000000 at91-sama7g5ek.dtb; " \
                                "fatload mmc " CONFIG_ENV_FAT_DEVICE_AND_PART " 0x62000000 zImage; " \
                                "bootz 0x62000000 - 0x61000000"
+#else
+#define CONFIG_BOOTCOMMAND     "Place your bootcommand here"
+#endif
+
 #endif
 
 #define CONFIG_ARP_TIMEOUT             200