All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] km: adapt defines and variables for new memory layout
@ 2020-10-09 15:21 Holger Brunck
  2020-10-09 15:21 ` [PATCH v2 2/2] km/common: change ubicopy variable Holger Brunck
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Holger Brunck @ 2020-10-09 15:21 UTC (permalink / raw)
  To: u-boot

Due to increasing kernel image sizes we get problems when decompressing
the kernel image. To fix this we need to change the addresses where we
load and where we extract the kernel. Also we need to adapt the address
where to load the CRAMFS image and where to load the DTB file.
While at it also harmonize all boards for PPC and ARM to have the
same values. Also we add a new variable "env_version", so that the
userspace is able to detect if this is a u-boot binary with updated
values or not.

CC: Valentin Longchamp <valentin.longchamp@hitachi-powergrids.com>
CC: Heiko Schocher <hs@denx.de>
CC: Tom Rini <trini@konsulko.com>
Signed-off-by: Holger Brunck <holger.brunck@hitachi-powergrids.com>
---
 board/keymile/Kconfig               | 12 +++---------
 include/configs/km/keymile-common.h |  1 +
 include/configs/km/km-powerpc.h     |  4 ++++
 include/configs/km/km_arm.h         |  3 +++
 4 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/board/keymile/Kconfig b/board/keymile/Kconfig
index e20c017436..e5906906f3 100644
--- a/board/keymile/Kconfig
+++ b/board/keymile/Kconfig
@@ -37,26 +37,20 @@ config KM_RESERVED_PRAM
 
 config KM_CRAMFS_ADDR
 	hex "CRAMFS Address"
-	default 0x2400000 if ARCH_KIRKWOOD
-	default 0xC00000 if MPC83xx
-	default 0x2000000 if MPC85xx
+	default 0x3000000
 	depends on !ARCH_SOCFPGA
 	help
 	  Start address of the CRAMFS containing the Linux kernel.
 
 config KM_KERNEL_ADDR
 	hex "Kernel Load Address"
-	default 0x2000000 if ARCH_KIRKWOOD
-	default 0x400000 if MPC83xx
-	default 0x1000000 if MPC85xx || ARCH_SOCFPGA
+	default 0x2000000
 	help
 	  Address where to load Linux kernel in RAM.
 
 config KM_FDT_ADDR
 	hex "FDT Load Address"
-	default 0x23E0000 if ARCH_KIRKWOOD || ARCH_SOCFPGA
-	default 0xB80000 if MPC83xx
-	default 0x1F80000 if MPC85xx
+	default 0x2FC0000
 	help
 	  Address where to load flattened device tree in RAM.
 
diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h
index e9e3981060..6a8c41529f 100644
--- a/include/configs/km/keymile-common.h
+++ b/include/configs/km/keymile-common.h
@@ -160,6 +160,7 @@
 	"pnvramsize=" __stringify(CONFIG_KM_PNVRAM) "\0"		\
 	"testbootcmd=setenv boot_bank ${test_bank}; "			\
 		"run ${subbootcmds}; reset\0"				\
+	"env_version=1\0"						\
 	""
 
 #ifndef CONFIG_KM_DEF_ENV
diff --git a/include/configs/km/km-powerpc.h b/include/configs/km/km-powerpc.h
index fde8487178..7bfe12fecb 100644
--- a/include/configs/km/km-powerpc.h
+++ b/include/configs/km/km-powerpc.h
@@ -21,6 +21,9 @@
 /* Reserve 4 MB for malloc */
 #define CONFIG_SYS_MALLOC_LEN		(4 * 1024 * 1024)
 
+/* Increase max size of compressed kernel */
+#define CONFIG_SYS_BOOTM_LEN		0x2000000     /* 32 MB */
+
 /******************************************************************************
  * (PRAM usage)
  * ... -------------------------------------------------------
@@ -53,6 +56,7 @@
 		"protect on " __stringify(BOOTFLASH_START) "  +${filesize}\0"\
 	"set_fdthigh=true\0"						\
 	"checkfdt=true\0"						\
+	"bootm_mapsize=" __stringify(CONFIG_SYS_BOOTM_LEN) "\0"		\
 	""
 
 #endif /* __CONFIG_KEYMILE_POWERPC_H */
diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h
index 79edfa728a..98e0ce1c24 100644
--- a/include/configs/km/km_arm.h
+++ b/include/configs/km/km_arm.h
@@ -35,6 +35,9 @@
 /* Reserve 4 MB for malloc */
 #define CONFIG_SYS_MALLOC_LEN		(4 * 1024 * 1024)
 
+/* Increase max size of compressed kernel */
+#define CONFIG_SYS_BOOTM_LEN		(32 << 20)
+
 #include "asm/arch/config.h"
 
 #define CONFIG_SYS_LOAD_ADDR	0x00800000	/* default load adr- 8M */
-- 
2.26.0

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

* [PATCH v2 2/2] km/common: change ubicopy variable
  2020-10-09 15:21 [PATCH v2 1/2] km: adapt defines and variables for new memory layout Holger Brunck
@ 2020-10-09 15:21 ` Holger Brunck
  2020-10-12  4:08   ` Heiko Schocher
  2020-10-23  0:29   ` Tom Rini
  2020-10-12  4:07 ` [PATCH v2 1/2] km: adapt defines and variables for new memory layout Heiko Schocher
  2020-10-23  0:29 ` Tom Rini
  2 siblings, 2 replies; 6+ messages in thread
