@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.

vi, to random
@vi@mastodon.social avatar

@drewdevault Is the harelang site down for maintenance at the moment? I'm getting curl: (16) Error in the HTTP2 framing layer via curl and browsers aren't opening up the site for me.

drewdevault,
@drewdevault@fosstodon.org avatar

@vi fixed

drewdevault, to random
@drewdevault@fosstodon.org avatar

Closed access science should have been outlawed the moment ARPANET was online

drewdevault, to random
@drewdevault@fosstodon.org avatar

There are not actually many good games for the NDS, it seems

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

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)

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

Day 17 so far:

  • New syscalls: chdir, fchdir, pipe; getpid/getppid removed, replaced with getcreds (also does uid, gid, euid, sid, etc)
  • Mountpoints refactored to live on inodes, all *at (e.g. openat) syscalls finished
  • C++ running in userspace (ugh, needed for a future gcc port)
  • Bunnix target patched into binutils & gcc cross toolchain, proper sysroot set up
  • libc expanded: dirent, getopt, stat, time, plus riggings for the new syscalls (e.g. pipe, getuid)
drewdevault,
@drewdevault@fosstodon.org avatar

Progress towards shell: I have some dash patches that almost build; 11 libc functions remain. These are mostly going to involve shimming out signal-handling functions until I implement them in the kernel.

I have 44 coreutils from sbase building in my sysroot (e.g. grep, sed, od, uniq, etc)

A keyboard driver and console thing for an interactive shell remains to be done in the kernel

drewdevault,
@drewdevault@fosstodon.org avatar

Funnily enough, of all of the syscalls I have left to implement before I can finish porting dash, I suspect getcwd will be the most difficult.

drewdevault,
@drewdevault@fosstodon.org avatar

I think I'll end up having to open(cwd + "/..") in a loop until cwd == ".." to construct the path, or at least something like that

Or add a direntry cache like Linux has, but that would be a fair bit of work

Or, shit, I could just stick a cwd string on the process structure and live with the fact that it breaks if the cwd moves underneath you

drewdevault,
@drewdevault@fosstodon.org avatar

✔️ new syscalls: dup, dup2

drewdevault,
@drewdevault@fosstodon.org avatar

Down to three missing symbols to build this (patched) version of dash: fcntl (with SETFL and SETFD), getgroups, and getcwd

There is a syscall for getgroups, but it's missing in libc.

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

@mort not quite, hautils does build (in part) for Bunnix but I'm planning to port sbase for now

drewdevault,
@drewdevault@fosstodon.org avatar

Yeah, it turns out that getcwd is a massive bitch to implement

I'm just going to write a shitty/buggy implementation and move on for now

drewdevault,
@drewdevault@fosstodon.org avatar

@mxk the latter

drewdevault,
@drewdevault@fosstodon.org avatar

Day 18

drewdevault,
@drewdevault@fosstodon.org avatar

Day 19 -- going to Utrecht tonight so there's not going to be much

  • dash incorporated into source tree to provide /bin/sh
  • New syscalls: setcreds (provides setuid et al), setgroups, mount
  • libc expanded with support for passwd, groups, shadow, etc, login(1) stuff
  • Bunnix executes /etc/rc on boot as a shell script

I have realized that dash depends on signals to work properly, however, so I will probably have to either get that working or switch to rc.

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