]> git.ozlabs.org Git - petitboot/blob - discover/boot.h
discover/platform-powerpc: Correct aux revision format
[petitboot] / discover / boot.h
1 #ifndef _BOOT_H
2 #define _BOOT_H
3
4 #include <types/types.h>
5 #include "device-handler.h"
6
7 struct boot_option;
8 struct boot_command;
9
10 typedef void (*boot_status_fn)(void *arg, struct status *);
11
12 struct boot_task *boot(void *ctx, struct discover_boot_option *opt,
13                 struct boot_command *cmd, int dry_run,
14                 boot_status_fn status_fn, void *status_arg);
15
16 void boot_cancel(struct boot_task *task);
17
18 struct boot_task {
19         struct load_url_result *image;
20         struct load_url_result *initrd;
21         struct load_url_result *dtb;
22         const char *local_image;
23         const char *local_initrd;
24         const char *local_dtb;
25         char *local_image_override;
26         char *local_initrd_override;
27         char *local_dtb_override;
28         const char *args;
29         const char *boot_console;
30         boot_status_fn status_fn;
31         void *status_arg;
32         bool dry_run;
33         bool cancelled;
34         bool verify_signature;
35         bool decrypt_files;
36         struct load_url_result *image_signature;
37         struct load_url_result *initrd_signature;
38         struct load_url_result *dtb_signature;
39         struct load_url_result *cmdline_signature;
40         const char *local_image_signature;
41         const char *local_initrd_signature;
42         const char *local_dtb_signature;
43         const char *local_cmdline_signature;
44 };
45
46 enum {
47         KEXEC_LOAD_DECRYPTION_FALURE = 252,
48         KEXEC_LOAD_SIG_SETUP_INVALID = 253,
49         KEXEC_LOAD_SIGNATURE_FAILURE = 254,
50 };
51
52 #endif /* _BOOT_H */