diff mbox

[U-Boot] ls1046aqds: update the defaule mtdparts

Message ID 1499845412-18063-1-git-send-email-xiaowei.bao@nxp.com
State Rejected
Delegated to: York Sun
Headers show

Commit Message

Xiaowei Bao July 12, 2017, 7:43 a.m. UTC
From: Bao Xiaowei <xiaowei.bao@nxp.com>

modify the include/configs/ls1046aqds.h file, according to the latest
partion rules, norflash nandflash dspiflash detailed partion as follows:

mtd0: 00100000 00020000 "nor_bank0_rcw"
mtd1: 00200000 00020000 "nor_bank0_uboot"
mtd2: 00100000 00020000 "nor_bank0_uboot_env"
mtd3: 00200000 00020000 "nor_bank0_ppa"
mtd4: 00300000 00020000 "nor_bank0_secure_boot"
mtd5: 00600000 00020000 "nor_bank0_dppa_qe"
mtd6: 00100000 00020000 "nor_bank0_dtb"
mtd7: 01000000 00020000 "nor_bank0_kernel"
mtd8: 02000000 00020000 "nor_bank0_rootfs"
mtd9: 00100000 00020000 "nor_bank4_rcw"
mtd10: 00200000 00020000 "nor_bank4_uboot"
mtd11: 00200000 00020000 "nor_bank4_uboot_env"
mtd12: 00100000 00020000 "nor_bank4_ppa"
mtd13: 00300000 00020000 "nor_bank4_secure_boot"
mtd14: 00600000 00020000 "nor_bank4_dppa_qe"
mtd15: 00100000 00020000 "nor_bank4_dtb"
mtd16: 01000000 00020000 "nor_bank4_kernel"
mtd17: 02000000 00020000 "nor_bank4_rootfs"
mtd18: 00100000 00040000 "nand_rcw"
mtd19: 00200000 00040000 "nand_uboot"
mtd20: 00100000 00040000 "nand_uboot_env"
mtd21: 00200000 00040000 "nand_ppa"
mtd22: 00300000 00040000 "nand_secure_boot"
mtd23: 00600000 00040000 "nand_dppa_qe"
mtd24: 00100000 00040000 "nand_dtb"
mtd25: 01000000 00040000 "nand_kernel"
mtd26: 02000000 00040000 "nand_rootfs"
mtd27: 1c000000 00040000 "nand_free"
mtd28: 01000000 00010000 "spi0_free"
mtd29: 00080000 00001000 "spi1_free"
mtd30: 00800000 00001000 "spi2_free"

Signed-off-by: Bao Xiaowei <xiaowei.bao@nxp.com>
---
 include/configs/ls1046aqds.h | 28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)

Comments

York Sun Aug. 7, 2017, 10:30 p.m. UTC | #1
On 07/12/2017 04:44 AM, xiaowei.bao wrote:
> From: Bao Xiaowei <xiaowei.bao@nxp.com>
> 
> modify the include/configs/ls1046aqds.h file, according to the latest
> partion rules, norflash nandflash dspiflash detailed partion as follows:
> 
> mtd0: 00100000 00020000 "nor_bank0_rcw"
> mtd1: 00200000 00020000 "nor_bank0_uboot"
> mtd2: 00100000 00020000 "nor_bank0_uboot_env"
> mtd3: 00200000 00020000 "nor_bank0_ppa"
> mtd4: 00300000 00020000 "nor_bank0_secure_boot"
> mtd5: 00600000 00020000 "nor_bank0_dppa_qe"
> mtd6: 00100000 00020000 "nor_bank0_dtb"
> mtd7: 01000000 00020000 "nor_bank0_kernel"
> mtd8: 02000000 00020000 "nor_bank0_rootfs"
> mtd9: 00100000 00020000 "nor_bank4_rcw"
> mtd10: 00200000 00020000 "nor_bank4_uboot"
> mtd11: 00200000 00020000 "nor_bank4_uboot_env"
> mtd12: 00100000 00020000 "nor_bank4_ppa"
> mtd13: 00300000 00020000 "nor_bank4_secure_boot"
> mtd14: 00600000 00020000 "nor_bank4_dppa_qe"
> mtd15: 00100000 00020000 "nor_bank4_dtb"
> mtd16: 01000000 00020000 "nor_bank4_kernel"
> mtd17: 02000000 00020000 "nor_bank4_rootfs"
> mtd18: 00100000 00040000 "nand_rcw"
> mtd19: 00200000 00040000 "nand_uboot"
> mtd20: 00100000 00040000 "nand_uboot_env"
> mtd21: 00200000 00040000 "nand_ppa"
> mtd22: 00300000 00040000 "nand_secure_boot"
> mtd23: 00600000 00040000 "nand_dppa_qe"
> mtd24: 00100000 00040000 "nand_dtb"
> mtd25: 01000000 00040000 "nand_kernel"
> mtd26: 02000000 00040000 "nand_rootfs"
> mtd27: 1c000000 00040000 "nand_free"
> mtd28: 01000000 00010000 "spi0_free"
> mtd29: 00080000 00001000 "spi1_free"
> mtd30: 00800000 00001000 "spi2_free"

