All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/4] configs: pcm051: Support distro bootcmds
@ 2018-06-02 17:22 Matwey V. Kornilov
  2018-06-02 17:22 ` [U-Boot] [PATCH 2/4] configs: pcm051: Use DEFAULT_MMC_TI_ARGS instead of hardcoded duplicates Matwey V. Kornilov
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Matwey V. Kornilov @ 2018-06-02 17:22 UTC (permalink / raw)
  To: u-boot

Add support for distro bootcmds.

Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
---
 include/configs/pcm051.h | 49 ++++++++++++++++++++++++++++--------------------
 1 file changed, 29 insertions(+), 20 deletions(-)

diff --git a/include/configs/pcm051.h b/include/configs/pcm051.h
index a59e88171f..c1a5c6fe32 100644
--- a/include/configs/pcm051.h
+++ b/include/configs/pcm051.h
@@ -25,6 +25,34 @@
 #define CONFIG_MACH_TYPE		MACH_TYPE_PCM051
 
 /* set to negative value for no autoboot */
+#define BOOTENV_DEV_LEGACY_MMC(devtypeu, devtypel, instance) \
+	"bootcmd_" #devtypel #instance "=" \
+	"setenv mmcdev " #instance"; "\
+	"setenv bootpart " #instance":2 ; "\
+	"run mmcboot\0"
+
+#define BOOTENV_DEV_NAME_LEGACY_MMC(devtypeu, devtypel, instance) \
+	#devtypel #instance " "
+
+#define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \
+	"bootcmd_" #devtypel "=" \
+	"run nandboot\0"
+
+#define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
+	#devtypel #instance " "
+
+#define BOOT_TARGET_DEVICES(func) \
+	func(MMC, mmc, 0) \
+	func(LEGACY_MMC, legacy_mmc, 0) \
+	func(MMC, mmc, 1) \
+	func(LEGACY_MMC, legacy_mmc, 1) \
+	func(NAND, nand, 0)
+
+#define CONFIG_BOOTCOMMAND \
+	"run distro_bootcmd"
+
+#include <config_distro_bootcmd.h>
+
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"loadaddr=0x80007fc0\0" \
 	"fdtaddr=0x80000000\0" \
@@ -62,26 +90,7 @@
 	"ramboot=echo Booting from ramdisk ...; " \
 		"run ramargs; " \
 		"bootm ${loadaddr}\0" \
-
-#define CONFIG_BOOTCOMMAND \
-	"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 loaduimage; then " \
-				"run mmcboot;" \
-			"fi;" \
-		"fi ;" \
-	"fi;" \
+	BOOTENV
 
 /* Clock Defines */
 #define V_OSCK				25000000  /* Clock output from T2 */
-- 
2.13.6

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

* [U-Boot] [PATCH 2/4] configs: pcm051: Use DEFAULT_MMC_TI_ARGS instead of hardcoded duplicates
  2018-06-02 17:22 [U-Boot] [PATCH 1/4] configs: pcm051: Support distro bootcmds Matwey V. Kornilov
@ 2018-06-02 17:22 ` Matwey V. Kornilov
  2018-06-13 15:42   ` [U-Boot] [U-Boot, " Tom Rini
  2018-06-02 17:22 ` [U-Boot] [PATCH 3/4] configs: pcm051: Use DEFAULT_LINUX_BOOT_ENV instead of hardcoded values Matwey V. Kornilov
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Matwey V. Kornilov @ 2018-06-02 17:22 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
---
 include/configs/pcm051.h | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/include/configs/pcm051.h b/include/configs/pcm051.h
index c1a5c6fe32..3bdd30d84f 100644
--- a/include/configs/pcm051.h
+++ b/include/configs/pcm051.h
@@ -53,7 +53,11 @@
 
 #include <config_distro_bootcmd.h>
 
+#include <environment/ti/dfu.h>
+#include <environment/ti/mmc.h>
+
 #define CONFIG_EXTRA_ENV_SETTINGS \
+	DEFAULT_MMC_TI_ARGS \
 	"loadaddr=0x80007fc0\0" \
 	"fdtaddr=0x80000000\0" \
 	"rdaddr=0x81000000\0" \
@@ -61,15 +65,8 @@
 	"fdtfile=pcm051.dtb\0" \
 	"console=ttyO0,115200n8\0" \
 	"optargs=\0" \
