public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH V2 0/5] ARM: OMAP4/5: Add support to boot with device tree as default
@ 2013-03-24  6:24 Sricharan R
  2013-03-24  6:24 ` [U-Boot] [PATCH V2 1/5] ARM: OMAP5: Rename omap5_evm to omap5_uevm Sricharan R
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Sricharan R @ 2013-03-24  6:24 UTC (permalink / raw)
  To: u-boot

With the kernel moving all towards device tree, this series
adds support to make the device tree boot as the default
for OMAP4/5 platforms.

Sricharan R (5):
  ARM: OMAP5: Rename omap5_evm to omap5_uevm
  ARM: OMAP5: Set fdt_high to enable booting with Device tree
  ARM: OMAP5: Support loading environment variables from txt file
  ARM: OMAP4/5: Change the default boot command to work with device
    tree
  ARM: OMAP4/5: Make bootz as the default boot command

 board/ti/{omap5_evm => omap5_uevm}/Makefile   |    0
 board/ti/{omap5_evm => omap5_uevm}/evm.c      |    0
 board/ti/{omap5_evm => omap5_uevm}/mux_data.h |    0
 boards.cfg                                    |    2 +-
 include/configs/omap4_common.h                |   17 ++++++++++----
 include/configs/omap5_common.h                |   30 ++++++++++++++++++++-----
 include/configs/{omap5_evm.h => omap5_uevm.h} |    0
 7 files changed, 38 insertions(+), 11 deletions(-)
 rename board/ti/{omap5_evm => omap5_uevm}/Makefile (100%)
 rename board/ti/{omap5_evm => omap5_uevm}/evm.c (100%)
 rename board/ti/{omap5_evm => omap5_uevm}/mux_data.h (100%)
 rename include/configs/{omap5_evm.h => omap5_uevm.h} (100%)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH V2 1/5] ARM: OMAP5: Rename omap5_evm to omap5_uevm
  2013-03-24  6:24 [U-Boot] [PATCH V2 0/5] ARM: OMAP4/5: Add support to boot with device tree as default Sricharan R
@ 2013-03-24  6:24 ` Sricharan R
  2013-03-24  6:24 ` [U-Boot] [PATCH V2 2/5] ARM: OMAP5: Set fdt_high to enable booting with Device tree Sricharan R
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Sricharan R @ 2013-03-24  6:24 UTC (permalink / raw)
  To: u-boot

The omap5-uevm is the reference board name for OMAP5 soc
based platform. So rename it accordingly.

Signed-off-by: Sricharan R <r.sricharan@ti.com>
---
 [V2] Formatted the patch using -M option to detect renames
      and edited the subject

 board/ti/{omap5_evm => omap5_uevm}/Makefile   |    0
 board/ti/{omap5_evm => omap5_uevm}/evm.c      |    0
 board/ti/{omap5_evm => omap5_uevm}/mux_data.h |    0
 boards.cfg                                    |    2 +-
 include/configs/{omap5_evm.h => omap5_uevm.h} |    0
 5 files changed, 1 insertion(+), 1 deletion(-)
 rename board/ti/{omap5_evm => omap5_uevm}/Makefile (100%)
 rename board/ti/{omap5_evm => omap5_uevm}/evm.c (100%)
 rename board/ti/{omap5_evm => omap5_uevm}/mux_data.h (100%)
 rename include/configs/{omap5_evm.h => omap5_uevm.h} (100%)

diff --git a/board/ti/omap5_evm/Makefile b/board/ti/omap5_uevm/Makefile
similarity index 100%
rename from board/ti/omap5_evm/Makefile
rename to board/ti/omap5_uevm/Makefile
diff --git a/board/ti/omap5_evm/evm.c b/board/ti/omap5_uevm/evm.c
similarity index 100%
rename from board/ti/omap5_evm/evm.c
rename to board/ti/omap5_uevm/evm.c
diff --git a/board/ti/omap5_evm/mux_data.h b/board/ti/omap5_uevm/mux_data.h
similarity index 100%
rename from board/ti/omap5_evm/mux_data.h
rename to board/ti/omap5_uevm/mux_data.h
diff --git a/boards.cfg b/boards.cfg
index ee68fdd..c9ad3ff 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -291,7 +291,7 @@ twister                      arm         armv7       twister             technex
 nokia_rx51                   arm         armv7       rx51                nokia          omap3
 omap4_panda                  arm         armv7       panda               ti             omap4
 omap4_sdp4430                arm         armv7       sdp4430             ti             omap4
-omap5_evm                    arm         armv7       omap5_evm           ti		omap5
+omap5_uevm                   arm         armv7       omap5_uevm          ti		omap5
 dra7xx_evm		     arm	 armv7	     dra7xx		 ti	        omap5
 s5p_goni                     arm         armv7       goni                samsung        s5pc1xx
 smdkc100                     arm         armv7       smdkc100            samsung        s5pc1xx
diff --git a/include/configs/omap5_evm.h b/include/configs/omap5_uevm.h
similarity index 100%
rename from include/configs/omap5_evm.h
rename to include/configs/omap5_uevm.h
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH V2 2/5] ARM: OMAP5: Set fdt_high to enable booting with Device tree
  2013-03-24  6:24 [U-Boot] [PATCH V2 0/5] ARM: OMAP4/5: Add support to boot with device tree as default Sricharan R
  2013-03-24  6:24 ` [U-Boot] [PATCH V2 1/5] ARM: OMAP5: Rename omap5_evm to omap5_uevm Sricharan R
