1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright 2021 Google LLC
7 #define LOG_CATEGORY UCLASS_BOOTSTD
15 * show_bootmeths() - List available bootmeths
17 * We could refactor this to use do_bootmeth_list() if more detail (or ordering)
20 static void show_bootmeths(void)
25 printf("Bootmeths: ");
26 uclass_id_foreach_dev(UCLASS_BOOTMETH, dev, uc)
27 printf(" %s", dev->name);
31 int bootstd_prog_boot(void)
33 struct bootflow_iter iter;
34 struct bootflow bflow;
37 printf("Programmatic boot starting\n");
39 flags = BOOTFLOWIF_HUNT | BOOTFLOWIF_SHOW | BOOTFLOWIF_SKIP_GLOBAL;
42 for (i = 0, ret = bootflow_scan_first(NULL, NULL, &iter, flags, &bflow);
43 i < 1000 && ret != -ENODEV;
44 i++, ret = bootflow_scan_next(&iter, &bflow)) {
46 bootflow_run_boot(&iter, &bflow);
47 bootflow_free(&bflow);