-	"mmcdev=0\0" \
-	"mmcroot=/dev/mmcblk0p2 ro\0" \
-	"mmcrootfstype=ext4 rootwait\0" \
 	"ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \
 	"ramrootfstype=ext2\0" \
-	"mmcargs=setenv bootargs console=${console} " \
-		"${optargs} " \
-		"root=${mmcroot} " \
-		"rootfstype=${mmcrootfstype}\0" \
 	"bootenv=uEnv.txt\0" \
 	"loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \
 	"bootscript=echo Running bootscript from mmc${mmcdev} ...; " \
@@ -85,7 +82,7 @@
 	"loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \
 	"loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} ${bootfile}\0" \
 	"mmcboot=echo Booting from mmc ...; " \
-		"run mmcargs; " \
+		"run args_mmc; " \
 		"bootm ${loadaddr}\0" \
 	"ramboot=echo Booting from ramdisk ...; " \
 		"run ramargs; " \
-- 
2.13.6

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

* [U-Boot] [PATCH 3/4] configs: pcm051: Use DEFAULT_LINUX_BOOT_ENV instead of hardcoded values
  2018-06-02 17:22 [U-Boot] [PATCH 1/4] configs: pcm051: Support distro bootcmds Matwey V. Kornilov
  2018-06-02 17:22 ` [U-Boot] [PATCH 2/4] configs: pcm051: Use DEFAULT_MMC_TI_ARGS instead of hardcoded duplicates Matwey V. Kornilov
@ 2018-06-02 17:22 ` Matwey V. Kornilov
  2018-06-13 15:42   ` [U-Boot] [U-Boot, " Tom Rini
  2018-06-02 17:22 ` [U-Boot] [PATCH 4/4] configs: pcm051: Use am335x-wega-rdk.dtb as fdtfile Matwey V. Kornilov
  2018-06-13 15:42 ` [U-Boot] [U-Boot,1/4] configs: pcm051: Support distro bootcmds Tom Rini
  3 siblings, 1 reply; 8+ messages in thread
From: Matwey V. Kornilov @ 2018-06-02 17:22 UTC (permalink / raw)
  To: u-boot

It appears that DEFAULT_LINUX_BOOT_ENV can be used to boot pcm051 board.

Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
---
 include/configs/pcm051.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/configs/pcm051.h b/include/configs/pcm051.h
index 3bdd30d84f..0475d80666 100644
--- a/include/configs/pcm051.h
+++ b/include/configs/pcm051.h
@@ -57,10 +57,8 @@
 #include <environment/ti/mmc.h>
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
+	DEFAULT_LINUX_BOOT_ENV \
 	DEFAULT_MMC_TI_ARGS \
-	"loadaddr=0x80007fc0\0" \
-	"fdtaddr=0x80000000\0" \
-	"rdaddr=0x81000000\0" \
 	"bootfile=uImage\0" \
 	"fdtfile=pcm051.dtb\0" \
 	"console=ttyO0,115200n8\0" \
-- 
2.13.6

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

* [U-Boot] [PATCH 4/4] configs: pcm051: Use am335x-wega-rdk.dtb as fdtfile
  2018-06-02 17:22 [U-Boot] [PATCH 1/4] configs: pcm051: Support distro bootcmds Matwey V. Kornilov
  2018-06-02 17:22 ` [U-Boot] [PATCH 2/4] configs: pcm051: Use DEFAULT_MMC_TI_ARGS instead of hardcoded duplicates Matwey V. Kornilov
  2018-06-02 17:22 ` [U-Boot] [PATCH 3/4] configs: pcm051: Use DEFAULT_LINUX_BOOT_ENV instead of hardcoded values Matwey V. Kornilov
@ 2018-06-02 17:22 ` Matwey V. Kornilov
  2018-06-13 15:42   ` [U-Boot] [U-Boot, " Tom Rini
  2018-06-13 15:42 ` [U-Boot] [U-Boot,1/4] configs: pcm051: Support distro bootcmds Tom Rini
  3 siblings, 1 reply; 8+ messages in thread
From: Matwey V. Kornilov @ 2018-06-02 17:22 UTC (permalink / raw)
  To: u-boot

In upstream Linux kernel, the fdtfile
for this specific board is called am335x-wega-rdk.dtb

Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
---
 include/configs/pcm051.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/pcm051.h b/include/configs/pcm051.h
index 0475d80666..5381ed1f45 100644
--- a/include/configs/pcm051.h
+++ b/include/configs/pcm051.h
@@ -60,7 +60,7 @@
 	DEFAULT_LINUX_BOOT_ENV \
 	DEFAULT_MMC_TI_ARGS \
 	"bootfile=uImage\0" \
-	"fdtfile=pcm051.dtb\0" \
+	"fdtfile=am335x-wega-rdk.dtb\0" \
 	"console=ttyO0,115200n8\0" \
 	"optargs=\0" \
 	"ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \
-- 
2.13.6

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

