]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ti: am43xx_evm: Switch to DISTRO_BOOT only
authorTom Rini <trini@konsulko.com>
Thu, 1 Jul 2021 13:26:10 +0000 (09:26 -0400)
committerLokesh Vutla <lokeshvutla@ti.com>
Thu, 15 Jul 2021 12:26:04 +0000 (17:56 +0530)
Remove the environment support for various legacy boot methods.  With
this, we will now default to booting any distribution that follows the
generic distro boot framework and no longer attempt to boot various
legacy (to this SoC) scripts/etc.

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Link: https://lore.kernel.org/r/20210701132612.7559-1-trini@konsulko.com
configs/am43xx_evm_defconfig
configs/am43xx_evm_qspiboot_defconfig
configs/am43xx_evm_rtconly_defconfig
configs/am43xx_evm_usbhost_boot_defconfig
configs/am43xx_hs_evm_defconfig
include/configs/am43xx_evm.h

index b73fb9260d0fece0c4d8176b6fc489bd535cb10a..05e7e774c6374387b6152c4392e545b9ce169f5b 100644 (file)
@@ -12,7 +12,7 @@ CONFIG_SPL=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SPL_LOAD_FIT=y
 # CONFIG_USE_SPL_FIT_GENERATOR is not set
-# CONFIG_USE_BOOTCOMMAND is not set
+CONFIG_BOOTCOMMAND="run findfdt; run finduuid; run distro_bootcmd"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_MISC_INIT_R is not set
 CONFIG_SPL_ETH_SUPPORT=y
index 546669f4658733553efcc230dff7646da325e183..352050204d6a3a176d1b9e4c46de7edc1b8ed2a6 100644 (file)
@@ -13,7 +13,7 @@ CONFIG_ENV_OFFSET_REDUND=0x120000
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SYS_EXTRA_OPTIONS="QSPI,QSPI_BOOT"
 CONFIG_QSPI_BOOT=y
-# CONFIG_USE_BOOTCOMMAND is not set
+CONFIG_BOOTCOMMAND="run findfdt; run finduuid; run distro_bootcmd"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_BOARD_EARLY_INIT_F=y
 # CONFIG_MISC_INIT_R is not set
index ed5ce0f380a9a7b76c4ed9df12a50e86a493cc5b..c8db636e2565e467e4587ab5bce4dbc6f76c2164 100644 (file)
@@ -12,7 +12,7 @@ CONFIG_SPL=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SPL_LOAD_FIT=y
 # CONFIG_USE_SPL_FIT_GENERATOR is not set
-# CONFIG_USE_BOOTCOMMAND is not set
+CONFIG_BOOTCOMMAND="run findfdt; run finduuid; run distro_bootcmd"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_MISC_INIT_R is not set
 CONFIG_SPL_MTD_SUPPORT=y
index b1be0272e71388be77afa7a3924f0ab97fefa7dd..ae233434099cf58ce51b5b3789e3c71e71a5acf8 100644 (file)
@@ -11,7 +11,7 @@ CONFIG_SPL=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SPL_LOAD_FIT=y
 # CONFIG_USE_SPL_FIT_GENERATOR is not set
-# CONFIG_USE_BOOTCOMMAND is not set
+CONFIG_BOOTCOMMAND="run findfdt; run finduuid; run distro_bootcmd"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_MISC_INIT_R is not set
 CONFIG_SPL_MTD_SUPPORT=y
index 0f4872993fbf7d478c92a99b9eccae4a77b14f5b..f568aa646efa2a2def5798388534790a3e782795 100644 (file)
@@ -21,7 +21,7 @@ CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y
 # CONFIG_USE_SPL_FIT_GENERATOR is not set
 CONFIG_OF_BOARD_SETUP=y
-# CONFIG_USE_BOOTCOMMAND is not set
+CONFIG_BOOTCOMMAND="run findfdt; run finduuid; run distro_bootcmd"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_MISC_INIT_R is not set
 CONFIG_SPL_ETH_SUPPORT=y
index 6df6b49c8008d273b5436071831582ed03c24797..a9ec1aacf3ce099804d1f9549e3c6dac944ed949 100644 (file)
 #define DFUARGS
 #endif
 
+#define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \
+       "bootcmd_" #devtypel "=" \
+       "run nandboot\0"
+
+#define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
+       #devtypel #instance " "
+
+#define BOOT_TARGET_DEVICES(func) \
+       func(MMC, mmc, 0) \
+       func(USB, usb, 0) \
+       func(NAND, nand, 0) \
+       func(PXE, pxe, na) \
+       func(DHCP, dhcp, na)
+
+#include <config_distro_bootcmd.h>
+
 #ifndef CONFIG_SPL_BUILD
 #include <environment/ti/dfu.h>
-#include <environment/ti/mmc.h>
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
        DEFAULT_LINUX_BOOT_ENV \
-       DEFAULT_MMC_TI_ARGS \
-       DEFAULT_FIT_TI_ARGS \
        "fdtfile=undefined\0" \
-       "bootpart=0:2\0" \
-       "bootdir=/boot\0" \
-       "bootfile=zImage\0" \
+       "finduuid=part uuid mmc 0:2 uuid\0" \
        "console=ttyO0,115200n8\0" \
        "partitions=" \
                "uuid_disk=${uuid_gpt_disk};" \
                "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \
        "optargs=\0" \
-       "usbroot=/dev/sda2 rw\0" \
-       "usbrootfstype=ext4 rootwait\0" \
-       "usbdev=0\0" \
        "ramroot=/dev/ram0 rw\0" \
        "ramrootfstype=ext2\0" \
-       "usbargs=setenv bootargs console=${console} " \
-               "${optargs} " \
-               "root=${usbroot} " \
-               "rootfstype=${usbrootfstype}\0" \
        "ramargs=setenv bootargs console=${console} " \
                "${optargs} " \
                "root=${ramroot} " \
                "rootfstype=${ramrootfstype}\0" \
        "loadramdisk=load ${devtype} ${devnum} ${rdaddr} ramdisk.gz\0" \
-       "usbboot=" \
-               "setenv devnum ${usbdev}; " \
-               "setenv devtype usb; " \
-               "usb start ${usbdev}; " \
-               "if usb dev ${usbdev}; then " \
-                       "if run loadbootenv; then " \
-                               "echo Loaded environment from ${bootenv};" \
-                               "run importbootenv;" \
-                       "fi;" \
-                       "if test -n $uenvcmd; then " \
-                               "echo Running uenvcmd ...;" \
-                               "run uenvcmd;" \
-                       "fi;" \
-                       "if run loadimage; then " \
-                               "run loadfdt; " \
-                               "echo Booting from usb ${usbdev}...; " \
-                               "run usbargs;" \
-                               "bootz ${loadaddr} - ${fdtaddr}; " \
-                       "fi;" \
-               "fi\0" \
-               "fi;" \
-               "usb stop ${usbdev};\0" \
        "findfdt="\
                "if test $board_name = AM43EPOS; then " \
                        "setenv fdtfile am43x-epos-evm.dtb; fi; " \
        NANDARGS \
        NETARGS \
        DFUARGS \
-
-#define CONFIG_BOOTCOMMAND \
-       "if test ${boot_fit} -eq 1; then "      \
-               "run update_to_fit;"    \
-       "fi;"   \
-       "run findfdt; " \
-       "run envboot;" \
-       "run mmcboot;" \
-       "run usbboot;" \
-       NANDBOOT \
+       BOOTENV
 
 #endif