#Astral

1 messages · Page 18 of 1

obsidian pivot
#

instead of debian gnu/linux

fierce forge
#

how difficult would it be to reimplement gnu/mach api? thonk

analog berry
#

the urge to implement a drm for astral

#

idk

obsidian pivot
analog berry
#

does it have mesa

#

didnt think so

obsidian pivot
#

Not yet

#

But it is an active project trl

analog berry
#

true lol

#

if keyronex had a mesa port id do that probably

#

or if mintia had an x86 port

#

although that uses a weird lang

#

yeah idk which kernel to pick

grand shadow
#

Orr

#

Udrm

fleet osprey
#

I love how astral kinda just turned into the sandbox os for other projects (e.g. uacpi) trl

analog berry
#

That was obos

#

It uses most of uacpi

#

Suspend and resume functionality and stuff

analog berry
# grand shadow If only

meson --cross-file ${base_dir}/util/crossfile --prefix=${prefix} --buildtype=release -Dplatforms=x11 -Dglx=xlib -Dgallium-drivers=swrast -Dvulkan-drivers= -Dllvm=enabled -Dvalgrind=disabled -Dlibunwind=disabled ..
This is how u currently build mesa right

#

Do u know how to enable all the drm shit?

grand shadow
#

I dont but you can probably look at the blfs page for mesa

analog berry
#

thanks

grand shadow
#

Astralbros undefeated once more

obsidian pivot
#

And would boot on 90% of hardware

flat copper
#

box drawing characters in ncursesw get fucked with TERM=linux somehow

grand shadow
#

When I get motivation to work on this project again its over for everyone else

feral depot
grand shadow
#

How does cement taste like

feral depot
grand shadow
#

Does wine need siginfo bs

#

@carmine swallow

#

I think you were the one who ported wine to managarm

carmine swallow
#

I don't remember for sure, I think it needs ucontext at least

#

did you try it btw?

grand shadow
#

I was thinking of trying it for the memes

carmine swallow
#

from what I remember managarm already had siginfo and was just missing ucontext but idk if it needs siginfo

#

I mean its not that hard to try and see if it works or not lol

grand shadow
#

Yeah true

fierce forge
#

ucontext is like 30 lines of assembly?

carmine swallow
#

its not really even any extra asm, you just have to save the registers from the point in the thread where the signal was raised (a pagefault frame or whatever) to the user stack before jumping to the signal handler and then when the signal handler returns you modify the syscall frame using registers loaded from the user stack (where the ucontext is)

#

or well ig that depends on how exactly you implement it but at least that's one way on a monolithic kernel

fierce forge
#

I do it in userspace in pmOS

#

Without calling the kernel

carmine swallow
#

yeah I guess in that case, but you already need to restore the regs so its not really any extra asm?

#

like for sigreturn

fierce forge
#

Yeah

carmine swallow
#

you just have to make sure that the saved stuff matches the ucontext layout

fierce forge
#

But anyway, it's just 3 functions which save and restore registers, it should be quick to implement

grand shadow
carmine swallow
#

pretty sure yeah as it has to change the cpu mode

#

I didn't do that on managarm so I don't really know that much about it other than what I saw in the source

grand shadow
#

Wonder how bad it is to implement

carmine swallow
#

I wouldn't think its that bad, you do need some kind of syscall for the ldt stuff

grand shadow
#

I can probably shove it in the astral archctl syscall

carmine swallow
#

and I think it needs two builds of wine and you point the second build to the first while configuring or something like that to actually build wow64 support (if you don't want to have 32-bit system libs)

grand shadow
#

Wtf

inland cliff
#

Help

#

Got 400k robots on Nauvis and I forgot to run a green wire so after a day over 1M solid fuel was produced and I had to place more yellow chests and that turned into pixel soup very quickly

obsidian pivot
#

In real life?

inland cliff
grand shadow
#

what the fuck

fierce forge
#

wsl?

carmine swallow
#

yeah that's kinda weird, ig you have to explicitly specify it using --build or whatever

grand shadow
#

it doesnt let you use --build 💀

fierce forge
#

wsl2 is just ubuntu in hyperv vm

#

(or other distro)

#

why does it even need a wsl target?

carmine swallow
grand shadow
# carmine swallow what does it give
legacy cross-compilation flags is not supported.
You specified: --openjdk-target=x86_64-astral and  --build.
The recommended use is just --openjdk-target.```
carmine swallow
#

bruh

#

I wonder if you can just hack it somehow so it thinks the build machine is linux

grand shadow
#

thats what I'll probably try to do

carmine swallow
#

you could probably add ```
-wsl*)
os=echo $os | sed -e 's|wsl|linux-gnu|'
;;

grand shadow
#

copying config.guess alongside config.sub fixed it

carmine swallow
#

ah, nice

carmine swallow
#

reminds me that I should get back to uhda and try to fix the astral integration (and figure out how you are actually supposed to associate (or just figure out which ones of them are ones that should be exposed as individual things to the user) the billion speakers in the laptop that I have to the actual physical speakers, though I am not completely sure if that's handled by the hda driver or is that some sst bs that's passed in some config fw file)

#

and fix the volume computation lol, rn I divide the max value (which is at max like 127) by 100 and multiply that by the percent which is pretty inaccurate (and if the max happens to be less than 100 then I just set one percent to equal 1 and clamp the range so it stays in the supported range)

grand shadow
#

Thatd be cool

#

What was the issue with uhda on astral?

carmine swallow
#

well the one issue I already kinda figured out and told you (that it was just having a too small buffer size)

#

