Email or username:

Password:

Forgot your password?
251 comments
char *lotte; :v_trans: :v_bi:

@drewdevault anything (non-trivial) that can be done with a regex, should be done with a regex

Drew DeVault

Yes, this is a regex implementation in ring 0

Jeroen Massar

@drewdevault but why the f is it there? ;) (I can only assume because at the moment it is quicker than solving the problem the "correct" way ;) )

R. L. Dane :debian: :openbsd:

@drewdevault

Lemme guess, "just a little hobby project, won't ever be as big as MINIX, only supports AT harddisks right now because that's all you have?" 😂

mort

@drewdevault Wait you implemented ext4? I assumed that for this kind of project you'd make a baby's first file system style thing like we did in OS class in uni...

Drew DeVault

It can read files from the Linux install on my laptop :D

Borjan Tchakaloff

@drewdevault inspiring! At this rate you'll have the laptop on the Internet by next week

Side note: you definitely need to label your white marker on one of these alt texts 😁 "WXGA whatnot"

Drew DeVault

End of day 4: ext4 works but needs to be integrated into the filesystem abstraction (which also needs to be fleshed out)

Maybe VFS tomorrow?

Drew DeVault

Starting to get lwext4 rigged into the Bunnix filesystem abstraction

Drew DeVault

Did anyone else think inodes were black magic when they first got into Unix

Dušan 🇷🇸 :arch: ⚛️

@drewdevault Of course, just the idea of files having different entries in the FS table, but pointing to the same underlying data on disk is still something I find a little bit like black magic. 😂

Steven Reed

@drewdevault I never really used DOS/Windows much, and I don't remember delving deeply into filesystem internals on the Amiga or Beeb, so Linux was my first exposure. Inodes therefore always seemed very natural, and meant FAT confused the hell out of me...

Henri

@drewdevault First had to learn what they were when a drive ran out of them and I had to reformat.

Drew DeVault

Work progresses on integrating ext4 with the Bunnix filesystem API

This screenshot brought to you by fs::* rather than lwext4::*

Drew DeVault replied to Drew

I have a (shitty) VFS

That's probably it for day 5, I have other things to do today 🙂

Drew DeVault replied to Drew

What's probably next is fleshing out the VFS a bit, then getting to userspace and implementing a few syscalls

Noodlez :nixos: :neovim: replied to Drew

@drewdevault Dude you're amazing. I've been stuck on just memory management in my hobby kernel for like 6 months now (although truthfully like 6 hours I barely get to work on it), and here you are just pumping out a kernel like it's nothing.

Drew DeVault replied to Noodlez :nixos: :neovim:

@noodlez1232 I've done this a few times already, experience makes it easier :) and I still struggle with memory management! In a way it's the hardest part imho

Drew DeVault replied to Drew

Day 7, taking a break to hang out with a friend who's in town, more to come tomorrow

BIG KRIMPIN replied to Drew

@drewdevault but Drew, tomorrow is kingsday, you can't miss out on kingsday!

Drew DeVault replied to BIG
Drew DeVault replied to Drew

@bigkrimpin ...although sometimes I cosplay as one when it's funny

BIG KRIMPIN replied to Drew

@drewdevault yeah me neither... but like... cheap stuff y'know?

Drew DeVault replied to Drew

Day 8: let's write a System-V loader and get to userspace

also: don't write a USB driver don't write a USB driver don't write a USB driver

Drew DeVault replied to Drew

✓ Userspace

No user I/O yet though so you have to take my word for it

Drew DeVault replied to Drew

Okay, now you don't have to take my word for it

marius replied to Drew

@drewdevault is this part of Helios, or some exploratory alternative?

marius replied to Drew

@drewdevault is that the secret to get this far this quickly? :)

Drew DeVault replied to Drew

Day 8 was all about getting userspace online. We are loading ELF programs, jumping into userspace, and we have working interrupts and syscalls

Day 9 will start implementing more useful syscalls and fleshing out I/O

Drew DeVault replied to Drew

There we go. That's probably all for today.

Josef 'Jeff' Sipek replied to Drew

@drewdevault I'm really impressed how quickly you're implementing this.

Drew DeVault replied to Drew

I confess that I rushed into userspace without a plan, so I have a bit of a mess to figure out once I decide how to actually structure the project properly.

But that aside, I implemented a handful of syscalls today, notably readv, write, and mmap (MAP_ANON only, for allocations)

_L4NyrlfL1I0 replied to Drew

@drewdevault You're basically at the point where my university's OS exercise starts out.

We're given a (IMO pretty horrible) codebase with a basic OS that has a scheduler, page allocator, basic filesystem and block device layer, basic userspace with a few I/O calls, a very non-posix CreateProcess syscall, and a minimal shell to start testcases with.

1/2

Drew DeVault replied to Drew

Okay, reorganized the source tree to make a lot more sense before we move any further into userspace. Took some inspiration from the BSD layouts, since I intend to ship kernel and userspace as one cohesive project.

Drew DeVault replied to Drew

Day 10 is getting fork working (and preemptive multitasking)

Getting there.

Drew DeVault replied to Carlos

@codonell I don't think fork is good but I am writing a unix so

Carlos O'Donell replied to Drew

@drewdevault Sorry, no judgement here, just wanted to point out an interesting paper I'd read recently only for the first time. And that perhaps might influence how deeply one plumbs fork as an abstraction into the OS.

Jiří Stránský replied to Drew

@drewdevault Are there resources that you use or that you'd recommend to someone wanting to learn about these low-level OS topics? Perhaps some books / websites or something like that?

Drew DeVault replied to Jiří

@jistr osdev wiki and the manuals/specs for the hardware you want to work with

Drew DeVault replied to Drew

exec works, but there's still some kind of bug in fork+exec

Drew DeVault replied to Drew

Summary of work up to day 10:

* AHCI driver
* MBR and GPT partitions
* ext4
* VFS
* Userspace
* Preemptive multitasking
* Syscalls: readv, writev, lseek, close, mmap, munmap, mprotect, fork, execve

tippfehlr replied to Drew

@drewdevault is taking a break from taking a break

Go Up