All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] armv8/ls1043a: Add MTD partition scheme
@ 2016-04-01  9:28 Wenbin Song
  2016-04-05 20:32 ` York Sun
  0 siblings, 1 reply; 12+ messages in thread
From: Wenbin Song @ 2016-04-01  9:28 UTC (permalink / raw)
  To: u-boot

Add and share the the MTD partition scheme with kernel by defualt bootargs.
And add the "mtdparts" env.

Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
---
 include/configs/ls1043a_common.h | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
index fd243b1..6964873 100644
--- a/include/configs/ls1043a_common.h
+++ b/include/configs/ls1043a_common.h
@@ -236,6 +236,21 @@
 #define CONFIG_HWCONFIG
 #define HWCONFIG_BUFFER_SIZE		128
 
+#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
+#define MTDPARTS_DEFAULT "mtdparts=spi0.0:1m(uboot)," \
+			"5m(kernel),1m(dtb),9m(file_system)"
+#else
+#define MTDPARTS_DEFAULT "mtdparts=60000000.nor:1m(nor_bank0_rcw)," \
+			"1m(nor_bank0_uboot),1m(nor_bank0_uboot_env)," \
+			"1m(nor_bank0_fman_uconde),40m(nor_bank0_fit)," \
+			"1m(nor_bank4_rcw),1m(nor_bank4_uboot)," \
+			"1m(nor_bank4_uboot_env),1m(nor_bank4_fman_ucode)," \
+			"40m(nor_bank4_fit);7e800000.flash:" \
+			"1m(nand_uboot),1m(nand_uboot_env)," \
+			"20m(nand_fit);spi0.0:1m(uboot)," \
+			"5m(kernel),1m(dtb),9m(file_system)"
+#endif
+
 /* Initial environment variables */
 #define CONFIG_EXTRA_ENV_SETTINGS		\
 	"hwconfig=fsl_ddr:bank_intlv=auto\0"	\
@@ -248,10 +263,13 @@
 	"kernel_start=0x61100000\0"		\
 	"kernel_load=0xa0000000\0"		\
 	"kernel_size=0x2800000\0"		\
-	"console=ttyAMA0,38400n8\0"
+	"console=ttyAMA0,38400n8\0"		\
+	"mtdparts=" MTDPARTS_DEFAULT "\0"
 
 #define CONFIG_BOOTARGS			"console=ttyS0,115200 root=/dev/ram0 " \
-					"earlycon=uart8250,mmio,0x21c0500"
+					"earlycon=uart8250,mmio,0x21c0500 " \
+					MTDPARTS_DEFAULT
+
 #define CONFIG_BOOTCOMMAND		"cp.b $kernel_start $kernel_load "     \
 					"$kernel_size && bootm $kernel_load"
 #define CONFIG_BOOTDELAY		10
-- 
2.1.0.27.g96db324

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

* [U-Boot] [PATCH] armv8/ls1043a: Add MTD partition scheme
  2016-04-01  9:28 [U-Boot] [PATCH] armv8/ls1043a: Add MTD partition scheme Wenbin Song
@ 2016-04-05 20:32 ` York Sun
  2016-04-05 21:02   ` York Sun
  2016-04-06  4:20   ` Wenbin Song
  0 siblings, 2 replies; 12+ messages in thread
From: York Sun @ 2016-04-05 20:32 UTC (permalink / raw)
  To: u-boot

On 04/01/2016 02:37 AM, Wenbin Song wrote:
> Add and share the the MTD partition scheme with kernel by defualt bootargs.
> And add the "mtdparts" env.
> 
> Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
> ---
>  include/configs/ls1043a_common.h | 22 ++++++++++++++++++++--
>  1 file changed, 20 insertions(+), 2 deletions(-)
> 
> diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
> index fd243b1..6964873 100644
> --- a/include/configs/ls1043a_common.h
> +++ b/include/configs/ls1043a_common.h
> @@ -236,6 +236,21 @@
>  #define CONFIG_HWCONFIG
>  #define HWCONFIG_BUFFER_SIZE		128
>  
> +#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
> +#define MTDPARTS_DEFAULT "mtdparts=spi0.0:1m(uboot)," \
> +			"5m(kernel),1m(dtb),9m(file_system)"
> +#else
> +#define MTDPARTS_DEFAULT "mtdparts=60000000.nor:1m(nor_bank0_rcw)," \
> +			"1m(nor_bank0_uboot),1m(nor_bank0_uboot_env)," \
> +			"1m(nor_bank0_fman_uconde),40m(nor_bank0_fit)," \
> +			"1m(nor_bank4_rcw),1m(nor_bank4_uboot)," \
> +			"1m(nor_bank4_uboot_env),1m(nor_bank4_fman_ucode)," \
> +			"40m(nor_bank4_fit);7e800000.flash:" \
> +			"1m(nand_uboot),1m(nand_uboot_env)," \
> +			"20m(nand_fit);spi0.0:1m(uboot)," \
> +			"5m(kernel),1m(dtb),9m(file_system)"
> +#endif
> +
>  /* Initial environment variables */
>  #define CONFIG_EXTRA_ENV_SETTINGS		\
>  	"hwconfig=fsl_ddr:bank_intlv=auto\0"	\
> @@ -248,10 +263,13 @@
>  	"kernel_start=0x61100000\0"		\
>  	"kernel_load=0xa0000000\0"		\
>  	"kernel_size=0x2800000\0"		\
> -	"console=ttyAMA0,38400n8\0"
> +	"console=ttyAMA0,38400n8\0"		\
> +	"mtdparts=" MTDPARTS_DEFAULT "\0"
>  
>  #define CONFIG_BOOTARGS			"console=ttyS0,115200 root=/dev/ram0 " \
> -					"earlycon=uart8250,mmio,0x21c0500"
> +					"earlycon=uart8250,mmio,0x21c0500 " \
> +					MTDPARTS_DEFAULT

