On Wed, Feb 25, 2026 at 05:27:45PM +0100, Quentin Schulz wrote: > Hi Padmarao, > > On 2/22/26 8:07 AM, Padmarao Begari wrote: > > Add a 'part dupcheck' subcommand that scans all block devices for > > duplicate partition UUIDs. This helps detect situations where the > > same disk image has been flashed to multiple boot devices (e.g., > > USB stick and UFS), which can lead to unpredictable boot behavior > > when using PARTUUID-based root filesystem specifications. It > > iterates all block devices using blk_foreach_probe() and checks > > partition UUIDs via part_get_info(). > > > > When duplicates are found, a warning is printed for each occurrence: > > > > Warning: duplicate PARTUUID 20c5fba5-0171-457f-b9cd-f5129cd07228 > > first seen on usb_mass_storage.lun0:3 > > also on ufs_scsi.id0lun0:3 > > > > Add Kconfig option `CMD_PART_DUPCHECK` and update the `part` help > > text accordingly. > > > > Signed-off-by: John Toomey <[email protected]> > > Signed-off-by: Padmarao Begari <[email protected]> > > --- > > Changes in v2: > > -Add own kconfig symbol for dupcheck subcommand and guard it. > > --- > > cmd/Kconfig | 7 ++++ > > cmd/part.c | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++- > > 2 files changed, 110 insertions(+), 1 deletion(-) > > > > diff --git a/cmd/Kconfig b/cmd/Kconfig > > index 322ebe600c5..73d27fe2e28 100644 > > --- a/cmd/Kconfig > > +++ b/cmd/Kconfig > > @@ -1663,6 +1663,13 @@ config CMD_PART > > Read and display information about the partition table on > > various media. > > +config CMD_PART_DUPCHECK > > + bool "part dupcheck" > > + depends on CMD_PART > > + help > > + Enable the 'part dupcheck' sub-command under 'part' to scan the > > + current partition table and report any duplicate partition UUIDs. > > + > > config CMD_PCI > > bool "pci - Access PCI devices" > > help > > diff --git a/cmd/part.c b/cmd/part.c > > index 975a0a08a99..c4df5053936 100644 > > --- a/cmd/part.c > > +++ b/cmd/part.c > > @@ -15,9 +15,12 @@ > > * Pavel Bartusek <[email protected]> > > */ > > +#include <blk.h> > > #include <config.h> > > #include <command.h> > > +#include <dm.h> > > #include <env.h> > > +#include <malloc.h> > > Can you check the size impact of adding those three include files if we > aren't enabling CMD_PART_DUPCHECK? I'm wondering if we shouldn't guard those > includes with the Kconfig symbol as well?
Headers shouldn't have a size impact. If they do, that's a problem to figure out. -- Tom
signature.asc
Description: PGP signature

