All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] environment: distro: Add SF distro support
@ 2020-04-10 18:26 ` Jagan Teki
  0 siblings, 0 replies; 16+ messages in thread
From: Jagan Teki @ 2020-04-10 18:26 UTC (permalink / raw)
  To: Tom Rini, Kever Yang, Simon Glass, Philipp Tomsich
  Cc: sunil, u-boot, linux-rockchip, linux-amarula, Jagan Teki

This patch is based on Tom comments from previous 
version[1] for adding new distro support separately
as in include/environment/distro/sf.h 

This new sf distro command not touch the existing
include/config_distro_bootcmd.h.

Used this new SF distro command in rk3399 platform.

[1] https://patchwork.ozlabs.org/patch/1232666/

Any inputs?
Jagan.

Jagan Teki (3):
  environment: distro: Add SF distro command
  rk3399: Add boot flash script offset, size
  rockchip: Enable SF distro bootcmd

 include/configs/rk3399_common.h   |  3 +++
 include/configs/rockchip-common.h |  9 ++++++-
 include/environment/distro/sf.h   | 41 +++++++++++++++++++++++++++++++
 3 files changed, 52 insertions(+), 1 deletion(-)
 create mode 100644 include/environment/distro/sf.h

-- 
2.17.1

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

* [PATCH v2 0/3] environment: distro: Add SF distro support
@ 2020-04-10 18:26 ` Jagan Teki
  0 siblings, 0 replies; 16+ messages in thread
From: Jagan Teki @ 2020-04-10 18:26 UTC (permalink / raw)
  To: u-boot

This patch is based on Tom comments from previous 
version[1] for adding new distro support separately
as in include/environment/distro/sf.h 

This new sf distro command not touch the existing
include/config_distro_bootcmd.h.

Used this new SF distro command in rk3399 platform.

[1] https://patchwork.ozlabs.org/patch/1232666/

Any inputs?
Jagan.

Jagan Teki (3):
  environment: distro: Add SF distro command
  rk3399: Add boot flash script offset, size
  rockchip: Enable SF distro bootcmd

 include/configs/rk3399_common.h   |  3 +++
 include/configs/rockchip-common.h |  9 ++++++-
 include/environment/distro/sf.h   | 41 +++++++++++++++++++++++++++++++
 3 files changed, 52 insertions(+), 1 deletion(-)
 create mode 100644 include/environment/distro/sf.h

-- 
2.17.1

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

* [PATCH v2 1/3] environment: distro: Add SF distro command
  2020-04-10 18:26 ` Jagan Teki
@ 2020-04-10 18:26     ` Jagan Teki
  -1 siblings, 0 replies; 16+ messages in thread
From: Jagan Teki @ 2020-04-10 18:26 UTC (permalink / raw)
  To: Tom Rini, Kever Yang, Simon Glass, Philipp Tomsich
  Cc: u-boot-0aAXYlwwYIKGBzrmiIFOJg,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
	Jagan Teki, sunil-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/

Add distro boot command support for SPI flash (SF).

This distro boot will read the boot script at specific
location at the flash and start sourcing the same.

This file need to include on required include/config
file.

Cc: Tom Rini <trini-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
---
Changes for v2:
- new patch

 include/environment/distro/sf.h | 41 +++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 include/environment/distro/sf.h