You could use $mtdparts here so your bootcmd doesn't get too long.

York

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

* [U-Boot] [PATCH] armv8/ls1043a: Add MTD partition scheme
  2016-04-05 20:32 ` York Sun
@ 2016-04-05 21:02   ` York Sun
  2016-04-06  3:24     ` Wenbin Song
  2016-04-06  4:20   ` Wenbin Song
  1 sibling, 1 reply; 12+ messages in thread
From: York Sun @ 2016-04-05 21:02 UTC (permalink / raw)
  To: u-boot

On 04/05/2016 01:32 PM, York Sun wrote:
> On 04/01/2016 02:37 AM, Wenbin Song wrote:
>> Add and share the the MTD partition scheme with kernel by defualt bootargs.
>> And add the "mtdparts" env.
>>
>> Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
>> ---
>>  include/configs/ls1043a_common.h | 22 ++++++++++++++++++++--
>>  1 file changed, 20 insertions(+), 2 deletions(-)
>>
>> diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
>> index fd243b1..6964873 100644
>> --- a/include/configs/ls1043a_common.h
>> +++ b/include/configs/ls1043a_common.h
>> @@ -236,6 +236,21 @@
>>  #define CONFIG_HWCONFIG
>>  #define HWCONFIG_BUFFER_SIZE		128
>>  
>> +#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
>> +#define MTDPARTS_DEFAULT "mtdparts=spi0.0:1m(uboot)," \
>> +			"5m(kernel),1m(dtb),9m(file_system)"
>> +#else
>> +#define MTDPARTS_DEFAULT "mtdparts=60000000.nor:1m(nor_bank0_rcw)," \
>> +			"1m(nor_bank0_uboot),1m(nor_bank0_uboot_env)," \
>> +			"1m(nor_bank0_fman_uconde),40m(nor_bank0_fit)," \
>> +			"1m(nor_bank4_rcw),1m(nor_bank4_uboot)," \
>> +			"1m(nor_bank4_uboot_env),1m(nor_bank4_fman_ucode)," \
>> +			"40m(nor_bank4_fit);7e800000.flash:" \
>> +			"1m(nand_uboot),1m(nand_uboot_env)," \
>> +			"20m(nand_fit);spi0.0:1m(uboot)," \
>> +			"5m(kernel),1m(dtb),9m(file_system)"
>> +#endif
>> +
>>  /* Initial environment variables */
>>  #define CONFIG_EXTRA_ENV_SETTINGS		\
>>  	"hwconfig=fsl_ddr:bank_intlv=auto\0"	\
>> @@ -248,10 +263,13 @@
>>  	"kernel_start=0x61100000\0"		\
>>  	"kernel_load=0xa0000000\0"		\
>>  	"kernel_size=0x2800000\0"		\
>> -	"console=ttyAMA0,38400n8\0"
>> +	"console=ttyAMA0,38400n8\0"		\
>> +	"mtdparts=" MTDPARTS_DEFAULT "\0"
>>  
>>  #define CONFIG_BOOTARGS			"console=ttyS0,115200 root=/dev/ram0 " \
>> -					"earlycon=uart8250,mmio,0x21c0500"
>> +					"earlycon=uart8250,mmio,0x21c0500 " \
>> +					MTDPARTS_DEFAULT
> 
> You could use $mtdparts here so your bootcmd doesn't get too long.
> 

Wenbin,

A related question regarding MTD, how do you make NOR MTD device working on
these boards (ls1043aqds and ls1043ardb)? This is a common file for both RDB and
QDS. I presume you have verified on both. I have nand working on both, spi-nor
working on rdb only. I don't have NOR working on either of them. It may be not a
U-Boot issue though.

York

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

* [U-Boot] [PATCH] armv8/ls1043a: Add MTD partition scheme
  2016-04-05 21:02   ` York Sun
@ 2016-04-06  3:24     ` Wenbin Song
  0 siblings, 0 replies; 12+ messages in thread
From: Wenbin Song @ 2016-04-06  3:24 UTC (permalink / raw)
  To: u-boot

Hi: York

1, There is an issue for sdk2.0 kernel that the nor-flash can't be probed . we can fix it as follow:

$make menuconfig

  x     -> Device Drivers                                                                                                                                                                       
  x        -> Memory Technology Device (MTD) support 
  x          -> RAM/ROM/Flash chip drivers                                                                                                                
  x            -> Flash chip driver advanced configuration options 
  x                -> Flash cmd/query data swapping                                                                                         
       x x                  ( ) NO                                   
       x x                  (X) BIG_ENDIAN_BYTE                     
       x x                  ( ) LITTLE_ENDIAN_BYTE                   

Enable BIG_ENDIAN_BYTE .

2,  The  spi-nor flash can working on  ls1043aqds , and I use the sdk2.0 kernel (ce5a3841f3).
      [    1.598954] m25p80 spi0.0: n25q128a11 (16384 Kbytes)