Do we really need to expose every image as individual partition? It is 
only useful if we need to access them under Linux. What's the chance to 
update U-Boot environmental variables under Linux? If you really to do 
so, you can probably be fine by defining a larger partition to include 
all images used for U-Boot. Agree?

York
Xiaowei Bao Aug. 8, 2017, 2:48 a.m. UTC | #2
Hi York,

This patch is for the ls1046aqds platform, In order to facilitate the test staff and customers to view the detailed partition information, so didn't define a larger partition to include all images, and the partition rule  is discussed internally as the default partitioning standard for the layerscape platform.

thanks

-----Original Message-----
From: York Sun 
Sent: Tuesday, August 08, 2017 6:31 AM
To: Xiaowei Bao <xiaowei.bao@nxp.com>; Mingkai Hu <mingkai.hu@nxp.com>; Sumit Garg <sumit.garg@nxp.com>; u-boot@lists.denx.de
Subject: Re: [U-Boot] [PATCH] ls1046aqds: update the defaule mtdparts

On 07/12/2017 04:44 AM, xiaowei.bao wrote:
> From: Bao Xiaowei <xiaowei.bao@nxp.com>
> 
> modify the include/configs/ls1046aqds.h file, according to the latest 
> partion rules, norflash nandflash dspiflash detailed partion as follows:
> 
> mtd0: 00100000 00020000 "nor_bank0_rcw"
> mtd1: 00200000 00020000 "nor_bank0_uboot"
> mtd2: 00100000 00020000 "nor_bank0_uboot_env"
> mtd3: 00200000 00020000 "nor_bank0_ppa"
> mtd4: 00300000 00020000 "nor_bank0_secure_boot"
> mtd5: 00600000 00020000 "nor_bank0_dppa_qe"
> mtd6: 00100000 00020000 "nor_bank0_dtb"
> mtd7: 01000000 00020000 "nor_bank0_kernel"
> mtd8: 02000000 00020000 "nor_bank0_rootfs"
> mtd9: 00100000 00020000 "nor_bank4_rcw"
> mtd10: 00200000 00020000 "nor_bank4_uboot"
> mtd11: 00200000 00020000 "nor_bank4_uboot_env"
> mtd12: 00100000 00020000 "nor_bank4_ppa"
> mtd13: 00300000 00020000 "nor_bank4_secure_boot"
> mtd14: 00600000 00020000 "nor_bank4_dppa_qe"
> mtd15: 00100000 00020000 "nor_bank4_dtb"
> mtd16: 01000000 00020000 "nor_bank4_kernel"
> mtd17: 02000000 00020000 "nor_bank4_rootfs"
> mtd18: 00100000 00040000 "nand_rcw"
> mtd19: 00200000 00040000 "nand_uboot"
> mtd20: 00100000 00040000 "nand_uboot_env"
> mtd21: 00200000 00040000 "nand_ppa"
> mtd22: 00300000 00040000 "nand_secure_boot"
> mtd23: 00600000 00040000 "nand_dppa_qe"
> mtd24: 00100000 00040000 "nand_dtb"
> mtd25: 01000000 00040000 "nand_kernel"
> mtd26: 02000000 00040000 "nand_rootfs"
> mtd27: 1c000000 00040000 "nand_free"
> mtd28: 01000000 00010000 "spi0_free"
> mtd29: 00080000 00001000 "spi1_free"
> mtd30: 00800000 00001000 "spi2_free"

Do we really need to expose every image as individual partition? It is only useful if we need to access them under Linux. What's the chance to update U-Boot environmental variables under Linux? If you really to do so, you can probably be fine by defining a larger partition to include all images used for U-Boot. Agree?

York
York Sun Aug. 8, 2017, 4:40 p.m. UTC | #3
On 08/07/2017 07:48 PM, Xiaowei Bao wrote:
> Hi York,
> 
> This patch is for the ls1046aqds platform, In order to facilitate the test staff and customers to view the detailed partition information, so didn't define a larger partition to include all images, and the partition rule  is discussed internally as the default partitioning standard for the layerscape platform.

If you start to partition flashes by every image, are you going to do 
the same for QSPI?

> 
> thanks
> 
> -----Original Message-----
> From: York Sun
> Sent: Tuesday, August 08, 2017 6:31 AM
> To: Xiaowei Bao <xiaowei.bao@nxp.com>; Mingkai Hu <mingkai.hu@nxp.com>; Sumit Garg <sumit.garg@nxp.com>; u-boot@lists.denx.de
> Subject: Re: [U-Boot] [PATCH] ls1046aqds: update the defaule mtdparts
> 
> On 07/12/2017 04:44 AM, xiaowei.bao wrote:
>> From: Bao Xiaowei <xiaowei.bao@nxp.com>
>>
>> modify the include/configs/ls1046aqds.h file, according to the latest
>> partion rules, norflash nandflash dspiflash detailed partion as follows:
>>
>> mtd0: 00100000 00020000 "nor_bank0_rcw"
>> mtd1: 00200000 00020000 "nor_bank0_uboot"
>> mtd2: 00100000 00020000 "nor_bank0_uboot_env"
>> mtd3: 00200000 00020000 "nor_bank0_ppa"
>> mtd4: 00300000 00020000 "nor_bank0_secure_boot"
>> mtd5: 00600000 00020000 "nor_bank0_dppa_qe"
>> mtd6: 00100000 00020000 "nor_bank0_dtb"
>> mtd7: 01000000 00020000 "nor_bank0_kernel"
>> mtd8: 02000000 00020000 "nor_bank0_rootfs"
>> mtd9: 00100000 00020000 "nor_bank4_rcw"
>> mtd10: 00200000 00020000 "nor_bank4_uboot"
>> mtd11: 00200000 00020000 "nor_bank4_uboot_env"
>> mtd12: 00100000 00020000 "nor_bank4_ppa"
>> mtd13: 00300000 00020000 "nor_bank4_secure_boot"
>> mtd14: 00600000 00020000 "nor_bank4_dppa_qe"
>> mtd15: 00100000 00020000 "nor_bank4_dtb"
>> mtd16: 01000000 00020000 "nor_bank4_kernel"
>> mtd17: 02000000 00020000 "nor_bank4_rootfs"

When you boot from bank4, your partition name will not match the 
physical bank.

>> mtd18: 00100000 00040000 "nand_rcw"
>> mtd19: 00200000 00040000 "nand_uboot"
>> mtd20: 00100000 00040000 "nand_uboot_env"
>> mtd21: 00200000 00040000 "nand_ppa"
>> mtd22: 00300000 00040000 "nand_secure_boot"
>> mtd23: 00600000 00040000 "nand_dppa_qe"
>> mtd24: 00100000 00040000 "nand_dtb"
>> mtd25: 01000000 00040000 "nand_kernel"
>> mtd26: 02000000 00040000 "nand_rootfs"
>> mtd27: 1c000000 00040000 "nand_free"
>> mtd28: 01000000 00010000 "spi0_free"
>> mtd29: 00080000 00001000 "spi1_free"
>> mtd30: 00800000 00001000 "spi2_free"
> 
> Do we really need to expose every image as individual partition? It is only useful if we need to access them under Linux. What's the chance to update U-Boot environmental variables under Linux? If you really to do so, you can probably be fine by defining a larger partition to include all images used for U-Boot. Agree?

My point is, who uses these partitions? If it is only for testing, you 
can keep this variable local, or leave it to your test script. You are 
not going to use default values of ipaddr, or serverip, are you? Why do 
you rely on the default value of mtdparts? It doesn't even get used by 
U-Boot itself.

York
Xiaowei Bao Aug. 9, 2017, 2:27 a.m. UTC | #4
Hi York,

