Skip to contentSkip to conversation

MX31: Adjust default environment for QONG module

PATCH New Stefano Babic 2 participants 4 messages Apr 28, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MX31: Adjust default environment for QONG module

Because the the size of u-boot increased after adding new features (mainly the support for ubi/ubifs), storing u-boot requires an additional sector on the flash. The patch adjusts the kernel_addr and mtdparts variables giving 128KB more space for u-boot code.

---
 include/configs/qong.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
include/configs/qong.h +2 -2
index 1a2f19f..067dc79 100644
@@ -144,7 +144,7 @@
 	"addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"		\
 	"addmisc=setenv bootargs ${bootargs}\0"				\
 	"uboot_addr=a0000000\0"						\
-	"kernel_addr=a0080000\0"					\
+	"kernel_addr=a00a0000\0"					\
 	"ramdisk_addr=a0300000\0"					\
 	"u-boot=qong/u-boot.bin\0"					\
 	"kernel_addr_r=80800000\0"					\
@@ -274,7 +274,7 @@ extern int qong_nand_rdy(void *chip);
 #define CONFIG_FLASH_CFI_MTD
 #define MTDIDS_DEFAULT		"nor0=physmap-flash.0"
 #define MTDPARTS_DEFAULT	\
-	"mtdparts=physmap-flash.0:256k(U-Boot),128k(env1),"	\
+	"mtdparts=physmap-flash.0:384k(U-Boot),128k(env1),"	\
 	"128k(env2),2560k(kernel),13m(ramdisk),-(user)"
 
 #endif /* __CONFIG_H */
Signature · 1 line
1.6.3.3
#1 lore raw

PATCH 1/1 MX31: Adjust default environment for QONG module

Dear Stefano Babic,

Quoted 5 lines · In message <[email protected]> you wrote:

Because the the size of u-boot increased after adding new features (mainly the support for ubi/ubifs), storing u-boot requires an additional sector on the flash. The patch adjusts the kernel_addr and mtdparts variables giving 128KB more space for u-boot code.

...

include/configs/qong.h line 148

Quoted 7 lines
include/configs/qong.h +1 -1
@@ -144,7 +144,7 @@
 	"addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"		\
 	"addmisc=setenv bootargs ${bootargs}\0"				\
 	"uboot_addr=a0000000\0"						\
-	"kernel_addr=a0080000\0"					\
+	"kernel_addr=a00a0000\0"					\
 	"ramdisk_addr=a0300000\0"					\

=========^^^^^^^^^^^^^^^^^^^^^

include/configs/qong.h extern int qong_nand_rdy(void *chip); · line 278

Quoted 9 lines
include/configs/qong.h +1 -1
 	"u-boot=qong/u-boot.bin\0"					\
 	"kernel_addr_r=80800000\0"					\
@@ -274,7 +274,7 @@ extern int qong_nand_rdy(void *chip);
 #define CONFIG_FLASH_CFI_MTD
 #define MTDIDS_DEFAULT		"nor0=physmap-flash.0"
 #define MTDPARTS_DEFAULT	\
-	"mtdparts=physmap-flash.0:256k(U-Boot),128k(env1),"	\
+	"mtdparts=physmap-flash.0:384k(U-Boot),128k(env1),"	\
 	"128k(env2),2560k(kernel),13m(ramdisk),-(user)"

This shifts the start address of the "ramdisk' and "user" partitions to some odd addresses; also, this makes the definition of "ramdisk_addr" (see above) incorrct.

I recommend to do this instead:

- "mtdparts=physmap-flash.0:256k(U-Boot),128k(env1)," \
- "128k(env2),2560k(kernel),13m(ramdisk),-(user)"
+ "mtdparts=physmap-flash.0:384k(U-Boot),128k(env1)," \
+ "128k(env2),2432k(kernel),13m(ramdisk),-(user)"

What do you think?

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
People seldom know what they want until you give them what  they  ask
for.
#2 lore raw

PATCH 1/1 MX31: Adjust default environment for QONG module

Quoted 16 lines · Wolfgang Denk
Quoted 1 line

"ramdisk_addr=a0300000\0" \

=========^^^^^^^^^^^^^^^^^^^^^

include/configs/qong.h extern int qong_nand_rdy(void *chip); · line 278

Quoted 9 lines
include/configs/qong.h +1 -1
 	"u-boot=qong/u-boot.bin\0"					\
 	"kernel_addr_r=80800000\0"					\
@@ -274,7 +274,7 @@ extern int qong_nand_rdy(void *chip);
 #define CONFIG_FLASH_CFI_MTD
 #define MTDIDS_DEFAULT		"nor0=physmap-flash.0"
 #define MTDPARTS_DEFAULT	\
-	"mtdparts=physmap-flash.0:256k(U-Boot),128k(env1),"	\
+	"mtdparts=physmap-flash.0:384k(U-Boot),128k(env1),"	\
 	"128k(env2),2560k(kernel),13m(ramdisk),-(user)"

This shifts the start address of the "ramdisk' and "user" partitions to some odd addresses; also, this makes the definition of "ramdisk_addr" (see above) incorrct.

You are right. The ramdisk_addr must be shifted, or the kernel size must be adjusted.

Quoted 9 lines

I recommend to do this instead:

include/configs/qong.h +2 -2
-	"mtdparts=physmap-flash.0:256k(U-Boot),128k(env1),"	\
-	"128k(env2),2560k(kernel),13m(ramdisk),-(user)"
+	"mtdparts=physmap-flash.0:384k(U-Boot),128k(env1),"	\
+	"128k(env2),2432k(kernel),13m(ramdisk),-(user)"

What do you think?

Agree. I will send a new version of the patch with your proposed values.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#3 lore raw

PATCH v2 1/1 MX31: Adjust default environment for QONG module

In reply to Stefano Babic

Because the the size of u-boot increased after adding new features (mainly the support for ubi/ubifs), storing u-boot requires an additional sector on the flash. The patch adjusts the kernel_addr and mtdparts variable giving 128KB more space for u-boot code.

---
 include/configs/qong.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
include/configs/qong.h +3 -3
index 1284a00..dc828f6 100644
@@ -144,7 +144,7 @@
 	"addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"		\
 	"addmisc=setenv bootargs ${bootargs}\0"				\
 	"uboot_addr=a0000000\0"						\
-	"kernel_addr=a0080000\0"					\
+	"kernel_addr=a00a0000\0"					\
 	"ramdisk_addr=a0300000\0"					\
 	"u-boot=qong/u-boot.bin\0"					\
 	"kernel_addr_r=80800000\0"					\
@@ -276,7 +276,7 @@ extern int qong_nand_rdy(void *chip);
 #define CONFIG_FLASH_CFI_MTD
 #define MTDIDS_DEFAULT		"nor0=physmap-flash.0"
 #define MTDPARTS_DEFAULT	\
-	"mtdparts=physmap-flash.0:256k(U-Boot),128k(env1),"	\
-	"128k(env2),2560k(kernel),13m(ramdisk),-(user)"
+	"mtdparts=physmap-flash.0:384k(U-Boot),128k(env1),"	\
+	"128k(env2),2432k(kernel),13m(ramdisk),-(user)"
 
 #endif /* __CONFIG_H */
Signature · 1 line
1.6.3.3