From: Holger Brunck @ 2020-10-09 15:21 UTC (permalink / raw)
  To: u-boot

Instead having a hard coded value for "cramfsaddr" after compile time,
we change it to take the variable "cramfsaddr" for the ubicopy variable.
This makes sure that ubicopy uses the right address, even when
the value for "cramfsaddr" has changed.

CC: Valentin Longchamp <valentin.longchamp@hitachi-powergrids.com>
CC: Heiko Schocher <hs@denx.de>
CC: Tom Rini <trini@konsulko.com>
Signed-off-by: Holger Brunck <holger.brunck@hitachi-powergrids.com>
---
 include/configs/km/keymile-common.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h
index 6a8c41529f..c1968048a7 100644
--- a/include/configs/km/keymile-common.h
+++ b/include/configs/km/keymile-common.h
@@ -143,8 +143,7 @@
 #define CONFIG_KM_DEF_ENV_FLASH_BOOT					\
 	"cramfsaddr=" __stringify(CONFIG_KM_CRAMFS_ADDR) "\0"		\
 	"cramfsloadkernel=cramfsload ${load_addr_r} ${uimage}\0"	\
-	"ubicopy=ubi read "__stringify(CONFIG_KM_CRAMFS_ADDR)		\
-			" bootfs${boot_bank}\0"				\
+	"ubicopy=ubi read ${cramfsaddr} bootfs${boot_bank}\0"		\
 	"uimage=" CONFIG_KM_UIMAGE_NAME					\
 	CONFIG_KM_DEV_ENV_FLASH_BOOT_UBI
 
-- 
2.26.0

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

* [PATCH v2 1/2] km: adapt defines and variables for new memory layout
  2020-10-09 15:21 [PATCH v2 1/2] km: adapt defines and variables for new memory layout Holger Brunck
  2020-10-09 15:21 ` [PATCH v2 2/2] km/common: change ubicopy variable Holger Brunck
@ 2020-10-12  4:07 ` Heiko Schocher
  2020-10-23  0:29 ` Tom Rini
  2 siblings, 0 replies; 6+ messages in thread
From: Heiko Schocher @ 2020-10-12  4:07 UTC (permalink / raw)
  To: u-boot

Hello Holger,

Am 09.10.2020 um 17:21 schrieb Holger Brunck:
> Due to increasing kernel image sizes we get problems when decompressing
> the kernel image. To fix this we need to change the addresses where we
> load and where we extract the kernel. Also we need to adapt the address
> where to load the CRAMFS image and where to load the DTB file.
> While at it also harmonize all boards for PPC and ARM to have the
> same values. Also we add a new variable "env_version", so that the
> userspace is able to detect if this is a u-boot binary with updated
> values or not.
> 
> CC: Valentin Longchamp <valentin.longchamp@hitachi-powergrids.com>
> CC: Heiko Schocher <hs@denx.de>
> CC: Tom Rini <trini@konsulko.com>
> Signed-off-by: Holger Brunck <holger.brunck@hitachi-powergrids.com>
> ---
>   board/keymile/Kconfig               | 12 +++---------
>   include/configs/km/keymile-common.h |  1 +
>   include/configs/km/km-powerpc.h     |  4 ++++
>   include/configs/km/km_arm.h         |  3 +++
>   4 files changed, 11 insertions(+), 9 deletions(-)

Nitpick: Version history missing... see:
https://www.denx.de/wiki/U-Boot/Patches#Sending_updated_patch_versions

Tip: may you want to use u-boot:/tools/patman/README

Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

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

* [PATCH v2 2/2] km/common: change ubicopy variable
  2020-10-09 15:21 ` [PATCH v2 2/2] km/common: change ubicopy variable Holger Brunck
