mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 23:10:32 +00:00
Correctly set sys_boot_src in zealbooter based on media type.
This commit is contained in:
parent
94eea62a5c
commit
017025fae2
1 changed files with 8 additions and 1 deletions
|
@ -139,6 +139,8 @@ struct CKernel {
|
|||
} __attribute__((packed));
|
||||
|
||||
#define BOOT_SRC_RAM 2
|
||||
#define BOOT_SRC_HDD 3
|
||||
#define BOOT_SRC_DVD 4
|
||||
#define RLF_16BIT 0b01
|
||||
#define RLF_VESA 0b10
|
||||
|
||||
|
@ -222,6 +224,11 @@ void _start(void) {
|
|||
CORE0_32BIT_INIT -= (uintptr_t)kernel->address;
|
||||
CORE0_32BIT_INIT += final_address;
|
||||
|
||||
if (kernel->media_type == LIMINE_MEDIA_TYPE_OPTICAL)
|
||||
CKernel->boot_src = BOOT_SRC_DVD;
|
||||
else if (kernel->media_type == LIMINE_MEDIA_TYPE_GENERIC)
|
||||
CKernel->boot_src = BOOT_SRC_HDD;
|
||||
else
|
||||
CKernel->boot_src = BOOT_SRC_RAM;
|
||||
CKernel->boot_blk = 0;
|
||||
CKernel->boot_patch_table_base = (uintptr_t)CKernel + CKernel->h.patch_table_offset;
|
||||
|
|
Loading…
Reference in a new issue