This provides a basic prototype for boot control. Some documentation is in boot/bootctl/README.rst
46 lines
1.0 KiB
C
46 lines
1.0 KiB
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Uclass implementation for boot schema
|
|
*
|
|
* Copyright 2025 Canonical Ltd
|
|
* Written by Simon Glass <simon.glass@canonical.com>
|
|
*/
|
|
|
|
#define LOG_CATEGORY UCLASS_BOOTCTL
|
|
|
|
#include <bootctl.h>
|
|
#include <dm.h>
|
|
|
|
UCLASS_DRIVER(bootctrl) = {
|
|
.id = UCLASS_BOOTCTL,
|
|
.name = "bootctrl",
|
|
#if CONFIG_IS_ENABLED(OF_REAL)
|
|
.post_bind = dm_scan_fdt_dev,
|
|
#endif
|
|
.per_device_plat_auto = sizeof(struct bootctl_uc_plat),
|
|
};
|
|
|
|
UCLASS_DRIVER(bootctrl_measure) = {
|
|
.id = UCLASS_BOOTCTL_MEASURE,
|
|
.name = "bootctrl_measure",
|
|
.per_device_plat_auto = sizeof(struct bootctl_uc_plat),
|
|
};
|
|
|
|
UCLASS_DRIVER(bootctrl_oslist) = {
|
|
.id = UCLASS_BOOTCTL_OSLIST,
|
|
.name = "bootctrl_oslist",
|
|
.per_device_plat_auto = sizeof(struct bootctl_uc_plat),
|
|
};
|
|
|
|
UCLASS_DRIVER(bootctrl_state) = {
|
|
.id = UCLASS_BOOTCTL_STATE,
|
|
.name = "bootctrl_state",
|
|
.per_device_plat_auto = sizeof(struct bootctl_uc_plat),
|
|
};
|
|
|
|
UCLASS_DRIVER(bootctrl_ui) = {
|
|
.id = UCLASS_BOOTCTL_UI,
|
|
.name = "bootctrl_ui",
|
|
.per_device_plat_auto = sizeof(struct bootctl_uc_plat),
|
|
};
|