All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/2] mpc83xx: fix the broken on the mpc83xx boards
@ 2016-07-08  3:25 Kevin Hao
  2016-07-08  3:25 ` [U-Boot] [PATCH 1/2] mpc83xx: fix the corruption of u-boot when saveenv Kevin Hao
  2016-07-08  3:25 ` [U-Boot] [PATCH 2/2] mpc83xx: make it bootable with the latest kernel Kevin Hao
  0 siblings, 2 replies; 5+ messages in thread
From: Kevin Hao @ 2016-07-08  3:25 UTC (permalink / raw)
  To: u-boot

Hi,

Robert P. J. Day reported that the latest u-boot can't work on mpc8315erdb
board. There are two bugs in the config of this board. This patch series
tries to fix these two issue for all the mpc83xx boards. Only run test
on mpc8315erdb board. Just build test for other boards.

Kevin Hao (2):
  mpc83xx: fix the corruption of u-boot when saveenv
  mpc83xx: make it bootable with the latest kernel

 include/configs/MPC8308RDB.h  | 3 ++-
 include/configs/MPC8313ERDB.h | 5 +++--
 include/configs/MPC8315ERDB.h | 5 +++--
 include/configs/MPC8323ERDB.h | 3 ++-
 include/configs/MPC832XEMDS.h | 3 ++-
 include/configs/MPC8349EMDS.h | 3 ++-
 include/configs/MPC8349ITX.h  | 3 ++-
 include/configs/MPC837XEMDS.h | 3 ++-
 include/configs/MPC837XERDB.h | 3 ++-
 9 files changed, 20 insertions(+), 11 deletions(-)

-- 
2.8.1

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

* [U-Boot] [PATCH 1/2] mpc83xx: fix the corruption of u-boot when saveenv
  2016-07-08  3:25 [U-Boot] [PATCH 0/2] mpc83xx: fix the broken on the mpc83xx boards Kevin Hao
