configs: am335x_evm: Support distro bootcmds
Add support for distro bootcmds and network booting while retaining backwards compatibility with the current "legacy" setup. With these changes the default boot sequence becomes: * SD card (standard distro boot) * SD card (legacy boot) * EMMC (standard distro boot) * EMMC (legacy boot) * Nand (legacy boot) * PXE (standard distro boot) * DHCP (standard distro boot) The older boot scripts have some overlap with what the distro bootcommands to however i've left them unchanged to prevent introduction of subtle bugs. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
This commit is contained in:
parent
7749b67f6c
commit
bc3199fd18
|
|
@ -18,6 +18,10 @@
|
||||||
|
|
||||||
#include <configs/ti_am335x_common.h>
|
#include <configs/ti_am335x_common.h>
|
||||||
|
|
||||||
|
/* Don't override the distro default bootdelay */
|
||||||
|
#undef CONFIG_BOOTDELAY
|
||||||
|
#include <config_distro_defaults.h>
|
||||||
|
|
||||||
#ifndef CONFIG_SPL_BUILD
|
#ifndef CONFIG_SPL_BUILD
|
||||||
#ifndef CONFIG_FIT
|
#ifndef CONFIG_FIT
|
||||||
# define CONFIG_FIT
|
# define CONFIG_FIT
|
||||||
|
|
@ -67,6 +71,37 @@
|
||||||
|
|
||||||
#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
|
#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
|
||||||
|
|
||||||
|
#define BOOTENV_DEV_LEGACY_MMC(devtypeu, devtypel, instance) \
|
||||||
|
"bootcmd_" #devtypel #instance "=" \
|
||||||
|
"setenv mmcdev " #instance"; "\
|
||||||
|
"setenv bootpart " #instance":2 ; "\
|
||||||
|
"run mmcboot\0"
|
||||||
|
|
||||||
|
#define BOOTENV_DEV_NAME_LEGACY_MMC(devtypeu, devtypel, instance) \
|
||||||
|
#devtypel #instance " "
|
||||||
|
|
||||||
|
#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(LEGACY_MMC, legacy_mmc, 0) \
|
||||||
|
func(MMC, mmc, 1) \
|
||||||
|
func(LEGACY_MMC, legacy_mmc, 1) \
|
||||||
|
func(NAND, nand, 0) \
|
||||||
|
func(PXE, pxe, na) \
|
||||||
|
func(DHCP, dhcp, na)
|
||||||
|
|
||||||
|
#define CONFIG_BOOTCOMMAND \
|
||||||
|
"run findfdt; " \
|
||||||
|
"run distro_bootcmd"
|
||||||
|
|
||||||
|
#include <config_distro_bootcmd.h>
|
||||||
|
|
||||||
#ifndef CONFIG_SPL_BUILD
|
#ifndef CONFIG_SPL_BUILD
|
||||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||||
DEFAULT_LINUX_BOOT_ENV \
|
DEFAULT_LINUX_BOOT_ENV \
|
||||||
|
|
@ -160,16 +195,10 @@
|
||||||
"echo WARNING: Could not determine device tree to use; fi; \0" \
|
"echo WARNING: Could not determine device tree to use; fi; \0" \
|
||||||
NANDARGS \
|
NANDARGS \
|
||||||
NETARGS \
|
NETARGS \
|
||||||
DFUARGS
|
DFUARGS \
|
||||||
|
BOOTENV
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CONFIG_BOOTCOMMAND \
|
|
||||||
"run findfdt; " \
|
|
||||||
"run mmcboot;" \
|
|
||||||
"setenv mmcdev 1; " \
|
|
||||||
"setenv bootpart 1:2; " \
|
|
||||||
"run mmcboot;" \
|
|
||||||
"run nandboot;"
|
|
||||||
|
|
||||||
/* NS16550 Configuration */
|
/* NS16550 Configuration */
|
||||||
#define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
|
#define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue