Skip to contentSkip to conversation

arm: dra7xx: Update the EXTRA_ENV_SETTINGS

PATCH Superseded Dan Murphy 2 participants 4 messages Jun 4, 2013 – Jun 5, 2013

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Dan Murphy

author
#0 lore raw

PATCH v2 1/1 arm: dra7xx: Update the EXTRA_ENV_SETTINGS

Update the EXTRA_ENV_SETTING for the dra7xx.
The console needs to be set to ttyO0 and the
findfdt needs to be updated to load the
dra7xx-evm.dtb file.

---
v2 - Updated with side bar maintainer comments.

 include/configs/omap5_common.h |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
include/configs/omap5_common.h +10 -2
index deb5e9f..c5061dd 100644
@@ -142,9 +142,15 @@
 #define PARTS_DEFAULT
 #endif
 
+#ifdef CONFIG_DRA7XX
+#define CONFIG_CONSOLE_DEV		"ttyO0"
+#else
+#define CONFIG_CONSOLE_DEV		"ttyO2"
+#endif
+
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"loadaddr=0x82000000\0" \
-	"console=ttyO2,115200n8\0" \
+	"console=" CONFIG_CONSOLE_DEV ",115200n8\0" \
 	"fdt_high=0xffffffff\0" \
 	"fdtaddr=0x80f80000\0" \
 	"bootpart=0:2\0" \
@@ -174,7 +180,9 @@
 		"bootz ${loadaddr} - ${fdtaddr}\0" \
 	"findfdt="\
 		"if test $board_name = omap5_uevm; then " \
-			"setenv fdtfile omap5-uevm.dtb; fi;\0 " \
+			"setenv fdtfile omap5-uevm.dtb; fi; " \
+		"if test $board_name = dra7xx; then " \
+			"setenv fdtfile dra7-evm.dtb; fi;\0 " \
 	"loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0" \
 
 #define CONFIG_BOOTCOMMAND \
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH v2 1/1 arm: dra7xx: Update the EXTRA_ENV_SETTINGS

Quoted 19 lines · Dan Murphy

Update the EXTRA_ENV_SETTING for the dra7xx.
The console needs to be set to ttyO0 and the
findfdt needs to be updated to load the
dra7xx-evm.dtb file.

---
v2 - Updated with side bar maintainer comments.

 include/configs/omap5_common.h |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
include/configs/omap5_common.h +0 -0
index deb5e9f..c5061dd 100644
@@ -142,9 +142,15 @@
 #define PARTS_DEFAULT
 #endif
 

include/configs/omap5_common.h line 153

Quoted 10 lines
include/configs/omap5_common.h +7 -1
+#ifdef CONFIG_DRA7XX
+#define CONFIG_CONSOLE_DEV		"ttyO0"
+#else
+#define CONFIG_CONSOLE_DEV		"ttyO2"
+#endif
+
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"loadaddr=0x82000000\0" \
-	"console=ttyO2,115200n8\0" \
+	"console=" CONFIG_CONSOLE_DEV ",115200n8\0" \

Sorry, when we chatted on IRC I was being a bit more literal than you did. I want dra7xx_evm.h to have '#define CONSOLEDEV "ttyO0"' and omap5_uevm.h to have '#define CONSOLEDEV "ttyO2"' and omap5_common.h to have:
"console=" CONSOLEDEV ",115200n8\0" \

include/configs/omap5_common.h line 185

Quoted 8 lines
include/configs/omap5_common.h +3 -1
@@ -174,7 +180,9 @@
 		"bootz ${loadaddr} - ${fdtaddr}\0" \
 	"findfdt="\
 		"if test $board_name = omap5_uevm; then " \
-			"setenv fdtfile omap5-uevm.dtb; fi;\0 " \
+			"setenv fdtfile omap5-uevm.dtb; fi; " \
+		"if test $board_name = dra7xx; then " \
+			"setenv fdtfile dra7-evm.dtb; fi;\0 " \

This part is fine, thanks. If you've got time, add something like:
if test -z $fdtfile; then
echo "WARNING: Could not determine device tree to use"
fi

After testing I got the syntax right, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130604/be3171b7/attachment.pgp>
author
#2 lore raw

PATCH v2 1/1 arm: dra7xx: Update the EXTRA_ENV_SETTINGS

Quoted 20 lines · Tom Rini
Quoted 19 lines · Dan Murphy

Update the EXTRA_ENV_SETTING for the dra7xx.
The console needs to be set to ttyO0 and the
findfdt needs to be updated to load the
dra7xx-evm.dtb file.

---
v2 - Updated with side bar maintainer comments.

 include/configs/omap5_common.h |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
include/configs/omap5_common.h +0 -0
index deb5e9f..c5061dd 100644
@@ -142,9 +142,15 @@
 #define PARTS_DEFAULT
 #endif
 
Quoted 15 lines

include/configs/omap5_common.h line 153

Quoted 10 lines
include/configs/omap5_common.h +7 -1
+#ifdef CONFIG_DRA7XX
+#define CONFIG_CONSOLE_DEV		"ttyO0"
+#else
+#define CONFIG_CONSOLE_DEV		"ttyO2"
+#endif
+
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"loadaddr=0x82000000\0" \
-	"console=ttyO2,115200n8\0" \
+	"console=" CONFIG_CONSOLE_DEV ",115200n8\0" \

Sorry, when we chatted on IRC I was being a bit more literal than you did. I want dra7xx_evm.h to have '#define CONSOLEDEV "ttyO0"' and omap5_uevm.h to have '#define CONSOLEDEV "ttyO2"' and omap5_common.h to have:
"console=" CONSOLEDEV ",115200n8\0" \

OK I got it. Change a comin.

Quoted 13 lines

include/configs/omap5_common.h line 185

Quoted 8 lines
include/configs/omap5_common.h +3 -1
@@ -174,7 +180,9 @@
 		"bootz ${loadaddr} - ${fdtaddr}\0" \
 	"findfdt="\
 		"if test $board_name = omap5_uevm; then " \
-			"setenv fdtfile omap5-uevm.dtb; fi;\0 " \
+			"setenv fdtfile omap5-uevm.dtb; fi; " \
+		"if test $board_name = dra7xx; then " \
+			"setenv fdtfile dra7-evm.dtb; fi;\0 " \

This part is fine, thanks. If you've got time, add something like:
if test -z $fdtfile; then
echo "WARNING: Could not determine device tree to use"
fi

Quoted 2 lines

After testing I got the syntax right, thanks!

What does the -z do? Could not find any info on that.

Signature · 2 lines
------------------
Dan Murphy
#3 lore raw

PATCH v2 1/1 arm: dra7xx: Update the EXTRA_ENV_SETTINGS

Quoted 50 lines · Dan Murphy
Quoted 20 lines · Tom Rini
Quoted 19 lines · Dan Murphy

Update the EXTRA_ENV_SETTING for the dra7xx.
The console needs to be set to ttyO0 and the
findfdt needs to be updated to load the
dra7xx-evm.dtb file.

---
v2 - Updated with side bar maintainer comments.

 include/configs/omap5_common.h |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
include/configs/omap5_common.h +0 -0
index deb5e9f..c5061dd 100644
@@ -142,9 +142,15 @@
 #define PARTS_DEFAULT
 #endif
 
Quoted 15 lines

include/configs/omap5_common.h line 153

Quoted 10 lines
include/configs/omap5_common.h +7 -1
+#ifdef CONFIG_DRA7XX
+#define CONFIG_CONSOLE_DEV		"ttyO0"
+#else
+#define CONFIG_CONSOLE_DEV		"ttyO2"
+#endif
+
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"loadaddr=0x82000000\0" \
-	"console=ttyO2,115200n8\0" \
+	"console=" CONFIG_CONSOLE_DEV ",115200n8\0" \

Sorry, when we chatted on IRC I was being a bit more literal than you did. I want dra7xx_evm.h to have '#define CONSOLEDEV "ttyO0"' and omap5_uevm.h to have '#define CONSOLEDEV "ttyO2"' and omap5_common.h to have:
"console=" CONSOLEDEV ",115200n8\0" \

OK I got it. Change a comin.

Quoted 13 lines

include/configs/omap5_common.h line 185

Quoted 8 lines
include/configs/omap5_common.h +3 -1
@@ -174,7 +180,9 @@
 		"bootz ${loadaddr} - ${fdtaddr}\0" \
 	"findfdt="\
 		"if test $board_name = omap5_uevm; then " \
-			"setenv fdtfile omap5-uevm.dtb; fi;\0 " \
+			"setenv fdtfile omap5-uevm.dtb; fi; " \
+		"if test $board_name = dra7xx; then " \
+			"setenv fdtfile dra7-evm.dtb; fi;\0 " \

This part is fine, thanks. If you've got time, add something like:
if test -z $fdtfile; then
echo "WARNING: Could not determine device tree to use"
fi

Quoted 4 lines
Quoted 2 lines

After testing I got the syntax right, thanks!

What does the -z do? Could not find any info on that.

If it works, it's like regular shell scripts, and we test that the contents are empty (so, I forgot quotes, after double checking fedora's arm-boot-config, if test -z "$fdtfile" ...)

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