Commit c53654fcda9db51518266cc5feb81f5fb3d71d52

Authored by Maxime Ripard
1 parent 5dc0256d12

sunxi: Add default partition scheme

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.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Showing 1 changed file with 17 additions and 0 deletions Side-by-side Diff

include/configs/sunxi-common.h
... ... @@ -493,6 +493,20 @@
493 493 #define SUNXI_MTDPARTS_DEFAULT
494 494 #endif
495 495  
  496 +#define PARTS_DEFAULT \
  497 + "name=loader1,start=8k,size=32k,uuid=${uuid_gpt_loader1};" \
  498 + "name=loader2,size=984k,uuid=${uuid_gpt_loader2};" \
  499 + "name=esp,size=128M,bootable,uuid=${uuid_gpt_esp};" \
  500 + "name=system,size=-,uuid=${uuid_gpt_system};"
  501 +
  502 +#define UUID_GPT_ESP "c12a7328-f81f-11d2-ba4b-00a0c93ec93b"
  503 +
  504 +#ifdef CONFIG_ARM64
  505 +#define UUID_GPT_SYSTEM "b921b045-1df0-41c3-af44-4c6f280d3fae"
  506 +#else
  507 +#define UUID_GPT_SYSTEM "69dad710-2ce4-4e3c-b16c-21a1d49abed3"
  508 +#endif
  509 +
496 510 #define CONSOLE_ENV_SETTINGS \
497 511 CONSOLE_STDIN_SETTINGS \
498 512 CONSOLE_STDOUT_SETTINGS
... ... @@ -511,6 +525,9 @@
511 525 "console=ttyS0,115200\0" \
512 526 SUNXI_MTDIDS_DEFAULT \
513 527 SUNXI_MTDPARTS_DEFAULT \
  528 + "uuid_gpt_esp=" UUID_GPT_ESP "\0" \
  529 + "uuid_gpt_system=" UUID_GPT_SYSTEM "\0" \
  530 + "partitions=" PARTS_DEFAULT "\0" \
514 531 BOOTCMD_SUNXI_COMPAT \
515 532 BOOTENV
516 533