@ 2016-07-08  3:25 ` Kevin Hao
  2016-07-19 22:32   ` york sun
  2016-07-08  3:25 ` [U-Boot] [PATCH 2/2] mpc83xx: make it bootable with the latest kernel Kevin Hao
  1 sibling, 1 reply; 5+ messages in thread
From: Kevin Hao @ 2016-07-08  3:25 UTC (permalink / raw)
  To: u-boot

Robert P. J. Day has pointed that the value of SYS_MONITOR_LEN in
MPC8315ERDB.h is smaller than the u-boot.bin. This will cause the
overlap between the code of u-boot and the environment variable.
So when executing saveenv, it will corrupt the code of u-boot and
causes the board not boot. Fix this for all the mpc83xx boards by
reserving a 512K area.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
---
 include/configs/MPC8308RDB.h  | 2 +-
 include/configs/MPC8313ERDB.h | 2 +-
 include/configs/MPC8315ERDB.h | 2 +-
 include/configs/MPC8323ERDB.h | 2 +-
 include/configs/MPC832XEMDS.h | 2 +-
 include/configs/MPC8349EMDS.h | 2 +-
 include/configs/MPC8349ITX.h  | 2 +-
 include/configs/MPC837XEMDS.h | 2 +-
 include/configs/MPC837XERDB.h | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/configs/MPC8308RDB.h b/include/configs/MPC8308RDB.h
index 578325cd05eb..e809dcfc5c85 100644
--- a/include/configs/MPC8308RDB.h
+++ b/include/configs/MPC8308RDB.h
@@ -203,7 +203,7 @@
  */
 #define CONFIG_SYS_MONITOR_BASE	CONFIG_SYS_TEXT_BASE /* start of monitor */
 
-#define CONFIG_SYS_MONITOR_LEN	(384 * 1024) /* Reserve 384 kB for Mon */
+#define CONFIG_SYS_MONITOR_LEN	(512 * 1024) /* Reserve 512 kB for Mon */
 #define CONFIG_SYS_MALLOC_LEN	(512 * 1024) /* Reserved for malloc */
 
 /*
diff --git a/include/configs/MPC8313ERDB.h b/include/configs/MPC8313ERDB.h
index 5613a4a0cd28..1947cf1fd369 100644
--- a/include/configs/MPC8313ERDB.h
+++ b/include/configs/MPC8313ERDB.h
@@ -241,7 +241,7 @@
 #define CONFIG_SYS_INIT_SP_OFFSET	CONFIG_SYS_GBL_DATA_OFFSET
 
 /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */
-#define CONFIG_SYS_MONITOR_LEN	(384 * 1024)	/* Reserve 384 kB for Mon */
+#define CONFIG_SYS_MONITOR_LEN	(512 * 1024)	/* Reserve 512 kB for Mon */
 #define CONFIG_SYS_MALLOC_LEN	(512 * 1024)	/* Reserved for malloc */
 
 /*
diff --git a/include/configs/MPC8315ERDB.h b/include/configs/MPC8315ERDB.h
index 7ce5f5993736..5b23f9401c5e 100644
--- a/include/configs/MPC8315ERDB.h
+++ b/include/configs/MPC8315ERDB.h
@@ -169,7 +169,7 @@
 /*
  * The reserved memory
  */
-#define CONFIG_SYS_MONITOR_LEN	(384 * 1024) /* Reserve 384 kB for Mon */
+#define CONFIG_SYS_MONITOR_LEN	(512 * 1024) /* Reserve 512 kB for Mon */
 #define CONFIG_SYS_MALLOC_LEN	(512 * 1024) /* Reserved for malloc */
 
 /*
diff --git a/include/configs/MPC8323ERDB.h b/include/configs/MPC8323ERDB.h
index 13f954d00edd..6680b5938e64 100644
--- a/include/configs/MPC8323ERDB.h
+++ b/include/configs/MPC8323ERDB.h
@@ -156,7 +156,7 @@
 #endif
 
 /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */
-#define CONFIG_SYS_MONITOR_LEN	(384 * 1024)	/* Reserve 384 kB for Mon */
+#define CONFIG_SYS_MONITOR_LEN	(512 * 1024)	/* Reserve 512 kB for Mon */
 #define CONFIG_SYS_MALLOC_LEN	(256 * 1024)	/* Reserved for malloc */
 
 /*
diff --git a/include/configs/MPC832XEMDS.h b/include/configs/MPC832XEMDS.h
index fd482606adab..babbd1a8e824 100644
--- a/include/configs/MPC832XEMDS.h
+++ b/include/configs/MPC832XEMDS.h
@@ -168,7 +168,7 @@
 #endif
 
 /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */
-#define CONFIG_SYS_MONITOR_LEN	(384 * 1024)	/* Reserve 384 kB for Mon */
+#define CONFIG_SYS_MONITOR_LEN	(512 * 1024)	/* Reserve 512 kB for Mon */
 #define CONFIG_SYS_MALLOC_LEN	(256 * 1024)	/* Reserved for malloc */
 
 /*
diff --git a/include/configs/MPC8349EMDS.h b/include/configs/MPC8349EMDS.h
index 288b126d02ef..0c44097519b0 100644
--- a/include/configs/MPC8349EMDS.h
+++ b/include/configs/MPC8349EMDS.h
@@ -225,7 +225,7 @@
 			(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET	CONFIG_SYS_GBL_DATA_OFFSET
 
-#define CONFIG_SYS_MONITOR_LEN	(384 * 1024)	/* Reserve 384 kB for Mon */
+#define CONFIG_SYS_MONITOR_LEN	(512 * 1024)	/* Reserve 512 kB for Mon */
 #define CONFIG_SYS_MALLOC_LEN	(256 * 1024)	/* Reserved for malloc */
 
 /*
diff --git a/include/configs/MPC8349ITX.h b/include/configs/MPC8349ITX.h
index 2721255254fb..a7c37e1ebe9c 100644
--- a/include/configs/MPC8349ITX.h
+++ b/include/configs/MPC8349ITX.h
@@ -330,7 +330,7 @@ boards, we say we have two, but don't display a message if we find only one. */
 #define CONFIG_SYS_INIT_SP_OFFSET	CONFIG_SYS_GBL_DATA_OFFSET
 
 /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */
-#define CONFIG_SYS_MONITOR_LEN	(384 * 1024) /* Reserve 384 kB for Mon */
+#define CONFIG_SYS_MONITOR_LEN	(512 * 1024) /* Reserve 512 kB for Mon */
 #define CONFIG_SYS_MALLOC_LEN	(256 * 1024) /* Reserved for malloc */
 
 /*
diff --git a/include/configs/MPC837XEMDS.h b/include/configs/MPC837XEMDS.h
index 921d5f399d25..8bc72d562feb 100644
--- a/include/configs/MPC837XEMDS.h
+++ b/include/configs/MPC837XEMDS.h
@@ -200,7 +200,7 @@
 #endif
 
 /* CONFIG_SYS_MONITOR_LEN must be a multiple of CONFIG_ENV_SECT_SIZE */
-#define CONFIG_SYS_MONITOR_LEN	(384 * 1024) /* Reserve 384 kB for Mon */
+#define CONFIG_SYS_MONITOR_LEN	(512 * 1024) /* Reserve 512 kB for Mon */
 #define CONFIG_SYS_MALLOC_LEN	(512 * 1024) /* Reserved for malloc */
 
 /*
diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h
index bb06e89b4ea0..8962959156be 100644
--- a/include/configs/MPC837XERDB.h
+++ b/include/configs/MPC837XERDB.h
@@ -225,7 +225,7 @@
 #undef	CONFIG_SYS_RAMBOOT
 #endif
 
-#define CONFIG_SYS_MONITOR_LEN	(384 * 1024) /* Reserve 384 kB for Mon */
+#define CONFIG_SYS_MONITOR_LEN	(512 * 1024) /* Reserve 512 kB for Mon */
 #define CONFIG_SYS_MALLOC_LEN	(512 * 1024) /* Reserved for malloc */
 
 /*
-- 
2.8.1

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

* [U-Boot] [PATCH 2/2] mpc83xx: make it bootable with the latest kernel
  2016-07-08  3:25 [U-Boot] [PATCH 0/2] mpc83xx: fix the broken on the mpc83xx boards Kevin Hao
  2016-07-08  3:25 ` [U-Boot] [PATCH 1/2] mpc83xx: fix the corruption of u-boot when saveenv Kevin Hao
