Add ext2 superblock, document file system
diff --git a/src/kernel/dri/fs/ext2/Jmk b/src/kernel/dri/fs/ext2/Jmk
index b0da0c3..aac4c5c 100644
--- a/src/kernel/dri/fs/ext2/Jmk
+++ b/src/kernel/dri/fs/ext2/Jmk
@@ -8,7 +8,7 @@
archetype(c)
-CFLAGS += -I/include/kernel
+CFLAGS += -I$(ROOT)/include/kernel
OBJECTS = ext2.o
diff --git a/src/kernel/dri/fs/ext2/ext2.c b/src/kernel/dri/fs/ext2/ext2.c
index eb6842b..31ed7fe 100644
--- a/src/kernel/dri/fs/ext2/ext2.c
+++ b/src/kernel/dri/fs/ext2/ext2.c
@@ -1,7 +1,20 @@
#include <dri/fs/ext2/ext2.h>
+#include <dri/ata_pio/ata_pio.h>
#include <kint.h>
+#include <log.h>
+
+struct ext2_superblock ext2_read_superblock()
+{
+ uchar buffer[512 * 2];
+ ata_pio_read_sectors(buffer, 2, 2);
+
+ struct ext2_superblock *sb = (void *)(buffer);
+ return *sb;
+}
void ext2_mount(struct fs_node *where)
{
- // TODO
+ struct ext2_superblock sb = ext2_read_superblock();
+
+ kprintf("Magic = 0x%x\n", sb.signature);
}