mirror of
https://github.com/limine-bootloader/limine
synced 2024-11-28 19:33:09 +03:00
protos: Drop autodetection support
This commit is contained in:
parent
e906d0597d
commit
8981575db6
@ -913,47 +913,26 @@ noreturn void boot(char *config) {
|
||||
|
||||
char *proto = config_get_value(config, 0, "PROTOCOL");
|
||||
if (proto == NULL) {
|
||||
printv("PROTOCOL not specified, using autodetection...\n");
|
||||
autodetect:
|
||||
multiboot2_load(config, cmdline);
|
||||
multiboot1_load(config, cmdline);
|
||||
limine_load(config, cmdline);
|
||||
linux_load(config, cmdline);
|
||||
panic(true, "Kernel protocol autodetection failed");
|
||||
panic(true, "Boot protocol not specified for this entry");
|
||||
}
|
||||
|
||||
bool ret = true;
|
||||
|
||||
if (!strcmp(proto, "stivale1") || !strcmp(proto, "stivale") || !strcmp(proto, "stivale2")) {
|
||||
print("The stivale and stivale2 protocols is no longer supported as of Limine 4.x\n");
|
||||
print("The stivale and stivale2 protocols are no longer supported as of Limine 4.x\n");
|
||||
print("Please notify kernel maintainers to move to the Limine boot protocol or\n");
|
||||
print("roll back to Limine 3.x.\n\n");
|
||||
} else if (!strcmp(proto, "limine")) {
|
||||
ret = limine_load(config, cmdline);
|
||||
limine_load(config, cmdline);
|
||||
} else if (!strcmp(proto, "linux")) {
|
||||
ret = linux_load(config, cmdline);
|
||||
linux_load(config, cmdline);
|
||||
} else if (!strcmp(proto, "multiboot1") || !strcmp(proto, "multiboot")) {
|
||||
ret = multiboot1_load(config, cmdline);
|
||||
multiboot1_load(config, cmdline);
|
||||
} else if (!strcmp(proto, "multiboot2")) {
|
||||
ret = multiboot2_load(config, cmdline);
|
||||
multiboot2_load(config, cmdline);
|
||||
} else if (!strcmp(proto, "chainload")) {
|
||||
chainload(config);
|
||||
}
|
||||
|
||||
if (ret) {
|
||||
print("WARNING: Unsupported protocol specified: %s.\n", proto);
|
||||
} else {
|
||||
print("WARNING: Incorrect protocol specified for kernel.\n");
|
||||
}
|
||||
|
||||
print(" Press A to attempt autodetection or any other key to return to menu.\n");
|
||||
|
||||
int c = getchar();
|
||||
if (c == 'a' || c == 'A') {
|
||||
goto autodetect;
|
||||
} else {
|
||||
menu(false);
|
||||
}
|
||||
panic(true, "Incorrect protocol specified for kernel.");
|
||||
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user