config: Search for tomatboot.cfg config files as well
diff --git a/CONFIG.md b/CONFIG.md
index a473df9f..19d8e2e0 100644
--- a/CONFIG.md
+++ b/CONFIG.md
@@ -4,7 +4,8 @@
Limine scans for a config file on *the boot drive*. Every partition on the boot drive
is scanned sequentially (first partition first, last partition last) for the presence
-of either a `/limine.cfg` or a `/boot/limine.cfg` file, in that order.
+of either a `/limine.cfg`, `/boot/limine.cfg`, `/tomatboot.cfg`, or a
+`/boot/tomatboot.cfg` file, in that order.
Once the file is located, Limine will use it as its config file. Other possible
candidates in subsequent partitions or directories are ignored.
diff --git a/limine-pxe.bin b/limine-pxe.bin
index ad0a6ac0..5cfe58a7 100644
Binary files a/limine-pxe.bin and b/limine-pxe.bin differ
diff --git a/limine.bin b/limine.bin
index 9b6f7b75..25b1fbce 100644
Binary files a/limine.bin and b/limine.bin differ
diff --git a/stage2.map b/stage2.map
index e492b6d2..1d181e33 100644
Binary files a/stage2.map and b/stage2.map differ
diff --git a/stage2/lib/config.c b/stage2/lib/config.c
index 03b00f1d..456808cf 100644
--- a/stage2/lib/config.c
+++ b/stage2/lib/config.c
@@ -19,10 +19,11 @@ static char *config_addr;
int init_config_disk(struct part *part) {
struct file_handle f;
- if (fopen(&f, part, "/limine.cfg")) {
- if (fopen(&f, part, "/boot/limine.cfg")) {
- return -1;
- }
+ if (fopen(&f, part, "/limine.cfg")
+ && fopen(&f, part, "/boot/limine.cfg")
+ && fopen(&f, part, "/tomatboot.cfg")
+ && fopen(&f, part, "/boot/tomatboot.cfg")) {
+ return -1;
}
size_t config_size = f.size + 1;
@@ -35,7 +36,8 @@ int init_config_disk(struct part *part) {
int init_config_pxe(void) {
struct tftp_file_handle cfg;
- if (tftp_open(&cfg, 0, 69, "limine.cfg")) {
+ if (tftp_open(&cfg, 0, 69, "limine.cfg")
+ && tftp_open(&cfg, 0, 69, "tomatboot.cfg")) {
return -1;
}
config_addr = conv_mem_alloc(cfg.file_size);