diff --git a/include/environment/distro/sf.h b/include/environment/distro/sf.h
new file mode 100644
index 0000000000..e793be06c6
--- /dev/null
+++ b/include/environment/distro/sf.h
@@ -0,0 +1,41 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2020 Amarula Solutions(India)
+ *
+ * SF distro configurations.
+ */
+
+#ifndef __DISTRO_SF_CONFIG_H
+#define __DISTRO_SF_CONFIG_H
+
+#if CONFIG_IS_ENABLED(CMD_SF)
+#define BOOTENV_SHARED_SF(devtypel)				\
+	#devtypel "_boot=" 					\
+	"if " #devtypel " probe ${busnum}; then "		\
+		"devtype=" #devtypel "; "	  		\
+		"run scan_sf_for_scripts; "	  		\
+	"fi\0"
+#define BOOTENV_DEV_SF(devtypeu, devtypel, instance) 		\
+	"bootcmd_" #devtypel #instance "=" 			\
+		"busnum=" #instance "; " 			\
+		"run " #devtypel "_boot\0"
+#define BOOTENV_DEV_NAME_SF(devtypeu, devtypel, instance) 	\
+	#devtypel #instance " "
+#else
+#define BOOTENV_SHARED_SF(devtypel)
+#define BOOTENV_DEV_SF \
+	BOOT_TARGET_DEVICES_references_SF_without_CONFIG_CMD_SF
+#define BOOTENV_DEV_NAME_SF \
+	BOOT_TARGET_DEVICES_references_SF_without_CONFIG_CMD_SF
+
+#endif /* CONFIG_CMD_SF */
+
+#define BOOTENV_SF \
+	BOOTENV_SHARED_SF(sf) \
+	"scan_sf_for_scripts="					\
+		"${devtype} read ${scriptaddr} "		\
+			"${script_offset_f} ${script_size_f}; "	\
+		"source ${scriptaddr}; "			\
+		"echo SCRIPT FAILED: continuing...\0"
+
+#endif /* __DISTRO_SF_CONFIG_H */
-- 
2.17.1

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

* [PATCH v2 1/3] environment: distro: Add SF distro command
@ 2020-04-10 18:26     ` Jagan Teki
  0 siblings, 0 replies; 16+ messages in thread
From: Jagan Teki @ 2020-04-10 18:26 UTC (permalink / raw)
  To: u-boot

Add distro boot command support for SPI flash (SF).

This distro boot will read the boot script at specific
location at the flash and start sourcing the same.

This file need to include on required include/config
file.

Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v2:
- new patch

 include/environment/distro/sf.h | 41 +++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 include/environment/distro/sf.h

diff --git a/include/environment/distro/sf.h b/include/environment/distro/sf.h
new file mode 100644
index 0000000000..e793be06c6
--- /dev/null
+++ b/include/environment/distro/sf.h
@@ -0,0 +1,41 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2020 Amarula Solutions(India)
+ *
+ * SF distro configurations.
+ */
+
+#ifndef __DISTRO_SF_CONFIG_H
+#define __DISTRO_SF_CONFIG_H
+
+#if CONFIG_IS_ENABLED(CMD_SF)
+#define BOOTENV_SHARED_SF(devtypel)				\
+	#devtypel "_boot=" 					\
+	"if " #devtypel " probe ${busnum}; then "		\
+		"devtype=" #devtypel "; "	  		\
+		"run scan_sf_for_scripts; "	  		\
+	"fi\0"
+#define BOOTENV_DEV_SF(devtypeu, devtypel, instance) 		\
+	"bootcmd_" #devtypel #instance "=" 			\
+		"busnum=" #instance "; " 			\
+		"run " #devtypel "_boot\0"
+#define BOOTENV_DEV_NAME_SF(devtypeu, devtypel, instance) 	\
+	#devtypel #instance " "
+#else
+#define BOOTENV_SHARED_SF(devtypel)
+#define BOOTENV_DEV_SF \
+	BOOT_TARGET_DEVICES_references_SF_without_CONFIG_CMD_SF
+#define BOOTENV_DEV_NAME_SF \
+	BOOT_TARGET_DEVICES_references_SF_without_CONFIG_CMD_SF
+
+#endif /* CONFIG_CMD_SF */
+
+#define BOOTENV_SF \
+	BOOTENV_SHARED_SF(sf) \
+	"scan_sf_for_scripts="					\
+		"${devtype} read ${scriptaddr} "		\
+			"${script_offset_f} ${script_size_f}; "	\
+		"source ${scriptaddr}; "			\
+		"echo SCRIPT FAILED: continuing...\0"
+
+#endif /* __DISTRO_SF_CONFIG_H */
-- 
2.17.1

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

* [PATCH v2 2/3] rk3399: Add boot flash script offset, size
  2020-04-10 18:26 ` Jagan Teki
