#Maestro - Linux-compatible-ish OS in Rust

1 messages · Page 7 of 1

late oar
#

dead project

#

(I just resumed working on it right now)

late oar
late oar
#

while working on epoll, I am also fixing my poll and select system calls that are broken

#

I tried running Xorg with epoll, and now it seems to want sockets (good)

late oar
#

kinda want Minecraft on Maestro rn

#

gotta work more

shell tusk
#

chop chop

inner pilot
#

chop chop

late oar
#

chop chop

late oar
#

spent the last few hours debugging shitty concurrency issues in the scheduler™

late oar
teal dock
#

I don't usually make prs for my own projects

errant venture
#

you should

#

it's nice for reviewing the code + having CI run

teal dock
#

I jump between working on different stuff too much

errant venture
#

not sure how that prevents making prs tbh

#

i have prs with hundred commits sometimes

#

they dont have to all match a specific topic

late oar
late oar
#

Currently implementing unix domain sockets for xorg (and later wayland I guess. I think it also uses those?)

late oar
#

(does not work because rename* is broken, I have a stale PR for fixing that)

late oar
#
[2979566.935] _XSERVTransSocketCreateListener: failed to bind listener
[2979566.935] _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
[2979567.935] _XSERVTransMakeAllCOTSServerListeners: failed to create listener for local
[2979567.935] _XSERVTransSocketCreateListener: failed to bind listener
[2979567.935] _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
[2979567.935] _XSERVTransMakeAllCOTSServerListeners: failed to create listener for unix
[2979567.935] (EE) 
Fatal server error:
[2979567.935] (EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE) 
[2979568.935] (EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
[2979568.935] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[2979568.935] (EE) 
[2979568.935] (EE) Server terminated with error (1). Closing log file.

now let's fix bind

late oar
#

It seems I need connect now

#

it wants connect because it tries to connect to a font server, because it cannot find fonts, because I did not package them

late oar
#

alright, currently packaging fonts

late oar
#

it seems to want connect anyways so I am currently implementing connect for unix sockets

late oar
#

should my socket structure in the kernel (in case this is a listening socket) have a list of all client sockets currently connected to it? or should I do that another way?

#

and like, on connect, I insert the client socket in the list (which will require the struct to be shared in between the listening socket's list, and the open file structure)

shell tusk
#

When a client connect()s you add it to a backlog and when the server accept()s you create a new socket object that pairs with it

#

You dont need to keep a list of everything connected

late oar
#

ded project

#

unix sockets soon™

late oar
#

can't find modules because it happens a / after file paths for some reason, prolly a getdents64 issue

#

okay that's actually an issue of driver not installed

#

#ui message

@shell tusk claude is telling me xf86-input-evdev needs udev too, is it lying?

shell tusk
#

I use evdev without udev

#

but I needed to patch in a backend for proper autodetection

#

you could theoretically get away with just adding a config file with the devices for initial testing and then when evdev is known working just ctrl+C ctrl+V ing my patch lol

late oar
#

okay, now I have xf86-video-fbdev. It opens /dev/fb0, and now it seems to want /sys/class/graphics/fb0/device/subsystem (not implemented yet)

late oar
shell tusk
#

if you do write one, make it based and not hard depending on linux apis

teal dock
teal dock
#

don't forget procfs, sysfs, cgroups, namespaces, etc

shell tusk
late oar
#

okay, I have the sysfs and the FBIOGET_VSCREENINFO/FBIOGET_FSCREENINFO ioctls.
Now I need to be able to map the framebuffer in Xorg's memory with mmap

teal dock
#

what does the structure look like

late oar
late oar
#

framebuffer stuff seems to have been fixed? (still ain't displaying anything though). right now it's need xkeyboard-config and xkbcomp so I am packaging those

teal dock
teal dock
late oar
#

epstein file

shell tusk
#

they done implemented epsteinfd 😭

late oar
late oar
inner pilot
#

both

#

kankerfd

late oar
#

I am implementing epoll right now because xorg wants it

#

but maybe that comes from the way I built it

solid rose
#

you have to patch it if you don't want it using epoll

inner pilot
#

not really

#

you can also just not expose an epoll header

solid rose
#

or well, yeah

#

yea

inner pilot
#

but then, why are you exposing a header for something you don't implement lol

solid rose
#

cause i enable the mlibc linux option for some reason

inner pilot
#

L

#

imagine

solid rose
#

i think some stuff was being annoying and i just did that

#

and then patched xorg-server

diff --git xorg-server-clean/include/meson.build xorg-server-workdir/include/meson.build
index bda84bd..1f63b00 100644
--- xorg-server-clean/include/meson.build
+++ xorg-server-workdir/include/meson.build
@@ -143,7 +143,7 @@ conf_data.set('HAVE_UNISTD_H', cc.has_header('unistd.h') ? '1' : false)
 conf_data.set('HAVE_ARC4RANDOM_BUF', cc.has_function('arc4random_buf', dependencies: libbsd_dep) ? '1' : false)
 conf_data.set('HAVE_BACKTRACE', cc.has_function('backtrace') ? '1' : false)
 conf_data.set('HAVE_CBRT', cc.has_function('cbrt') ? '1' : false)
-conf_data.set('HAVE_EPOLL_CREATE1', cc.has_function('epoll_create1') ? '1' : false)
+conf_data.set('HAVE_EPOLL_CREATE1', false)
 conf_data.set('HAVE_GETUID', cc.has_function('getuid') ? '1' : false)
 conf_data.set('HAVE_GETEUID', cc.has_function('geteuid') ? '1' : false)
 conf_data.set('HAVE_ISASTREAM', cc.has_function('isastream') ? '1' : false)
#

not the greatest way to do it

#

but it does the job

inner pilot
#

you can use linux apis now without subscribing to all of it

#

in mlibc

solid rose
#

wha

inner pilot
solid rose
#

oh interesting

inner pilot
#

that's how i ported weston

#

i am not linux abi/api compatible

#

but i do expose epoll, just like solaris

solid rose
#

ah

inner pilot
#

or bsd via kqueue shim

late oar
inner pilot
#

not really

#

you want to be linux like, no?

#

then you subscribe to that hell

#

👍

late oar
#

I want to be a subset of linoox

inner pilot
#

larp

tough onyx
#

everything is a subset of linux if you squeeze your eyes

inner pilot
#

posix is just linux because it's the only implementation

late oar
#

I get a black screen. come on. I'm almost there

#

letting claude package twm because I don't like packaging

solid rose
#

have you tried running anything on xorg yet

late oar
shell tusk
late oar
shell tusk
#

Yeah it does that

late oar
#

ksldfjklsdfklsdlk

solid rose
#

if you just run X you will get a black screen

#

if you add -retro you will get the classic root weave

#

(if its working)

late oar
#

so it does not work

#

my OS is slooooooow as fuck, I really need to optimize this

#

like, I have to wait a few minutes to attempt to launch Xorg

late oar
#

it actually works apparently (I am printing syscalls so it's messed up)

#

It still hasn't any ways to read the keyboard, and I don't even have a mouse driver yet

#

currently packaging shit to get xeyes running

#

kinda want to start my wayland compositor, I wanna make something pretty

late oar
#

running startx /usr/bin/xeyes shows a black screen. I guess imma continue another day, time to sleep

slender ruin
teal dock
late oar
late oar
slender ruin
#

ahhh

#

fair

#

using wlroots might be good since you're aiming for linux compat methinks

#

unsure though

#

:P

late oar
#

dead project

late oar
teal dock
#

are you running with tcg?

late oar
#

xeyes wants setitimer which I didn't implement

late oar
teal dock
#

try kvm

late oar
#

yeah

#

that's a lot better. but still slow. even with tcg it should start instantaneously, right?

teal dock
#

I have only tried to run it on kvm

#

and it displays instantly

solid rose
#

on my kernel it takes about 3-4 seconds to start xorg and a window manager on tcg and -smp 1

#

do you compile your kernel with optimizations enabled because they help a ton

solid rose
#

yeah absolutely do that then

late oar
#

but even then, I am pretty sure it is not supposed to take several minutes

solid rose
#

hmmm

#

true

teal dock
late oar
#

yeah there's definitely an issue

solid rose
#

what do you use for disk access

late oar
solid rose
#

weird then

charred kernel
#

In release mode that's instantaneous

charred kernel
wheat wave
#

pretty sure you underestimated the dependencies (jk)

late oar
valid grove
late oar
valid grove
#

maybe some random thing idk

valid grove
slender ruin
# late oar Maybe I'll do that

actually it seems like smithay supports almost all the base protocols, most of the wlroots ones, and I think some of the KDE ones?

  • that's rust also so natural fit
    the only problem I can see is that it doesn't support vulkan yet/right now/at all it seems
#

idk why i am saying this as if this is something you wouldn't know already, soz 😭

slender ruin
#

ah

#

fair

#

I like wayland it's very funny

#

it has done horrid things to computing (not allowing funny cat to chase my cursor) but it's funny regardless

shell tusk
#

wayland kicked my dog and fucked my wife

slender ruin
#

kinky

valid grove
shell tusk
#

no. only linux apis kick pregnant dogs

valid grove
#

real

late oar
#

hello, I am returning to this project rn

#

I haven't worked on it for 1 week and a half and it feels like I haven't touched it in 6 months

#

I am merging the stuff I started on Xorg and putting it aside for now. I have a much more urgent matter to address: the kernel is slow as hell

#

It's such fucking unbearable to debug