[    1.603923] 4 cmdlinepart partitions found on MTD device spi0.0
[    1.609842] Creating 4 MTD partitions on "spi0.0":
[    1.614624] 0x000000000000-0x000000100000 : "uboot"
[    1.624205] ftl_cs: FTL header not found.
[    1.628421] 0x000000100000-0x000000600000 : "kernel"
[    1.638086] ftl_cs: FTL header not found.
[    1.642316] 0x000000600000-0x000000700000 : "dtb"
[    1.651702] ftl_cs: FTL header not found.
[    1.655932] 0x000000700000-0x000001000000 : "file_system"
[    1.666028] ftl_cs: FTL header not found.

Best Regards
Wenbin Song


> -----Original Message-----
> From: York Sun [mailto:york.sun at nxp.com]
> Sent: Wednesday, April 06, 2016 5:02 AM
> To: Wenbin Song <wenbin.song@nxp.com>; Mingkai Hu
> <mingkai.hu@nxp.com>; u-boot at lists.denx.de
> Cc: Qianyu Gong <qianyu.gong@nxp.com>; Shaohui Xie
> <shaohui.xie@nxp.com>; Zhiqiang Hou <zhiqiang.hou@nxp.com>
> Subject: Re: [PATCH] armv8/ls1043a: Add MTD partition scheme
> 
> On 04/05/2016 01:32 PM, York Sun wrote:
> > On 04/01/2016 02:37 AM, Wenbin Song wrote:
> >> Add and share the the MTD partition scheme with kernel by defualt
> bootargs.
> >> And add the "mtdparts" env.
> >>
> >> Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
> >> ---
> >>  include/configs/ls1043a_common.h | 22 ++++++++++++++++++++--
> >>  1 file changed, 20 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/include/configs/ls1043a_common.h
> >> b/include/configs/ls1043a_common.h
> >> index fd243b1..6964873 100644
> >> --- a/include/configs/ls1043a_common.h
> >> +++ b/include/configs/ls1043a_common.h
> >> @@ -236,6 +236,21 @@
> >>  #define CONFIG_HWCONFIG
> >>  #define HWCONFIG_BUFFER_SIZE		128
> >>
> >> +#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
> >> +#define MTDPARTS_DEFAULT "mtdparts=spi0.0:1m(uboot)," \
> >> +			"5m(kernel),1m(dtb),9m(file_system)"
> >> +#else
> >> +#define MTDPARTS_DEFAULT
> "mtdparts=60000000.nor:1m(nor_bank0_rcw)," \
> >> +			"1m(nor_bank0_uboot),1m(nor_bank0_uboot_env),"
> \
> >> +			"1m(nor_bank0_fman_uconde),40m(nor_bank0_fit),"
> \
> >> +			"1m(nor_bank4_rcw),1m(nor_bank4_uboot)," \
> >> +
> 	"1m(nor_bank4_uboot_env),1m(nor_bank4_fman_ucode)," \
> >> +			"40m(nor_bank4_fit);7e800000.flash:" \
> >> +			"1m(nand_uboot),1m(nand_uboot_env)," \
> >> +			"20m(nand_fit);spi0.0:1m(uboot)," \
> >> +			"5m(kernel),1m(dtb),9m(file_system)"
> >> +#endif
> >> +
> >>  /* Initial environment variables */
> >>  #define CONFIG_EXTRA_ENV_SETTINGS		\
> >>  	"hwconfig=fsl_ddr:bank_intlv=auto\0"	\
> >> @@ -248,10 +263,13 @@
> >>  	"kernel_start=0x61100000\0"		\
> >>  	"kernel_load=0xa0000000\0"		\
> >>  	"kernel_size=0x2800000\0"		\
> >> -	"console=ttyAMA0,38400n8\0"
> >> +	"console=ttyAMA0,38400n8\0"		\
> >> +	"mtdparts=" MTDPARTS_DEFAULT "\0"
> >>
> >>  #define CONFIG_BOOTARGS			"console=ttyS0,115200
> root=/dev/ram0 " \
> >> -					"earlycon=uart8250,mmio,0x21c0500"
> >> +					"earlycon=uart8250,mmio,0x21c0500 " \
> >> +					MTDPARTS_DEFAULT
> >
> > You could use $mtdparts here so your bootcmd doesn't get too long.
> >
> 
> Wenbin,
> 
> A related question regarding MTD, how do you make NOR MTD device working
> on these boards (ls1043aqds and ls1043ardb)? This is a common file for both
> RDB and QDS. I presume you have verified on both. I have nand working on
> both, spi-nor working on rdb only. I don't have NOR working on either of them.
> It may be not a U-Boot issue though.
> 
> York
> 

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

* [U-Boot] [PATCH] armv8/ls1043a: Add MTD partition scheme
  2016-04-05 20:32 ` York Sun
  2016-04-05 21:02   ` York Sun
@ 2016-04-06  4:20   ` Wenbin Song
  2016-04-06  4:39     ` York Sun
  1 sibling, 1 reply; 12+ messages in thread
From: Wenbin Song @ 2016-04-06  4:20 UTC (permalink / raw)
  To: u-boot

Hi: York

Do you mean that I should use $mtdpart to instead of "MTDPARTS_DEFAULT" ?
 
As follows:	
       #define CONFIG_BOOTARGS                 "console=ttyS0,115200 root=/dev/ram0 " \
	                                         "earlycon=uart8250,mmio,0x21c0500 " \
	                                       "$mtdparts"

If so, the variable $mtdparts can't  be extend ,like that:

root at ls1043aqds:~# cat /proc/cmdline
console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0500 ${mtdparts}


