Make stivale actually pass the command line to the kernel
This commit is contained in:
parent
6578b55c9f
commit
2ecd4a8016
@ -95,7 +95,7 @@ void main(int boot_drive) {
|
||||
echfs_open(&f, drive, part, path);
|
||||
|
||||
if (!strcmp(proto, "stivale")) {
|
||||
stivale_load(&f);
|
||||
stivale_load(&f, cmdline);
|
||||
} else if (!strcmp(proto, "qword")) {
|
||||
echfs_read(&f, (void *)0x100000, 0, f.dir_entry.size);
|
||||
// Boot the kernel.
|
||||
|
@ -40,7 +40,7 @@ struct stivale_struct {
|
||||
|
||||
struct stivale_struct stivale_struct = {0};
|
||||
|
||||
void stivale_load(struct echfs_file_handle *fd) {
|
||||
void stivale_load(struct echfs_file_handle *fd, char *cmdline) {
|
||||
uint64_t entry_point;
|
||||
|
||||
struct stivale_header stivale_hdr;
|
||||
@ -117,6 +117,8 @@ void stivale_load(struct echfs_file_handle *fd) {
|
||||
stivale_struct.rsdp = (uint64_t)(size_t)get_rsdp();
|
||||
print("stivale: RSDP at %X\n", stivale_struct.rsdp);
|
||||
|
||||
stivale_struct.cmdline = (uint64_t)(size_t)cmdline;
|
||||
|
||||
stivale_struct.framebuffer_width = stivale_hdr.framebuffer_width;
|
||||
stivale_struct.framebuffer_height = stivale_hdr.framebuffer_height;
|
||||
stivale_struct.framebuffer_bpp = stivale_hdr.framebuffer_bpp;
|
||||
|
@ -3,6 +3,6 @@
|
||||
|
||||
#include <fs/echfs.h>
|
||||
|
||||
void stivale_load(struct echfs_file_handle *fd);
|
||||
void stivale_load(struct echfs_file_handle *fd, char *cmdline);
|
||||
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
TIMEOUT=0
|
||||
TIMEOUT=3
|
||||
|
||||
KERNEL_PARTITION=0
|
||||
KERNEL_PATH=test.elf
|
||||
|
Loading…
Reference in New Issue
Block a user