Replace bios with bootloader, don't use bootsector
Instead of using the bootsector to load a bootloader, just put the bootloader in the ROM and call it a day. It looks for a file on the SD card in the root directory named `kernel.bin` and loads it into memory. This is not a perfect solution, as the kernel will grow larger and the kernel load address will have to change. At this point I could add back the bootloader, but that is for later. Also the bootloader is just a copy of the kernel, so that can be trimmed down a lot.
This commit is contained in:
28
sw/bootloader/filesystem/o65.c
Normal file
28
sw/bootloader/filesystem/o65.c
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <conio.h>
|
||||
|
||||
#include "o65.h"
|
||||
|
||||
void o65_print_option(o65_opt_t* opt) {
|
||||
int i;
|
||||
|
||||
cprintf("Option Length: %d\n", opt->olen);
|
||||
cprintf("Option Type: %x ", opt->type);
|
||||
|
||||
switch (opt->type) {
|
||||
case O65_OPT_FILENAME: cprintf("Filename\n"); break;
|
||||
case O65_OPT_OS: cprintf("OS\n"); break;
|
||||
case O65_OPT_ASSEMBLER: cprintf("Assembler\n"); break;
|
||||
case O65_OPT_AUTHOR: cprintf("Author\n"); break;
|
||||
case O65_OPT_DATE: cprintf("Creation Date\n"); break;
|
||||
default: cprintf("Invalid\n"); break;
|
||||
}
|
||||
|
||||
if (opt->type != O65_OPT_OS) {
|
||||
for (i = 0; i < opt->olen - 2; i++) {
|
||||
cprintf("%c", opt->data[i]);
|
||||
}
|
||||
} else {
|
||||
cprintf("%x", opt->data[0]);
|
||||
}
|
||||
cprintf("\n\n");
|
||||
}
|
||||
Reference in New Issue
Block a user