Close

File system drivers

A project log for Motorola 68000 computer

A mc68k-based computer motherboard, some expansion cards, and a very basic multitasking OS, all built from scratch.

stuartStuart 08/18/2015 at 09:520 Comments

I'm currently working on file system support in the OS. So far I've written a minimal virtual file system (VFS) abstraction, and the beginnings of a FAT file system driver. I'm working on the FAT file system first because it's extremely easy to implement. I am also in the process of resurrecting some old ext2 driver code that I wrote a few years ago. My goal is to prove the viability of the VFS design by supporting two different file system types in a way that's transparent to the code accessing the code accessing the files.

To test the system, I partitioned a CompactFlash card, created a few ext2 and FAT file systems on it, and copied a bunch of files and directories into each file system. The 68010 motherboard is able to read the card's MBR and partition table, and can expose individual partitions as block devices. It's a bit like the Linux block device abstraction.

I'm now at the point where I can traverse a FAT file system and list files in a directory, which is nice :)

The picture below is a screenshot of a serial terminal session between my dev PC and the 68010 system. It shows the system booting, and the output of an "ls" command.

(The references to powerpc are irrelevant - I just happen to have a copy of glibc on this file system)

Discussions