[U-Boot] [PATCH 3/4] sunxi: Add default partition scheme
André Przywara
andre.przywara at arm.com
Thu Nov 30 00:23:06 UTC 2017
Hi Maxime,
On 28/11/17 10:34, 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 | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> index 4391a8cbc824..c9214a709221 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,uuid=${uuid_gpt_loader1};" \
> + "name=loader2,size=984k,uuid=${uuid_gpt_loader2};" \
> + "name=esp,size=128M,bootable,uuid=${uuid_gpt_esp};" \
Those numbers look right to me, but I can't find the definition of
uuid_gpt_loader{1,2} in U-Boot. Only I see them referenced by some
rockchip header.
Is there some magic definition I missed or do we actually need to add them?
I guess you are after the Android-IA bootloader UUIDs from the Wikipedia
page, starting with 2568845D- and 114EAFFE-?
> + "name=system,size=-,uuid=${uuid_gpt_system};"
So does fastboot require a system partition? And it wouldn't know where
to put the rootfs to without one?
In this case I guess it's fine, because it fits the use case.
But otherwise (as mentioned before) one giant partition to fill the rest
of the "disk" is more annoying than helpful for regular Linux installers.
> +
> #define CONSOLE_ENV_SETTINGS \
> CONSOLE_STDIN_SETTINGS \
> CONSOLE_STDOUT_SETTINGS
> @@ -511,6 +517,9 @@ extern int soft_i2c_gpio_scl;
> "console=ttyS0,115200\0" \
> SUNXI_MTDIDS_DEFAULT \
> SUNXI_MTDPARTS_DEFAULT \
> + "uuid_gpt_esp=C12A7328-F81F-11D2-BA4B-00A0C93EC93B\0" \
> + "uuid_gpt_system=0FC63DAF-8483-4772-8E79-3D69D8477DE4\0" \
The ESP GUID is correct, the other is "Linux filesystem data", right?
Technically I guess root partition would be more suitable, but we would
need to know whether it's AArch64 or ARM, if I get this correctly.
Shall we use #ifdef CONFIG_ARM64 here?
Cheers,
Andre.
> + "partitions=" PARTS_DEFAULT "\0" \
> BOOTCMD_SUNXI_COMPAT \
> BOOTENV
>
>
More information about the U-Boot
mailing list