@ 2016-07-08  3:25 ` Kevin Hao
  1 sibling, 0 replies; 5+ messages in thread
From: Kevin Hao @ 2016-07-08  3:25 UTC (permalink / raw)
  To: u-boot

Due to the blow up of the latest kernel size, the default gnuzip
size (8M) seems too small. The yocto kernel size I built for
mpc8315erdb board is 5294393, and it can't be boot by using the
latest u-boot. So expand gnuzip buffer for all the mpc83xx boards
to fix this issue.

Robert P. J. Day also pointed that the kernel partition on the NAND
flash is also too small, fix it at the same time.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
---
 include/configs/MPC8308RDB.h  | 1 +
 include/configs/MPC8313ERDB.h | 3 ++-
 include/configs/MPC8315ERDB.h | 3 ++-
 include/configs/MPC8323ERDB.h | 1 +
 include/configs/MPC832XEMDS.h | 1 +
 include/configs/MPC8349EMDS.h | 1 +
 include/configs/MPC8349ITX.h  | 1 +
 include/configs/MPC837XEMDS.h | 1 +
 include/configs/MPC837XERDB.h | 1 +
 9 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/include/configs/MPC8308RDB.h b/include/configs/MPC8308RDB.h
index e809dcfc5c85..5b804648edb8 100644
--- a/include/configs/MPC8308RDB.h
+++ b/include/configs/MPC8308RDB.h
@@ -452,6 +452,7 @@
  * the maximum mapped by the Linux kernel during initialization.
  */
 #define CONFIG_SYS_BOOTMAPSZ	(256 << 20) /* Initial Memory map for Linux */
+#define CONFIG_SYS_BOOTM_LEN	(64 << 20)	/* Increase max gunzip size */
 
 /*
  * Core HID Setup
diff --git a/include/configs/MPC8313ERDB.h b/include/configs/MPC8313ERDB.h
index 1947cf1fd369..1c4e082d4ec6 100644
--- a/include/configs/MPC8313ERDB.h
+++ b/include/configs/MPC8313ERDB.h
@@ -268,7 +268,7 @@
 #define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT			"nand0=e2800000.flash"
 #define MTDPARTS_DEFAULT		\
-	"mtdparts=e2800000.flash:512k(uboot),128k(env),3m at 1m(kernel),-(fs)"
+	"mtdparts=e2800000.flash:512k(uboot),128k(env),6m at 1m(kernel),-(fs)"
 
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
 #define CONFIG_CMD_NAND 1
@@ -502,6 +502,7 @@
  */
 				/* Initial Memory map for Linux*/
 #define CONFIG_SYS_BOOTMAPSZ	(256 << 20)
+#define CONFIG_SYS_BOOTM_LEN	(64 << 20)	/* Increase max gunzip size */
 
 #define CONFIG_SYS_RCWH_PCIHOST 0x80000000	/* PCIHOST  */
 
diff --git a/include/configs/MPC8315ERDB.h b/include/configs/MPC8315ERDB.h
index 5b23f9401c5e..23a2e34ce729 100644
--- a/include/configs/MPC8315ERDB.h
+++ b/include/configs/MPC8315ERDB.h
@@ -241,7 +241,7 @@
 #define CONFIG_CMD_MTDPARTS
 #define MTDIDS_DEFAULT			"nand0=e0600000.flash"
 #define MTDPARTS_DEFAULT		\
-	"mtdparts=e0600000.flash:512k(uboot),128k(env),3m at 1m(kernel),-(fs)"
+	"mtdparts=e0600000.flash:512k(uboot),128k(env),6m@1m(kernel),-(fs)"
 
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
 #define CONFIG_CMD_NAND			1
@@ -489,6 +489,7 @@
  * the maximum mapped by the Linux kernel during initialization.
  */
 #define CONFIG_SYS_BOOTMAPSZ	(256 << 20) /* Initial Memory map for Linux */
+#define CONFIG_SYS_BOOTM_LEN	(64 << 20)	/* Increase max gunzip size */
 
 /*
  * Core HID Setup
diff --git a/include/configs/MPC8323ERDB.h b/include/configs/MPC8323ERDB.h
index 6680b5938e64..095c0d8dcadc 100644
--- a/include/configs/MPC8323ERDB.h
+++ b/include/configs/MPC8323ERDB.h
@@ -359,6 +359,7 @@
  */
 					/* Initial Memory map for Linux */
 #define CONFIG_SYS_BOOTMAPSZ		(256 << 20)
+#define CONFIG_SYS_BOOTM_LEN	(64 << 20)	/* Increase max gunzip size */
 
 /*
  * Core HID Setup
diff --git a/include/configs/MPC832XEMDS.h b/include/configs/MPC832XEMDS.h
index babbd1a8e824..18418e398e53 100644
--- a/include/configs/MPC832XEMDS.h
+++ b/include/configs/MPC832XEMDS.h
@@ -441,6 +441,7 @@
  */
 					/* Initial Memory map for Linux */
 #define CONFIG_SYS_BOOTMAPSZ		(256 << 20)
+#define CONFIG_SYS_BOOTM_LEN	(64 << 20)	/* Increase max gunzip size */
 
 /*
  * Core HID Setup
diff --git a/include/configs/MPC8349EMDS.h b/include/configs/MPC8349EMDS.h
index 0c44097519b0..a2fa783a77e9 100644
--- a/include/configs/MPC8349EMDS.h
+++ b/include/configs/MPC8349EMDS.h
@@ -508,6 +508,7 @@
  */
 				/* Initial Memory map for Linux*/
 #define CONFIG_SYS_BOOTMAPSZ	(256 << 20)
+#define CONFIG_SYS_BOOTM_LEN	(64 << 20)	/* Increase max gunzip size */
 
 #define CONFIG_SYS_RCWH_PCIHOST 0x80000000 /* PCIHOST  */
 
diff --git a/include/configs/MPC8349ITX.h b/include/configs/MPC8349ITX.h
index a7c37e1ebe9c..c11c0cf8250d 100644
--- a/include/configs/MPC8349ITX.h
+++ b/include/configs/MPC8349ITX.h
@@ -544,6 +544,7 @@ boards, we say we have two, but don't display a message if we find only one. */
  */
 				/* Initial Memory map for Linux*/
 #define CONFIG_SYS_BOOTMAPSZ	(256 << 20)
+#define CONFIG_SYS_BOOTM_LEN	(64 << 20)	/* Increase max gunzip size */
 
 #define CONFIG_SYS_HRCW_LOW (\
 	HRCWL_LCL_BUS_TO_SCB_CLK_1X1 |\
diff --git a/include/configs/MPC837XEMDS.h b/include/configs/MPC837XEMDS.h
index 8bc72d562feb..b2dc1890c743 100644
--- a/include/configs/MPC837XEMDS.h
+++ b/include/configs/MPC837XEMDS.h
@@ -522,6 +522,7 @@ extern int board_pci_host_broken(void);
  * the maximum mapped by the Linux kernel during initialization.
  */
 #define CONFIG_SYS_BOOTMAPSZ	(256 << 20) /* Initial Memory map for Linux */
+#define CONFIG_SYS_BOOTM_LEN	(64 << 20)	/* Increase max gunzip size */
 
 /*
  * Core HID Setup
diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h
index 8962959156be..8eb87ebde502 100644
--- a/include/configs/MPC837XERDB.h
+++ b/include/configs/MPC837XERDB.h
@@ -533,6 +533,7 @@
  * the maximum mapped by the Linux kernel during initialization.
  */
 #define CONFIG_SYS_BOOTMAPSZ	(256 << 20) /* Initial Memory map for Linux */
+#define CONFIG_SYS_BOOTM_LEN	(64 << 20)	/* Increase max gunzip size */
 
 /*
  * Core HID Setup
-- 
2.8.1

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

* [U-Boot] [PATCH 1/2] mpc83xx: fix the corruption of u-boot when saveenv
  2016-07-08  3:25 ` [U-Boot] [PATCH 1/2] mpc83xx: fix the corruption of u-boot when saveenv Kevin Hao