@ 2020-04-10 18:26     ` Jagan Teki
  -1 siblings, 0 replies; 16+ messages in thread
From: Jagan Teki @ 2020-04-10 18:26 UTC (permalink / raw)
  To: Tom Rini, Kever Yang, Simon Glass, Philipp Tomsich
  Cc: u-boot-0aAXYlwwYIKGBzrmiIFOJg,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
	Jagan Teki, sunil-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/

Most of the SPI flash devices in rockchip (rk3399)
are 16MiB size. So, let's use the script offset at
the end of 8K. 

This way it cannot overlap any offsets being used
by software components in flash layout.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
---
Changes for v2:
- new patch

 include/configs/rk3399_common.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h
index 89a8a44bbe..01a9174bd2 100644
--- a/include/configs/rk3399_common.h
+++ b/include/configs/rk3399_common.h
@@ -48,6 +48,8 @@
 
 #define ENV_MEM_LAYOUT_SETTINGS \
 	"scriptaddr=0x00500000\0" \
+	"script_offset_f=0xffe000\0" \
+	"script_size_f=0x2000\0" \
 	"pxefile_addr_r=0x00600000\0" \
 	"fdt_addr_r=0x01f00000\0" \
 	"kernel_addr_r=0x02080000\0" \
-- 
2.17.1


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* [PATCH v2 2/3] rk3399: Add boot flash script offset, size
@ 2020-04-10 18:26     ` Jagan Teki
  0 siblings, 0 replies; 16+ messages in thread
From: Jagan Teki @ 2020-04-10 18:26 UTC (permalink / raw)
  To: u-boot

Most of the SPI flash devices in rockchip (rk3399)
are 16MiB size. So, let's use the script offset at
the end of 8K.?

This way it cannot overlap any offsets being used
by software components in flash layout.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
---
Changes for v2:
- new patch

 include/configs/rk3399_common.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h
index 89a8a44bbe..01a9174bd2 100644
--- a/include/configs/rk3399_common.h
+++ b/include/configs/rk3399_common.h
@@ -48,6 +48,8 @@
 
 #define ENV_MEM_LAYOUT_SETTINGS \
 	"scriptaddr=0x00500000\0" \
+	"script_offset_f=0xffe000\0" \
+	"script_size_f=0x2000\0" \
 	"pxefile_addr_r=0x00600000\0" \
 	"fdt_addr_r=0x01f00000\0" \
 	"kernel_addr_r=0x02080000\0" \
-- 
2.17.1

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

* [PATCH v2 3/3] rockchip: Enable SF distro bootcmd
  2020-04-10 18:26 ` Jagan Teki
@ 2020-04-10 18:26     ` Jagan Teki
  -1 siblings, 0 replies; 16+ messages in thread
From: Jagan Teki @ 2020-04-10 18:26 UTC (permalink / raw)
  To: Tom Rini, Kever Yang, Simon Glass, Philipp Tomsich
  Cc: u-boot-0aAXYlwwYIKGBzrmiIFOJg,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
	Jagan Teki, sunil-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/

Enable SPI flash(SF) distro boot command in Rockchip.

This distro boot will read the boot script at specific
location at the flash and start sourcing the same.

Included the SF device at the last of the target devices
list since all the rest of the devices on the list have
more possibility to boot the distribution due to the
size of the SPI flash is concern.

Cc: Tom Rini <trini-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
---
Changes for v2:
- update BOOT_TARGET_SF 

 include/configs/rk3399_common.h   | 1 +
 include/configs/rockchip-common.h | 9 ++++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h
index 01a9174bd2..f0ae6e67a7 100644
--- a/include/configs/rk3399_common.h
+++ b/include/configs/rk3399_common.h
@@ -60,6 +60,7 @@
 #endif
 
 #include <config_distro_bootcmd.h>
+#include <environment/distro/sf.h>
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	ENV_MEM_LAYOUT_SETTINGS \
 	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
index b55e09a9ca..d97395db90 100644
--- a/include/configs/rockchip-common.h
+++ b/include/configs/rockchip-common.h
@@ -41,11 +41,18 @@
 	#define BOOT_TARGET_DHCP(func)
 #endif
 
+#if CONFIG_IS_ENABLED(CMD_SF)
+	#define BOOT_TARGET_SF(func)	func(SF, sf, 0)
+#else
+	#define BOOT_TARGET_SF(func)
+#endif
+
 #define BOOT_TARGET_DEVICES(func) \
 	BOOT_TARGET_MMC(func) \
 	BOOT_TARGET_USB(func) \
 	BOOT_TARGET_PXE(func) \