then I think the another one was that the reset is broken or something (as in when you stop the playback in the middle using ctrl c and restart)

grand shadow
#

I started implementing a new feature today maybe were so back?

#

I still cannot for the life of me find whats the relation between shutdown() and poll() in posix like what a poll would return after shutdown

robust geyser
#

POLLHUP/POLLNVAL?

errant zephyr
#

probably not POLLHUP

#

i'd say POLLIN

neon crane
#

im cooked

winged basin
errant zephyr
#

POLLIN makes sense

#

because you can immediatly read 0 bytes

winged basin
#

it's highly debatable

robust geyser
#

it's not supposed to make sense

#

it's supposed to be spec compliant

#

whatever that means

winged basin
#

the spec doesn't define it

robust geyser
#

too bad

#

it does for epoll

#

switch to the better alternative (jk)

#

only if epoll wasn't linux specific

winged basin
#

linux favours pollhup in a lot of cases but a lot of other kernels favour both POLLIN|POLLHUP or just POLLIN

errant zephyr
#

POLLIN makes more sense imo

prime juniper
grand shadow
#

silly me, I forgot a context_t * in syscall_truncate

#

least shit astral code

supple hatch
#

astral dead real?

feral depot
#

i eat cement

proper meteor
eager copper
#

that's no proof

hearty fulcrum
feral depot
grand shadow
obsidian pivot
#

hi mathewnd

#

ok bye mathewnd

grand shadow
#

alright so

#

the reason why uacpi init seems to be so damn slow is the allocator

#

my mutex is fine, avg 41 per acquire and 39 per release

#

average alloc() is giving 1139

#

a lot of time seems to be inside alloc() itself

#

as slab_allocate is at 844

#

mapping is also horrible, 50k avg

#

free is also a big culprit, 2k per free

#

yeah this is super slow

grand shadow
#

doing this on wsl sucks, its so inconsistent

grand shadow
#

I think the final push I am missing is lto

#

atm on my craptop its 1.75mil

#

I should probably update uacpi

#

oh the pci api changed

#

@analog berry did any other apis change

analog berry
#

yes

#

split to fixed width

#

aka io_read -> io_read8/16/32

grand shadow
#

alr ty

grand shadow
#

yeah I'm this close to just rewriting the entire allocator

grand shadow
#

yeah this is the best I can do today, if anyone with a good computer wants to try out and get the score
qemu-system-x86_64 -cdrom astral.iso -M q35 -enable-kvm -cpu host,migratable=off

fervent fjord
#

4.5M

grand shadow
#

holy

fervent fjord
#

my computer is a nuclear powerplant

#

ill pass you the bill

#

but fair warning, we do financing too

grand shadow
#

I'll pay 2 sealcoins

#

could you send the full score and your cpu

fervent fjord
#

each sealcoin is 1 euro

#

ill be waiting for the paypal transaction

grand shadow
#

🪙 🪙

feral depot
#

if yes then got: 3.3M

grand shadow
#

Damn theres such a big disparity based on cpu speed

feral depot
#

i have this (3.3M)

carmine swallow
grand shadow
#

rip

#

I wonder if that's the same segfault that was crashing wine factorio?

wild marsh
#

vmm: no range

grand shadow
#

yeah I print that whenever I have to send a SIGSEGV

wild marsh
#

ah

carmine swallow
#

this is what it says within the bash window

grand shadow
#

damn yeah its the segfault

wild marsh
#

report it on the factorio forum

grand shadow
#

if you add PRINT_CTX(ctx) in the mmu page fault handler after it raises the sigsegv what does it say

carmine swallow
#

also idk where have all the library dependencies gone in factorio 2, I took a look at it and it only has the libc dependencies whereas factorio 1 has all the deps on eg. pulseaudio and whatever

grand shadow
#

inb4 statically linked

grand shadow
wild marsh
#

i wouldn't be surprised

grand shadow
#

"hey guys I need help it crashes on this os I'm trying out what does this mean"

wild marsh
#

"oh yeah guys im using this shim to run glibc software on a different libc"

grand shadow
#

stack overflow??????

#

wtf

wild marsh
#

how large of a stack are you giving it?

grand shadow
#

I give like 2mb I think?

wild marsh
#

maybe give it 8M

#

since that's the default limit on lunix

grand shadow
#

I give 4mb actually

#

yeah true

#

@carmine swallow go to elf.c and increase the stack size

wild marsh
#

still strange that it uses that much stack space

grand shadow
#

yeah

analog berry
#

it's probably an infinite recursion or OOB

grand shadow
#

that looks like its using more than 1 gb

carmine swallow
#

its still the same

grand shadow
#

yeah 4 gbs

#

wtf

wild marsh
#

4G stack frame bless

#

inb4 some ucontext meme where rbp gets corrupted

grand shadow
#

that'd make sense

#

hm

carmine swallow
#

also re the libs maybe it dynamically loads them because the names for them are still in the executable

grand shadow
#

I wonder if my ucontext is different from the linux one in some way and thats causing it to write a 32 bit int in the bottom dword of rbp

#

no it seems to be the same

hearty fulcrum
grand shadow
#

ok yeah it seems to be different?

#

sizeof(ucontext) in the host is 968 but in astral its 424

feral depot
#

omg

#

that is gigachad

carmine swallow
#

well no it doesn't work lol, the attempt to run it in wine got further than this

grand shadow
#

I think it crashed at the same point?

formal patio
#

what the cogs do to a man

carmine swallow
grand shadow
#

yeah

carmine swallow
#

yeah its likely not the same place

