openbsd-ext4/writeup/0.md

27 lines
1.5 KiB
Markdown
Raw Normal View History

# Introduction
We created this guide because there was no good place to start on making an ext4 driver or how exactly the internals work. Most of the information is available on the [kernel specification](https://www.kernel.org/doc/html/v4.19/filesystems/ext4/index.html) but it's not like anyone is going to read through all that. We want to make low level development accessible to the average user today, so that we can [make abstractions](https://codeberg.org/gek/seabass.git) to focus on the high level stuff.
# Motivation
We are working on an ext4 driver for [OpenBSD](https://openbsd.org)
# Getting Started
Even though we have code snippets in our code to mimic Jupyter notebooks, we recommend following along with the source code on your local device. For ease of understanding reasons, we are going to start with a thorough analysis of the OpenBSD ext3 source code, draw comparisons with the Linux ext4 source code, and then somehow "merge" the two, without plagarizing so we can keep our code in the standard OpenBSD license.
For the first part of the tutorial, we will be using the OpenBSD `ext2fs` code. So run the following:
```bash
sudo apt-get install cvs
# https://www.openbsd.org/anoncvs.html#CVSROOT
cvs -qd anoncvs@anoncvs1.usa.openbsd.org:/cvs checkout -P src
# wait patiently...
cd src/sys/ufs/ext2fs
```
Unless you are on an OpenBSD based system, you wil not be able to build the code. By the way, if you plan on messing with ext2fs too, you should probably setup a VM.
Follow to the next page.