@ 2013-03-24  6:24 ` Sricharan R
  2013-03-24  6:24 ` [U-Boot] [PATCH V2 3/5] ARM: OMAP5: Support loading environment variables from txt file Sricharan R
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Sricharan R @ 2013-03-24  6:24 UTC (permalink / raw)
  To: u-boot

While booting with dt blob, if fdt_high is not set to
0xffffffff, the dt blob gets relocated to a high ram address,
which the kernel is not able to use without HIGHMEM.

So set it to 0xffffffff to avoid the issue.

Signed-off-by: Sricharan R <r.sricharan@ti.com>
---
 include/configs/omap5_common.h |    1 +
 1 file changed, 1 insertion(+)

diff --git a/include/configs/omap5_common.h b/include/configs/omap5_common.h
index af97564..f0416df 100644
--- a/include/configs/omap5_common.h
+++ b/include/configs/omap5_common.h
@@ -143,6 +143,7 @@
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"loadaddr=0x82000000\0" \
 	"console=ttyO2,115200n8\0" \
+	"fdt_high=0xffffffff\0" \
 	"usbtty=cdc_acm\0" \
 	"vram=16M\0" \
 	"mmcdev=0\0" \
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH V2 3/5] ARM: OMAP5: Support loading environment variables from txt file
  2013-03-24  6:24 [U-Boot] [PATCH V2 0/5] ARM: OMAP4/5: Add support to boot with device tree as default Sricharan R
  2013-03-24  6:24 ` [U-Boot] [PATCH V2 1/5] ARM: OMAP5: Rename omap5_evm to omap5_uevm Sricharan R
  2013-03-24  6:24 ` [U-Boot] [PATCH V2 2/5] ARM: OMAP5: Set fdt_high to enable booting with Device tree Sricharan R
