mirror of
https://github.com/Tom-on64/kern.git
synced 2026-11-04 02:23:10 +00:00
Implemented custom filesystem and got it to compile. It seems that it isn't loading the 3rd stage bootloader though
This commit is contained in:
+3
-3
@@ -2,9 +2,9 @@
|
||||
[org 0x7c00]
|
||||
|
||||
%define SUPERBLOCK 0x8c00
|
||||
%define FIRST_INODE_BLOCK (SUPERBLOCK) + 12
|
||||
%define STAGE3_INODE 0xb000 + 128
|
||||
%define EXTENT0 (STAGE3_INODE) + 21 ; Offset of extent[0] in inode_t
|
||||
%define FIRST_INODE_BLOCK (SUPERBLOCK) + 18
|
||||
%define STAGE3_INODE 0xb000 + (2 * 64)
|
||||
%define EXTENT0 (STAGE3_INODE) + 14 ; Offset of extent[0] in inode_t
|
||||
|
||||
start:
|
||||
xor ax, ax
|
||||
|
||||
+5
-5
@@ -27,16 +27,16 @@ void main() {
|
||||
deinitMemoryRegion(MEMMAP_AREA, maxBlocks / BLOCKS_PER_BYTE);
|
||||
|
||||
// Load root dir, find kernel INode and parse it
|
||||
superBlock_t* superblock = (superBlock_t*)SUPERBLOCK_LOC;
|
||||
superblock->rootINodePtr = BOOT_FIRST_INODE_LOC + sizeof(inode_t);
|
||||
diskRead(superblock->firstDataBlock * 8, 8, (void*)SCRATCH_BLOCK_LOC);
|
||||
superblock_t* superblock = (superblock_t*)SUPERBLOCK_LOC;
|
||||
superblock->rootInodePtr = BOOT_FIRST_INODE_LOC + sizeof(inode_t);
|
||||
diskRead(superblock->dataStart * 8, 8, (void*)SCRATCH_BLOCK_LOC);
|
||||
|
||||
inode_t* inode;
|
||||
if ((inode = getINode("kernel.bin")) == NULL) {
|
||||
if ((inode = getInode("kernel.bin")) == NULL) {
|
||||
__asm__ volatile ("cli; hlt" : : "a"(0xDeadBeef));
|
||||
} else { loadFile(inode, (void*)KERNEL_LOC); }
|
||||
|
||||
if ((inode = getINode("term16n.fnt")) == NULL) {
|
||||
if ((inode = getInode("term16n.fnt")) == NULL) {
|
||||
__asm__ volatile ("cli; hlt" : : "a"(0xDeadBeef));
|
||||
} else { loadFile(inode, (void*)FONT_LOC); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user