@ 2016-07-19 22:32   ` york sun
  2016-07-20  3:55     ` Sinan Akman
  0 siblings, 1 reply; 5+ messages in thread
From: york sun @ 2016-07-19 22:32 UTC (permalink / raw)
  To: u-boot

On 07/08/2016 12:19 AM, Kevin Hao wrote:
> Robert P. J. Day has pointed that the value of SYS_MONITOR_LEN in
> MPC8315ERDB.h is smaller than the u-boot.bin. This will cause the
> overlap between the code of u-boot and the environment variable.
> So when executing saveenv, it will corrupt the code of u-boot and
> causes the board not boot. Fix this for all the mpc83xx boards by
> reserving a 512K area.
>
> Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
> ---
>  include/configs/MPC8308RDB.h  | 2 +-
>  include/configs/MPC8313ERDB.h | 2 +-
>  include/configs/MPC8315ERDB.h | 2 +-
>  include/configs/MPC8323ERDB.h | 2 +-
>  include/configs/MPC832XEMDS.h | 2 +-
>  include/configs/MPC8349EMDS.h | 2 +-
>  include/configs/MPC8349ITX.h  | 2 +-
>  include/configs/MPC837XEMDS.h | 2 +-
>  include/configs/MPC837XERDB.h | 2 +-
>  9 files changed, 9 insertions(+), 9 deletions(-)
>

