2021-06-14 05:11:37 +03:00
|
|
|
#pragma once
|
2018-06-09 12:56:00 +03:00
|
|
|
|
|
|
|
struct option {
|
|
|
|
int * value;
|
|
|
|
char * title;
|
|
|
|
char * description_1;
|
|
|
|
char * description_2;
|
2021-06-14 05:11:37 +03:00
|
|
|
};
|
2018-06-09 12:56:00 +03:00
|
|
|
|
2021-06-14 05:11:37 +03:00
|
|
|
extern struct option boot_options[20];
|
2018-06-09 12:56:00 +03:00
|
|
|
static int _boot_offset = 0;
|
2021-06-14 05:11:37 +03:00
|
|
|
|
2018-06-09 12:56:00 +03:00
|
|
|
#define BOOT_OPTION(_value, default_val, option, d1, d2) \
|
|
|
|
int _value = default_val;\
|
|
|
|
boot_options[_boot_offset].value = &_value; \
|
|
|
|
boot_options[_boot_offset].title = option; \
|
|
|
|
boot_options[_boot_offset].description_1 = d1; \
|
|
|
|
boot_options[_boot_offset].description_2 = d2; \
|
2021-06-14 05:11:37 +03:00
|
|
|
_boot_offset++;
|
2018-06-09 12:56:00 +03:00
|
|
|
|
2018-07-07 04:56:14 +03:00
|
|
|
struct bootmode {
|
|
|
|
int index;
|
|
|
|
char * key;
|
|
|
|
char * title;
|
|
|
|
};
|
|
|
|
|
2018-06-09 12:56:00 +03:00
|
|
|
#define BASE_SEL ((sizeof(boot_mode_names)/sizeof(*boot_mode_names))-1)
|
2021-06-14 05:11:37 +03:00
|
|
|
extern int base_sel;
|
|
|
|
|
2021-09-07 05:45:58 +03:00
|
|
|
#define BOOT_SET() do { \
|
|
|
|
base_sel = BASE_SEL; \
|
|
|
|
_boot_offset = 0; \
|
|
|
|
memset(boot_options, 0, sizeof(boot_options)); \
|
|
|
|
} while (0)
|
|
|
|
|
2021-06-14 05:11:37 +03:00
|
|
|
extern char * VERSION_TEXT;
|
|
|
|
extern char * HELP_TEXT;
|
2021-08-22 11:49:28 +03:00
|
|
|
extern char * HELP_TEXT_OPT;
|
2021-06-14 05:11:37 +03:00
|
|
|
extern char * COPYRIGHT_TEXT;
|
|
|
|
extern char * LINK_TEXT;
|
|
|
|
extern char * kernel_path;
|
|
|
|
extern char * ramdisk_path;
|
|
|
|
extern char cmdline[1024];
|
2018-07-07 04:56:14 +03:00
|
|
|
|
2021-06-14 05:11:37 +03:00
|
|
|
extern struct bootmode boot_mode_names[];
|