Best Regards
Wenbin Song


> -----Original Message-----
> From: York Sun [mailto:york.sun at nxp.com]
> Sent: Wednesday, April 06, 2016 4:33 AM
> To: Wenbin Song <wenbin.song@nxp.com>; Mingkai Hu
> <mingkai.hu@nxp.com>; u-boot at lists.denx.de
> Cc: Qianyu Gong <qianyu.gong@nxp.com>; Shaohui Xie
> <shaohui.xie@nxp.com>; Zhiqiang Hou <zhiqiang.hou@nxp.com>
> Subject: Re: [PATCH] armv8/ls1043a: Add MTD partition scheme
> 
> On 04/01/2016 02:37 AM, Wenbin Song wrote:
> > Add and share the the MTD partition scheme with kernel by defualt bootargs.
> > And add the "mtdparts" env.
> >
> > Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
> > ---
> >  include/configs/ls1043a_common.h | 22 ++++++++++++++++++++--
> >  1 file changed, 20 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/configs/ls1043a_common.h
> > b/include/configs/ls1043a_common.h
> > index fd243b1..6964873 100644
> > --- a/include/configs/ls1043a_common.h
> > +++ b/include/configs/ls1043a_common.h
> > @@ -236,6 +236,21 @@
> >  #define CONFIG_HWCONFIG
> >  #define HWCONFIG_BUFFER_SIZE		128
> >
> > +#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
> #define
> > +MTDPARTS_DEFAULT "mtdparts=spi0.0:1m(uboot)," \
> > +			"5m(kernel),1m(dtb),9m(file_system)"
> > +#else
> > +#define MTDPARTS_DEFAULT
> "mtdparts=60000000.nor:1m(nor_bank0_rcw)," \
> > +			"1m(nor_bank0_uboot),1m(nor_bank0_uboot_env),"
> \
> > +			"1m(nor_bank0_fman_uconde),40m(nor_bank0_fit),"
> \
> > +			"1m(nor_bank4_rcw),1m(nor_bank4_uboot)," \
> > +
> 	"1m(nor_bank4_uboot_env),1m(nor_bank4_fman_ucode)," \
> > +			"40m(nor_bank4_fit);7e800000.flash:" \
> > +			"1m(nand_uboot),1m(nand_uboot_env)," \
> > +			"20m(nand_fit);spi0.0:1m(uboot)," \
> > +			"5m(kernel),1m(dtb),9m(file_system)"
> > +#endif
> > +
> >  /* Initial environment variables */
> >  #define CONFIG_EXTRA_ENV_SETTINGS		\
> >  	"hwconfig=fsl_ddr:bank_intlv=auto\0"	\
> > @@ -248,10 +263,13 @@
> >  	"kernel_start=0x61100000\0"		\
> >  	"kernel_load=0xa0000000\0"		\
> >  	"kernel_size=0x2800000\0"		\
> > -	"console=ttyAMA0,38400n8\0"
> > +	"console=ttyAMA0,38400n8\0"		\
> > +	"mtdparts=" MTDPARTS_DEFAULT "\0"
> >
> >  #define CONFIG_BOOTARGS			"console=ttyS0,115200
> root=/dev/ram0 " \
> > -					"earlycon=uart8250,mmio,0x21c0500"
> > +					"earlycon=uart8250,mmio,0x21c0500 " \
> > +					MTDPARTS_DEFAULT
> 
> You could use $mtdparts here so your bootcmd doesn't get too long.
> 
> York

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

* [U-Boot] [PATCH] armv8/ls1043a: Add MTD partition scheme
  2016-04-06  4:20   ` Wenbin Song
@ 2016-04-06  4:39     ` York Sun
  2016-04-06  7:11       ` Wenbin Song
  0 siblings, 1 reply; 12+ messages in thread
From: York Sun @ 2016-04-06  4:39 UTC (permalink / raw)
  To: u-boot

On 04/05/2016 09:20 PM, Wenbin Song wrote:
> Hi: York
> 
> Do you mean that I should use $mtdpart to instead of "MTDPARTS_DEFAULT" ?
>  
> As follows:	
>        #define CONFIG_BOOTARGS                 "console=ttyS0,115200 root=/dev/ram0 " \
> 	                                         "earlycon=uart8250,mmio,0x21c0500 " \
> 	                                       "$mtdparts"
> 
> If so, the variable $mtdparts can't  be extend ,like that:
> 
> root at ls1043aqds:~# cat /proc/cmdline
> console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0500 ${mtdparts}
> 

What do you see "print bootargs" under U-Boot?
I thought the variable can be extended when U-Boot runs the command. Like we
used to have $consoledev, $othbootargs, etc.

York

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

* [U-Boot] [PATCH] armv8/ls1043a: Add MTD partition scheme
  2016-04-06  4:39     ` York Sun
@ 2016-04-06  7:11       ` Wenbin Song
  2016-04-06 17:17         ` York Sun
  0 siblings, 1 reply; 12+ messages in thread
From: Wenbin Song @ 2016-04-06  7:11 UTC (permalink / raw)
  To: u-boot

Hi: York

I set bootargs  as the following steps:

