From cd539722680e4463fcfcf2335f0cf3df1663345f Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Tue, 29 Sep 2015 09:43:34 +0100 Subject: [PATCH 4/5] am33xx: add support for generic distro boot --- include/configs/am335x_evm.h | 28 ++++++++++++++++++---------- include/configs/ti_armv7_common.h | 1 + 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 3cf768e..bf78902 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -18,6 +18,21 @@ #include +#include + +#define BOOTENV_BOOT_PARTITIONS "1 2" + +#define BOOTENV_INIT_COMMAND "run findfdt ;" +#ifdef CONFIG_NAND +#define BOOTENV_POST_COMMAND "run nandboot ;" +#endif + +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 0) \ + func(MMC, mmc, 1) + +#include + #ifndef CONFIG_SPL_BUILD #ifndef CONFIG_FIT # define CONFIG_FIT @@ -72,7 +87,7 @@ DEFAULT_LINUX_BOOT_ENV \ DEFAULT_MMC_TI_ARGS \ "boot_fdt=try\0" \ - "bootpart=0:2\0" \ + "bootpart=1\0" \ "bootdir=/boot\0" \ "bootfile=zImage\0" \ "fdtfile=undefined\0" \ @@ -160,17 +175,10 @@ "echo WARNING: Could not determine device tree to use; fi; \0" \ NANDARGS \ NETARGS \ - DFUARGS + DFUARGS \ + BOOTENV #endif -#define CONFIG_BOOTCOMMAND \ - "run findfdt; " \ - "run mmcboot;" \ - "setenv mmcdev 1; " \ - "setenv bootpart 1:2; " \ - "run mmcboot;" \ - "run nandboot;" - /* NS16550 Configuration */ #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */ #define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */ diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h index 6dc6515..684d616 100644 --- a/include/configs/ti_armv7_common.h +++ b/include/configs/ti_armv7_common.h @@ -52,6 +52,7 @@ #define DEFAULT_LINUX_BOOT_ENV \ "loadaddr=0x82000000\0" \ "kernel_addr_r=0x82000000\0" \ + "scriptaddr=0x82000000\0" \ "fdtaddr=0x88000000\0" \ "fdt_addr_r=0x88000000\0" \ "rdaddr=0x88080000\0" \ -- 2.5.0