[U-Boot] [PATCH 00/10] ti: configs: Misc updates for config files

This series does miscellaneous updates to config files and environment variables.
This depends on the TI's PMMC support on K2G SoC series posted by Nishanth Menon[1]
[1] https://www.mail-archive.com/u-boot@lists.denx.de/msg204671.html
Carlos Hernandez (2): ti_armv7_keystone2: env: Update UBIFS image paths ti_armv7_keystone2: env: Remove securedb.key.bin load
Lokesh Vutla (4): am335x: configs: Fix usb ether boot support ti_armv7_common: env: Consolidate support for loading script and text env files k2g: env: Allow use of a script and plain text env files k2g: configs: Add support to save env in MMC
Mugunthan V N (2): ti_armv7_keystone2: configs: add usb mass storage support am43xx: configs: Enable USB commands for non usb boot also
Murali Karicheri (1): keystone2: env: add env script for booting with an initramfs with firmware
Yan Liu (1): keystone2: env: Set mmc as default boot for k2g-evm
include/configs/am335x_evm.h | 28 +++++----------------------- include/configs/am43xx_evm.h | 17 ++++------------- include/configs/k2e_evm.h | 2 ++ include/configs/k2g_evm.h | 10 ++++++++++ include/configs/k2hk_evm.h | 2 ++ include/configs/k2l_evm.h | 2 ++ include/configs/ti_am335x_common.h | 4 +++- include/configs/ti_armv7_common.h | 25 ++++++++++++++++++++++++- include/configs/ti_armv7_keystone2.h | 27 ++++++++++++++++++--------- include/configs/ti_omap4_common.h | 7 +------ include/configs/ti_omap5_common.h | 13 +------------ 11 files changed, 72 insertions(+), 65 deletions(-)

From: Mugunthan V N mugunthanvnm@ti.com
Add USB mass storage support so that kernel can be read from connected usb storage.
Signed-off-by: Mugunthan V N mugunthanvnm@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com --- include/configs/ti_armv7_keystone2.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h index 70a484e..39e9852 100644 --- a/include/configs/ti_armv7_keystone2.h +++ b/include/configs/ti_armv7_keystone2.h @@ -195,6 +195,7 @@ #define CONFIG_USB_XHCI_DWC3 #define CONFIG_USB_XHCI_KEYSTONE #define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2 +#define CONFIG_USB_STORAGE #define CONFIG_EFI_PARTITION #define CONFIG_FS_FAT #define CONFIG_SYS_CACHELINE_SIZE 64

On Wed, Mar 09, 2016 at 03:39:30PM +0530, Lokesh Vutla wrote:
From: Mugunthan V N mugunthanvnm@ti.com
Add USB mass storage support so that kernel can be read from connected usb storage.
Signed-off-by: Mugunthan V N mugunthanvnm@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com
Reviewed-by: Tom Rini trini@konsulko.com

On Wed, Mar 09, 2016 at 03:39:30PM +0530, Lokesh Vutla wrote:
From: Mugunthan V N mugunthanvnm@ti.com
Add USB mass storage support so that kernel can be read from connected usb storage.
Signed-off-by: Mugunthan V N mugunthanvnm@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com Reviewed-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