The default partition is mainly to facilitate the test staff to view the partition information of the storage medium, And the jira ticket also carry by the test staff, I am not sure if it need to push the opensource.

Qspi did not do partition processing, because of hardware design reason, the different boot mode need different pbl.bin, and the Qspi is only 16M, our partition rule is 64M include all of images, so did not do partition of Qspi.

Thanks

-----Original Message-----
From: York Sun 
Sent: Wednesday, August 09, 2017 12:41 AM
To: Xiaowei Bao <xiaowei.bao@nxp.com>; Mingkai Hu <mingkai.hu@nxp.com>; Sumit Garg <sumit.garg@nxp.com>; u-boot@lists.denx.de
Subject: Re: [U-Boot] [PATCH] ls1046aqds: update the defaule mtdparts

On 08/07/2017 07:48 PM, Xiaowei Bao wrote:
> Hi York,
> 
> This patch is for the ls1046aqds platform, In order to facilitate the test staff and customers to view the detailed partition information, so didn't define a larger partition to include all images, and the partition rule  is discussed internally as the default partitioning standard for the layerscape platform.

If you start to partition flashes by every image, are you going to do the same for QSPI?

> 
> thanks
> 
> -----Original Message-----
> From: York Sun
> Sent: Tuesday, August 08, 2017 6:31 AM
> To: Xiaowei Bao <xiaowei.bao@nxp.com>; Mingkai Hu 
> <mingkai.hu@nxp.com>; Sumit Garg <sumit.garg@nxp.com>; 
> u-boot@lists.denx.de
> Subject: Re: [U-Boot] [PATCH] ls1046aqds: update the defaule mtdparts
> 
> On 07/12/2017 04:44 AM, xiaowei.bao wrote:
>> From: Bao Xiaowei <xiaowei.bao@nxp.com>
>>
>> modify the include/configs/ls1046aqds.h file, according to the latest 
>> partion rules, norflash nandflash dspiflash detailed partion as follows:
>>
>> mtd0: 00100000 00020000 "nor_bank0_rcw"
>> mtd1: 00200000 00020000 "nor_bank0_uboot"
>> mtd2: 00100000 00020000 "nor_bank0_uboot_env"
>> mtd3: 00200000 00020000 "nor_bank0_ppa"
>> mtd4: 00300000 00020000 "nor_bank0_secure_boot"
>> mtd5: 00600000 00020000 "nor_bank0_dppa_qe"
>> mtd6: 00100000 00020000 "nor_bank0_dtb"
>> mtd7: 01000000 00020000 "nor_bank0_kernel"
>> mtd8: 02000000 00020000 "nor_bank0_rootfs"
>> mtd9: 00100000 00020000 "nor_bank4_rcw"
>> mtd10: 00200000 00020000 "nor_bank4_uboot"
>> mtd11: 00200000 00020000 "nor_bank4_uboot_env"
>> mtd12: 00100000 00020000 "nor_bank4_ppa"
>> mtd13: 00300000 00020000 "nor_bank4_secure_boot"
>> mtd14: 00600000 00020000 "nor_bank4_dppa_qe"
>> mtd15: 00100000 00020000 "nor_bank4_dtb"
>> mtd16: 01000000 00020000 "nor_bank4_kernel"
>> mtd17: 02000000 00020000 "nor_bank4_rootfs"

When you boot from bank4, your partition name will not match the physical bank.

>> mtd18: 00100000 00040000 "nand_rcw"
>> mtd19: 00200000 00040000 "nand_uboot"
>> mtd20: 00100000 00040000 "nand_uboot_env"
>> mtd21: 00200000 00040000 "nand_ppa"
>> mtd22: 00300000 00040000 "nand_secure_boot"
>> mtd23: 00600000 00040000 "nand_dppa_qe"
>> mtd24: 00100000 00040000 "nand_dtb"
>> mtd25: 01000000 00040000 "nand_kernel"
>> mtd26: 02000000 00040000 "nand_rootfs"
>> mtd27: 1c000000 00040000 "nand_free"
>> mtd28: 01000000 00010000 "spi0_free"
>> mtd29: 00080000 00001000 "spi1_free"
>> mtd30: 00800000 00001000 "spi2_free"
> 
> Do we really need to expose every image as individual partition? It is only useful if we need to access them under Linux. What's the chance to update U-Boot environmental variables under Linux? If you really to do so, you can probably be fine by defining a larger partition to include all images used for U-Boot. Agree?