@ 2013-03-24  6:24 ` Sricharan R
  2013-03-24  6:24 ` [U-Boot] [PATCH V2 4/5] ARM: OMAP4/5: Change the default boot command to work with device tree Sricharan R
  2013-03-24  6:24 ` [U-Boot] [PATCH V2 5/5] ARM: OMAP4/5: Make bootz as the default boot command Sricharan R
  4 siblings, 0 replies; 8+ messages in thread
From: Sricharan R @ 2013-03-24  6:24 UTC (permalink / raw)
  To: u-boot

The boot.scr has to be built and copied, where as allowing
to import the environment from a text file is much more
friendly.

Thanks to the below patch, which has much more informative
change log.

commit: d70f54808dfa83b574e1239c3eccbcf3317343e1
(omap4: allow the use of a plain text env file instead boot scripts)

Signed-off-by: Sricharan R <r.sricharan@ti.com>
---
 include/configs/omap5_common.h |   16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/include/configs/omap5_common.h b/include/configs/omap5_common.h
index f0416df..6d7aa7b 100644
--- a/include/configs/omap5_common.h
+++ b/include/configs/omap5_common.h
@@ -156,6 +156,9 @@
 	"loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
 	"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
 		"source ${loadaddr}\0" \
+	"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \
+	"importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
+		"env import -t ${loadaddr} ${filesize}\0" \
 	"loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
 	"mmcboot=echo Booting from mmc${mmcdev} ...; " \
 		"run mmcargs; " \
@@ -166,9 +169,16 @@
 		"if run loadbootscript; then " \
 			"run bootscript; " \
 		"else " \
-			"if run loaduimage; then " \
-				"run mmcboot; " \
-			"fi; " \
+			"if run loadbootenv; then " \
+				"run importbootenv; " \
+			"fi;" \
+			"if test -n ${uenvcmd}; then " \
+				"echo Running uenvcmd ...;" \
+				"run uenvcmd;" \
+			"fi;" \
+		"fi;" \
+		"if run loaduimage; then " \
+			"run mmcboot; " \
 		"fi; " \
 	"fi"
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH V2 4/5] ARM: OMAP4/5: Change the default boot command to work with device tree
  2013-03-24  6:24 [U-Boot] [PATCH V2 0/5] ARM: OMAP4/5: Add support to boot with device tree as default Sricharan R
                   ` (2 preceding siblings ...)
  2013-03-24  6:24 ` [U-Boot] [PATCH V2 3/5] ARM: OMAP5: Support loading environment variables from txt file Sricharan R
@ 2013-03-24  6:24 ` Sricharan R
  2013-03-24 14:09   ` Tom Rini
  2013-03-24  6:24 ` [U-Boot] [PATCH V2 5/5] ARM: OMAP4/5: Make bootz as the default boot command Sricharan R
  4 siblings, 1 reply; 8+ messages in thread
From: Sricharan R @ 2013-03-24  6:24 UTC (permalink / raw)
  To: u-boot

Now with kernel moving to all device tree, the default
boot command is changed to pass the device tree blob.
Also, adding the findfdt command to get the dt-blob
based on the board.

Thanks to Tom Rini <trini@ti.com> for suggesting this.

Signed-off-by: Sricharan R <r.sricharan@ti.com>
---
 [V2] Corrected the board file name for omap4 boards
      in findfdt command

 include/configs/omap4_common.h |   13 +++++++++++--
 include/configs/omap5_common.h |   11 +++++++++--
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h
index 6ae6a0f..f584403 100644
--- a/include/configs/omap4_common.h
+++ b/include/configs/omap4_common.h
@@ -138,6 +138,7 @@
  */
 
 #define CONFIG_BOOTDELAY	3
+#define CONFIG_ENV_VARS_UBOOT_CONFIG
 
 #define CONFIG_ENV_OVERWRITE
 
@@ -145,6 +146,7 @@
 	"loadaddr=0x82000000\0" \
 	"console=ttyO2,115200n8\0" \
 	"fdt_high=0xffffffff\0" \
+	"fdtaddr=0x88000000\0" \
 	"usbtty=cdc_acm\0" \
 	"vram=16M\0" \
 	"mmcdev=0\0" \
@@ -153,7 +155,9 @@
 	"mmcargs=setenv bootargs console=${console} " \
 		"vram=${vram} " \
 		"root=${mmcroot} " \
-		"rootfstype=${mmcrootfstype}\0" \
+		"rootfstype=${mmcrootfstype}; " \
+		"run findfdt; " \
+		"fatload mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
 	"loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
 	"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
 		"source ${loadaddr}\0" \
@@ -163,7 +167,12 @@
 	"loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
 	"mmcboot=echo Booting from mmc${mmcdev} ...; " \
 		"run mmcargs; " \
-		"bootm ${loadaddr}\0" \
+		"bootm ${loadaddr} - ${fdtaddr}\0" \
+	"findfdt="\
+		"if test $board_name = sdp4430; then " \
+			"setenv fdtfile omap4-sdp.dtb; fi; " \
+		"if test $board_name = panda; then " \
+			"setenv fdtfile omap4-panda.dtb; fi\0" \
 
 #define CONFIG_BOOTCOMMAND \
 	"mmc dev ${mmcdev}; if mmc rescan; then " \
diff --git a/include/configs/omap5_common.h b/include/configs/omap5_common.h
index 6d7aa7b..1576fa0 100644
--- a/include/configs/omap5_common.h
+++ b/include/configs/omap5_common.h
@@ -137,6 +137,7 @@
  */
 
 #define CONFIG_BOOTDELAY	3
