[U-Boot] [PATCH 1/6] arm: socfpga: cyclone5-socdk: Enabling mtd partitioning layout

Chin Liang See clsee at altera.com
Sat Dec 12 07:30:46 CET 2015


On Sat, 2015-12-12 at 04:20 +0100, Marek Vasut wrote:
> On Saturday, December 12, 2015 at 12:59:02 AM, Chin Liang See wrote:
> > On Fri, 2015-12-11 at 15:21 +0100, Marek Vasut wrote:
> > > On Friday, December 11, 2015 at 10:15:48 AM, Chin Liang See
> > > wrote:
> > > > Enabling mtd partitioning layout which indicate partition
> > > > for various boot partition
> > > > 
> > > > Signed-off-by: Chin Liang See <clsee at altera.com>
> > > > Cc: Dinh Nguyen <dinguyen at opensource.altera.com>
> > > > Cc: Dinh Nguyen <dinh.linux at gmail.com>
> > > > Cc: Pavel Machek <pavel at denx.de>
> > > > Cc: Marek Vasut <marex at denx.de>
> > > > Cc: Stefan Roese <sr at denx.de>
> > > > ---
> > > > 
> > > >  include/configs/socfpga_cyclone5_socdk.h | 12 ++++++++++++
> > > >  1 file changed, 12 insertions(+)
> > > > 
> > > > diff --git a/include/configs/socfpga_cyclone5_socdk.h
> > > > b/include/configs/socfpga_cyclone5_socdk.h index
> > > > 67bb35f..e4a1657
> > > > 100644
> > > > --- a/include/configs/socfpga_cyclone5_socdk.h
> > > > +++ b/include/configs/socfpga_cyclone5_socdk.h
> > > > @@ -96,4 +96,16 @@
> > > > 
> > > >  /* The rest of the configuration is shared */
> > > >  #include <configs/socfpga_common.h>
> > > > 
> > > > +/* mtd partitioning for serial NOR flash */
> > > > +#if defined(CONFIG_CMD_UBI) || defined(CONFIG_CMD_SF)
> > > 
> > > Is this the default Altera layout ?
> > 
> > Yah but believe it need to be updated
> 
> So you're not worried about compatibility I presume ?

I still need to care of compatiblity. Some of them will break due to
size increase. But through the use of partition name and environment,
user will be abstracted from this. 

> 
> > > > +#define MTDPARTS_DEFAULT	"mtdparts=ff705000.spi:"\
> > > > +				"256k(spl),"		\
> > > > +				"64k(env),"		\
> > > > +				"64k(dtb),"		\
> > > 
> > > What happens if the DT grows over 64k ?
> > 
> > Hmmm rethinking of this, I will make Linux dtb, U-Boot and kernel
> > as
> > part of one big UBI partition called boot.
> 
> I am using this sort of layout on SoCkit internally:
> 
>         "mtdparts=ff705000.spi:"                \
>                 "1m(u-boot),"                   \
>                 "64k(env1),"                    \
>                 "64k(env2),"                    \
>                 "-(UBI)\0"
> 

Hmmm I didn't see the area for SPL. Wonder is it part of u-boot
partition?


> I have two environment blocks to implement redundant env, which is
> useful
> when deploying the system. It makes the system slightly more
> resilient
> against problems of aging flash.

Nice thought, will increase the environment partition to 256kB to cater
this.

> 
> > > > +				"256k(boot),"		\
> > > 
> > > 256k is not enough for U-Boot (considering this is U-Boot).
> > 
> > Will create boot region to avoid worrying the size issue
> > 
> > > > +				"16m(kernel),"		
> > > > \
> > > > +				"16m(rootfs),"		
> > > > \
> > > 
> > > Why don't you put kernel and rootfs onto the UBI volume instead ?
> > 
> > Yup, kernel will go into boot partition. It will be separated from
> > rootfs as user might choose nfs.
> 
> Can you share the final layout before you roll out patches ?

Sure, plan to do so but need to away from desk just now.

Here is the old layout
256k(spl)
64k(env)
64k(dtb)
256k(boot)
16m(kernel)
16m(rootfs)

The new one would like this
256k(spl)
256k(env)
15872k(boot)
16m(rootfs)

The boot partition can be used as ubi part or raw partition.
It contains the linux dtb, u-boot and linux images.
The environment will be used to determine the image offset for
mentioned boot images from boot partition.

Thanks
Chin Liang




More information about the U-Boot mailing list