-	BOOT_TARGET_DHCP(func)
+	BOOT_TARGET_DHCP(func) \
+	BOOT_TARGET_SF(func)
 
 #ifdef CONFIG_ARM64
 #define ROOT_UUID "B921B045-1DF0-41C3-AF44-4C6F280D3FAE;\0"
-- 
2.17.1

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

* [PATCH v2 3/3] rockchip: Enable SF distro bootcmd
@ 2020-04-10 18:26     ` Jagan Teki
  0 siblings, 0 replies; 16+ messages in thread
From: Jagan Teki @ 2020-04-10 18:26 UTC (permalink / raw)
  To: u-boot

Enable SPI flash(SF) distro boot command in Rockchip.

This distro boot will read the boot script at specific
location at the flash and start sourcing the same.

Included the SF device at the last of the target devices
list since all the rest of the devices on the list have
more possibility to boot the distribution due to the
size of the SPI flash is concern.

Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v2:
- update BOOT_TARGET_SF 

 include/configs/rk3399_common.h   | 1 +
 include/configs/rockchip-common.h | 9 ++++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h
index 01a9174bd2..f0ae6e67a7 100644
--- a/include/configs/rk3399_common.h
+++ b/include/configs/rk3399_common.h
@@ -60,6 +60,7 @@
 #endif
 
 #include <config_distro_bootcmd.h>
+#include <environment/distro/sf.h>
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	ENV_MEM_LAYOUT_SETTINGS \
 	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
index b55e09a9ca..d97395db90 100644
--- a/include/configs/rockchip-common.h
+++ b/include/configs/rockchip-common.h
@@ -41,11 +41,18 @@
 	#define BOOT_TARGET_DHCP(func)
 #endif
 
+#if CONFIG_IS_ENABLED(CMD_SF)
+	#define BOOT_TARGET_SF(func)	func(SF, sf, 0)
+#else
+	#define BOOT_TARGET_SF(func)
+#endif
+
 #define BOOT_TARGET_DEVICES(func) \
 	BOOT_TARGET_MMC(func) \
 	BOOT_TARGET_USB(func) \
 	BOOT_TARGET_PXE(func) \
-	BOOT_TARGET_DHCP(func)
+	BOOT_TARGET_DHCP(func) \
+	BOOT_TARGET_SF(func)
 
 #ifdef CONFIG_ARM64
 #define ROOT_UUID "B921B045-1DF0-41C3-AF44-4C6F280D3FAE;\0"
-- 
2.17.1

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

* Re: [PATCH v2 1/3] environment: distro: Add SF distro command
  2020-04-10 18:26     ` Jagan Teki
@ 2020-04-15 20:00       ` Tom Rini
  -1 siblings, 0 replies; 16+ messages in thread
From: Tom Rini @ 2020-04-15 20:00 UTC (permalink / raw)
  To: Jagan Teki
  Cc: Kever Yang, Simon Glass, Philipp Tomsich, sunil, u-boot,
	linux-rockchip, linux-amarula

[-- Attachment #1: Type: text/plain, Size: 460 bytes --]

On Fri, Apr 10, 2020 at 11:56:29PM +0530, Jagan Teki wrote:

> Add distro boot command support for SPI flash (SF).
> 
> This distro boot will read the boot script at specific
> location at the flash and start sourcing the same.
> 
> This file need to include on required include/config
> file.
> 
> Cc: Tom Rini <trini@konsulko.com>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

* [PATCH v2 1/3] environment: distro: Add SF distro command
@ 2020-04-15 20:00       ` Tom Rini
  0 siblings, 0 replies; 16+ messages in thread
From: Tom Rini @ 2020-04-15 20:00 UTC (permalink / raw)
  To: u-boot

On Fri, Apr 10, 2020 at 11:56:29PM +0530, Jagan Teki wrote:

> Add distro boot command support for SPI flash (SF).
> 
> This distro boot will read the boot script at specific
> location at the flash and start sourcing the same.
> 
> This file need to include on required include/config
> file.
> 
> Cc: Tom Rini <trini@konsulko.com>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200415/133ede32/attachment.sig>

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

* Re: [PATCH v2 0/3] environment: distro: Add SF distro support
  2020-04-10 18:26 ` Jagan Teki
@ 2020-04-20 14:21   ` Jagan Teki
  -1 siblings, 0 replies; 16+ messages in thread
From: Jagan Teki @ 2020-04-20 14:21 UTC (permalink / raw)
  To: Tom Rini, Kever Yang, Simon Glass, Philipp Tomsich
  Cc: Suniel Mahesh, U-Boot-Denx, open list:ARM/Rockchip SoC..., linux-amarula

On Fri, Apr 10, 2020 at 11:57 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> This patch is based on Tom comments from previous
> version[1] for adding new distro support separately
> as in include/environment/distro/sf.h
>
> This new sf distro command not touch the existing
> include/config_distro_bootcmd.h.
>
> Used this new SF distro command in rk3399 platform.
>
> [1] https://patchwork.ozlabs.org/patch/1232666/
>
> Any inputs?
> Jagan.
>
> Jagan Teki (3):
>   environment: distro: Add SF distro command
>   rk3399: Add boot flash script offset, size
>   rockchip: Enable SF distro bootcmd

Applied to u-boot-spi/master

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

* [PATCH v2 0/3] environment: distro: Add SF distro support
@ 2020-04-20 14:21   ` Jagan Teki
  0 siblings, 0 replies; 16+ messages in thread
From: Jagan Teki @ 2020-04-20 14:21 UTC (permalink / raw)
  To: u-boot

On Fri, Apr 10, 2020 at 11:57 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> This patch is based on Tom comments from previous
> version[1] for adding new distro support separately
> as in include/environment/distro/sf.h
>
> This new sf distro command not touch the existing
> include/config_distro_bootcmd.h.
>
> Used this new SF distro command in rk3399 platform.
>
> [1] https://patchwork.ozlabs.org/patch/1232666/
>
> Any inputs?
> Jagan.
>
> Jagan Teki (3):
>   environment: distro: Add SF distro command
>   rk3399: Add boot flash script offset, size
>   rockchip: Enable SF distro bootcmd

Applied to u-boot-spi/master

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

* Re: [PATCH v2 2/3] rk3399: Add boot flash script offset, size
  2020-04-10 18:26     ` Jagan Teki
@ 2020-04-20 15:51         ` Peter Robinson
  -1 siblings, 0 replies; 16+ messages in thread
From: Peter Robinson @ 2020-04-20 15:51 UTC (permalink / raw)
  To: Jagan Teki
  Cc: Tom Rini, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Simon Glass, Kever Yang, u-boot-0aAXYlwwYIKGBzrmiIFOJg,
	sunil-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
	Philipp Tomsich, linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/

> Most of the SPI flash devices in rockchip (rk3399)
> are 16MiB size. So, let's use the script offset at
> the end of 8K.

You wouldn't have the commands for writing the
idbloader.img/u-boot.itb to these SPI flash on one of these devices by
chance?

Peter

> This way it cannot overlap any offsets being used
> by software components in flash layout.
>
> Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
> Reviewed-by: Kever Yang <kever.yang-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> ---
> Changes for v2:
> - new patch
>
>  include/configs/rk3399_common.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h
> index 89a8a44bbe..01a9174bd2 100644
> --- a/include/configs/rk3399_common.h
> +++ b/include/configs/rk3399_common.h
> @@ -48,6 +48,8 @@
>
>  #define ENV_MEM_LAYOUT_SETTINGS \
>         "scriptaddr=0x00500000\0" \
> +       "script_offset_f=0xffe000\0" \
> +       "script_size_f=0x2000\0" \
>         "pxefile_addr_r=0x00600000\0" \
>         "fdt_addr_r=0x01f00000\0" \
>         "kernel_addr_r=0x02080000\0" \
> --
> 2.17.1
>

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

* [PATCH v2 2/3] rk3399: Add boot flash script offset, size
@ 2020-04-20 15:51         ` Peter Robinson
  0 siblings, 0 replies; 16+ messages in thread
From: Peter Robinson @ 2020-04-20 15:51 UTC (permalink / raw)
  To: u-boot

> Most of the SPI flash devices in rockchip (rk3399)
> are 16MiB size. So, let's use the script offset at
> the end of 8K.

You wouldn't have the commands for writing the
idbloader.img/u-boot.itb to these SPI flash on one of these devices by
chance?