+#define CONFIG_ENV_VARS_UBOOT_CONFIG
 
 #define CONFIG_ENV_OVERWRITE
 
@@ -144,6 +145,7 @@
 	"loadaddr=0x82000000\0" \
 	"console=ttyO2,115200n8\0" \
 	"fdt_high=0xffffffff\0" \
+	"fdtaddr=0x88000000\0" \
 	"usbtty=cdc_acm\0" \
 	"vram=16M\0" \
 	"mmcdev=0\0" \
@@ -152,7 +154,9 @@
 	"mmcargs=setenv bootargs console=${console} " \
 		"vram=${vram} " \
 		"root=${mmcroot} " \
-		"rootfstype=${mmcrootfstype}\0" \
+		"rootfstype=${mmcrootfstype}; " \
+		"run findfdt; " \
+		"fatload mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \
 	"loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
 	"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
 		"source ${loadaddr}\0" \
@@ -162,7 +166,10 @@
 	"loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
 	"mmcboot=echo Booting from mmc${mmcdev} ...; " \
 		"run mmcargs; " \
-		"bootm ${loadaddr}\0" \
+		"bootm ${loadaddr} - ${fdtaddr}\0" \
+	"findfdt="\
+		"if test $board_name = omap5_uevm; then " \
+			"setenv fdtfile omap5-uevm.dtb; fi;\0 " \
 
 #define CONFIG_BOOTCOMMAND \
 	"mmc dev ${mmcdev}; if mmc rescan; then " \
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH V2 5/5] ARM: OMAP4/5: Make bootz as the default boot command
  2013-03-24  6:24 [U-Boot] [PATCH V2 0/5] ARM: OMAP4/5: Add support to boot with device tree as default Sricharan R
                   ` (3 preceding siblings ...)
  2013-03-24  6:24 ` [U-Boot] [PATCH V2 4/5] ARM: OMAP4/5: Change the default boot command to work with device tree Sricharan R
@ 2013-03-24  6:24 ` Sricharan R
  4 siblings, 0 replies; 8+ messages in thread
From: Sricharan R @ 2013-03-24  6:24 UTC (permalink / raw)
  To: u-boot

So with OMAP added to multi platform kernel,
the uImage no more contains a valid load address.
With the uboot already supporting zImage,
change the default boot command to bootz
instead.

Signed-off-by: Sricharan R <r.sricharan@ti.com>
---
 include/configs/omap4_common.h |    6 +++---
 include/configs/omap5_common.h |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h
index f584403..0fb2177 100644
--- a/include/configs/omap4_common.h
+++ b/include/configs/omap4_common.h
@@ -164,10 +164,10 @@
 	"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \
 	"importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
 		"env import -t ${loadaddr} ${filesize}\0" \
-	"loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
+	"loadzimage=fatload mmc ${mmcdev} ${loadaddr} zImage\0" \
 	"mmcboot=echo Booting from mmc${mmcdev} ...; " \
 		"run mmcargs; " \
-		"bootm ${loadaddr} - ${fdtaddr}\0" \
+		"bootz ${loadaddr} - ${fdtaddr}\0" \
 	"findfdt="\
 		"if test $board_name = sdp4430; then " \
 			"setenv fdtfile omap4-sdp.dtb; fi; " \
@@ -188,7 +188,7 @@
 				"run uenvcmd;" \
 			"fi;" \
 		"fi;" \
-		"if run loaduimage; then " \
+		"if run loadzimage; then " \
 			"run mmcboot; " \
 		"fi; " \
 	"fi"
diff --git a/include/configs/omap5_common.h b/include/configs/omap5_common.h
index 1576fa0..0df2600 100644
--- a/include/configs/omap5_common.h
+++ b/include/configs/omap5_common.h
@@ -163,10 +163,10 @@
 	"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \
 	"importbootenv=echo Importing environment from mmc${mmcdev} ...; " \
 		"env import -t ${loadaddr} ${filesize}\0" \
-	"loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
+	"loadzimage=fatload mmc ${mmcdev} ${loadaddr} zImage\0" \
 	"mmcboot=echo Booting from mmc${mmcdev} ...; " \
 		"run mmcargs; " \
-		"bootm ${loadaddr} - ${fdtaddr}\0" \
+		"bootz ${loadaddr} - ${fdtaddr}\0" \
 	"findfdt="\
 		"if test $board_name = omap5_uevm; then " \
 			"setenv fdtfile omap5-uevm.dtb; fi;\0 " \
@@ -184,7 +184,7 @@
 				"run uenvcmd;" \
 			"fi;" \
 		"fi;" \
-		"if run loaduimage; then " \
+		"if run loadzimage; then " \
 			"run mmcboot; " \
 		"fi; " \
 	"fi"
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH V2 4/5] ARM: OMAP4/5: Change the default boot command to work with device tree
  2013-03-24  6:24 ` [U-Boot] [PATCH V2 4/5] ARM: OMAP4/5: Change the default boot command to work with device tree Sricharan R
@ 2013-03-24 14:09   ` Tom Rini
  2013-03-25  5:09     ` Sricharan R
  0 siblings, 1 reply; 8+ messages in thread
From: Tom Rini @ 2013-03-24 14:09 UTC (permalink / raw)
  To: u-boot

On Sun, Mar 24, 2013 at 11:54:07AM +0530, Sricharan R wrote:

> Now with kernel moving to all device tree, the default
> boot command is changed to pass the device tree blob.
> Also, adding the findfdt command to get the dt-blob
> based on the board.
> 
> Thanks to Tom Rini <trini@ti.com> for suggesting this.
[snip]
> @@ -145,6 +146,7 @@
>  	"loadaddr=0x82000000\0" \
>  	"console=ttyO2,115200n8\0" \
>  	"fdt_high=0xffffffff\0" \
> +	"fdtaddr=0x88000000\0" \

I'd rather we use 0x80F80000 on both platforms, ala am335x as this makes
it harder to run into the fdt with a large ramdisk, which is even more
important once we've said no run-time relocation of the device tree.
Otherwise looks good and I'm glad the build-time ${board_name} works out
right :)

-- 
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/20130324/ed39a844/attachment.pgp>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH V2 4/5] ARM: OMAP4/5: Change the default boot command to work with device tree
  2013-03-24 14:09   ` Tom Rini
@ 2013-03-25  5:09     ` Sricharan R
  0 siblings, 0 replies; 8+ messages in thread
From: Sricharan R @ 2013-03-25  5:09 UTC (permalink / raw)
  To: u-boot

On Sunday 24 March 2013 07:39 PM, Tom Rini wrote:
> On Sun, Mar 24, 2013 at 11:54:07AM +0530, Sricharan R wrote:
> 
>> Now with kernel moving to all device tree, the default
>> boot command is changed to pass the device tree blob.
>> Also, adding the findfdt command to get the dt-blob
>> based on the board.
>>
>> Thanks to Tom Rini <trini@ti.com> for suggesting this.
> [snip]
>> @@ -145,6 +146,7 @@
>>  	"loadaddr=0x82000000\0" \
>>  	"console=ttyO2,115200n8\0" \
>>  	"fdt_high=0xffffffff\0" \
>> +	"fdtaddr=0x88000000\0" \
> 
> I'd rather we use 0x80F80000 on both platforms, ala am335x as this makes
> it harder to run into the fdt with a large ramdisk, which is even more
> important once we've said no run-time relocation of the device tree.
> Otherwise looks good and I'm glad the build-time ${board_name} works out
> right :)
> 
 correct. will change this.

Regards,
 Sricharan

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-03-25  5:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-24  6:24 [U-Boot] [PATCH V2 0/5] ARM: OMAP4/5: Add support to boot with device tree as default Sricharan R
2013-03-24  6:24 ` [U-Boot] [PATCH V2 1/5] ARM: OMAP5: Rename omap5_evm to omap5_uevm Sricharan R
2013-03-24  6:24 ` [U-Boot] [PATCH V2 2/5] ARM: OMAP5: Set fdt_high to enable booting with Device tree Sricharan R
2013-03-24  6:24 ` [U-Boot] [PATCH V2 3/5] ARM: OMAP5: Support loading environment variables from txt file Sricharan R
2013-03-24  6:24 ` [U-Boot] [PATCH V2 4/5] ARM: OMAP4/5: Change the default boot command to work with device tree Sricharan R
2013-03-24 14:09   ` Tom Rini
2013-03-25  5:09     ` Sricharan R
2013-03-24  6:24 ` [U-Boot] [PATCH V2 5/5] ARM: OMAP4/5: Make bootz as the default boot command Sricharan R

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox