[PATCH 06/18] blspec: collect bootloader spec entries from ESP
Marco Felsch
m.felsch at pengutronix.de
Mon Apr 14 03:41:46 PDT 2025
On 25-04-14, Ahmad Fatoum wrote:
> Hello Marco,
>
> On 4/14/25 12:14, Marco Felsch wrote:
> > On 25-04-14, Ahmad Fatoum wrote:
> >> + if (!have_esp)
> >> + goto out;
> >> +
> >> + for_each_cdev_partition(partcdev, cdev) {
> >> + if (!(partcdev->flags & DEVFS_PARTITION_BOOTABLE_ESP))
> >> + continue;
> >> +
> >> + /*
> >> + * ESP is only a fallback. If we have an ESP, but no bootloader spec
> >> + * files inside, this is not an error.
> >> + */
> >> + ret = boot_scan_cdev(scanner, bootentries, partcdev, true);
> >> + if (ret >= 0)
> >> + found += ret;
> >> + else
> >> + err = ret;
> >> + }
> >
> > Is it allowed to have multiple ESP partitions? If not we could save us
> > the additional loop and just store the ESP directly and make use of it.
>
> It may make sense to have multiple ESPs on the same medium, as long as
> some of them set DPS_TYPE_FLAG_NO_AUTO in the upper bits of the Type
> UUID. I didn't want to preclude such a configuration, hence the loop.
Make sense.
Regards,
Marco
>
> Thanks,
> Ahmad
>
> >
> > Regards,
> > Marco
> >
> >
> >> +
> >> +out:
> >> return found ?: err;
> >> }
> >>
> >> --
> >> 2.39.5
> >>
> >>
> >>
> >
>
> --
> Pengutronix e.K. | |
> Steuerwalder Str. 21 | http://www.pengutronix.de/ |
> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>
>
More information about the barebox
mailing list