* [U-Boot] [U-Boot,1/4] configs: pcm051: Support distro bootcmds
  2018-06-02 17:22 [U-Boot] [PATCH 1/4] configs: pcm051: Support distro bootcmds Matwey V. Kornilov
                   ` (2 preceding siblings ...)
  2018-06-02 17:22 ` [U-Boot] [PATCH 4/4] configs: pcm051: Use am335x-wega-rdk.dtb as fdtfile Matwey V. Kornilov
@ 2018-06-13 15:42 ` Tom Rini
  3 siblings, 0 replies; 8+ messages in thread
From: Tom Rini @ 2018-06-13 15:42 UTC (permalink / raw)
  To: u-boot

On Sat, Jun 02, 2018 at 08:22:25PM +0300, Matwey V. Kornilov wrote:

> Add support for distro bootcmds.
> 
> Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180613/2ca20dae/attachment.sig>

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

* [U-Boot] [U-Boot, 2/4] configs: pcm051: Use DEFAULT_MMC_TI_ARGS instead of hardcoded duplicates
  2018-06-02 17:22 ` [U-Boot] [PATCH 2/4] configs: pcm051: Use DEFAULT_MMC_TI_ARGS instead of hardcoded duplicates Matwey V. Kornilov
@ 2018-06-13 15:42   ` Tom Rini
  0 siblings, 0 replies; 8+ messages in thread
From: Tom Rini @ 2018-06-13 15:42 UTC (permalink / raw)
  To: u-boot

On Sat, Jun 02, 2018 at 08:22:26PM +0300, Matwey V. Kornilov wrote:

> Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180613/187aa7dc/attachment.sig>

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

* [U-Boot] [U-Boot, 3/4] configs: pcm051: Use DEFAULT_LINUX_BOOT_ENV instead of hardcoded values
  2018-06-02 17:22 ` [U-Boot] [PATCH 3/4] configs: pcm051: Use DEFAULT_LINUX_BOOT_ENV instead of hardcoded values Matwey V. Kornilov
@ 2018-06-13 15:42   ` Tom Rini
  0 siblings, 0 replies; 8+ messages in thread
From: Tom Rini @ 2018-06-13 15:42 UTC (permalink / raw)
  To: u-boot

On Sat, Jun 02, 2018 at 08:22:27PM +0300, Matwey V. Kornilov wrote:

> It appears that DEFAULT_LINUX_BOOT_ENV can be used to boot pcm051 board.
> 
> Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180613/02c0b900/attachment.sig>

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

* [U-Boot] [U-Boot, 4/4] configs: pcm051: Use am335x-wega-rdk.dtb as fdtfile
  2018-06-02 17:22 ` [U-Boot] [PATCH 4/4] configs: pcm051: Use am335x-wega-rdk.dtb as fdtfile Matwey V. Kornilov
@ 2018-06-13 15:42   ` Tom Rini
  0 siblings, 0 replies; 8+ messages in thread
From: Tom Rini @ 2018-06-13 15:42 UTC (permalink / raw)
  To: u-boot

On Sat, Jun 02, 2018 at 08:22:28PM +0300, Matwey V. Kornilov wrote:

> In upstream Linux kernel, the fdtfile
> for this specific board is called am335x-wega-rdk.dtb
> 
> Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180613/3c1f77b0/attachment.sig>

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

end of thread, other threads:[~2018-06-13 15:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-02 17:22 [U-Boot] [PATCH 1/4] configs: pcm051: Support distro bootcmds Matwey V. Kornilov
2018-06-02 17:22 ` [U-Boot] [PATCH 2/4] configs: pcm051: Use DEFAULT_MMC_TI_ARGS instead of hardcoded duplicates Matwey V. Kornilov
2018-06-13 15:42   ` [U-Boot] [U-Boot, " Tom Rini
2018-06-02 17:22 ` [U-Boot] [PATCH 3/4] configs: pcm051: Use DEFAULT_LINUX_BOOT_ENV instead of hardcoded values Matwey V. Kornilov
2018-06-13 15:42   ` [U-Boot] [U-Boot, " Tom Rini
2018-06-02 17:22 ` [U-Boot] [PATCH 4/4] configs: pcm051: Use am335x-wega-rdk.dtb as fdtfile Matwey V. Kornilov
2018-06-13 15:42   ` [U-Boot] [U-Boot, " Tom Rini
2018-06-13 15:42 ` [U-Boot] [U-Boot,1/4] configs: pcm051: Support distro bootcmds Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.