Peter

> This way it cannot overlap any offsets being used
> by software components in flash layout.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
> ---
> Changes for v2:
> - new patch
>
>  include/configs/rk3399_common.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h
> index 89a8a44bbe..01a9174bd2 100644
> --- a/include/configs/rk3399_common.h
> +++ b/include/configs/rk3399_common.h
> @@ -48,6 +48,8 @@
>
>  #define ENV_MEM_LAYOUT_SETTINGS \
>         "scriptaddr=0x00500000\0" \
> +       "script_offset_f=0xffe000\0" \
> +       "script_size_f=0x2000\0" \
>         "pxefile_addr_r=0x00600000\0" \
>         "fdt_addr_r=0x01f00000\0" \
>         "kernel_addr_r=0x02080000\0" \
> --
> 2.17.1
>

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

* Re: [PATCH v2 2/3] rk3399: Add boot flash script offset, size
  2020-04-20 15:51         ` Peter Robinson
@ 2020-04-20 16:25             ` Jagan Teki
  -1 siblings, 0 replies; 16+ messages in thread
From: Jagan Teki @ 2020-04-20 16:25 UTC (permalink / raw)
  To: Peter Robinson
  Cc: Tom Rini, open list:ARM/Rockchip SoC...,
	Simon Glass, Kever Yang, U-Boot-Denx, Suniel Mahesh,
	Philipp Tomsich, linux-amarula

On Mon, Apr 20, 2020 at 9:21 PM Peter Robinson <pbrobinson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > Most of the SPI flash devices in rockchip (rk3399)
> > are 16MiB size. So, let's use the script offset at
> > the end of 8K.
>
> You wouldn't have the commands for writing the
> idbloader.img/u-boot.itb to these SPI flash on one of these devices by
> chance?

https://wiki.amarulasolutions.com/bsp/rockchip/rk3399/roc-rk3399-pc.html#booting-from

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

* [PATCH v2 2/3] rk3399: Add boot flash script offset, size
@ 2020-04-20 16:25             ` Jagan Teki
  0 siblings, 0 replies; 16+ messages in thread
From: Jagan Teki @ 2020-04-20 16:25 UTC (permalink / raw)
  To: u-boot

On Mon, Apr 20, 2020 at 9:21 PM Peter Robinson <pbrobinson@gmail.com> wrote:
>
> > Most of the SPI flash devices in rockchip (rk3399)
> > are 16MiB size. So, let's use the script offset at
> > the end of 8K.
>
> You wouldn't have the commands for writing the
> idbloader.img/u-boot.itb to these SPI flash on one of these devices by
> chance?

https://wiki.amarulasolutions.com/bsp/rockchip/rk3399/roc-rk3399-pc.html#booting-from

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

end of thread, other threads:[~2020-04-20 16:25 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-10 18:26 [PATCH v2 0/3] environment: distro: Add SF distro support Jagan Teki
2020-04-10 18:26 ` Jagan Teki
     [not found] ` <20200410182631.11951-1-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
2020-04-10 18:26   ` [PATCH v2 1/3] environment: distro: Add SF distro command Jagan Teki
2020-04-10 18:26     ` Jagan Teki
2020-04-15 20:00     ` Tom Rini
2020-04-15 20:00       ` Tom Rini
2020-04-10 18:26   ` [PATCH v2 2/3] rk3399: Add boot flash script offset, size Jagan Teki
2020-04-10 18:26     ` Jagan Teki
     [not found]     ` <20200410182631.11951-3-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
2020-04-20 15:51       ` Peter Robinson
2020-04-20 15:51         ` Peter Robinson
     [not found]         ` <CALeDE9O2QaO7CnHPb1nQ2-J6NCWYD=PDSbhtMi-3N68Azm=nVw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-04-20 16:25           ` Jagan Teki
2020-04-20 16:25             ` Jagan Teki
2020-04-10 18:26   ` [PATCH v2 3/3] rockchip: Enable SF distro bootcmd Jagan Teki
2020-04-10 18:26     ` Jagan Teki
2020-04-20 14:21 ` [PATCH v2 0/3] environment: distro: Add SF distro support Jagan Teki
2020-04-20 14:21   ` Jagan Teki

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.