{ }
};
-U_BOOT_DRIVER(bootmeth_extlinux) = {
+/* Put an number before 'extlinux' to provide a default ordering */
+U_BOOT_DRIVER(bootmeth_1extlinux) = {
.name = "bootmeth_extlinux",
.id = UCLASS_BOOTMETH,
.of_match = extlinux_bootmeth_ids,
{ }
};
-U_BOOT_DRIVER(bootmeth_script) = {
+/* Put an number before 'script' to provide a default ordering */
+U_BOOT_DRIVER(bootmeth_2script) = {
.name = "bootmeth_script",
.id = UCLASS_BOOTMETH,
.of_match = script_bootmeth_ids,
Controlling ordering
--------------------
+By default, faster bootdevs (or those which are assumed to be faster) are used
+first, since they are more likely to be able to boot the device quickly.
+
Several options are available to control the ordering of boot scanning:
bootmeths
~~~~~~~~~
+By default bootmeths are checked in name order. Use `bootmeth list` to see the
+ordering. Note that the `extlinux` and `script` bootmeth is first, to preserve the behaviour
+used by the old distro scripts.
+
This environment variable can be used to control the list of bootmeths used and
their ordering for example::
The :ref:`usage/cmd/bootmeth:bootmeth command` (`bootmeth order`) operates in
the same way as setting this variable.
-
Bootdev uclass
--------------
DECLARE_GLOBAL_DATA_PTR;
-extern U_BOOT_DRIVER(bootmeth_script);
+extern U_BOOT_DRIVER(bootmeth_2script);
static int inject_response(struct unit_test_state *uts)
{
/* Enable the script bootmeth too */
ut_assertok(uclass_first_device_err(UCLASS_BOOTSTD, &bootstd));
- ut_assertok(device_bind(bootstd, DM_DRIVER_REF(bootmeth_script),
+ ut_assertok(device_bind(bootstd, DM_DRIVER_REF(bootmeth_2script),
"bootmeth_script", 0, ofnode_null(), &dev));
/* Change the order to include mmc4 */