grand shadow
#

its the same as the mlibc one, let me see if the mlibc one is the same size as astral's

#

yeah astral's is the same

grand shadow
#

(unless factorio gets loaded there)

#

it tries to create the file and then complains that it doesnt exist???

carmine swallow
#

NtCreateFile can also be used to open file

grand shadow
#

oh

#

wtf

carmine swallow
#

is the kernel32 file in the wineprefix

grand shadow
#

the wineprefix doesnt even get made yet

#

it crashes before it even makes the wineprefix

carmine swallow
#

ah

grand shadow
#

the reason is baffling me

#

^[[0m0024:warn:file:NtCreateFile L"\\??\\Z:\\root\\kernel32.dll" not found (c0000034)

#

it tries to get kernel32.dll in the cwd

carmine swallow
#

but didn't it work before

grand shadow
carmine swallow
#

is this for the 64-bit one or the 32-bit one?

grand shadow
#

weirdly enough it does find it in the /lib/wine folder before that but after it dies

grand shadow
grand shadow
#

so weird

#

its in loader-init in the load_dll(NULL, L"kernel32.dll", ...)

#

I suppose the library search path is borked somehow?

grand shadow
#

so the wine it starts has the right default_load_path but the wine I start doesnt

#

hmmmm

#

wonder if I'm missing an env or something

grand shadow
#

yeah, if I set WINEPATH it doesnt die there

grand shadow
#

by moving my general allocator code into the same file as the slab allocator I got 100k for uacpi on my laptop

grand shadow
#

it dies if I do and I really dont feel like debugging that💀

proper meteor
#

for me it was because of pointer provenance issues

grand shadow
#

damn

#

lto seems to be more sensitive to ub than o3

#

since it works with o3

errant zephyr
grand shadow
#

lto breaks the printf I use when running on tcg

#

wtf

#

printf("response: %d\n", 1); triple faults

#

maybe I need to pick another printf

analog berry
#

Whats your printf

analog berry
grand shadow
#

mpaland

grand shadow
analog berry
#

Lol

analog berry
grand shadow
analog berry
#

I guess its actually shit

errant zephyr
#

write a good printf then?

#

lol

analog berry
#

strange that it has so many stars but dies under lto

winged basin
#

i like nanoprintf

#

they do it the right way with functions that accept putchar callbacks

obsidian pivot
#

agreed

#

iirc stb's printf also did something like that

hearty fulcrum
#

I have this

#

works fine with lto

#

and is actively maintained

analog berry
hearty fulcrum
#

yep

grand shadow
#

I'll take a look at it at some point

analog berry
#

whatever u do dont use stb printf

#

it doesnt implement precision correctly

#

if your uacpi segfaults im not responsible trl

analog berry
#

is this expected?

robust geyser
#

initrd too big?

#

maybe

analog berry
#

giving it 8g instead of 4g solved it

#

how is astral so big lmao

#

whats strange is this is the defaults for astral

#

yay new uacpi on astral

robust geyser
#

based

#

why so slow

grand shadow
#

How did I fuck the spelling up so badly

robust geyser
#

"g" right below "y" and "a" right next to "s"

analog berry
#

lol

#

mango port

grand shadow
#

You can probably build it with DISTROTYPE=minimal if youre just uacping

analog berry
#

im retarded and just spent 5 hours waiting for it to build

#

instead of that

grand shadow
#

You can also just make a disk image with make disk and do make run-disk-kvm

#

Saves inittd loading time

#

Or one day I could take the 9pill and just have a 9pfs run directly from the sysroot folder.....

analog berry
#

i should've probably asked u...

grand shadow
#

I mean I wasnt awake 5 hours ago

obsidian pivot
#

although I don't think anything really uses other IPs in that subnet as loopback

grand shadow
#

hm it could be an issue

#

in the routing table its correct but this probably breaks in the ipv4 receive

obsidian pivot
#

wait why would the IP even be stored in the NIC data structure

#

I would expect that to only be in the routing table...

grand shadow
#

I forgor

pine ledge
#

Sorry I didn’t know the thread was that old 😭😭

fleet osprey
#

no astral updates in a week, dead os meme /j

crude agate
#

chat it's been an hour and it's still compiling the project (i'm using -j8)

hearty fulcrum
#

you clearly need to upgrade to a 128 core cpu and a terabyte of ram

crude agate
#

oh shit

#

}

carmine swallow
#

?

#

that's perfectly normal temp under high load

crude agate
#

Also directory's like 14gib rn

crude agate
hearty fulcrum
#

it's fine

carmine swallow
#

the point where you should be getting worried about it is when it gets above 100c or something like that

crude agate
#

oke

hearty fulcrum
#

if it does, it'll just thermal throttle

carmine swallow
#

and even then it will just throttle itself so its fine unless you have no cooler at all in which case its just going to do a thermal shutdown at some point

#

yeah

hearty fulcrum
#

no damage will be done

crude agate
#

👍

sage locust
#

Italian spotted

#

just run it again

supple hatch
crude agate
#

Anyways we'll wait

neon crane
#

theres definitely some resource leak or maybe you are compiling ALL of astral's ports

crude agate
#

I just typed make and pressed enter

#

Which ig it does that?

#

}

hearty fulcrum
#

I can't imagine using Linux in any other language than English

#

imagine googling errors

crude agate
#

Idk if you know how to translate them then you're good

#

Also

#

Most of program errors are in english

crude agate
crude agate
#

Resumed the compilation at 2pm

#

(it's 3pm rn)

#

It's building llvm rn

crude agate
#

It just finished building

neon crane
hearty fulcrum
analog berry
crude agate
grand shadow
#

Just download more disk space

neon crane
grand shadow
#

Google drive or something

#

Make 10 accounts and mount the drive wherever needed

fierce forge
opal lotus
#

@grand shadow do you use the tsc as your main timer?

grand shadow
opal lotus
#

because i think your calibration without hpet is a bit weird

#

you do ecx * ebx / eax, but wikipedia says you have to do ecx * (ebx / eax)

grand shadow
opal lotus
#

no

#

first one does

  • x = ecx * ebx
  • x / eax
#

second one does

  • x = ebx / eax
  • ecx * x
fierce forge
#

you loose precision (?)

grand shadow
grand shadow
#

in the sdm it says “TSC frequency” = “core crystal clock frequency” * EBX/EAX.

opal lotus
#

idk i just read this

grand shadow
#

I mean if you use floats it would give the same result in both cases, but I think that in the ebx/eax one it'd be less precise if you dont

opal lotus
#

i'm confuzzled

#

whatever i'm computing is not in Hz

#

@grand shadow what's a normal value to come out of this calculation

grand shadow
#

idk none of my computers support it

opal lotus
#

qemu?

grand shadow
#

I've never teted it

#

testuied

#

tested

opal lotus
#

bruh

#

because i'm getting 4000hz

hearty fulcrum
#

at least not enabled by default, there might be some flag to turn it on

opal lotus
#

what

#

-cpu max?

hearty fulcrum
#

cpuid 0x15

#

for calculating the frequency

opal lotus
#

yea what about it

hearty fulcrum
opal lotus
#

super weird

candid gale
#

afaik it requires -cpu host,migratable=off

#

that might be why

hearty fulcrum
opal lotus
#

... i may have omitted the leaf presence check lol

hearty fulcrum
#

lol

neon crane
#

iirc that's what my VM gave me

opal lotus
#

lol

#

yea those are bogus values then

#

xd

neon crane
#

4000hz sure is

#

maybe 4000mhz

opal lotus
#

fun

feral depot
#

mul is more precise but when doing mul with floating it is not precise

#

2 float operation vs 1

#

2 less precise then 1

#

?

#

am i correct?

fierce forge
#

no (?)

feral depot
#

@opal lotus who is correct and what is the answer>?

opal lotus
#

what

#

there are no float ops here

feral depot
#

ok my brain no work

hearty fulcrum
feral depot
#

forgot they need to be xmm registers

#

i am confused

#

; -;

feral depot
tribal dust
#

i eat cement

#

wait wrong account

bronze nexus
tribal dust
#

we eat cement

proper meteor
feral depot
hearty fulcrum
feral depot
#

no?

lean kettle
#

i eat cement

#

wait wrong account again

feral depot
#

i am telling you they are blaming me

lean kettle
#

i dont know electrode the silly

#

wait wrong account again

feral depot
#

@hearty fulcrum belive me

tribal dust
#

and cat is not my alt

hearty fulcrum
feral depot
#

; -;

warped plinth
feral depot
#

我吃水泥

#

this is cement eating channel now

fierce forge
#

i eat cement

#

nooo wrong account

warped plinth
#

beboop

opal lotus
#

dead chat

proper meteor
#

ded

feral depot
#

no i ate the walls

grand shadow
#

dead os

opal lotus
#

real

fleet osprey
#

the os is death

grand shadow
#

Dead body reported

#

I have been super busy with many things

#

Which then leave me with no energy for programming

proper meteor
#

(don't)

analog berry
#

(do)

fierce forge
#

Who needs a life when you can do osdev

neon crane
hearty fulcrum
#

there's no don't without do trl

fierce forge
#

GregTech?

grand shadow
#

greg

hearty fulcrum
#

astral is alive

fleet osprey
grand shadow
#

You gotta crawl before you can walk

proper meteor
supple hatch
#

prove it

#

prove greg

#

provided a therom proving greg

warped plinth
#

going to install this on a laptop and attempt to daily drive it

robust geyser
#

good luck

#

that aint gonna work

warped plinth
#

why not?

robust geyser
#

i don't think it's very rich in drivers.

#

also i don't think it has a web browser

warped plinth
#

lynx :^)

robust geyser
#

not very capable but u do u

#

good luck

warped plinth
hearty fulcrum
formal patio
#

Managarm is somewhat daily-drivable meme

formal patio
#

We have qemu

#

You could just finish up czapek's KVM work

#

And wire up vfio ioctls for good perf

analog berry
hearty fulcrum
supple hatch
warped plinth
grand shadow
#

getting it to compile again

#

we might be back

fleet osprey
#

👀

grand shadow
#

I'm working on redoing the kernel initialization

#

no more infinite _init() calls

#

just gotta redo the dependency lists I made because I nuked some useless init calls

charred sinew
#

are you planning to do a rewrite or extending astral

grand shadow
#

extending

#

I do not have the time for another full rewrite

analog berry
#

yeah dont

robust geyser
#

imagine not rewriting your kernel every time you touch it

hearty fulcrum
#

Imagine actually working on your kernel

#

couldn't be me

grand shadow
#

didnt do anything today because gregtech

analog berry
#

which tier

grand shadow
analog berry
#

Ah I see, still doing the tutorial

grand shadow
#

lmao yeah

#

cant wait for AE2 so I can actually start playing factorio in minecraft

#

I already have some simple stuff automated like benzene (for power), ingot cooling, polyethylene, oxygen, hydrogen, nitrogen, rubber and stone + sand + gravel + obsidian

#

and gold/redstone

#

because I'm not fucking mining for gold

#

but I desire more automation

analog berry
#

U do ic2?

#

U should also automate fluorine since you'll need tons for PTFE

analog berry
grand shadow
#

so I just made a glowshroom farm to get glowstone to get redstone/gold

analog berry
#

Ah

grand shadow
analog berry
#

Yeah

grand shadow
#

okok I cannot let this die

#

tomorrow I will finish what I am doing and then start looking into reworking my device driver stuff since it kinda goes hand to hand with what I am doing

grand shadow
sage locust
#

Astral ftw

warped plinth
feral depot
#

i can see this reviving frfr

grand shadow
#

Im currentlly busy being gay sorry

supple hatch
fierce forge
prime juniper
#

I’ve always been told that gay bars and other LGBTQIA+ establishments are loads of fun even for straight people. Never went to one tho

fierce forge
#

It was also the first time I went to a club in general

prime juniper
#

That’s an interesting first club experience then

fierce forge
#

But somehow I went to a straight club a week later and perhaps it was because it was overcrowded, but I felt like the energy was not it

fierce forge
prime juniper
#

If you’ve tried clubs, but not your thing, a bar is different from a club and there are many types of bars. I’m more a bar person

prime juniper
fierce forge
#

I feel like it's just difficult for me to socialize in general

#

(like I haven't been to bars a lot either)

#

The clubs seem fine, but I feel like it's not the place where you could go often

prime juniper
prime juniper
grand shadow
#

cooking something (assert expected)

#

only these two are hooked for now but I think I got the logic done and can start hooking up the rest to it

#
#define INIT_ROUTINE_DEFINE(name_, flags_, fn_, ...) \
#

its pretty simple

#

name is name, flags is flags, fn is function and ... is deps

#

works with stuff on other files and all

#

and then you call one of these and it will do its job

void init_run_routine(init_routine_t *routine);
void init_run_all_routines(void)
grand shadow
#

I think I'm not gonna keep the print though, seems to really clutter the logs

#

hooked enough to get the scheduler running

#

I will finish the rest tomorrow

supple hatch
#

balling

warped plinth
#

BALLIN

opal lotus
#

is it like a dependency tree?

analog berry
grand shadow
analog berry
# grand shadow cooking something (assert expected)

Btw, maybe instead of building a hashtable you should implement something like I did (which I stole from Linux) where u just do int x; parameter(x); and that creates a struct in a special section of such structs that u can just iterate and match parameters

grand shadow
#

Hm true that way I could have it parsed before any allocator is initialized

analog berry
#

I do it specifically because it allows me to define early_parameter()

#

Which is how I set the early console

opal lotus
#

i have this

analog berry
opal lotus
#

why

analog berry
#

it was always just a hack

#

this is what i have now

opal lotus
#

how do you know which earlycons are available

analog berry
#

do u mean on the userside or on the kernel side?

opal lotus
#

kernel i guess

analog berry
#

for e9 it checks that it's in a hypervisor and that in(0xE9) == 0xE9

#

for serial u have to trust the user that they know a com1 exists for example

hearty fulcrum
#

can't you check it with acpi

analog berry
#

it's an early console

hearty fulcrum
#

oh yeah lol

analog berry
#

it's set up way before anything else

opal lotus
#

how does the kernel know about the console

#

it needs to somehow resolve earlycon=serial for example

analog berry
#

which will call register_console()

#

or do u mean how it finds the parameter?

opal lotus
#

what i do is i just have an earlycon_setup which scans all early console names and tries to find the one specified by the command line

analog berry
#
static error_t earlycon_set(struct string mode, struct param *p)
{
    error_t ret;
    struct string *cur = p->value;

    ret = earlycon_destroy();
    if (is_error(ret))
        return ret;

    if (str_equals_caseless(mode, EARLYCON_MODE_NONE)) {
        *cur = EARLYCON_MODE_NONE;
        return EOK;
    }

    if (str_equals_caseless(mode, EARLYCON_MODE_E9)) {
        ret = e9_console_init();
        if (is_error(ret))
            return ret;

        *cur = EARLYCON_MODE_E9;
        goto out_ok;
    }

    if (str_equals_caseless(mode, EARLYCON_MODE_VGA)) {
        ret = vga_text_console_init();
        if (is_error(ret))
            return ret;

        *cur = EARLYCON_MODE_VGA;
        goto out_ok;
    }

    return EINVAL;

out_ok:
    pr_info("using '%pS' as the early console\n", cur);
    return EOK;
}

Does this help?

opal lotus
#

yeah so you just hardcode the earlycons

analog berry
#

yeah, all early consoles live in earlycon.c

opal lotus
#

right, i do that dynamically

analog berry
#

i also stole that from linux

#

i thought if it works for them it will work for me as well

opal lotus
analog berry
#

ohh ok so u have like a deeper layer

#

i thought it was overkill honestly

#

but its fine ig

#

like imo all early consoles you will have will be tiny

#

and they will be arch specific

analog berry
# opal lotus

btw i see that u pass a null terminated string, do u destroy the command line in-place?

opal lotus
#

yes

analog berry
#

ah

#

do u have any way to diffirentiate between early vs late options?

#

or e.g. set an integer option

opal lotus
#

i did that before, but now i leave the parsing up to the option

#

i do have atoi and the sort though

analog berry
#

I see

#

your options are kind of like the deprecated __setup() in linux

opal lotus
#

kinda

#

i don't have many crazy options in the kernel so it's fine

analog berry
#

yeah

#

i went with the ops approach so i can slap a sysfs on top easily

opal lotus
#

because im now doing a microkernel, most will be propagated to the user space processes anyways

analog berry
#

fair

opal lotus
#

and those can just be argv and such

analog berry
#

yeah

#

are you gonna be propagating unknown options / options after -- to userspace?

opal lotus
#

i'm still thinking about what to do. my idea was to propagate all options with a prefix to the respective server

analog berry
#

that makes sense

opal lotus
#

like posix.dev_automount would go to posix as dev_automount

analog berry
#

like linux does for modules

#

with modname.option

opal lotus
#

my plan is for menix to be completely freestanding, despite being a microkernel system

#

so you can build it without a real cross compiler

analog berry
#

interesting

#

so are you doing a rust userspace?

analog berry
#

lol

#

thats surprising

carmine swallow
#

I kinda want to try doing kotlin servers for my ukernel

analog berry
#

thats cool

opal lotus
#

it's annoying because i ended up spending 90% of my time thinking about how to approach things instead of just writing code

analog berry
#

u just needed to write 999999999 more loc

opal lotus
#

which (as you've already seen) is not the case in C

analog berry
#

then you would see solutions in your mind

opal lotus
#

i literally pushed out like 120 files in one commit

analog berry
#

lol

#

just copy managarm code and s/managarm/menix trl

grand shadow
#

fr

#

do not france emote me

opal lotus
#

one thing i don't really know yet is how i want to approach cross server IPC

analog berry
#

thats something no one knows probably

opal lotus
#

thing is that there's no optimal solution

#

it all depends

analog berry
#

yeah

opal lotus
#

atm i'm thinking of doing a msglink and datalink which is for sending messages/objects and bytes respectively

carmine swallow
# carmine swallow I kinda want to try doing kotlin servers for my ukernel

also I already did start making that, I basically just copied what I had for my new crescent2 c rewrite removing all nt stuff and I made an ipc generator similar to mach mig where you write stuff like this ```c
msg_id_start 0

#include <bruh.h>

proc create_window(server: ipc_port_t, window: out ipc_port_t, width: i32, height: i32)
proc set_window_pos(window: ipc_port_t, x: i32, y: i32)
proc destroy_window(window: ipc_port_t)

opal lotus
#

cool

analog berry
#

yeah

opal lotus
#

what's an ipc_port here? just a message channel?

#

also for my ipc i'm just going to use regular headers

#

no fancy dpl

analog berry
#

thats gonna get annoying quickly

#

hand writing the same code in different permutations in different places etc

carmine swallow
opal lotus
#

same KEKW

grand shadow
#

My roadmap is kinda finish init rework -> redo device drivers -> rewrite scheduler

#

With an openrc port somewhere inbetween

#

Maybe after I finish the init rework

supple hatch
opal lotus
#

yours

hearty fulcrum
grand shadow
#

Menix more like minex

supple hatch
grand shadow
#

alright I think everything is hooked up

#

boots into fvwm and all

#

was wondering why networking was borked but then noticed I forgot to hook arp up

#

saw people talking about porting lua in nyaux thread so I decided to try to see if astral could download and compile it and it works

#

too lazy to make it a real recipe, if you need lua just wget it

#

(once I update the certs)

analog berry
#

Daamn nice

grand shadow
#

this is with the new init stuff too so that works

#

guess I can upstream it

fleet osprey
#

Based

analog berry
robust geyser
#

probably \n vs \r\n

#

xterm might be a bit stupid or something

grand shadow
#

that happens with python too

#

I think its just an xterm thing yah I remember python being normal in flanterm

robust geyser
#

python built with readline?

#

if so then that's weird

#

unless you/xterm doesn't set the TERM env properly

grand shadow
#

accidentally ran make clean and have to rebuild everything we do not speak of this again

grand shadow
#

Now I am actually debating whether I should do device rework or scheduler rewrite next

#

I think a better scheduler would be a priority

fleet osprey
#

~~fix PS/2 kbds meme ~~

grand shadow
#

never

grand shadow
#

PNP0500 Standard PC COM port

#

saving for later

grand shadow
#

Im writing a very barebones and questionable serial driver because I have mostly been developing astral over ssh lately and I would rather just be able to run commands on the terminal

#

Its just gonna be something to set up the serial port, set up irqs for it, create a tty device and have agetty or something on userspace take over it

analog berry
#

U could virtio console if you wanted it to be fast

grand shadow
#

Ehh might as well have a basic serial driver I can expand later on

#

Plus Im using uacpi to find them to make you proud :3

analog berry
#

Real

#

I hope u also do resource parsing to find the io ports and interrupts

grand shadow
#

I do

#

The only thing I dont do is enumerate the entire namespace recursivelt etc etc thats for the device rework

grand shadow
#

alright its all hooked up to the kernel, just gotta configure the actual serial controller

#

and write tx/rx

grand shadow
#

Reading the ule paper again

supple hatch
#

epic

grand shadow
#

I have been playing so much rainworld I instinctively have been writing "iterator" instead of "iteration"

grand shadow
#

now to get a shell running...

grand shadow
#

well good news and bad news!

#

good news: I get to a shell

#

bad news: everything is horrendously slow

#

system wide

#

so there is 100% some irq funkiness happening

#

ohhhh

#

it was not irq funkiness

#

it was something so much stupider

#

and slightly funny

#

I had two inits running KEKW

#

forgot to remove a fork after I changed another function in init

#

so it kinda just started xorg twice

#

along with fvwm and all that crap

#

there we go

#

qemu does capture ^C and similar which is annoying

#

as in, ^C affects qemu

analog berry
#

Well done

grand shadow
analog berry
#

Real

#

Time to test real hw chad

grand shadow
#

dont have anything I can use serial on :p

fleet osprey
#

I can do it

#

I have 2 x86 boxes w/ RS232

analog berry
#

inb4 ps/2 curse but for serial

grand shadow
#

😭

grand shadow
fleet osprey
#

yeah

grand shadow
#

oooo sure

#

let me just finish making it respond to userspace ioctl

fleet osprey
#

Dell Optiplex 755 (Core 2 Duo E8400)
Dell Precision T1650 (Xeon E3-1240 v2)

grand shadow
#

I remember you trying it out

fleet osprey
#

iirc it failed with some issue on the Optiplex

#

it booted on the Precision but no keyboard

#

could be wrong though, my memory is ass

grand shadow
#

wasnt the optiplex issue some ventoy stuff

fleet osprey
#

nah even once it was past that it failed iirc

#

anyways if you can toss me an image I'll try it
all of my good hardware is currently busy so it'd take eons to compile from source

grand shadow
#

will do once I finish this

#

@fleet osprey what do you usually run the serial ports on, like baud rate parity etc

fleet osprey
#

usually 115200 8n1

#

though I can do anything

#

if you want to set it to 9600 or whatever that's fine

#

got that image yet? gtg in a few min, and I'd need to test it after I'm back

grand shadow
#

still fighting my demons (termios

#

I can wait dwdw

fleet osprey
#

👍

#

alright, just ping me w/ it whenever it's ready and I'll get to it when I get a chance

grand shadow
#

okay

#

ty

grand shadow
grand shadow
#

alright the serial port is pushed time to do irl stuff

#

if this works in real hardware I will be amazed I dont think I did a very good implementation considering its the first time I wrote a serial driver

#

if it works the only two theoretical ways to interact with astral that works would be ssh and serial meme

#

(real nic driver not included)

fleet osprey
#

Dw I vibe coded my serial driver back in the day of TFOS (iirc 2021?) using whatever godawful model OpenAI was shipping back then and it still worked

#

It'll be fine

grand shadow
#

it doesnt print anything wrt init to serial, so the only thing you should be seeing is a login prompt

fleet osprey
#

Ok testing in a few min

#

flashing to a USB rn

#

it just hangs

#

no limine

#

wasn't there a consensus ages ago that you were making the image wrong or something

#

yeah

#

(damn almost a year ago)

#

@grand shadow

grand shadow
#

Damn

grand shadow
fleet osprey
#

haven't checked on the Precision

#

that one might actually work since it has UEFI

#

one sec

grand shadow
#

Wait didnt you add a make usb

#

I think I could run that kekw

fleet osprey
#

lmao

#

lmao yeah the Precision says it outright when I try to legacy boot it

#

let me try UEFI

#

hey mathewnd did you know that PS/2 doesn't work on here trl

#

anyways I am big dumb and forgot to move the serial cable over to the new machine

fleet osprey
#

lmao

#

so I get loopback from Astral

#

but no login prompt

#

at least after hotplugging it

grand shadow
#

hotplug is not really gonna work I dont think

fleet osprey
#

lmfao I pressed the power button and got a div by 0

grand shadow
#

wtf

#

rip?

fleet osprey
grand shadow
#

ok a ringbuffer somewhere is not being initialized at all during init KEKW

#

assuming somewhere in the depths of acpi

fleet osprey
grand shadow
#

me when acpi dev init not in init routines

#

forgor to add it there

#

oops!

fleet osprey
#

lol

grand shadow
#

probably a better idea to just put it to init in acpi_init

#

did you get anything now

fleet osprey
#

waiting for it to load

#

my USB sucks

fleet osprey
#

woah

#

it loads but I can see it being printed character by character

grand shadow
#

wtf

fleet osprey
#

it's unfathomably slow

#

looks like it's coming in at like 150 baud

grand shadow
#

it should be 38400 baud

#

maybe the way I do it is just too slow in real hw

#

might be it

#

actually yeah its defo that

#

I dont do fifo buffering yet

fleet osprey
#

but that's what it does

grand shadow
#

so it has to wait for the interrupt to send the next char

grand shadow
#

hey at least its running in real hardware

#

I'll implement the fifo buffering stuff if not today then tomorrow and annoy you to see if it got any faster

#

oh yeah

#

I gotta give you the usb image

fleet osprey
#

so you can watch it crash and burn on 2007 hardware troll

#

it has a known bad PS/2 emulation btw

#

even DOS fails at using it

grand shadow
fleet osprey
#

idk why they even bothered shipping it

#

it literally doesn't work KEKW

#

it sometimes just doesn't fire an interrupt for keypresses, so the buffer gradually becomes more and more full, and the OS gets less and less up-to-date presses

#

Dell was wild in 2007 apparently

grand shadow
#

if anything it will probably be slow like that but still work

fleet osprey
#

gotta wait for it to download over my crappy DSL first KEKW

grand shadow
#

might as well look into implementing that fifo stuff in the meantime

#

from what I read it was just like

#

get interrupt when empty

#

fill it up

#

repeat

fleet osprey
#

iirc mine just didn't care if it was full and sent data as fast as possible lol

#

though it has been eons since I touched that code so I could be entirely wrong

grand shadow
#

me when I send fifty billion bytes in a 50 baud line

fleet osprey
#

oh yeah that also doesn't crash when I press power

#

it actually works

grand shadow
fleet osprey
#

yeah, was just confirming that it indeed does work

#

also serial doesn't work here

#

though that might be a skill issue?

#

idk if it's even enabled in the BIOS

#

I've done weird shit to this box

grand shadow
#

did you get limine

#

I got limie in serial

fleet osprey
#

no

#

limine booted perfectly here tho

#

no hang

grand shadow
#

yeah then its probably just not having serial

fleet osprey
#

KEKW that'd do it

#

I indeed see Limine now

#

on serial

grand shadow
#

actually I dont think the way I am doing the transmit is even the way I should be doing it in my own tty design hold on KEKW

#

beeen a while since I last did anything with the tty subsystem

#

yeah no the way I intended it was for it to just be a simply wait until empty transmit repeat

fleet osprey
#

serial works in Astral on here too 👍

grand shadow
#

no interrupt async bs

fleet osprey
#

still slow as hell, as expected

grand shadow
#

I'm going to do a change and then I will send you another usb image to test

fleet osprey
#

alright

#

btw I also have tons of hardware to test it on if you ever want to do a PowerPC port, just saying trl

fleet osprey
#

👀

grand shadow
fleet osprey
fleet osprey
# grand shadow bet

btw my current collection:

  • Apple
    • PowerMac G5, 2x 2.0GHz PPC970FX, 4GB RAM, GeForce FX 5200 Ultra
    • PowerBook G4 15", 1.67GHz PPC7447, 2GB RAM, Radeon Mobility 9700
    • [dying RAM] iBook G4 12", 1.33GHz PPC7447, 512MB RAM, Radeon Mobility 9550
    • [dead backlight] iBook G3 12", 600MHz PPC755, 640MB RAM, Rage Mobility 128
  • Nintendo
    • Wii U
    • Wii (BootMii-as-boot2 compatible, unpatched DVD drive)
    • 2x Wii (BootMii-as-boot2 patched, patched DVD drive)
  • Sony
    • [YLOD] PlayStation 3 CECH-2001A
  • Microsoft
    • [arriving in 4 days] Xbox 360 Slim (Corona motherboard)
grand shadow
#

damn that is a lot of computers

fleet osprey
#

new image is loading, almost there

#

lol, yeah, it's fast now

grand shadow
#

hell yeah

#

astral real hardware is real

fleet osprey
#

I should try it on my T14 Gen 1 AMD again

grand shadow
#

do neofetch to see if its stable

fleet osprey
#

I remember that failed some time in the past iirc

fleet osprey
grand shadow
#

YEAHHH

#

thank you techflash

fleet osprey
#

np

grand shadow
#

just gotta find someone with a vt100 now troll

fleet osprey
#

woah holy shit

#

PS/2 keyboard kinda works on my laptop

#

it's insanely slow

#

but it somehow works?

#

..... kinda, it's weird

#

it has the same problem that I described w/ my Optiplex lmao KEKW

#

it sometimes just doesn't fire an interrupt for keypresses, so the buffer gradually becomes more and more full, and the OS gets less and less up-to-date presses

#

at least, the same visible effect

#

no clue if that's the real cause or not

#

oh actually no

#

me when I fuckin lie

#

it's just slow as balls

#

I was confused by the timing

#

I press a key and it happens like 10s later

grand shadow
#

wtf

fleet osprey
#

also only 1 key gets processed every ~10s

#

so if I keysmash it doesn't wait 10s then keysmash at the same rate

#

it waits 10s then detects the first key, then 10s later the next, etc...

#

Average Consumer Hardware™ 👍

#

uploading a vid now

#

btw it seems to be running really hot, possibly related (something hogging all the CPU time?)

grand shadow
#

I'm starting to think the only two machiens with actually working ps2 are my desktop and laptop KEKW

#

since on both the mouse and keyboard work just fine

fleet osprey
#

lol

#

this is normal hardware too

#

just a basic ThinkPad

#

specifically it's a T14 Gen 1 AMD

#

Ryzen 4750U

#

16GB DDR4

#

basic PS/2 keyboard, Synaptics touchpad

#

lol yeah I'm 90% sure something in Astral was spinning on at least 1 CPU core

#

I lost like 7% battery doing this

#

(that's extremely abnormally high for this machine)

grand shadow
#
    asm("cli");
    for (;;) CPU_HALT();
#

so that cant be it right

fleet osprey
#

weird

#

maybe something was pegging the 1 core that it was using

#

no clue

#

I just know that the CPU was running abnormally hot (as if it was doing a ton of work), and that it drained a ton of battery

grand shadow
#

its the ps/2 microcontroller troll

fleet osprey
#

lmao

#

new trendy hardware issue caused by software

#

"Linux Mint erased my EC" gets out of here

#

"Astral burned up my PS/2 microcontroller" is the new issue of the day

grand shadow
#

I once had the idea of having something like an ssh that could spin up an astral vm and drop you into a shell and with this its probably possible now

fleet osprey
#

ooh, neat

#

so kinda like what Managarm is doing on Pis?
#1091278035686268928 message

opal lotus
wild marsh
supple hatch
#

very epic shit mathew

analog berry
#

@grand shadow btw do u still want astral off the uACPI board

grand shadow
analog berry
#

letsgo

grand shadow
#

Didnt do anything this weekend cuz was spending time with bf, will start doing ule soon™

grand shadow
#

I've gotten the interactivity calculation done I think, gonna start on the queues tomorrow

supple hatch
#

epic

grand shadow
#

I've gotten it to boot to xorg with the new scheduler queues and stuff but there is still something wrong since it is super slow

feral depot