diff mbox series

[U-Boot,v3,18/30] sunxi: Add uENV partition on gpt partition table

Message ID 1517156391-11353-19-git-send-email-jagan@amarulasolutions.com
State Changes Requested
Delegated to: Marek Vasut
Headers show
Series musb: sunxi: Add OTG-Peripheral support for Allwineer H3/H5/A64 | expand

Commit Message

Jagan Teki Jan. 28, 2018, 4:19 p.m. UTC
Insert 128KiB uENV partition after loader2 on gpt partition table.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 include/configs/sunxi-common.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Maxime Ripard Jan. 29, 2018, 8:03 a.m. UTC | #1
On Sun, Jan 28, 2018 at 09:49:39PM +0530, Jagan Teki wrote:
> Insert 128KiB uENV partition after loader2 on gpt partition table.
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

What is the point of this partition?

If it is to store the environment, it was discussed to add it into the
esp partition.

Maxime
Jagan Teki Jan. 29, 2018, 8:31 a.m. UTC | #2
On Mon, Jan 29, 2018 at 1:33 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> On Sun, Jan 28, 2018 at 09:49:39PM +0530, Jagan Teki wrote:
>> Insert 128KiB uENV partition after loader2 on gpt partition table.
>>
>> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>
> What is the point of this partition?

Yes for u-boot environment.

>
> If it is to store the environment, it was discussed to add it into the
> esp partition.

If it is part of esp are we sure env part from esp is always unchanged
expect u-boot saveenv?, I would prefer env has separate partition
because, there could be chance of formatting esp from host and copy
Linux images instead of fastboot write or any other media write.
Maxime Ripard Jan. 30, 2018, 8:25 a.m. UTC | #3
On Mon, Jan 29, 2018 at 02:01:49PM +0530, Jagan Teki wrote:
> On Mon, Jan 29, 2018 at 1:33 PM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > On Sun, Jan 28, 2018 at 09:49:39PM +0530, Jagan Teki wrote:
> >> Insert 128KiB uENV partition after loader2 on gpt partition table.
> >>
> >> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> >
> > What is the point of this partition?
> 
> Yes for u-boot environment.
> 
> >
> > If it is to store the environment, it was discussed to add it into the
> > esp partition.
> 
> If it is part of esp are we sure env part from esp is always unchanged
> expect u-boot saveenv?, I would prefer env has separate partition
> because, there could be chance of formatting esp from host and copy
> Linux images instead of fastboot write or any other media write.

Please look at the discussion we had at the time. The esp partition is
under the firmware control, so it's safe to put our environment there.

Maxime
diff mbox series

Patch

diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 687c7a3..4f3170d 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -505,6 +505,7 @@  extern int soft_i2c_gpio_scl;
 #define PARTS_DEFAULT \
 	"name=loader1,start=8k,size=32k,uuid=${uuid_gpt_loader1};" \
 	"name=loader2,size=984k,uuid=${uuid_gpt_loader2};" \
+	"name=uEnv,size=128K,uuid=${uuid_gpt_uenv};" \
 	"name=esp,size=128M,bootable,uuid=${uuid_gpt_esp};" \
 	"name=system,size=-,uuid=${uuid_gpt_system};"