From: Carlos Hernandez ceh@ti.com
UBI images created by OE does not contain boot partition by default, instead kernel and dtb are placed in /boot directory inside rootfs partition. So update env commands to load files from correct location.
Signed-off-by: Carlos Hernandez ceh@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com --- include/configs/ti_armv7_keystone2.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h index 39e9852..85f5d64 100644 --- a/include/configs/ti_armv7_keystone2.h +++ b/include/configs/ti_armv7_keystone2.h @@ -240,6 +240,7 @@ DEFAULT_LINUX_BOOT_ENV \ CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \ "boot=ubi\0" \ + "bootdir=/boot\0" \ "tftp_root=/\0" \ "nfs_root=/export\0" \ "mem_lpae=1\0" \ @@ -251,14 +252,14 @@ "run_kern=bootz ${loadaddr} - ${fdtaddr}\0" \ "init_net=run args_all args_net\0" \ "init_ubi=run args_all args_ubi; " \ - "ubi part ubifs; ubifsmount ubi:boot;" \ + "ubi part ubifs; ubifsmount ubi:rootfs;" \ "ubifsload ${addr_secdb_key} securedb.key.bin;\0" \ "get_fdt_net=dhcp ${fdtaddr} ${tftp_root}/${name_fdt}\0" \ - "get_fdt_ubi=ubifsload ${fdtaddr} ${name_fdt}\0" \ + "get_fdt_ubi=ubifsload ${fdtaddr} ${bootdir}/${name_fdt}\0" \ "get_kern_net=dhcp ${loadaddr} ${tftp_root}/${name_kern}\0" \ - "get_kern_ubi=ubifsload ${loadaddr} ${name_kern}\0" \ + "get_kern_ubi=ubifsload ${loadaddr} ${bootdir}/${name_kern}\0" \ "get_mon_net=dhcp ${addr_mon} ${tftp_root}/${name_mon}\0" \ - "get_mon_ubi=ubifsload ${addr_mon} ${name_mon}\0" \ + "get_mon_ubi=ubifsload ${addr_mon} ${bootdir}/${name_mon}\0" \ "get_uboot_net=dhcp ${loadaddr} ${tftp_root}/${name_uboot}\0" \ "burn_uboot_spi=sf probe; sf erase 0 0x80000; " \ "sf write ${loadaddr} 0 ${filesize}\0" \

On Wed, Mar 09, 2016 at 03:39:31PM +0530, Lokesh Vutla wrote:
From: Carlos Hernandez ceh@ti.com
UBI images created by OE does not contain boot partition by default, instead kernel and dtb are placed in /boot directory inside rootfs partition. So update env commands to load files from correct location.
Signed-off-by: Carlos Hernandez ceh@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com
Reviewed-by: Tom Rini trini@konsulko.com

On Wed, Mar 09, 2016 at 03:39:31PM +0530, Lokesh Vutla wrote:
From: Carlos Hernandez ceh@ti.com
UBI images created by OE does not contain boot partition by default, instead kernel and dtb are placed in /boot directory inside rootfs partition. So update env commands to load files from correct location.
Signed-off-by: Carlos Hernandez ceh@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com Reviewed-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

From: Carlos Hernandez ceh@ti.com
securedb.key.bin is not supported so it should not be loaded by default init_ubi command.
Signed-off-by: Carlos Hernandez ceh@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com --- include/configs/ti_armv7_keystone2.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h index 85f5d64..e1effc0 100644 --- a/include/configs/ti_armv7_keystone2.h +++ b/include/configs/ti_armv7_keystone2.h @@ -252,8 +252,7 @@ "run_kern=bootz ${loadaddr} - ${fdtaddr}\0" \ "init_net=run args_all args_net\0" \ "init_ubi=run args_all args_ubi; " \ - "ubi part ubifs; ubifsmount ubi:rootfs;" \ - "ubifsload ${addr_secdb_key} securedb.key.bin;\0" \ + "ubi part ubifs; ubifsmount ubi:rootfs;\0" \ "get_fdt_net=dhcp ${fdtaddr} ${tftp_root}/${name_fdt}\0" \ "get_fdt_ubi=ubifsload ${fdtaddr} ${bootdir}/${name_fdt}\0" \ "get_kern_net=dhcp ${loadaddr} ${tftp_root}/${name_kern}\0" \

On Wed, Mar 09, 2016 at 03:39:32PM +0530, Lokesh Vutla wrote:
From: Carlos Hernandez ceh@ti.com
securedb.key.bin is not supported so it should not be loaded by default init_ubi command.
Signed-off-by: Carlos Hernandez ceh@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com
Reviewed-by: Tom Rini trini@konsulko.com

On Wed, Mar 09, 2016 at 03:39:32PM +0530, Lokesh Vutla wrote:
From: Carlos Hernandez ceh@ti.com
securedb.key.bin is not supported so it should not be loaded by default init_ubi command.
Signed-off-by: Carlos Hernandez ceh@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com Reviewed-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

