@drewdevault@fosstodon.org
@drewdevault@fosstodon.org avatar

drewdevault

@drewdevault@fosstodon.org

I write code

Natural language proficiency:
★★★★★ 🇺🇸
★★★☆☆ 🇯🇵
★★☆☆☆ 🇳🇱
★★☆☆☆ 🤟
★☆☆☆☆ 🇫🇷

Does not want to talk to you about cryptocurrency or AI

This profile is from a federated server and may be incomplete. Browse more on the original instance.

whynothugo, to random
@whynothugo@fosstodon.org avatar

@drewdevault epoll(7) and poll(2) don't allow implementing non-blocking I/O on a filesystem. Is implementing such a thing under the radar for Bunnix or Helios?

drewdevault,
@drewdevault@fosstodon.org avatar

@whynothugo not especially trying to innovate just yet, we'll see

drewdevault, to random
@drewdevault@fosstodon.org avatar

I needed a break from Real Work, so I'm speedrunning writing a Unix-ish operating system

Day 3

drewdevault,
@drewdevault@fosstodon.org avatar

many process, much wait

drewdevault,
@drewdevault@fosstodon.org avatar

@mxk what is sync_fd()? Do you mean fsync?

drewdevault,
@drewdevault@fosstodon.org avatar

@mxk I haven't implemented fsync and presently all writes are committed to disk before write(2) et al returns to userspace, so I'm not sure. I might know more when I get to that.

drewdevault,
@drewdevault@fosstodon.org avatar

@mxk @bugaevc I made it so that you can only open directories with O_DIRECTORY and they can only be O_RDONLY

drewdevault,
@drewdevault@fosstodon.org avatar

@bugaevc @mxk I guess that makes sense. We'll see what people are doing in the wild when I start porting software and it trips over this

drewdevault,
@drewdevault@fosstodon.org avatar

Okay, about done for today. Summary of day 14 writing a Unix clone:

New syscalls: exit, waitpid

Improvements to openat: enforces read/write mode, supports O_DIRECTORY, O_APPEND, O_TRUNC, O_EXCL, and O_CLOEXEC

Added an inode cache

Optimized the MMU code for fork and process clean-up (still no CoW, though)

And laid some groundwork for signals, which I have been dreading from the start.

https://git.sr.ht/~sircmpwn/bunnix

drewdevault,
@drewdevault@fosstodon.org avatar

initramfs :D

Simon Zeni ported the Helios EFI bootloader to the Bunnix boot protocol last night, so I'm doing some other boot improvements this morning to get EFI support upstreamed

drewdevault,
@drewdevault@fosstodon.org avatar
drewdevault,
@drewdevault@fosstodon.org avatar

EFI w/framebuffer console via GOP

drewdevault,
@drewdevault@fosstodon.org avatar

Left: old thinkpad w/legacy boot
Right: modern starlabs starbook MkIV w/EFI boot

Both booted from the same flash drive :)

drewdevault,
@drewdevault@fosstodon.org avatar

EFI support ended up consuming all of day 15. D&D tonight!

drewdevault,
@drewdevault@fosstodon.org avatar

Day 16: I am porting musl libc to Bunnix

drewdevault,
@drewdevault@fosstodon.org avatar

Wiring up more of stdio.h

drewdevault,
@drewdevault@fosstodon.org avatar

End of day 16:

  • New syscall: fstatat (currently AT_EMPTY_PATH only, i.e. fstat(2) behavior)
  • Serious build system improvements, to add...
  • A sysroot during the build, into which...
  • An early port of musl libc has been installed, including varying degrees of support for stdio, math, complex, ctype, malloc, string, unistd, stat, and more

Unfortunately I'm now fully committed to GNU make, but this build is too complex to really get away with POSIX makefiles.

drewdevault,
@drewdevault@fosstodon.org avatar

Goal for the end of the week is to have a pretty decent C environment with a shell and a decent spread of coreutils ported, probably a bourne shell derivative plus sbase.

I'll port DOOM, too, if all of that is done before Saturday.

drewdevault,
@drewdevault@fosstodon.org avatar

Fleshed out libc a tiny bit more and tried to port some sbase utilities before calling it quits for today

drewdevault,
@drewdevault@fosstodon.org avatar
drewdevault,
@drewdevault@fosstodon.org avatar

Another day, another GCC cross compiler

drewdevault,
@drewdevault@fosstodon.org avatar

"success"

drewdevault,
@drewdevault@fosstodon.org avatar

So, in the morning of day 17, I have three languages running in userspace: Hare, C, and C++

I will keep fleshing out libc and the necessary syscalls until we have a shell. I suspect there is another scheduler bug as well.

Coming up soon: pipe(2), dup(2), fcntl(2)

drewdevault,
@drewdevault@fosstodon.org avatar

@yrlf libstdc++

drewdevault,
@drewdevault@fosstodon.org avatar

@lritter nope

drewdevault,
@drewdevault@fosstodon.org avatar

@lritter well, everything is cross-compiled. It's not self-hosting yet

drewdevault,
@drewdevault@fosstodon.org avatar

pipe(2)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • kavyap
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • osvaldo12
  • everett
  • Youngstown
  • khanakhh
  • slotface
  • rosin
  • thenastyranch
  • ngwrru68w68
  • Durango
  • JUstTest
  • normalnudes
  • ethstaker
  • GTA5RPClips
  • modclub
  • cisconetworking
  • mdbf
  • tacticalgear
  • cubers
  • provamag3
  • tester
  • anitta
  • Leos
  • lostlight
  • All magazines