I don't have any mpc83xx board to test the change. But it looks OK.

Sinan, do you have any comment for this and next patch in this set?

York

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

* [U-Boot] [PATCH 1/2] mpc83xx: fix the corruption of u-boot when saveenv
  2016-07-19 22:32   ` york sun
@ 2016-07-20  3:55     ` Sinan Akman
  0 siblings, 0 replies; 5+ messages in thread
From: Sinan Akman @ 2016-07-20  3:55 UTC (permalink / raw)
  To: u-boot


   Hi York

york sun wrote:
> On 07/08/2016 12:19 AM, Kevin Hao wrote:
>> Robert P. J. Day has pointed that the value of SYS_MONITOR_LEN in
>> MPC8315ERDB.h is smaller than the u-boot.bin. This will cause the
>> overlap between the code of u-boot and the environment variable.
>> So when executing saveenv, it will corrupt the code of u-boot and
>> causes the board not boot. Fix this for all the mpc83xx boards by
>> reserving a 512K area.
>>
>> Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
>> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
>> ---
>>  include/configs/MPC8308RDB.h  | 2 +-
>>  include/configs/MPC8313ERDB.h | 2 +-
>>  include/configs/MPC8315ERDB.h | 2 +-
>>  include/configs/MPC8323ERDB.h | 2 +-
>>  include/configs/MPC832XEMDS.h | 2 +-
>>  include/configs/MPC8349EMDS.h | 2 +-
>>  include/configs/MPC8349ITX.h  | 2 +-
>>  include/configs/MPC837XEMDS.h | 2 +-
>>  include/configs/MPC837XERDB.h | 2 +-
>>  9 files changed, 9 insertions(+), 9 deletions(-)
>>
> 
> I don't have any mpc83xx board to test the change. But it looks OK.
> 
> Sinan, do you have any comment for this and next patch in this set?

   I am travelling now but I could test several MPC83xx boards sometimes
next week if you prefer to wait for test. Otherwise the patch looks fine.

   Regards
   Sinan Akman

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

end of thread, other threads:[~2016-07-20  3:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-08  3:25 [U-Boot] [PATCH 0/2] mpc83xx: fix the broken on the mpc83xx boards Kevin Hao
2016-07-08  3:25 ` [U-Boot] [PATCH 1/2] mpc83xx: fix the corruption of u-boot when saveenv Kevin Hao
2016-07-19 22:32   ` york sun
2016-07-20  3:55     ` Sinan Akman
2016-07-08  3:25 ` [U-Boot] [PATCH 2/2] mpc83xx: make it bootable with the latest kernel Kevin Hao

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.