=> env default mtdparts
=> printenv mtdparts
mtdparts=mtdparts=60000000.nor:1m(nor_bank0_rcw),1m(nor_bank0_uboot),1m(nor_bank0_uboot_env),1m(nor_bank0_fman_uconde),40m(nor_bank0_fit),1m(nor_bank4_rcw),1m(nor_bank4_uboot),1m(nor_bank4_uboot_env),1m(nor_bank4_fman_ucode),40m(nor_bank4_fit);7e800000.flash:1m(nand_uboot),1m(nand_uboot_env),20m(nand_fit);spi0.0:1m(uboot),5m(kernel),1m(dtb),9m(file_system)
=> env default bootargs
=> printenv bootargs
bootargs=console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0500 ${mtdparts}


The macro  CONFIG_BOOTARGS  only be extern as an char-string, and it will be spliced into default_environment array . 

 const uchar default_environment[] = {
#ifdef  CONFIG_BOOTARGS
          "bootargs="     CONFIG_BOOTARGS                 "\0"
 #endif
 
The variable we use to have $consoledev, $othbootargs  was used in the following cases:

858  #define CONFIG_BOOTCOMMAND \
859         "setenv bootargs root=/dev/ram rw "             \
860         "console=$consoledev,$baudrate $othbootargs;"   \
861         "setenv ramdiskaddr 0x02000000;"                \
862         "setenv fdtaddr 0x00c00000;"                    \
863         "setenv loadaddr 0x1000000;"                    \
864         "bootm $loadaddr $ramdiskaddr $fdtaddr"

Because the "setenv"  will be executed  , So the variable could be extended.

What do you suggest?

Best Regards
Wenbin Song


> -----Original Message-----
> From: York Sun [mailto:york.sun at nxp.com]
> Sent: Wednesday, April 06, 2016 12:39 PM
> To: Wenbin Song <wenbin.song@nxp.com>; Mingkai Hu
> <mingkai.hu@nxp.com>; u-boot at lists.denx.de
> Cc: Qianyu Gong <qianyu.gong@nxp.com>; Shaohui Xie
> <shaohui.xie@nxp.com>; Zhiqiang Hou <zhiqiang.hou@nxp.com>
> Subject: Re: [PATCH] armv8/ls1043a: Add MTD partition scheme
> 
> On 04/05/2016 09:20 PM, Wenbin Song wrote:
> > Hi: York
> >
> > Do you mean that I should use $mtdpart to instead of
> "MTDPARTS_DEFAULT" ?
> >
> > As follows:
> >        #define CONFIG_BOOTARGS                 "console=ttyS0,115200
> root=/dev/ram0 " \
> > 	                                         "earlycon=uart8250,mmio,0x21c0500 " \
> > 	                                       "$mtdparts"
> >
> > If so, the variable $mtdparts can't  be extend ,like that:
> >
> > root at ls1043aqds:~# cat /proc/cmdline
> > console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0500
> > ${mtdparts}
> >
> 
> What do you see "print bootargs" under U-Boot?
> I thought the variable can be extended when U-Boot runs the command. Like
> we used to have $consoledev, $othbootargs, etc.
> 
> York

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

* [U-Boot] [PATCH] armv8/ls1043a: Add MTD partition scheme
  2016-04-06  7:11       ` Wenbin Song
@ 2016-04-06 17:17         ` York Sun
  2016-04-07  5:46           ` Wenbin Song
  0 siblings, 1 reply; 12+ messages in thread
From: York Sun @ 2016-04-06 17:17 UTC (permalink / raw)
  To: u-boot

On 04/06/2016 12:11 AM, Wenbin Song wrote:
> Hi: York
> 
> I set bootargs  as the following steps:
> 
> => env default mtdparts
> => printenv mtdparts
> mtdparts=mtdparts=60000000.nor:1m(nor_bank0_rcw),1m(nor_bank0_uboot),1m(nor_bank0_uboot_env),1m(nor_bank0_fman_uconde),40m(nor_bank0_fit),1m(nor_bank4_rcw),1m(nor_bank4_uboot),1m(nor_bank4_uboot_env),1m(nor_bank4_fman_ucode),40m(nor_bank4_fit);7e800000.flash:1m(nand_uboot),1m(nand_uboot_env),20m(nand_fit);spi0.0:1m(uboot),5m(kernel),1m(dtb),9m(file_system)
> => env default bootargs
> => printenv bootargs
> bootargs=console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0500 ${mtdparts}
> 
> 
> The macro  CONFIG_BOOTARGS  only be extern as an char-string, and it will be spliced into default_environment array . 
> 
>  const uchar default_environment[] = {
> #ifdef  CONFIG_BOOTARGS
>           "bootargs="     CONFIG_BOOTARGS                 "\0"
>  #endif
>  
> The variable we use to have $consoledev, $othbootargs  was used in the following cases:
> 
> 858  #define CONFIG_BOOTCOMMAND \
> 859         "setenv bootargs root=/dev/ram rw "             \
> 860         "console=$consoledev,$baudrate $othbootargs;"   \
> 861         "setenv ramdiskaddr 0x02000000;"                \
> 862         "setenv fdtaddr 0x00c00000;"                    \
> 863         "setenv loadaddr 0x1000000;"                    \
> 864         "bootm $loadaddr $ramdiskaddr $fdtaddr"
> 
> Because the "setenv"  will be executed  , So the variable could be extended.

I see what you mean. I am trying to reduce the environmental variables.
Do you need the variable "mtdparts"?
Would it be a better idea to set bootargs using the bootcmd?

While you are on it, I suggest you take a look at other variables.
"console=ttyAMA0,38400n8" is wrong here.

We don't have to copy kernel image from NOR flash to DDR if the ramdisk load
address is set properly in its file. So you can remove the copying from bootcmd.

York

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

* [U-Boot] [PATCH] armv8/ls1043a: Add MTD partition scheme
  2016-04-06 17:17         ` York Sun
@ 2016-04-07  5:46           ` Wenbin Song
  2016-07-19 22:02             ` york sun
  0 siblings, 1 reply; 12+ messages in thread
From: Wenbin Song @ 2016-04-07  5:46 UTC (permalink / raw)
  To: u-boot

Hi: York

Please see my inline comments.

Best Regards
Wenbin Song

> -----Original Message-----
> From: York Sun [mailto:york.sun at nxp.com]
> Sent: Thursday, April 07, 2016 1:18 AM
> To: Wenbin Song <wenbin.song@nxp.com>; Mingkai Hu
> <mingkai.hu@nxp.com>; u-boot at lists.denx.de
> Cc: Qianyu Gong <qianyu.gong@nxp.com>; Shaohui Xie
> <shaohui.xie@nxp.com>; Zhiqiang Hou <zhiqiang.hou@nxp.com>
> Subject: Re: [PATCH] armv8/ls1043a: Add MTD partition scheme
> 
> On 04/06/2016 12:11 AM, Wenbin Song wrote:
> > Hi: York
> >
> > I set bootargs  as the following steps:
> >
> > => env default mtdparts
> > => printenv mtdparts
> >
> mtdparts=mtdparts=60000000.nor:1m(nor_bank0_rcw),1m(nor_bank0_uboot)
> ,1
> >
> m(nor_bank0_uboot_env),1m(nor_bank0_fman_uconde),40m(nor_bank0_fit
> ),1m
> >
> (nor_bank4_rcw),1m(nor_bank4_uboot),1m(nor_bank4_uboot_env),1m(nor_
> ban
> >
> k4_fman_ucode),40m(nor_bank4_fit);7e800000.flash:1m(nand_uboot),1m(na
> n
> > d_uboot_env),20m(nand_fit);spi0.0:1m(uboot),5m(kernel),1m(dtb),9m(file
> > _system)
> > => env default bootargs
> > => printenv bootargs
> > bootargs=console=ttyS0,115200 root=/dev/ram0
> > earlycon=uart8250,mmio,0x21c0500 ${mtdparts}
> >
> >
> > The macro  CONFIG_BOOTARGS  only be extern as an char-string, and it will
> be spliced into default_environment array .
> >
> >  const uchar default_environment[] = { #ifdef  CONFIG_BOOTARGS
> >           "bootargs="     CONFIG_BOOTARGS                 "\0"
> >  #endif
> >
> > The variable we use to have $consoledev, $othbootargs  was used in the
> following cases:
> >
> > 858  #define CONFIG_BOOTCOMMAND \
> > 859         "setenv bootargs root=/dev/ram rw "             \
> > 860         "console=$consoledev,$baudrate $othbootargs;"   \
> > 861         "setenv ramdiskaddr 0x02000000;"                \
> > 862         "setenv fdtaddr 0x00c00000;"                    \
> > 863         "setenv loadaddr 0x1000000;"                    \
> > 864         "bootm $loadaddr $ramdiskaddr $fdtaddr"
> >
> > Because the "setenv"  will be executed  , So the variable could be extended.
> 
> I see what you mean. I am trying to reduce the environmental variables.
> Do you need the variable "mtdparts"?

[wenbin] 

I export this variable in order to make easier  to modify the bootargs under uboot command-line.

For example:
=>setenv bootargs  "console=ttyS0,115200  root=/dev/ram0  $mtdparts"
=>setenv bootargs  "console=ttyLP0,115200  root=/dev/ram0  $mtdparts"

Use the $mtdparts to instead of a long string.


> Would it be a better idea to set bootargs using the bootcmd?
[wenbin]

 yes, It is a good idea.
 But we need all kinds of  ways to boot kernel  with this  "bootargs".  The bootcmd only can specify one boot-way.
IOW,  only the way specified by this "bootcmd"  can  execute " setenv  bootargs".
So I want to supply the default bootargs  by the CONFIG_BOOTARGS .


> 
> While you are on it, I suggest you take a look at other variables.
> "console=ttyAMA0,38400n8" is wrong here.
> 
> We don't have to copy kernel image from NOR flash to DDR if the ramdisk load
> address is set properly in its file. So you can remove the copying from bootcmd.
> 
[wenbin]

Ok, thanks for your advices,  I will modify them on the later patch. 

> York

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

* [U-Boot] [PATCH] armv8/ls1043a: Add MTD partition scheme
  2016-04-07  5:46           ` Wenbin Song
@ 2016-07-19 22:02             ` york sun
  2016-07-20  3:02               ` Wenbin Song
  0 siblings, 1 reply; 12+ messages in thread
From: york sun @ 2016-07-19 22:02 UTC (permalink / raw)
  To: u-boot

On 04/06/2016 10:46 PM, Wenbin Song wrote:
> Hi: York
>
> Please see my inline comments.
>
> Best Regards
> Wenbin Song
>
>> -----Original Message-----
>> From: York Sun [mailto:york.sun at nxp.com]
>> Sent: Thursday, April 07, 2016 1:18 AM
>> To: Wenbin Song <wenbin.song@nxp.com>; Mingkai Hu
>> <mingkai.hu@nxp.com>; u-boot at lists.denx.de
>> Cc: Qianyu Gong <qianyu.gong@nxp.com>; Shaohui Xie
>> <shaohui.xie@nxp.com>; Zhiqiang Hou <zhiqiang.hou@nxp.com>
>> Subject: Re: [PATCH] armv8/ls1043a: Add MTD partition scheme
>>
>> On 04/06/2016 12:11 AM, Wenbin Song wrote:
>>> Hi: York
>>>
>>> I set bootargs  as the following steps:
>>>
>>> => env default mtdparts
>>> => printenv mtdparts
>>>
>> mtdparts=mtdparts=60000000.nor:1m(nor_bank0_rcw),1m(nor_bank0_uboot)
>> ,1
>>>
>> m(nor_bank0_uboot_env),1m(nor_bank0_fman_uconde),40m(nor_bank0_fit
>> ),1m
>>>
>> (nor_bank4_rcw),1m(nor_bank4_uboot),1m(nor_bank4_uboot_env),1m(nor_
>> ban
>>>
>> k4_fman_ucode),40m(nor_bank4_fit);7e800000.flash:1m(nand_uboot),1m(na
>> n
>>> d_uboot_env),20m(nand_fit);spi0.0:1m(uboot),5m(kernel),1m(dtb),9m(file
>>> _system)
>>> => env default bootargs
>>> => printenv bootargs
>>> bootargs=console=ttyS0,115200 root=/dev/ram0
>>> earlycon=uart8250,mmio,0x21c0500 ${mtdparts}
>>>
>>>
>>> The macro  CONFIG_BOOTARGS  only be extern as an char-string, and it will
>> be spliced into default_environment array .
>>>
>>>  const uchar default_environment[] = { #ifdef  CONFIG_BOOTARGS
>>>           "bootargs="     CONFIG_BOOTARGS                 "\0"
>>>  #endif
>>>
>>> The variable we use to have $consoledev, $othbootargs  was used in the
>> following cases:
>>>
>>> 858  #define CONFIG_BOOTCOMMAND \
>>> 859         "setenv bootargs root=/dev/ram rw "             \
>>> 860         "console=$consoledev,$baudrate $othbootargs;"   \
>>> 861         "setenv ramdiskaddr 0x02000000;"                \
>>> 862         "setenv fdtaddr 0x00c00000;"                    \
>>> 863         "setenv loadaddr 0x1000000;"                    \
>>> 864         "bootm $loadaddr $ramdiskaddr $fdtaddr"
>>>
>>> Because the "setenv"  will be executed  , So the variable could be extended.
>>
>> I see what you mean. I am trying to reduce the environmental variables.
>> Do you need the variable "mtdparts"?
>
> [wenbin]
>
> I export this variable in order to make easier  to modify the bootargs under uboot command-line.
>
> For example:
> =>setenv bootargs  "console=ttyS0,115200  root=/dev/ram0  $mtdparts"
> =>setenv bootargs  "console=ttyLP0,115200  root=/dev/ram0  $mtdparts"
>
> Use the $mtdparts to instead of a long string.
>
>
>> Would it be a better idea to set bootargs using the bootcmd?
> [wenbin]
>
>  yes, It is a good idea.
>  But we need all kinds of  ways to boot kernel  with this  "bootargs".  The bootcmd only can specify one boot-way.
> IOW,  only the way specified by this "bootcmd"  can  execute " setenv  bootargs".
> So I want to supply the default bootargs  by the CONFIG_BOOTARGS .
>
>
>>
>> While you are on it, I suggest you take a look at other variables.
>> "console=ttyAMA0,38400n8" is wrong here.
>>
>> We don't have to copy kernel image from NOR flash to DDR if the ramdisk load
>> address is set properly in its file. So you can remove the copying from bootcmd.
>>
> [wenbin]
>
> Ok, thanks for your advices,  I will modify them on the later patch.
>

Wenbin,

Do you have an update?

York

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

* [U-Boot] [PATCH] armv8/ls1043a: Add MTD partition scheme
  2016-07-19 22:02             ` york sun
@ 2016-07-20  3:02               ` Wenbin Song
  2016-07-20 21:27                 ` york sun
  0 siblings, 1 reply; 12+ messages in thread
From: Wenbin Song @ 2016-07-20  3:02 UTC (permalink / raw)
  To: u-boot

Hi: York

I'm sorry to have misunderstood you mean.
I think it is a good idea that modify/remove the wrong/useless variables  in a new patch.
And I will make it later.
Do you have any suggestion?

Best Regards
Wenbin Song

> -----Original Message-----
> From: york sun
> Sent: Wednesday, July 20, 2016 6:02 AM
> To: Wenbin Song <wenbin.song@nxp.com>; Mingkai Hu <mingkai.hu@nxp.com>;
> u-boot at lists.denx.de
> Cc: Qianyu Gong <qianyu.gong@nxp.com>; Shaohui Xie <shaohui.xie@nxp.com>;
> Zhiqiang Hou <zhiqiang.hou@nxp.com>
> Subject: Re: [PATCH] armv8/ls1043a: Add MTD partition scheme
> 
> On 04/06/2016 10:46 PM, Wenbin Song wrote:
> > Hi: York
> >
> > Please see my inline comments.
> >
> > Best Regards
> > Wenbin Song
> >
> >> -----Original Message-----
> >> From: York Sun [mailto:york.sun at nxp.com]
> >> Sent: Thursday, April 07, 2016 1:18 AM
> >> To: Wenbin Song <wenbin.song@nxp.com>; Mingkai Hu
> >> <mingkai.hu@nxp.com>; u-boot at lists.denx.de
> >> Cc: Qianyu Gong <qianyu.gong@nxp.com>; Shaohui Xie
> >> <shaohui.xie@nxp.com>; Zhiqiang Hou <zhiqiang.hou@nxp.com>
> >> Subject: Re: [PATCH] armv8/ls1043a: Add MTD partition scheme
> >>
> >> On 04/06/2016 12:11 AM, Wenbin Song wrote:
> >>> Hi: York
> >>>
> >>> I set bootargs  as the following steps:
> >>>
> >>> => env default mtdparts
> >>> => printenv mtdparts
> >>>
> >> mtdparts=mtdparts=60000000.nor:1m(nor_bank0_rcw),1m(nor_bank0_uboot)
> >> ,1
> >>>
> >> m(nor_bank0_uboot_env),1m(nor_bank0_fman_uconde),40m(nor_bank0_fit
> >> ),1m
> >>>
> >> (nor_bank4_rcw),1m(nor_bank4_uboot),1m(nor_bank4_uboot_env),1m(nor_
> >> ban
> >>>
> >> k4_fman_ucode),40m(nor_bank4_fit);7e800000.flash:1m(nand_uboot),1m(na
> >> n
> >>> d_uboot_env),20m(nand_fit);spi0.0:1m(uboot),5m(kernel),1m(dtb),9m(fi
> >>> le
> >>> _system)
> >>> => env default bootargs
> >>> => printenv bootargs
> >>> bootargs=console=ttyS0,115200 root=/dev/ram0
> >>> earlycon=uart8250,mmio,0x21c0500 ${mtdparts}
> >>>
> >>>
> >>> The macro  CONFIG_BOOTARGS  only be extern as an char-string, and it
> >>> will
> >> be spliced into default_environment array .
> >>>
> >>>  const uchar default_environment[] = { #ifdef  CONFIG_BOOTARGS
> >>>           "bootargs="     CONFIG_BOOTARGS                 "\0"
> >>>  #endif
> >>>
> >>> The variable we use to have $consoledev, $othbootargs  was used in
> >>> the
> >> following cases:
> >>>
> >>> 858  #define CONFIG_BOOTCOMMAND \
> >>> 859         "setenv bootargs root=/dev/ram rw "             \
> >>> 860         "console=$consoledev,$baudrate $othbootargs;"   \
> >>> 861         "setenv ramdiskaddr 0x02000000;"                \
> >>> 862         "setenv fdtaddr 0x00c00000;"                    \
> >>> 863         "setenv loadaddr 0x1000000;"                    \
> >>> 864         "bootm $loadaddr $ramdiskaddr $fdtaddr"
> >>>
> >>> Because the "setenv"  will be executed  , So the variable could be extended.
> >>
> >> I see what you mean. I am trying to reduce the environmental variables.
> >> Do you need the variable "mtdparts"?
> >
> > [wenbin]
> >
> > I export this variable in order to make easier  to modify the bootargs under
> uboot command-line.
> >
> > For example:
> > =>setenv bootargs  "console=ttyS0,115200  root=/dev/ram0  $mtdparts"
> > =>setenv bootargs  "console=ttyLP0,115200  root=/dev/ram0  $mtdparts"
> >
> > Use the $mtdparts to instead of a long string.
> >
> >
> >> Would it be a better idea to set bootargs using the bootcmd?
> > [wenbin]
> >
> >  yes, It is a good idea.
> >  But we need all kinds of  ways to boot kernel  with this  "bootargs".  The
> bootcmd only can specify one boot-way.
> > IOW,  only the way specified by this "bootcmd"  can  execute " setenv  bootargs".
> > So I want to supply the default bootargs  by the CONFIG_BOOTARGS .
> >
> >
> >>
> >> While you are on it, I suggest you take a look at other variables.
> >> "console=ttyAMA0,38400n8" is wrong here.
> >>
> >> We don't have to copy kernel image from NOR flash to DDR if the
> >> ramdisk load address is set properly in its file. So you can remove the copying
> from bootcmd.
> >>
> > [wenbin]
> >
> > Ok, thanks for your advices,  I will modify them on the later patch.
> >
> 
> Wenbin,
> 
> Do you have an update?
> 
> York

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

* [U-Boot] [PATCH] armv8/ls1043a: Add MTD partition scheme
  2016-07-20  3:02               ` Wenbin Song
@ 2016-07-20 21:27                 ` york sun
  0 siblings, 0 replies; 12+ messages in thread
From: york sun @ 2016-07-20 21:27 UTC (permalink / raw)
  To: u-boot

On 07/19/2016 08:02 PM, Wenbin Song wrote:
> Hi: York
>
> I'm sorry to have misunderstood you mean.
> I think it is a good idea that modify/remove the wrong/useless variables  in a new patch.
> And I will make it later.
> Do you have any suggestion?

Yes, please make a cleanup patch first, then your change of MTD partition.

York

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

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

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-01  9:28 [U-Boot] [PATCH] armv8/ls1043a: Add MTD partition scheme Wenbin Song
2016-04-05 20:32 ` York Sun
2016-04-05 21:02   ` York Sun
2016-04-06  3:24     ` Wenbin Song
2016-04-06  4:20   ` Wenbin Song
2016-04-06  4:39     ` York Sun
2016-04-06  7:11       ` Wenbin Song
2016-04-06 17:17         ` York Sun
2016-04-07  5:46           ` Wenbin Song
2016-07-19 22:02             ` york sun
2016-07-20  3:02               ` Wenbin Song
2016-07-20 21:27                 ` york sun

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.