[U-Boot] [PATCH 3/4] sunxi: Add default partition scheme

Maxime Ripard maxime.ripard at free-electrons.com
Thu Nov 16 09:29:44 UTC 2017


Hi Alexander,

On Wed, Nov 15, 2017 at 10:03:32PM +0100, Alexander Graf wrote:
> On 15.11.17 11:11, Maxime Ripard wrote:
> > The partitions variable is especially useful to create a partition table
> > from U-Boot, either directly from the U-Boot shell, or through flashing
> > tools like fastboot and its oem format command.
> > 
> > This is especially useful on devices with an eMMC you can't take out to
> > flash from another system, and booting a Linux system first to flash our
> > system then is not really practical.
> > 
> > Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
> > ---
> >  include/configs/sunxi-common.h | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> > index 4391a8cbc824..11da6ccfbf54 100644
> > --- a/include/configs/sunxi-common.h
> > +++ b/include/configs/sunxi-common.h
> > @@ -493,6 +493,12 @@ extern int soft_i2c_gpio_scl;
> >  #define SUNXI_MTDPARTS_DEFAULT
> >  #endif
> >  
> > +#define PARTS_DEFAULT \
> > +	"name=loader1,start=8k,size=32k;" \
> > +	"name=loader2,size=984k;" \
> > +	"name=boot,size=128M,bootable;" \
> > +	"name=system,size=-;"
> 
> Is there a particular reason you're creating a boot and system
> partition? In a normal distro world, the distro installer will take care
> of creating ESP + root + swap + whatever for you - and they (or the user
> driving the installation) usually know best what they need :)

Right, so let me explain my thought process here :)

We really want a main partition for the system for people that will
not use any distro installer (either because they generated their
image by hand before using something like debootstrap or ELBE) or
because they're using a build system that will generate the system
image directly, without any alternative process.

Then, the boot partition is the one I'm not really sure about. As you
know, we will transition to an FAT-based environment in the future, so
we need to have partition to hold it on all systems, and it can't be
the system one since, well, FAT.

I also was under the impression that it would benefit you in some way
to store the EFI data, and it's actually what I'd really like input
on. I have basically no idea what are your requirements or what would
be a good size.

The only real constraints we have is that it needs to be at least able
to store 128kB for the environment. If we want to align it properly,
that would be 1MB. Then, if you're telling me you don't need anything
else, then that's fine by me :)

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171116/2fcb07af/attachment.sig>


More information about the U-Boot mailing list