Skip to contentSkip to conversation

ti: configs: Misc updates for config files

PATCH New Lokesh Vutla 2 participants 31 messages Mar 9, 2016 – Mar 17, 2016

lore
Share & tools
lore
#0 lore raw

cover 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 at 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(-)
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/10 ti_armv7_keystone2: configs: add usb mass storage support

From: Mugunthan V N <[email protected]>

Add USB mass storage support so that kernel can be read from connected usb storage.

---
 include/configs/ti_armv7_keystone2.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/ti_armv7_keystone2.h +1 -0
index 70a484e..39e9852 100644
@@ -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
Signature · 1 line
2.1.4
#2 lore raw

PATCH 1/10 ti_armv7_keystone2: configs: add usb mass storage support

Quoted 7 lines · Lokesh Vutla

From: Mugunthan V N <[email protected]>

Add USB mass storage support so that kernel can be read from connected usb storage.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160311/013beb35/attachment.sig>
#3 lore raw

PATCH 1/10 ti_armv7_keystone2: configs: add usb mass storage support

In reply to Lokesh Vutla
Quoted 8 lines · Lokesh Vutla

From: Mugunthan V N <[email protected]>

Add USB mass storage support so that kernel can be read from connected usb storage.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160316/901167ea/attachment.sig>
#4 lore raw

PATCH 2/10 ti_armv7_keystone2: env: Update UBIFS image paths

In reply to Lokesh Vutla

From: Carlos Hernandez <[email protected]>

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.

---
 include/configs/ti_armv7_keystone2.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
include/configs/ti_armv7_keystone2.h +5 -4
index 39e9852..85f5d64 100644
@@ -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"		\
Signature · 1 line
2.1.4
#5 lore raw

PATCH 2/10 ti_armv7_keystone2: env: Update UBIFS image paths

Quoted 9 lines · Lokesh Vutla

From: Carlos Hernandez <[email protected]>

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.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160311/7bff5ffc/attachment.sig>
#6 lore raw

PATCH 2/10 ti_armv7_keystone2: env: Update UBIFS image paths

In reply to Lokesh Vutla
Quoted 10 lines · Lokesh Vutla

From: Carlos Hernandez <[email protected]>

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160316/907bd37f/attachment.sig>
#7 lore raw

PATCH 3/10 ti_armv7_keystone2: env: Remove securedb.key.bin load

In reply to Lokesh Vutla

From: Carlos Hernandez <[email protected]>

securedb.key.bin is not supported so it should not be loaded by default init_ubi command.

---
 include/configs/ti_armv7_keystone2.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
include/configs/ti_armv7_keystone2.h +1 -2
index 85f5d64..e1effc0 100644
@@ -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"	\
Signature · 1 line
2.1.4
#8 lore raw

PATCH 3/10 ti_armv7_keystone2: env: Remove securedb.key.bin load

Quoted 7 lines · Lokesh Vutla

From: Carlos Hernandez <[email protected]>

securedb.key.bin is not supported so it should not be loaded by default init_ubi command.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160311/6ab24223/attachment.sig>
#9 lore raw

PATCH 3/10 ti_armv7_keystone2: env: Remove securedb.key.bin load

In reply to Lokesh Vutla
Quoted 8 lines · Lokesh Vutla

From: Carlos Hernandez <[email protected]>

securedb.key.bin is not supported so it should not be loaded by default init_ubi command.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160316/0ce4030f/attachment.sig>
#10 lore raw

PATCH 4/10 am335x: configs: Fix usb ether boot support

In reply to Lokesh Vutla

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.

---
 include/configs/ti_am335x_common.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
include/configs/ti_am335x_common.h +3 -1
index edbd820..4535b8c 100644
@@ -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
Signature · 1 line
2.1.4
#11 lore raw

PATCH 4/10 am335x: configs: Fix usb ether boot support

Quoted 9 lines · Lokesh Vutla

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.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160311/94a21574/attachment.sig>
#12 lore raw

PATCH 4/10 am335x: configs: Fix usb ether boot support

In reply to Lokesh Vutla
Quoted 10 lines · Lokesh Vutla

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160316/24016105/attachment.sig>
#13 lore raw

PATCH 5/10 am43xx: configs: Enable USB commands for non usb boot also

In reply to Lokesh Vutla

From: Mugunthan V N <[email protected]>

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.

---
 include/configs/am43xx_evm.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
include/configs/am43xx_evm.h +3 -1
index 1428aa9..0a96bd3 100644
@@ -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
Signature · 1 line
2.1.4
#14 lore raw

PATCH 5/10 am43xx: configs: Enable USB commands for non usb boot also

Quoted 9 lines · Lokesh Vutla

From: Mugunthan V N <[email protected]>

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.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160311/6cdfb8c5/attachment.sig>
#15 lore raw

PATCH 5/10 am43xx: configs: Enable USB commands for non usb boot also

In reply to Lokesh Vutla
Quoted 10 lines · Lokesh Vutla

From: Mugunthan V N <[email protected]>

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160316/00eaf6d2/attachment.sig>
#16 lore raw

PATCH 6/10 ti_armv7_common: env: Consolidate support for loading script and text env files

In reply to Lokesh Vutla

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.

---
 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(-)
include/configs/am335x_evm.h +5 -23
index 6ebe0b3..8b0a721 100644
@@ -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 */
include/configs/am43xx_evm.h +1 -12
index 0a96bd3..b982ed6 100644
@@ -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 \
include/configs/ti_armv7_common.h +24 -1
index 199612b..31079f6 100644
@@ -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,
include/configs/ti_omap4_common.h +1 -6
index 8b6c065..837fcd1 100644
@@ -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} ...; " \
include/configs/ti_omap5_common.h +1 -12
index d373cbc..8189fe9 100644
@@ -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; " \
Signature · 1 line
2.1.4
#17 lore raw

PATCH 6/10 ti_armv7_common: env: Consolidate support for loading script and text env files

Quoted 5 lines · Lokesh Vutla

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.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160311/9e8fb5b6/attachment.sig>
#18 lore raw

PATCH 6/10 ti_armv7_common: env: Consolidate support for loading script and text env files

In reply to Lokesh Vutla
Quoted 6 lines · Lokesh Vutla

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160316/f812c327/attachment.sig>
#19 lore raw

PATCH 7/10 k2g: env: Allow use of a script and plain text env files

In reply to Lokesh Vutla

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.

---
 include/configs/k2g_evm.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/k2g_evm.h +1 -0
index ca1e368..ba084c1 100644
@@ -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"
Signature · 1 line
2.1.4
#20 lore raw

PATCH 7/10 k2g: env: Allow use of a script and plain text env files

Quoted 5 lines · Lokesh Vutla

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.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160311/a98e1832/attachment.sig>
#21 lore raw

PATCH 7/10 k2g: env: Allow use of a script and plain text env files

In reply to Lokesh Vutla
Quoted 6 lines · Lokesh Vutla

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160316/9118c7cf/attachment.sig>
#22 lore raw

PATCH 8/10 k2g: configs: Add support to save env in MMC

In reply to Lokesh Vutla

Adding support to save env in MMC on k2g platforms, as it is the preferred peripheral in saving env.

---
 include/configs/k2g_evm.h | 6 ++++++
 1 file changed, 6 insertions(+)
include/configs/k2g_evm.h +6 -0
index ba084c1..2c70df1 100644
@@ -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
 
Signature · 1 line
2.1.4
#23 lore raw

PATCH 8/10 k2g: configs: Add support to save env in MMC

Quoted 4 lines · Lokesh Vutla

Adding support to save env in MMC on k2g platforms, as it is the preferred peripheral in saving env.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160311/d2bdd139/attachment.sig>
#24 lore raw

PATCH 8/10 k2g: configs: Add support to save env in MMC

In reply to Lokesh Vutla
Quoted 5 lines · Lokesh Vutla

Adding support to save env in MMC on k2g platforms, as it is the preferred peripheral in saving env.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160316/90b087c4/attachment.sig>
#25 lore raw

PATCH 9/10 keystone2: env: add env script for booting with an initramfs with firmware

In reply to Lokesh Vutla

From: Murali Karicheri <[email protected]>

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.

---
 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(-)
include/configs/k2e_evm.h +1 -0
index e053a54..daf37f6 100644
@@ -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"	\
include/configs/k2g_evm.h +2 -0
index 2c70df1..2e47763 100644
@@ -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; "							\
include/configs/k2hk_evm.h +1 -0
index 3cd2a85..a031ae4 100644
@@ -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"	\
include/configs/k2l_evm.h +1 -0
index 9bacfa4..829daa2 100644
@@ -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"	\
include/configs/ti_armv7_keystone2.h +12 -3
index e1effc0..9ea6392 100644
@@ -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							\
Signature · 1 line
2.1.4
#26 lore raw

PATCH 9/10 keystone2: env: add env script for booting with an initramfs with firmware

Quoted 14 lines · Lokesh Vutla

From: Murali Karicheri <[email protected]>

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.

Quoted 5 lines

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.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160311/4289ab61/attachment.sig>
#27 lore raw

PATCH 9/10 keystone2: env: add env script for booting with an initramfs with firmware

In reply to Lokesh Vutla
Quoted 14 lines · Lokesh Vutla

From: Murali Karicheri <[email protected]>

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.

Quoted 6 lines

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160316/97fcf350/attachment.sig>
#28 lore raw

PATCH 10/10 keystone2: env: Set mmc as default boot for k2g-evm

In reply to Lokesh Vutla

From: Yan Liu <[email protected]>

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

---
 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(-)
include/configs/k2e_evm.h +1 -0
index daf37f6..07f975b 100644
@@ -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"	\
include/configs/k2g_evm.h +1 -0
index 2e47763..7bc506f 100644
@@ -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"						\
include/configs/k2hk_evm.h +1 -0
index a031ae4..a268a86 100644
@@ -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"	\
include/configs/k2l_evm.h +1 -0
index 829daa2..f366e67 100644
@@ -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"	\
include/configs/ti_armv7_keystone2.h +0 -1
index 9ea6392..f8193c2 100644
@@ -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"						\
Signature · 1 line
2.1.4
#29 lore raw

PATCH 10/10 keystone2: env: Set mmc as default boot for k2g-evm

Quoted 8 lines · Lokesh Vutla

From: Yan Liu <[email protected]>

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

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160311/b4967443/attachment.sig>
#30 lore raw

PATCH 10/10 keystone2: env: Set mmc as default boot for k2g-evm

In reply to Lokesh Vutla
Quoted 9 lines · Lokesh Vutla

From: Yan Liu <[email protected]>

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

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160316/f5ab41de/attachment.sig>