CONFIG_SPL_NET_VCI_STRING is available only with BOOTP. So if CMD_DHCP is enabled for SPL in usb ether boot, it will not pass the right vendor name and failing to download the right file. Also all the net CMD_* are not required in SPL builds. So defining these only for non-SPL builds.
Reported-by: Yan Liu yan-liu@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com Reviewed-by: Sekhar Nori nsekhar@ti.com --- include/configs/ti_am335x_common.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/configs/ti_am335x_common.h b/include/configs/ti_am335x_common.h index edbd820..4535b8c 100644 --- a/include/configs/ti_am335x_common.h +++ b/include/configs/ti_am335x_common.h @@ -28,6 +28,7 @@ #endif #define CONFIG_SYS_NS16550_CLK 48000000
+#ifndef CONFIG_SPL_BUILD /* Network defines. */ #define CONFIG_CMD_DHCP #define CONFIG_CMD_MII @@ -38,9 +39,10 @@ #define CONFIG_BOOTP_SUBNETMASK #define CONFIG_NET_RETRY_COUNT 10 #define CONFIG_CMD_PING -#define CONFIG_DRIVER_TI_CPSW /* Driver for IP block */ #define CONFIG_MII /* Required in net/eth.c */ +#endif
+#define CONFIG_DRIVER_TI_CPSW /* Driver for IP block */ /* * RTC related defines. To use bootcount you must set bootlimit in the * environment to a non-zero value and enable CONFIG_BOOTCOUNT_LIMIT

On Wed, Mar 09, 2016 at 03:39:33PM +0530, Lokesh Vutla wrote:
CONFIG_SPL_NET_VCI_STRING is available only with BOOTP. So if CMD_DHCP is enabled for SPL in usb ether boot, it will not pass the right vendor name and failing to download the right file. Also all the net CMD_* are not required in SPL builds. So defining these only for non-SPL builds.
Reported-by: Yan Liu yan-liu@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com Reviewed-by: Sekhar Nori nsekhar@ti.com
Reviewed-by: Tom Rini trini@konsulko.com

On Wed, Mar 09, 2016 at 03:39:33PM +0530, Lokesh Vutla wrote:
CONFIG_SPL_NET_VCI_STRING is available only with BOOTP. So if CMD_DHCP is enabled for SPL in usb ether boot, it will not pass the right vendor name and failing to download the right file. Also all the net CMD_* are not required in SPL builds. So defining these only for non-SPL builds.
Reported-by: Yan Liu yan-liu@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com Reviewed-by: Sekhar Nori nsekhar@ti.com Reviewed-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

From: Mugunthan V N mugunthanvnm@ti.com
With commit aee119bd70b8 ('am43xx_evm: add usb host boot support') usb commands is removed from U-boot second stage and enbaled only on USB boot config. Fixing this by enable USB commands for both USB boot and in second stage u-boot.
Signed-off-by: Mugunthan V N mugunthanvnm@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com --- include/configs/am43xx_evm.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index 1428aa9..0a96bd3 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -105,8 +105,10 @@ /* SPL USB Support */ #ifdef CONFIG_SPL_USB_HOST_SUPPORT #define CONFIG_SPL_USB_SUPPORT -#define CONFIG_SYS_USB_FAT_BOOT_PARTITION 1 +#endif
+#if defined(CONFIG_SPL_USB_HOST_SUPPORT) || !defined(CONFIG_SPL_BUILD) +#define CONFIG_SYS_USB_FAT_BOOT_PARTITION 1 #define CONFIG_CMD_USB #define CONFIG_USB_HOST #define CONFIG_USB_XHCI

On Wed, Mar 09, 2016 at 03:39:34PM +0530, Lokesh Vutla wrote:
From: Mugunthan V N mugunthanvnm@ti.com
With commit aee119bd70b8 ('am43xx_evm: add usb host boot support') usb commands is removed from U-boot second stage and enbaled only on USB boot config. Fixing this by enable USB commands for both USB boot and in second stage u-boot.
Signed-off-by: Mugunthan V N mugunthanvnm@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com
Reviewed-by: Tom Rini trini@konsulko.com

On Wed, Mar 09, 2016 at 03:39:34PM +0530, Lokesh Vutla wrote:
From: Mugunthan V N mugunthanvnm@ti.com
With commit aee119bd70b8 ('am43xx_evm: add usb host boot support') usb commands is removed from U-boot second stage and enbaled only on USB boot config. Fixing this by enable USB commands for both USB boot and in second stage u-boot.
Signed-off-by: Mugunthan V N mugunthanvnm@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com Reviewed-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

Support for loading bootscript and text env file is duplicated in all TI platforms. Add this information to DEFAULT_MMC_TI_ARGS so that it can be reused in all TI platforms.
Signed-off-by: Lokesh Vutla lokeshvutla@ti.com --- include/configs/am335x_evm.h | 28 +++++----------------------- include/configs/am43xx_evm.h | 13 +------------ include/configs/ti_armv7_common.h | 25 ++++++++++++++++++++++++- include/configs/ti_omap4_common.h | 7 +------ include/configs/ti_omap5_common.h | 13 +------------ 5 files changed, 32 insertions(+), 54 deletions(-)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 6ebe0b3..8b0a721 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -94,6 +94,7 @@
#define CONFIG_BOOTCOMMAND \ "run findfdt; " \ + "run envboot; " \ "run distro_bootcmd"
#include <config_distro_bootcmd.h> @@ -123,13 +124,6 @@ "${optargs} " \ "root=${spiroot} " \ "rootfstype=${spirootfstype}\0" \ - "bootenv=uEnv.txt\0" \ - "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ - "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ - "source ${loadaddr}\0" \ - "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ - "importbootenv=echo Importing environment from mmc ...; " \ - "env import -t -r $loadaddr $filesize\0" \ "ramargs=setenv bootargs console=${console} " \ "${optargs} " \ "root=${ramroot} " \ @@ -154,21 +148,10 @@ "mmcboot=mmc dev ${mmcdev}; " \ "if mmc rescan; then " \ "echo SD/MMC found on device ${mmcdev};" \ - "if run loadbootscript; then " \ - "run bootscript;" \ - "else " \ - "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 mmcloados;" \ - "fi;" \ - "fi ;" \ + "run envboot; " \ + "if run loadimage; then " \ + "run mmcloados;" \ + "fi;" \ "fi;\0" \ "spiboot=echo Booting from spi ...; " \ "run spiargs; " \ @@ -200,7 +183,6 @@ BOOTENV #endif
- /* NS16550 Configuration */ #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */ #define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */ diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index 0a96bd3..b982ed6 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -259,10 +259,6 @@ "${optargs} " \ "root=${usbroot} " \ "rootfstype=${usbrootfstype}\0" \ - "bootenv=uEnv.txt\0" \ - "loadbootenv=load ${devtype} ${devnum} ${loadaddr} ${bootenv}\0" \ - "importbootenv=echo Importing environment from mmc ...; " \ - "env import -t $loadaddr $filesize\0" \ "ramargs=setenv bootargs console=${console} " \ "${optargs} " \ "root=${ramroot} " \ @@ -275,14 +271,6 @@ "setenv devtype mmc; " \ "if mmc rescan; then " \ "echo SD/MMC found on device ${devnum};" \ - "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 mmc${mmcdev} ...; " \ @@ -329,6 +317,7 @@
#define CONFIG_BOOTCOMMAND \ "run findfdt; " \ + "run envboot;" \ "run mmcboot;" \ "run usbboot;" \ NANDBOOT \ diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h index 199612b..31079f6 100644 --- a/include/configs/ti_armv7_common.h +++ b/include/configs/ti_armv7_common.h @@ -64,7 +64,30 @@ "args_mmc=run finduuid;setenv bootargs console=${console} " \ "${optargs} " \ "root=PARTUUID=${uuid} rw " \ - "rootfstype=${mmcrootfstype}\0" + "rootfstype=${mmcrootfstype}\0" \ + "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ + "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ + "source ${loadaddr}\0" \ + "bootenvfile=uEnv.txt\0" \ + "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \ + "env import -t ${loadaddr} ${filesize}\0" \ + "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \ + "envboot=mmc dev ${mmcdev}; " \ + "if mmc rescan; then " \ + "echo SD/MMC found on device ${mmcdev};" \ + "if run loadbootscript; then " \ + "run bootscript;" \ + "else " \ + "if run loadbootenv; then " \ + "echo Loaded env from ${bootenvfile};" \ + "run importbootenv;" \ + "fi;" \ + "if test -n $uenvcmd; then " \ + "echo Running uenvcmd ...;" \ + "run uenvcmd;" \ + "fi;" \ + "fi;" \ + "fi;\0" \
/* * DDR information. If the CONFIG_NR_DRAM_BANKS is not defined, diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h index 8b6c065..837fcd1 100644 --- a/include/configs/ti_omap4_common.h +++ b/include/configs/ti_omap4_common.h @@ -104,6 +104,7 @@
#define CONFIG_BOOTCOMMAND \ "run findfdt; " \ + "run envboot; " \ "run distro_bootcmd"
#include <config_distro_bootcmd.h> @@ -118,12 +119,6 @@ "bootfile=zImage\0" \ "usbtty=cdc_acm\0" \ "vram=16M\0" \ - "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ - "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ - "source ${loadaddr}\0" \ - "loadbootenv=load mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \ - "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \ - "env import -t ${loadaddr} ${filesize}\0" \ "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ "loaduimage=load mmc ${mmcdev} ${loadaddr} uImage\0" \ "mmcboot=echo Booting from mmc${mmcdev} ...; " \ diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h index d373cbc..8189fe9 100644 --- a/include/configs/ti_omap5_common.h +++ b/include/configs/ti_omap5_common.h @@ -85,22 +85,10 @@ "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \ "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ "source ${loadaddr}\0" \ - "bootenv=uEnv.txt\0" \ - "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ - "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \ - "env import -t ${loadaddr} ${filesize}\0" \ "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ "mmcboot=mmc dev ${mmcdev}; " \ "if mmc rescan; then " \ "echo SD/MMC found on device ${mmcdev};" \ - "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 mmc${mmcdev} ...; " \ @@ -133,6 +121,7 @@ "echo Booting into fastboot ...; fastboot 0;" \ "fi;" \ "run findfdt; " \ + "run envboot; " \ "run mmcboot;" \ "setenv mmcdev 1; " \ "setenv bootpart 1:2; " \

On Wed, Mar 09, 2016 at 03:39:35PM +0530, Lokesh Vutla wrote:
Support for loading bootscript and text env file is duplicated in all TI platforms. Add this information to DEFAULT_MMC_TI_ARGS so that it can be reused in all TI platforms.
Signed-off-by: Lokesh Vutla lokeshvutla@ti.com
Reviewed-by: Tom Rini trini@konsulko.com

On Wed, Mar 09, 2016 at 03:39:35PM +0530, Lokesh Vutla wrote:
Support for loading bootscript and text env file is duplicated in all TI platforms. Add this information to DEFAULT_MMC_TI_ARGS so that it can be reused in all TI platforms.
Signed-off-by: Lokesh Vutla lokeshvutla@ti.com Reviewed-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

For development purposes, it is easier to use the env import command and plain text or script files instead of script-images. So allow u-boot to load env var from a text file or a script file.
Signed-off-by: Lokesh Vutla lokeshvutla@ti.com --- include/configs/k2g_evm.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/k2g_evm.h b/include/configs/k2g_evm.h index ca1e368..ba084c1 100644 --- a/include/configs/k2g_evm.h +++ b/include/configs/k2g_evm.h @@ -36,6 +36,7 @@ "get_mon_mmc=load mmc ${bootpart} ${addr_mon} ${bootdir}/${name_mon}\0"\
#define CONFIG_BOOTCOMMAND \ + "run envboot; " \ "run set_name_pmmc init_${boot} get_pmmc_${boot} run_pmmc " \ "get_fdt_${boot} get_mon_${boot} get_kern_${boot} " \ "run_mon run_kern"

On Wed, Mar 09, 2016 at 03:39:36PM +0530, Lokesh Vutla wrote:
For development purposes, it is easier to use the env import command and plain text or script files instead of script-images. So allow u-boot to load env var from a text file or a script file.
Signed-off-by: Lokesh Vutla lokeshvutla@ti.com
Reviewed-by: Tom Rini trini@konsulko.com

On Wed, Mar 09, 2016 at 03:39:36PM +0530, Lokesh Vutla wrote:
For development purposes, it is easier to use the env import command and plain text or script files instead of script-images. So allow u-boot to load env var from a text file or a script file.
Signed-off-by: Lokesh Vutla lokeshvutla@ti.com Reviewed-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

Adding support to save env in MMC on k2g platforms, as it is the preferred peripheral in saving env.
Signed-off-by: Lokesh Vutla lokeshvutla@ti.com --- include/configs/k2g_evm.h | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/include/configs/k2g_evm.h b/include/configs/k2g_evm.h index ba084c1..2c70df1 100644 --- a/include/configs/k2g_evm.h +++ b/include/configs/k2g_evm.h @@ -61,6 +61,12 @@ #define CONFIG_OMAP_HSMMC #define CONFIG_CMD_MMC
+#undef CONFIG_ENV_IS_IN_NAND +#define CONFIG_ENV_IS_IN_FAT +#define FAT_ENV_INTERFACE "mmc" +#define FAT_ENV_DEVICE_AND_PART "0:1" +#define FAT_ENV_FILE "uboot.env" + #define CONFIG_SF_DEFAULT_BUS 1 #define CONFIG_SF_DEFAULT_CS 0

On Wed, Mar 09, 2016 at 03:39:37PM +0530, Lokesh Vutla wrote:
Adding support to save env in MMC on k2g platforms, as it is the preferred peripheral in saving env.
Signed-off-by: Lokesh Vutla lokeshvutla@ti.com
Reviewed-by: Tom Rini trini@konsulko.com

On Wed, Mar 09, 2016 at 03:39:37PM +0530, Lokesh Vutla wrote:
Adding support to save env in MMC on k2g platforms, as it is the preferred peripheral in saving env.
Signed-off-by: Lokesh Vutla lokeshvutla@ti.com Reviewed-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

From: Murali Karicheri m-karicheri2@ti.com
This patch updates the env script to include a initramfs with firmware loaded and provided to kernel through second argument of bootz command during boot. Defined DEFAULT_FW_INITRAMFS_BOOT_ENV to have all of the required env variables and use it in evm specific config file.
The K2 linux drivers for PCIe and NetCP (1G, 10G) requires serdes firmwares. These requires firmware to be available early through the boot process in some cases to satisfy firmware requests from driver. Hence use a small initramfs to provide the same and update boot env to accommodate this in the boot flow. This method is used when rootfs is nfs and ubifs. This fs contains just lib/firmware folder with all required firmware.
When rootfs is on initramfs, then the filesystem has the firmware under lib/firmware and this early initramfs is not required and is not used.
Signed-off-by: Murali Karicheri m-karicheri2@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com --- include/configs/k2e_evm.h | 1 + include/configs/k2g_evm.h | 2 ++ include/configs/k2hk_evm.h | 1 + include/configs/k2l_evm.h | 1 + include/configs/ti_armv7_keystone2.h | 15 ++++++++++++--- 5 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/include/configs/k2e_evm.h b/include/configs/k2e_evm.h index e053a54..daf37f6 100644 --- a/include/configs/k2e_evm.h +++ b/include/configs/k2e_evm.h @@ -16,6 +16,7 @@
/* U-Boot general configuration */ #define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \ + DEFAULT_FW_INITRAMFS_BOOT_ENV \ "addr_mon=0x0c140000\0" \ "args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \ "root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,2048\0" \ diff --git a/include/configs/k2g_evm.h b/include/configs/k2g_evm.h index 2c70df1..2e47763 100644 --- a/include/configs/k2g_evm.h +++ b/include/configs/k2g_evm.h @@ -21,6 +21,7 @@ "console=ttyS0,115200n8\0" \ "bootpart=0:2\0" \ "bootdir=/boot\0" \ + "rd_spec=-\0" \ "addr_mon=0x0c040000\0" \ "args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \ "root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,2048\0" \ @@ -34,6 +35,7 @@ "get_kern_mmc=load mmc ${bootpart} ${loadaddr} " \ "${bootdir}/${name_kern}\0" \ "get_mon_mmc=load mmc ${bootpart} ${addr_mon} ${bootdir}/${name_mon}\0"\ + "name_fs=arago-base-tisdk-image-k2g-evm.cpio\0"
#define CONFIG_BOOTCOMMAND \ "run envboot; " \ diff --git a/include/configs/k2hk_evm.h b/include/configs/k2hk_evm.h index 3cd2a85..a031ae4 100644 --- a/include/configs/k2hk_evm.h +++ b/include/configs/k2hk_evm.h @@ -16,6 +16,7 @@
/* U-Boot general configuration */ #define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \ + DEFAULT_FW_INITRAMFS_BOOT_ENV \ "addr_mon=0x0c5f0000\0" \ "args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \ "root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,2048\0" \ diff --git a/include/configs/k2l_evm.h b/include/configs/k2l_evm.h index 9bacfa4..829daa2 100644 --- a/include/configs/k2l_evm.h +++ b/include/configs/k2l_evm.h @@ -16,6 +16,7 @@
/* U-Boot general configuration */ #define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \ + DEFAULT_FW_INITRAMFS_BOOT_ENV \ "addr_mon=0x0c140000\0" \ "args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \ "root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,4096\0" \ diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h index e1effc0..9ea6392 100644 --- a/include/configs/ti_armv7_keystone2.h +++ b/include/configs/ti_armv7_keystone2.h @@ -224,6 +224,15 @@ /* EDMA3 */ #define CONFIG_TI_EDMA3
+#define DEFAULT_FW_INITRAMFS_BOOT_ENV \ + "name_fw_rd=k2-fw-initrd.cpio.gz\0" \ + "set_rd_spec=setenv rd_spec ${rdaddr}:${filesize}\0" \ + "init_fw_rd_net=dhcp ${rdaddr} ${tftp_root}/${name_fw_rd}; " \ + "run set_rd_spec\0" \ + "init_fw_rd_ramfs=setenv rd_spec -\0" \ + "init_fw_rd_ubi=ubifsload ${rdaddr} ${bootdir}/${name_fw_rd}; " \ + "run set_rd_spec\0" \ + #define DEFAULT_PMMC_BOOT_ENV \ "set_name_pmmc=setenv name_pmmc ti-sci-firmware-${soc_variant}.bin\0" \ "dev_pmmc=0\0" \ @@ -249,7 +258,7 @@ "addr_secdb_key=0xc000000\0" \ "name_kern=zImage\0" \ "run_mon=mon_install ${addr_mon}\0" \ - "run_kern=bootz ${loadaddr} - ${fdtaddr}\0" \ + "run_kern=bootz ${loadaddr} ${rd_spec} ${fdtaddr}\0" \ "init_net=run args_all args_net\0" \ "init_ubi=run args_all args_ubi; " \ "ubi part ubifs; ubifsmount ubi:rootfs;\0" \ @@ -286,8 +295,8 @@
#ifndef CONFIG_BOOTCOMMAND #define CONFIG_BOOTCOMMAND \ - "run init_${boot} get_fdt_${boot} get_mon_${boot} " \ - "get_kern_${boot} run_mon run_kern" + "run init_${boot} init_fw_rd_${boot} get_fdt_${boot} " \ + "get_mon_${boot} get_kern_${boot} run_mon run_kern" #endif
#define CONFIG_BOOTARGS \

On Wed, Mar 09, 2016 at 03:39:38PM +0530, Lokesh Vutla wrote:
From: Murali Karicheri m-karicheri2@ti.com
This patch updates the env script to include a initramfs with firmware loaded and provided to kernel through second argument of bootz command during boot. Defined DEFAULT_FW_INITRAMFS_BOOT_ENV to have all of the required env variables and use it in evm specific config file.
The K2 linux drivers for PCIe and NetCP (1G, 10G) requires serdes firmwares. These requires firmware to be available early through the boot process in some cases to satisfy firmware requests from driver. Hence use a small initramfs to provide the same and update boot env to accommodate this in the boot flow. This method is used when rootfs is nfs and ubifs. This fs contains just lib/firmware folder with all required firmware.
When rootfs is on initramfs, then the filesystem has the firmware under lib/firmware and this early initramfs is not required and is not used.
Signed-off-by: Murali Karicheri m-karicheri2@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com
Reviewed-by: Tom Rini trini@konsulko.com

On Wed, Mar 09, 2016 at 03:39:38PM +0530, Lokesh Vutla wrote:
From: Murali Karicheri m-karicheri2@ti.com
This patch updates the env script to include a initramfs with firmware loaded and provided to kernel through second argument of bootz command during boot. Defined DEFAULT_FW_INITRAMFS_BOOT_ENV to have all of the required env variables and use it in evm specific config file.
The K2 linux drivers for PCIe and NetCP (1G, 10G) requires serdes firmwares. These requires firmware to be available early through the boot process in some cases to satisfy firmware requests from driver. Hence use a small initramfs to provide the same and update boot env to accommodate this in the boot flow. This method is used when rootfs is nfs and ubifs. This fs contains just lib/firmware folder with all required firmware.
When rootfs is on initramfs, then the filesystem has the firmware under lib/firmware and this early initramfs is not required and is not used.
Signed-off-by: Murali Karicheri m-karicheri2@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com Reviewed-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