@ 2020-10-12  4:08   ` Heiko Schocher
  2020-10-23  0:29   ` Tom Rini
  1 sibling, 0 replies; 6+ messages in thread
From: Heiko Schocher @ 2020-10-12  4:08 UTC (permalink / raw)
  To: u-boot

Hello Holger,

Am 09.10.2020 um 17:21 schrieb Holger Brunck:
> Instead having a hard coded value for "cramfsaddr" after compile time,
> we change it to take the variable "cramfsaddr" for the ubicopy variable.
> This makes sure that ubicopy uses the right address, even when
> the value for "cramfsaddr" has changed.
> 
> CC: Valentin Longchamp <valentin.longchamp@hitachi-powergrids.com>
> CC: Heiko Schocher <hs@denx.de>
> CC: Tom Rini <trini@konsulko.com>
> Signed-off-by: Holger Brunck <holger.brunck@hitachi-powergrids.com>
> ---
>   include/configs/km/keymile-common.h | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

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

* [PATCH v2 1/2] km: adapt defines and variables for new memory layout
  2020-10-09 15:21 [PATCH v2 1/2] km: adapt defines and variables for new memory layout Holger Brunck
  2020-10-09 15:21 ` [PATCH v2 2/2] km/common: change ubicopy variable Holger Brunck
  2020-10-12  4:07 ` [PATCH v2 1/2] km: adapt defines and variables for new memory layout Heiko Schocher
@ 2020-10-23  0:29 ` Tom Rini
  2 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2020-10-23  0:29 UTC (permalink / raw)
  To: u-boot

On Fri, Oct 09, 2020 at 05:21:32PM +0200, Holger Brunck wrote:

> Due to increasing kernel image sizes we get problems when decompressing
> the kernel image. To fix this we need to change the addresses where we
> load and where we extract the kernel. Also we need to adapt the address
> where to load the CRAMFS image and where to load the DTB file.
> While at it also harmonize all boards for PPC and ARM to have the
> same values. Also we add a new variable "env_version", so that the
> userspace is able to detect if this is a u-boot binary with updated
> values or not.
> 
> CC: Valentin Longchamp <valentin.longchamp@hitachi-powergrids.com>
> CC: Heiko Schocher <hs@denx.de>
> CC: Tom Rini <trini@konsulko.com>
> Signed-off-by: Holger Brunck <holger.brunck@hitachi-powergrids.com>
> Reviewed-by: Heiko Schocher <hs@denx.de>

Applied to u-boot/master, thanks!

-- 
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/20201022/5060cfdf/attachment.sig>

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

* [PATCH v2 2/2] km/common: change ubicopy variable
  2020-10-09 15:21 ` [PATCH v2 2/2] km/common: change ubicopy variable Holger Brunck
  2020-10-12  4:08   ` Heiko Schocher
@ 2020-10-23  0:29   ` Tom Rini
  1 sibling, 0 replies; 6+ messages in thread
From: Tom Rini @ 2020-10-23  0:29 UTC (permalink / raw)
  To: u-boot

On Fri, Oct 09, 2020 at 05:21:33PM +0200, Holger Brunck wrote:

> Instead having a hard coded value for "cramfsaddr" after compile time,
> we change it to take the variable "cramfsaddr" for the ubicopy variable.
> This makes sure that ubicopy uses the right address, even when
> the value for "cramfsaddr" has changed.
> 
> CC: Valentin Longchamp <valentin.longchamp@hitachi-powergrids.com>
> CC: Heiko Schocher <hs@denx.de>
> CC: Tom Rini <trini@konsulko.com>
> Signed-off-by: Holger Brunck <holger.brunck@hitachi-powergrids.com>
> Reviewed-by: Heiko Schocher <hs@denx.de>

Applied to u-boot/master, thanks!

-- 
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/20201022/8fa7a04e/attachment.sig>

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

end of thread, other threads:[~2020-10-23  0:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-09 15:21 [PATCH v2 1/2] km: adapt defines and variables for new memory layout Holger Brunck
2020-10-09 15:21 ` [PATCH v2 2/2] km/common: change ubicopy variable Holger Brunck
2020-10-12  4:08   ` Heiko Schocher
2020-10-23  0:29   ` Tom Rini
2020-10-12  4:07 ` [PATCH v2 1/2] km: adapt defines and variables for new memory layout Heiko Schocher
2020-10-23  0:29 ` 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.