My point is, who uses these partitions? If it is only for testing, you can keep this variable local, or leave it to your test script. You are not going to use default values of ipaddr, or serverip, are you? Why do you rely on the default value of mtdparts? It doesn't even get used by U-Boot itself.

York
York Sun Aug. 16, 2017, 4:14 p.m. UTC | #5
On 08/08/2017 07:27 PM, Xiaowei Bao wrote:
> Hi York,
> 
> The default partition is mainly to facilitate the test staff to view the partition information of the storage medium, And the jira ticket also carry by the test staff, I am not sure if it need to push the opensource.

So you agree we don't need this patch and test team can keep this 
variable internally.

York
Xiaowei Bao Aug. 17, 2017, 2:24 a.m. UTC | #6
Hi york,

Yes, I think so.

Thanks

-----Original Message-----
From: York Sun 
Sent: Thursday, August 17, 2017 12:15 AM
To: Xiaowei Bao <xiaowei.bao@nxp.com>; Mingkai Hu <mingkai.hu@nxp.com>; Sumit Garg <sumit.garg@nxp.com>; u-boot@lists.denx.de
Subject: Re: [U-Boot] [PATCH] ls1046aqds: update the defaule mtdparts

On 08/08/2017 07:27 PM, Xiaowei Bao wrote:
> Hi York,
> 
> The default partition is mainly to facilitate the test staff to view the partition information of the storage medium, And the jira ticket also carry by the test staff, I am not sure if it need to push the opensource.

So you agree we don't need this patch and test team can keep this variable internally.

York
diff mbox

Patch

diff --git a/include/configs/ls1046aqds.h b/include/configs/ls1046aqds.h
index 5d2e819..57aed04 100644
--- a/include/configs/ls1046aqds.h
+++ b/include/configs/ls1046aqds.h
@@ -479,17 +479,23 @@  unsigned long get_board_ddr_clk(void);
 #define MTDPARTS_DEFAULT "mtdparts=1550000.quadspi:2m(uboot)," \
 			"14m(free)"
 #else
-#define MTDPARTS_DEFAULT "mtdparts=60000000.nor:" \
-			"2m@0x100000(nor_bank0_uboot),"\
-			"40m@0x1100000(nor_bank0_fit)," \
-			"7m(nor_bank0_user)," \
-			"2m@0x4100000(nor_bank4_uboot)," \
-			"40m@0x5100000(nor_bank4_fit),"\
-			"-(nor_bank4_user);" \
-			"7e800000.flash:" \
-			"4m(nand_uboot),36m(nand_kernel)," \
-			"472m(nand_free);spi0.0:2m(uboot)," \
-			"14m(free)"
+#define MTDPARTS_DEFAULT "mtdparts=60000000.nor:1m(nor_bank0_rcw)," \
+			"2m(nor_bank0_uboot),1m(nor_bank0_uboot_env)," \
+			"2m(nor_bank0_ppa),3m(nor_bank0_secure_boot)," \
+			"6m(nor_bank0_dppa_qe),1m(nor_bank0_dtb)," \
+			"16m(nor_bank0_kernel),32m(nor_bank0_rootfs)," \
+			"1m(nor_bank4_rcw),2m(nor_bank4_uboot)," \
+			"2m(nor_bank4_uboot_env),1m(nor_bank4_ppa)," \
+			"3m(nor_bank4_secure_boot),6m(nor_bank4_dppa_qe)," \
+			"1m(nor_bank4_dtb),16m(nor_bank4_kernel)," \
+			"32m(nor_bank4_rootfs);7e800000.flash:" \
+			"1m(nand_rcw),2m(nand_uboot)," \
+			"1m(nand_uboot_env),2m(nand_ppa)," \
+			"3m(nand_secure_boot),6m(nand_dppa_qe)," \
+			"1m(nand_dtb),16m(nand_kernel)," \
+			"32m(nand_rootfs),448m(nand_free);" \
+			"spi0.0:16m(spi0_free);" \
+			"spi0.1:512k(spi1_free);spi0.2:8m(spi2_free)"
 #endif
 
 #include <asm/fsl_secure_boot.h>