From: Yan Liu yan-liu@ti.com
For k2l, k2e and k2hk, ubi is set to default boot in uboot environment settings; while for k2g, mmc should be the default boot. This patch is to set mmc as default for k2g-evm
Signed-off-by: Yan Liu yan-liu@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com --- include/configs/k2e_evm.h | 1 + include/configs/k2g_evm.h | 1 + include/configs/k2hk_evm.h | 1 + include/configs/k2l_evm.h | 1 + include/configs/ti_armv7_keystone2.h | 1 - 5 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/configs/k2e_evm.h b/include/configs/k2e_evm.h index daf37f6..07f975b 100644 --- a/include/configs/k2e_evm.h +++ b/include/configs/k2e_evm.h @@ -17,6 +17,7 @@ /* U-Boot general configuration */ #define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \ DEFAULT_FW_INITRAMFS_BOOT_ENV \ + "boot=ubi\0" \ "addr_mon=0x0c140000\0" \ "args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \ "root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,2048\0" \ diff --git a/include/configs/k2g_evm.h b/include/configs/k2g_evm.h index 2e47763..7bc506f 100644 --- a/include/configs/k2g_evm.h +++ b/include/configs/k2g_evm.h @@ -18,6 +18,7 @@ #define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \ DEFAULT_MMC_TI_ARGS \ DEFAULT_PMMC_BOOT_ENV \ + "boot=mmc\0" \ "console=ttyS0,115200n8\0" \ "bootpart=0:2\0" \ "bootdir=/boot\0" \ diff --git a/include/configs/k2hk_evm.h b/include/configs/k2hk_evm.h index a031ae4..a268a86 100644 --- a/include/configs/k2hk_evm.h +++ b/include/configs/k2hk_evm.h @@ -17,6 +17,7 @@ /* U-Boot general configuration */ #define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \ DEFAULT_FW_INITRAMFS_BOOT_ENV \ + "boot=ubi\0" \ "addr_mon=0x0c5f0000\0" \ "args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \ "root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,2048\0" \ diff --git a/include/configs/k2l_evm.h b/include/configs/k2l_evm.h index 829daa2..f366e67 100644 --- a/include/configs/k2l_evm.h +++ b/include/configs/k2l_evm.h @@ -17,6 +17,7 @@ /* U-Boot general configuration */ #define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \ DEFAULT_FW_INITRAMFS_BOOT_ENV \ + "boot=ubi\0" \ "addr_mon=0x0c140000\0" \ "args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \ "root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,4096\0" \ diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h index 9ea6392..f8193c2 100644 --- a/include/configs/ti_armv7_keystone2.h +++ b/include/configs/ti_armv7_keystone2.h @@ -248,7 +248,6 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \ - "boot=ubi\0" \ "bootdir=/boot\0" \ "tftp_root=/\0" \ "nfs_root=/export\0" \

On Wed, Mar 09, 2016 at 03:39:39PM +0530, Lokesh Vutla wrote:
From: Yan Liu yan-liu@ti.com
For k2l, k2e and k2hk, ubi is set to default boot in uboot environment settings; while for k2g, mmc should be the default boot. This patch is to set mmc as default for k2g-evm
Signed-off-by: Yan Liu yan-liu@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com
Reviewed-by: Tom Rini trini@konsulko.com

On Wed, Mar 09, 2016 at 03:39:39PM +0530, Lokesh Vutla wrote:
From: Yan Liu yan-liu@ti.com
For k2l, k2e and k2hk, ubi is set to default boot in uboot environment settings; while for k2g, mmc should be the default boot. This patch is to set mmc as default for k2g-evm
Signed-off-by: Yan Liu yan-liu@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com Reviewed-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!
participants (2)
-
Lokesh Vutla
-
Tom Rini