X-Git-Url: https://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fboot.h;h=69643bfb5a58dec46e0735095c754436570011b4;hp=bbb02cf7858e39e0f077fc42e56538c2b9a1f65b;hb=606c23f642a4e8a3a238cdbc3cd10d74708cbfad;hpb=375c81a1b9aa8904dfdd0b1195fe99a1e4a2fa9d diff --git a/discover/boot.h b/discover/boot.h index bbb02cf..69643bf 100644 --- a/discover/boot.h +++ b/discover/boot.h @@ -1,12 +1,52 @@ #ifndef _BOOT_H #define _BOOT_H +#include +#include "device-handler.h" + struct boot_option; struct boot_command; -typedef void (*boot_status_fn)(void *arg, struct boot_status *); +typedef void (*boot_status_fn)(void *arg, struct status *); + +struct boot_task *boot(void *ctx, struct discover_boot_option *opt, + struct boot_command *cmd, int dry_run, + boot_status_fn status_fn, void *status_arg); + +void boot_cancel(struct boot_task *task); + +struct boot_task { + struct load_url_result *image; + struct load_url_result *initrd; + struct load_url_result *dtb; + const char *local_image; + const char *local_initrd; + const char *local_dtb; + char *local_image_override; + char *local_initrd_override; + char *local_dtb_override; + const char *args; + const char *boot_console; + boot_status_fn status_fn; + void *status_arg; + bool dry_run; + bool cancelled; + bool verify_signature; + bool decrypt_files; + struct load_url_result *image_signature; + struct load_url_result *initrd_signature; + struct load_url_result *dtb_signature; + struct load_url_result *cmdline_signature; + const char *local_image_signature; + const char *local_initrd_signature; + const char *local_dtb_signature; + const char *local_cmdline_signature; +}; -int boot(void *ctx, struct discover_boot_option *opt, struct boot_command *cmd, - int dry_run, boot_status_fn status_fn, void *status_arg); +enum { + KEXEC_LOAD_DECRYPTION_FALURE = 252, + KEXEC_LOAD_SIG_SETUP_INVALID = 253, + KEXEC_LOAD_SIGNATURE_FAILURE = 254, +}; #endif /* _BOOT_H */