Hi, On 15/11/17 21:03, 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.rip...@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 :)
But do we actually care about this? If I understand this correctly, these are default settings for U-Boot's "mtdparts default" command, which honestly I didn't even know existed so far. So in a distribution scenario I wouldn't expect somebody to actually use this. Instead you boot from a (possibly unpartitioned) SD card with just U-Boot on it or from SPI flash, then launch an installer from somewhere (PXE, USB drive) and let it do its job. No U-Boot partition involved. And even if you use mtdpart, you can always override these default settings on the command line. Does mtdparts even use partition tables (MBR/GPT)? mtd sounds quite Android-y/embedded to me (passing partition information via command line). So apart from that I think it's good to have a default FAT/ESP partition, also for storing the environment. It's debatable whether we need a system partition defined at this stage. Can't this just left be unpartitioned, to be actually populated later? In a MBR/GPT scenario I would expect a big partition covering the whole device causes headache later on. Cheers, Andre. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot