#Astral
1 messages · Page 20 of 1
rivtard world rain
i hate wacatac
i wonder what the detection heuristics are for wacatac because i've seen it be detected as a false positive a bunch of times
if (download.is_kernel && download.kernel_is_good) detect("wacatac");
if (strfind(downloaded_file, "memory is not kernec")) detect("wacatc")
Wacatac is apparently a class of malwares and not a specific thing
That'd also explain why there are so many false positives of it.
got it to do a full build with the patches gcc, now it is time to update mlibc and do another clean build
my laptop probably wants to cry
almosst done, compiling wine
oh no
xterm stopped working
and so did me launching serial
did login stop working as well
ok I dont think its that
oh no it is that
creating /var/run makes it work
why would it not display an error though?
yeah creating that makes xterm also work
so weird though, that it makes both hang
Smells like something is missing error handling
time to go through the ports and see what works still works
indeed, might be in mlibc
as ^C still kills the process
sudo is broken, doesnt seem to have setuid bit
seems like dns is also borked
Damn, what changed to break all this shit?
I updated mlibc and patched gcc 💀
its probably the mlibc update, I was like a good year behind I think?
Mlibc regressions 💀
it does seem that just dns is down
gotta figure out if its my udp or something else
it used to work
seems like it is just the dns issues
tested the other ports
su also does not work
I think this doenst work more cuz of the jinx update
hm
yup
lets see how gloire handles this
oh they dont
had to port xbps and will do post install hooks for this
in a side quest to implement advisory locking now
so that xbps can run so that I can do post install hooks so that I can fix sudo et cetera
next side quest: fixing PS/2 
how are you gonna do sudo ?
Well not
Getting superuser will be done by talking with init to get it to spawn a privileged process.
systemd's run0 style
yep
oh cool way
My todo list rn is finish advisory locks, get xbps working, add post install hooks to a bunch of packages which need it, figure out why dns stopped working and then continue whatever I was doing
Small derailing
Worth
small derailing from the end goal of fixing PS2 
one day a deity will descend from the heavens and deliver a pr for a perfectly working ps2
Just blindly assume it's there and wait for interrupts for it like I did 
https://github.com/techflashYT/Techflash-OS/blob/old-bootboot/kernel/hardware/kbd.c
also please excuse the godawful code style
I don't write code like that anymore
this is old code
also since I was a fucking dumbass and decided that writing code under a custom license was somehow OK - you can use that code under whatever license for whatever you want
(if you do decide to use it or parts of it, for whatever horrific reason)
alright, I think I got advisory locks implemented
time to see if everything explodes
ewww stop doing permission checks I am your creator you must respect me
oh woops, forgot to add flock to the mlibc sysdep
nope, borked
me when I forget to intiialize variable
it ran but gpf'd while closing a file, likely due to the advlock
okay
I need to get this to run on the first boot now
xdddddd
there we go
I might want to just pipe that into a logfile, though
and if I run it again it does not run
perfect
there we go
and the xbps-reconfigure logs will be in /var/log
now I just gotta write the post install hooks
I'll do that tmr
and then I gotta see what broke dns
Nice work
@prime juniper mr port man I have a mlibc related question, does mlibc support vdsos
I looked into rtld and it seems like it only prints the value of the auxval
upstream does not but depending on your style of vdso (is it required to make syscalls (hard) or only an optimization (easy)) it's relatively easy to add
Itd mostly be for some syscalls like gettimeofday or getting the cpu id
for the "only an optimization" style this is all that's necessary to implement https://github.com/proxima-os/mlibc/commit/6ec4368abea33c0b95a4066d2b939bc4db911896
for the "required to make syscalls" style rtld itself hard-depends on the vdso and so the self-relocation needs to be changed which is much more extensive (https://github.com/proxima-os/mlibc/commit/08ea7f5a145f416d9862cf2ca23533549e9f3e85)
note that i haven't verified that this works correctly for linux-style vdsos (where the vdso provides symbols with the same name as libc, LD_PRELOAD style)
unlike linux's, hydrogen's vdso is listed in DT_NEEDED and uses unique symbol names not provided by any other objects, and for that usage style it works correctly
but idk how that code interacts with vdsos that aren't listed in DT_NEEDED (does it get inserted into the symbol resolution order at all? if so, where?)
looking at the linker code, if you add vdso_soname to the preloads vector the linux semantics should be implemented correctly
It would be interesting to have upstream mlibc vdso support with jinix being a thing now and other hobby kernels looking into it
@sharp carbon 
yeah yeah i know
If I get the hooks done today depends on that the bf wants to do
that is done
gotta figure out what broke dns now
ok so mlibc expects an /etc/services now
and if that is not present it just does not do dns
ugh
I mean its in posix so I gotta
even windows has etc/services (and etc/protocol + etc/hosts) in C:/Windows/System32/drivers/etc/
there we go that works now
Damn
Will astral be the only hobby os with a working chromium port at this pace
I wonder what you're even missing for that
Well DRM I guess
It's really in outer space compared to the other OSes 
Real
still a loong way
theres kernel work to do but I will take a small detour on a lil project
What's the project?
average experience after working on the PS/2 driver (definetly what you were doing
)
So true
I will do some mlibc sysdep work now, make some scheduling and smp syscalls etc
for getcpu I will just probably use rdtscp
actully taht could be intel specific hm
lemme check the amd manual
wait no I'm dumb I think its on both
vdso looking mad fine rn
might just query cpuid for it in __mlibc_entry and if it is present go through the fast path
nah just gonna keep it simple and slow
or nah I'll do that another time, just implementing getcpu
noooo updating mlbic seems to have broken links
@prime juniper what does sys_inet_configured search for exactly?
just if its running with ipv4 or ipv6?
I’d need to check
One sec
Seems like it
Tho it does some rtnetlink stuff in our sysdep
@formal patio might know more
I guess I can just hardcode it ipv4 = true
I dont support nor do I plan on supporting ipv6 for quite a while
otherwise I would have to implement a way to iterate through interfaces and check if those interfaces have an ip assigned to them from netd
and I refuse to implement netlink
yeah it really doesnt matter if theres no interface configured it'll just get a routing error in its face cuz of no route in the ip tables
It's for querying what posix calls checking if Internet is configured
So if you have no link up or should return false
You should do that tho 
rtnetlink is good tho
Better than any other of the cursed interfaces for that that I have seen so far
oh well
if it breaks something in the future I do that otherwise wawawawa
added it to the mlibc pr as well so I do not have to keep it in the local patch
I should finish setting up xbps and see if I can download and install a package
syscall return: pid 41 tid 42: 18446744073709551615 EAFNOSUPPORT (956 cached pages, 501055 free pages)
proably uz of this
oh right, I dont think I have special stuff in the type field
like cloexec
BROTHER I AM RUNNING AS ROOT
lmao
astral too secure
x86_64-repodata btw :^)
oh woops ty
this is so weird, no syscall in that process fails with EPERM
oh seems like xbps does return EPERM itself for some functions
oh right I'm blind
certificate veritfication failed
wait I dont think I install the certificates in the minimal distro
5head moment
can't wait to be able to install astral from a live usb
you should port dosfstools and e2fsprogs :^)
also something you can use to partition the drive
then you could do a full astral install from within astral
which would be very cool
I got e2fsprogs and I plan on porting parted
though I still need a fat driver for the efi boot partition and some real nic driver
astralbros we are so back
Damn
implement the way neofetch does uptime next
/proc/uptime
wtf windows supports /proc real
OMG
TIL
maybee it don't actually
and it alaways fallback to the commands stuff
maybe I could start adding some stuff to proc
$ cat /proc/gdt
$ ... OK
REAL
I do wonder, how does procfs handle say, a process doingle multiple reads of the same file
@analog berry linux man do you know
like reading half of it and then the other half
iirc it prints the content into a kernel buffer on first read and then returns from that buffer
nope
havent looked into the vfs and that stuff at all yet
Wow bro, amazing work seriously
real
Astral is my favorite hobby os here
that's a decent pick
fixed a bug in vionet that randomly broke networking
the bug?
a typo.
I typed tx instead of rx
fml
spent like 3 hours looking for the bug
but now! networking seems perfectly stable
I wanna see what error jinx makes
awwwww
it doesnt explode it just says fuck off
absolutely unacceptable, we need Astral support in Jinx 
uploading all package files I have to the repo
so that theyre there if needed
ig that means astral has working package management now
yippe
that's really cool
@grand shadow update Jinx, i upstreamed a new release :3
it makes it faster and whatnot
yippieeeee it did work (after some trial and error to find out which libs to install... I really need to make an xorg-base meta package or something)
will do tomorrow, it is 0:41 and I have to wake up 6
gn then lol
gnnn
imagine not going to bed at 1:30AM and needing to wake up at 5:40AM
(I do this often)

mlibc did the thing
lmao
well damn, locale being a stub in mlibc just breaks a very specific part of parted
fucking atari-fdisk
noboduy will use that
so I am just removing the init functions!
okay I got into a prompt
funny
%P terminator
fucked up?
(C99; not in SUSv2) For a conversion, the double argument is converted to hexadecimal notation (using the letters abcdef) in the style [-]0xh.hhhhp±; for A conversion the prefix 0X, the letters ABCDEF, and the exponent separator P is used. There is one hexadecimal digit before the decimal point, and the number of digits after it is equal to the precision. The default precision suffices for an exact representation of the value if an exact representation in base 2 exists and otherwise is sufficiently large to distinguish values of type double. The digit before the decimal point is unspecified for nonnormalized numbers, and nonzero but otherwise unspecified for normalized numbers.
this is the only thing I found where P is mentioned
wait no
tomorrow I'll debug this more
insans
I am just a parted port, dosfstools and a fat driver away from having this be able to install a distro of itself, exciting stuff
Maybe even only a parted port if I do mbr 
you still need the fat partition for limine to load limine-bios.sys from
and the config
and the kernel and everything
Wiay I thought lime went back to supporting ext2
unless you go with grub, but i don't remember astral having mb2 support
Did that change again
a long time ago
Damn
hm
oh wait this is decimal 50
I was looking at hex 50 oops
its complaining about the %....2
that does seem like a valid printf?
example from man 3 printf: %2$*1$d
ughh this is gonna be fun
oh wait seems like mlibc only handles it in scanf
well """handles"""
as in, stubs 
actuall wait
my frigg is probably like outdated as hell
maybe its been implemented in printf
wait no in frigg it seems to be handled but is breaking somehow?
oh yeap
seems like even after upgrading frigg it still dies
oh thank you beos devs
gonna open a mlibc issue for this so someone smarter than me can figure this out
what does bro want me to do
something is very wrong here
maybe its buggy cuz I dont have it working with readline let me try with it
still buggy, time to see whats it even reading back from that scanf
funny
surely mlibc's scanf supports %lf?
wait does mlibc scanf not even support %f
💀
oh wait I do remember, it was blocked on them trying to decide which library to use to handle the float conversion..... and it has been so for years now
genuinely considering dumping parted and just doing util-linux fdisk at this poin t
or writing my own
or I could also add a very barebones %lf support to mlibc locally
yeah doesnt seem to bad
float/double/long double tmp = 0;
float/double/long double div = 10;
get characters until dot or null
if not dot then tmp = tmp * 10 + digit
if dot then tmp = tmp + digit / div, div *= 10
then set the pointed address passed in scanf to tmp
small detour to implement that
still not working on real disks though, need to check my port
:D
as one last test I will add a second disk, add a gpt to it, add a partition, and install bash and chroot into it
then I go eep
damn, it all worked until xbps-install
it just doesnt want to work with a --rootdir for some reason
maybe I'm misunderstanding that option
figured it out ig?
seems like you have to copy the keys and the xbps config before doing the command
and that works
so yeah it is that
ugh to lazy to do everything now
at least I know about that xbps thing for an eventual installer
I use sgdisk
@carmine swallow I do wonder if the missing float handling in scanf is the reason why mlibc factorio does not wotk
It also causes parted to not work, xclock to not tick (and anything from xorg with float configs really) and xscreensaver-gfx to segfault
I wonder if thats also why fvwm had those funky windows, I didnt really boot into the wm since adding that patch
did some more mlibc work, now finishing the float conversions to (hopefully) be able to upstream
okay that is doneish
after my other pr is upstream I will open a pr for this
time to see if I can get meson and ninja ported
ok I got ninja but still trying to figure out meson
Yeah I’m not looking forward to packaging python modules
you can just look at jinix :^)
also i think i made a function for packaging perl modules if you ever need that lol

we do a little
wait FUUCK I have to get the linux headers in too
thank you scritps folder for the get linux headers script
trolled
guess I gotta port xz
Yeah I’m aware for both
Basic stuff
Real
Wonder how difficult it is to get mesa and virtio gpu accel working
If that needs drm then boooring
Damn it do
udrm when
I might take a look at it some time in the future then
At least for virtio gpu accel
dead
Becoming the thing I swore to destroy :(
I'm still wondering if it'd be possible for me to contribute this kinda thing to the OSDev community, but my Rust codebase would make that hard to do
Not that I'm at DRM yet at all
I need to see what causes unpacking a tar archive to take this long, in theory it should all go straight to the page cache
but unpacking the linux source is being sloow
espeiclaly when it gets to drm
probably file creation speed if I had to guess
the classic lots of small files is slow thing
just implement profiling infra 
profiling stuff on managarm has revealed many unexpected timesinks, some of which turned out to be avoidable
okay I think I found the issue
oversight on my part when implementing ext2
when growing a file I actually allocated the blocks instead of just creating a hole in the end that would get filled later
so the later reads would read the page fo the disk from there instead of memseting a page to zero
BRUHHH
I waited all this time
for this
its stable but there is something slowing it down
I need to figure out what causes it to slow down so much after a while
have you tried profiling your kernel?
I have a tool to do it through QEMU: https://github.com/maestro-os/kern-profile
although I haven't used it for a long time so it may be broken
I can take a look later
I do think its how Im hashing the vnode, offset for the cache table
Ill confirm that in a bit, gotta cook lunch
ok it is 100% the hashing I just need to do a field test by checking how many entries are put in every bucket
nvnm
I think it was just filling up the 2gbs of memory and having to do more disk io
linux does use a few gigs
- the other stuff
ah I'll figure that out later I want to see if I can compile mlibc
so I'll add the headers to the sysroot and then port rsync
NVMe
so meson runs but dies
dying on scandir makes me thinkg it is passing too small of a buffer to readdir
but meson does still seem to be kind of working and complaining
does not seem to be that
syscall log is needed, then
also it really wants sbrk() for some forsaken reason
I have been spending time with bf so havent looked into it
Tomorrow the fun resumes
I also wanna look into getting a fatfs implementation running
consider telling him about it
if he's also a programmer he could join
@grand shadow I am looking at your semaphore code and I have a question
https://github.com/Mathewnd/Astral/blob/1aeb85967754916ea9b236c7e1e58c167c65c564/kernel-src/lib/semaphore.c#L80
Can't a process get woken up for another reason than the semaphore being released? (example: woken up by a timer)
They can have a different wakeup reason in that case
I dont think theres any code off the top of my head that sleeps on a semaphore but has a timer
Unless its like an userspace timer, which just gives it an interrupted reason and sends EINTR down
Soon
Hes gonna get in cs next year
is he younger than you?
A few months, hes just switching from maths to cs
He was doing physics then switched to math then wants to switch to cs now
oh right, sched_yield returns a wakeup reason
I feel like working on a fat driver so I will put the mlibc compile stuff on hold
gonna do a driver for fat{12,16,32}
NTFS driver when 
Does it include vfat?
Idk anything about fat
vfat is just an extension that applies to all fat widths
Yesterday I got the typedefs and defines and stuff done, now Im going to actually do the fat
Start with mounting, dir traversal, fat traversal, etc
I wrote a fat32 implementation to lyre many eras ago and so I know what to expectish
This will hopefully be the final stretch before an installation program
Its not that hard, but I think ext2 js easier
Especially for integrating in the vfs
imo it depends on how advanced you want the driver to be
a basic fat driver (no lfn, bad performance) is easier than a basic ext2 driver
but a good fat driver (lfn, good performance, etc) is harder than a good ext2 driver
long file names
aka more than 8 chars before the last dot and/or more than 3 chars after it and/or mixed case names and/or Unicode names
Multiple chained directory entries to make one long name
thx
gnu tar has the same concept i think
it can be a surprisingly large hit
we've noticed that on managarm where our block allocation on ext2 was suboptimal but that lead to severe issues in some circumstances
optimizing placement + flushing of the bitmaps basically made writing out a coredump go from 60+ sec to sub 100 ms

did more fat work, working on directory parsing
<insert joke about grease/oil>
obese filesystem
<grease/oil.h>
I am still pondering whether I should port openrc or keep my simple init
having a more complete init system would be cool, but also having to implement more linux shit that openrc would likely expect would be ugh
I mean it runs on bsd so cant be THAT bad
it runs on BaSeD 
just keep your init
i am porting openrc because i actually implement linux interfaces
Systemd when
systemd demons
So excited for when I get fat to fully work and can write the install script finally
Then its a matter of writing a bunch more drivers for real hardware and forcing people to install astral 
I dont have any real hw NICs and the only real disk driver is nvme
damn the year of astral desktop is close
Would have been last year if I didnt have the habit of vanishing for months at a time because I burn out 
I think for the installer Im just gonna install a base system (maybe offer both a networkless and networked install images) and have that base system have everything to xbps-install more packages
arch astral
yeah thats nice
be like me and spend weeks on useless stuff
i think some osses here can do that
the one in basic iirc
ok but that one took every shortcut you could take lol
ig
astral makes no compromises
yeah :^)
can't wait for linux namespaces support so you can build the full distro on astral itself
Self hosting work stopped on mlibc, meson ran into some issues which I didnt debug because I wanted to get fatfs
But gcc and binutils and many other things do build just fine
Including the kernel
So clearily, I blame this on managarm picking a bad build system :^)
(actually I did it too)
but my installer is not great
I guess you need FAT to read the USB stick's filesystem? How would you determine which device is the one with the installer on it?
My installer uses an initramfs with everything in it so I didn't have to figure this out 
liar
banned
just do what most linux-based usb installers do and look for a partiton guid or partiton label
makes sense
Its mostly for limine, I dont have xhci
And if I were to use a filesystem for the usb itd be ext2
then how would you load the data to install
just load it into RAM?
The internet or just load into ram yeah
The base system is not that big
I do have to write a usb stack at some point (or force some poor soul to do it for me)
I wish someone made a uUSB
Be the change you want to see in the wo
I also still need to unfuck ps2 :^)
uSB
You picked the name, now all that's left is code 
unironically you can calamares for installer :^)
It’s what I’ve looked at for Managarm at one day
@grand shadow do you have a CI running for xbps packages
or did you simply upload the packages to the server
the latter
Yeah I simply uploaded, its not something super nescessary for now
rotund filesystem
fat12 and fat16 work, fat32 seems a bit borked so figuring out whats going on
oh right, forgot to set some metadata for the root cluster
Wait you didn't have FAT yet
no
alright, fat32 works now, had a super stupid typo
so that is a working fat read-only driver
still gotta do write and optimizations
but thats a start
I am inching closer to getting write working, been busy
after that I will upstream some mlibc stuff
that has been sitting around for a while and I've been meaning to upstream
you know, why is fsinfo a thing if the data there is not guaranteed to be right
ugh
I love fat
alright, I got it to be able to cp /usr/bin/neofetch /mnt/EXISTING_FILE
dosfsck complains about freeing unused clusters, so I gotta check whats up
oh wait it could be because I am not writing to all fats
alright, dosfsck is happy now
so I think file read/write is done
just need to do directories
which I will do tomorrow
chkdsk is the canonical disk checker, so consider testing w that as well
does it support lfn
and fat12/16
my readonly ext2 driver looks like this
meanwhile nanoshell's read+write ext2 implementation looks like this
loc != complexity
sure
ofc, yeah
skill /j
its not the best thing in the world, I'm gonna optimize it more when I'm done with making it read/write without exploding
probably yeah
the average line length is 300 characters 
How to bring down a sattelite
More like 400
time for directory operations
still missing those
link I just have to support linking a file with no disk dents
there were some troubles with long filenames that are now resolved, and I have written a function to create a dent in a dir
just gotta glue it and I will have create and link
fat has neither hard links nor soft links
so ENOTSUP time
Yes but you can still support something like keeping a file unlinked and then linking it again while keeping nlinks <= 1
link() takes a path name. once you unlink something you can't link it again because the (1) path name is no longer there
Something like that can work in my design
Since I pass vnode pointers and the final pathname
So you could use linkat with AT_EMPTY_PATH to relink it at the same filesystem without a loss of data
Obviously wouldnt work across filesystem boundaries
And the file data gets released on a refcount == 0
fat64 support for large disks
this does impress me as to how neofetch manages to be a big shell file
shit uses over 200kb
this is why fastfetch is better 
I think VOP_CREATE for fatfs is done
tomorrow I will do VOP_UNLINK and VOP_LINK work
and VOP_INACTIVE as well to go with VOP_UNLINK
which will leave just VOP_RENAME leftr
Did some unlink work, it works perfectly with short filenamew. Havent tested a long filename dent yet
Hoping to get fat work done soon so I can work on something akin to a install util (or at least for now install instructions like the gentoo manual) and then go back to doing self hosting work
Though if I ever want this installable on real hardware Im gonna need at least a not shit ps2 driver, ahci, some nics and maybe xhci
Contributions welcome 
only two major functions left
will do that at some other time
then do the few remaining TODOs I feel are important, then do some more hands on testing aka install limine and boot out of it, and then optimization time
but glad to see fat working
gonna be real exciting when I cook up a install manual
VOP_RENAME is done
and I did VOP_SYNC in the meantime
so all of the vfs glue has been implemented
time to try something fun out
but for that I need to port dosfstools
it is a bit cursed
but since fat only allows one hard link per file, I use the offset of the directory entry on disk
this is to keep it consistent with readdir() without having to allocate and keep the readdir() vnodes in memory
of course, if the file gets rename()d it breaks
but blame the filesystem for being shit
this only works because I have a 64 bit ino_t and will never support a 32 bit machine
Idk supporting 32 bit kernel builds at this point seems dumb af
32 bit userspace I guess, but the kernel is pointless
Tiny
Do u cache fat chains?
I cache vectors of contiguous spans in my driver
So best case is one entry, worst case is entry per block
I dont, at most it uses the page cache on the disk to at least not have to read the disk every next cluster
Oh well I guess that works
I am not super worried about making it very fast, since at most it'll be used as the boot partition and maybe to move stuff in a usb drive when I get an xhci driver in a trillion years
Still kinda nice to abuse the fact that most files will be contiguous so u save tons of cycles and also have fast binary search lookup
I solve this by faking the concept of inode numbers entirely for FAT.
Every time a VNode is opened, I just atomic_fetch_add a fake ino counter
And rely on the namecache for making sure VNodes are opened only once
So if you reboot the PC all inode numbers are gone?
Not just reboot, even dropping the last FD to a VNode will change the ino
☠️
But here's the kicker: It's FAT and I only need it for bootfs so whoms't care
I guess
it does not violate POSIX semantics if you ignore the part where a file will have its ino changed even though it's still the same file
It's also pretty unlikey an application will rely on checking the ino but not opening the file and getting confused when it checks the ino again
Which would be vulnerable to that race condition with proper POSIX vfs anyway
what the fuck is parted cooking
I forgot who suggested it, IIRC hyenasky did. Fixed all the problems I was having with FAT and ino
dont let it cook
wuh
why is there a hardlink to
ld
ld.bfd
and why did this only happen after adding parted
on ubuntu this is not a hardlink
oh according to blfs it is a hardlink
ah whatever
I will just implement the vfs_link call in initrd.c
oohohhhh
I just never put binutils in the initrd before?
no I did
but now theres a package that pulls it
what
I'll add verifying if libuuid really needs binutils in userspace to my todo list
I am cooking I am cooking
yea
congratulations
can run quite a lot of things
you have achieved peak
like what?
idk bash gcc x11 wine java
nice
wine is peak
port qemu on it you'll get something somewhat self sustaining /hj
about that 
holy shit based
congratulations you can daily drive it now
just run linux on qemu 
so true
I wish I could update the screenshot on the thread, that one is not even this current iteration of the os
i hate this discord needs to fix it so fucking bad 😭
audio was being worked on by qwinci but that is now deep in pr limbo
they probably expected forums to be used like actual forums as in like ask question, receive answer
definetely not long term

NO MUSIC
I AM COOKING
these fucking unices i cant understand anything 😔
nice tho
cooking
I am about to do something epic
oh wait I gotta update the packages in the repo, been a while
RAHHHHHH
forgot to add the kernel to the xbps install command oops
unpacking stuff......
:3c
I forgot to pass the flag to xbps install to not configure the packages so some stuff like sudo mkight be missing setuid
but a system there is!
and the kernel
time to try to install limine to that disk
oh yeah I can also chroot
aghh I'm just so excited
this is so cool
bruhh
how the fuck
I copied it from the /usr/share !!!
maybe it corrupted or something?
oh it is all zeros
I think I forgot to sync
no I'm trying to install astral to disk
I partitioned, made the filesystems, installed the base systems thru the package manager and now I am having some issues
nah
ok yeah I defo forgot to sync the fat fs
I'll just reformat it
HAHAHAHAHAHAHAHAHAHAHAHA
first boot of an astral install
that has been installed from the package manager
with the partitions made in astral
and the filesystems formatted in astral
gg
and the bootloader installed from astral
@sage locust look limine works in astral
and xbps seems to be working from the new install, installing gcc
oh oop I think that sync I forgot finally caught up to me
tomorrow I will do this again
and document all steps needed
Im still thinking about the init system stuff, I might port sysvinit
I am slightly familiar with it and its much less linux specfic I think
Compared to something like openrc
it is I just forgot to
though its named poweroff instead
it does the normal SIGTERM wait 5 secs SIGKILL sync poweroff
(in init)
poweroff itself writes to /tmp/.initcmd
which is a fifo read by /init
yeah it is a bit old
last updated when I updated the config file 
do I need to become the certified Limine Updater for Astral
I dont have the patience to update userspace stuff so prs always welcome :^)
tossed it onto my todo list
I'll get back to you in 3-5 business years
(said list is over 100 lines long)
damn awesome!
Sorry not sorry but unless I manage to land a full time paid job to update userspace components of hobby OSses I’m already behind with Managarm (and that’s only cuz menix doesn’t use my ports yet and mint keeps Gloire up to date
)
Else I wouldn’t mind doing it (but time)
systemd 
I will pay you a beer and some paperclips per month :meme
too much linux stuff needed smh
okay so, from what I remember from yesterday, the install process is:
format disk with an astral partition and a boot partition:
parted /dev/DISK
reboot
set up networking:
netd INTERFACE
make filesystems:
mkfs.ext2 /dev/DISKp1
mkfs.fat /dev/DISKp2
mount them:
mkdir /mnt
mount -d /dev/DISKp1 /mnt ext2
mkdir /mnt/boot
mount -d /dev/DISKp2 /mnt/boot fatfs
prepare xbps in the new root:
mkdir -p /mnt/usr/share
mkdir -p /mt/var/db/xbps
cp -r /var/db/xbps/keys /mnt/var/db/xbps
cp -r /usr/share/xbps.d /mnt/usr/share
install the base system:
xbps-install --rootdir /mnt -S -y astral mlibc bash coreutils init distro-files vim nano mount shadow sudo xbps net-base neofetch limine dosfstools e2fsprogs
chroot into the installed system:
mkdir /mnt/dev
mount /mnt/dev devfs
chroot /mnt
source /etc/profile
cd
write a limine.conf and copy required limine files to /boot (from now on using bios mbr):
cp /usr/share/limine/limine-bios.sys /boot
install limine
limine bios-install /dev/DISK
and at last:
reboot
I need to add some sort of command to allow you to not need to reboot after partitioning
like an ioctl on the raw disk or something
I remember the linux parted port having something like that
I should also probably make a base system metapackage
maybe make a sort of xbstrap script like arch has pacstrap
xbstrap you say?????? :p
holy shjit mnaganarm reference
lmao
time to try these steps
I really gotta make syncing faster
maybe have more worker threads that just do the i/o
not sure what the script would need to do, xbps supports a sysroot arg already
more so copy the keys and config to the sysroot
since the --rootdir argument uses the stuff from inside the sysroot
I mean gentoo does that
and void has an option to either do the config copy or tarball
either way, the install instructions work
just installed a perfectly working system and ran xbps-install gcc inside it
20 minute video and like a good chunk of it is syncing disks 💀 I really need to make that faster
blkpg :^)
it's an interface that parted uses to tell linux about partition addition, deletion and size changes
but if you don't want to support linux specific things maybe you could add support for astral in libparted, idk how hard that would be
I did add an astral port to libparted
ah that makes sense lol
you're probably familiar with what's needed for partition probing then
that's really cool
port fio to stress your disk/fs drivers
very nice tool
also nice for finding fs bugs ig
Will keep in mind ty
but the progress you've achieved is crazy still
literally maybe some speedups + drm and its daily drivable
very cool
Yeah some stuff is just too slow for daily use
And drivers
I need to have a lot more drivers
if this is wsl2 you should at least try windows qemu with whpx, nvme with nested virt has very weird performance at least for me
Hmm it is wsl2, Ill take a peek lTer
Now I'm gonna call it Mnaganarm forever 
.!t managarm
It's Managarm, not Managram
(Or derivatives )
mammogram
is it an inside joke or did you read my brainfart from yesterday
lounge 0
my hello world is somehow 1/3 of that and it doesnt do anything
or actually thats probably because tests make up a lot of the code and u dont have those
so thats why
dont you have like
an overengineered logging system
its only a few k
why tho
idk
whats the use of it
#1385970208631427173 message
Wait how
I thought your kinda progress needed a lot more code
quantity != quality
yeah im surprised its that small
managarm is probably way bigger
if you count frigg etc
or even without it
And tbh u barely have drivers right
yeah I havent spent a lot of time writing drivers
so I am missing a lot of lines of code lol
qemu with whpx works on my desktop but not on my laptop
this is funny
you know, between sysvinit and openrc I might as well just pick the nuclear option
and have both like gentoo does 
runit
Systemd. Easy
read what he said about systemd 😔
I’m aware
ok cool
okay I think I know why meson is complaining when building mlibc
apparently I am missing a very specific F_DUPFD_CLOEXEC op
tbhank you meson
BWAHAHAHAHAHA
that was it
that was so stupid
running ninja...
seems to be working
gg
and it installs...
now ninja install without DESTDIR 
so true
actually true I could tyr that
nice
astral first os to actually build mlibc inside mlibc
big step towards self hosting
I really want to try building some of the other base system packages now
lets see, I know these build:
binutils, gcc, mlibc, the kernel
I gotta try gettext, intl, libxcrypt for the base libraries
coreutils, bash, ncurses, readline for shell stuff
some astral tools like init, netd and mount are just simple c files on makefile, I wont even bother
maybe some tools like grep, sed, make, tar
and the libraries those would need
something tells me to try doing astral from scratch..
I have been thinking about how I would approach that stuff
if I would do /proc or some other astral tool
and how /proc would work
one thing i was thinking about is making the proc files binary and providing utils to write out the linux-style output from them
(not in managarm ofc)
Crazy
this would also extend to /proc/<pid> being special files instead of dirs
you should port fastfetch
What is the benefit other than the creator of neofetch is mia
neofetch is abandoned
neofetch is dead and fastfetch is actually genuinely much better
it's fast :P
And also fetch
it's written in c/c++
and has more information
what more do I need before I can have the satisfaction of calling astral fully self hosting and farming reddit karma?
Just show a timelapse of downloading the sources, then building and running in qemu, all from inside astral
honestly if I make astral faster I think I can do that 💀
I need to track down what is making it sluggish sometimes
I have a gcc build running in the background and its not really an acceptable speed
If you enable external profiling you will probably notice what's taking most of the time real fast
I'll take a look
also I just noticed
I'm gonna have to port perl to have autotools proper
perl doesnt work in managarm very well IIRC but idk if its managarm or mlibc
google is not being much of help, is it a qemu thing or the gcc -pg thing
Well there are different ways to implement it
You can just dump qemu registers every N us, or record stacks in your kernel
I think having it in kernel would probably be better, when I did the qemu register dump thing it was insanely slow after a specific amount of time per dump
Yeah I think so
we have profiling via pmus, the pmu is configured to raise an nmi after every n clock cycles, and in the nmi handler we log the ip where we were interrupted
wait
I think the reason why it might have been super slow
is that it was building gcc with -g by default???
why does gcc do that
I'm gonna leave it building with "-O2 -pipe" and without that -g to see if it helps any
while I look into the profiler
Isn't g just debug info
for what else?
Yes but my fs driver isnt very fast and its a lot of info 
I don't really know what the progress on perl is but i do know that perl is pretty anal about locale support
its a not insignificant amount of data to write out
some personal project, likely paaliaq when/if i get to that point
paaliaq?
ah
fork managarm 
that'd require having a c++ compiler :^)
port gcc 
yeah if perl does not work well enough for automake I might be in for some trouble if I want to fully self host
lily-cc 
when then means I gotta research into locales and implement them in mlibc
compile it yourself
no compiler needed
another issue is that the cpu has 4x less bits :^)
get 4 cpus then?
incredible
that was suspiciously quick?
make -j2 with 8g ram and vioblk
and 4 cores
ls is super slow for some reason
something is funky
@prime juniper probably knows if perl works on mlibc linux
I think something is funky with the page cache
I really need to rewrite this at some point
and do it completely differently
fs code?
page cache code
I think I do it the way svr4 did which is like just not good
or some other old unix, I rmeember getting inspiration from oen but I forgot which
It’s meh at best. I have a working 2048.pl but installing automake and friends and invoking it gave module errors
did you ever figure out if it was mlibc or managarm
Nope
@grand shadow as a shortcut couldnt you just compile the kernel and then copy all the userspace stuff from the host into the guest
or is that cheating
I mean you could, thats kind of the same as just installing the rest of the userspace with a package manager while compiling the kernel
i want to be able to build the userspace stuff in astral
tbf what you have already counts as self hosting to me
you can literally make git commits inside Astral and push them for your kernel, and then rebuild said kernel, install it, and reboot
it honestly doesn't get more selfhosting than that as a kernel
btw idr if you tried building Limine inside Astral too, but i don't see why it shouldn't build
I mean yeah, theres one specific commit that I pushed from inside astral to fix a typo.... that added another typo xd
I did and it did build after some fiddling around unimplemented mlibc stuff
which was iconv_open
but now thats in libintl and not in mlibc
so even that shoudlnt be an issue
locale stuff is probably the most annoying shit ever
i wish everyone spoke the same langauge and used the same formats for everything
At least what's required from libc is not that bad
You basically need to be able to tell which unicode chars satisfy isalpha(), isdigit(), islower() etc
and you need to be able to convert to upper case etc
Both of these tasks are solved by large lookup tables that you export from ICU :^)
that's how glibc does it
Actually, I'm not sure if glibc exports from icu or if it maintains its own copies
me thinking my tcp driver shat itself while downloading the binutils tarball
but no it was just ftpmirror.gnu.org giving me a botswana server 💀
it aint even close bruh
huh i didn't know you're in botswana :^)
How big is your TCP driver btw
Damn
Literally every astral component is 1 loc and somehow works better than everyone else
so true
astral network stack is about to become the world's leading embedded network stack
replacing lwIP

Lwip was huge iirc?
exactly
if Astral's is Just Lighter™, the joke was that it'd 100% replace lwIP
in all seriousness, it probably never would, but maybe it might see some use? would be neat
True
I mean it is certainly not *good* but it works well enough
considering it was my first time writing a tcp driver
I should steal it and use it for https://ptb.discord.com/channels/440442961147199490/1421414518034006066 once I implement literally any networking hardware support

implement astral kexec and use astral as the bootloader 5head 
(it'll probably absolutely shit itself on PowerPC, since you don't target anything big-endian)
big endian cpus arent real wake up sheeple theres a little fairy in your computer that switches the bytes while you arent looking
it is also not super complete
uIP when
I should do a small change on the kernel build stuff and move the regenerate stuff from jinx into a ./prepare.sh and add a kernel-src/BUILD.md detailing how to build just the kernel

