#AuroraOS
1 messages · Page 2 of 1
You using mlibc master or release
master
and did you use the script to download Linux headers?
maybe i should use release
No I use master
which script?
It’s included with mlibc
ohh y mean that
yes i copied ur stuff
word for word
ima have to check
else it might just be something w the config
wait do you need the linux option enabled?
No
You do need to manually say no to them though
But I know mlibc likes having the headers
What do they link to?
Copy the symlinks from the demo project
they have actual content inside of them
Ima just steal astrals
@quaint cape Did you also take my build script and patching system?
Yes.
Ik right.
Well i did rebuild and rename quite a bit
split it up into different files
Remember never do this for major things or your knee caps say bye bye
Try it without splitting it
Plausible deniability /hi
well its still the same thing
The folder structure though
its prob just my abi bits being broken
It may get mad or some shit
Perhaps
when i just started with mlibc i was stupid enough to delete some abi bits by mistake
and never fixed it
It would be nice if you got my patches working so my kernel can be credited and others and be cool
so time to redo it right

I will.
My kernel is meant to also be very human readable to be reference
Like I may convert to a ų kernel at some point
And having a good base is good
its always good
I also want to buy the physical copies of the Intel SDM
It’s like 200 bucks for 5500 pages
Like god damn that’s a steal
damn thats not bad at all
And then when people ask for help I can take a picture of the physical book XD
loool
It’s basically at cost
@quaint cape Btw feel free to ping me whenever you need a hand
I love helping out with my knowledge
Thanks.
<3
ngl build system can be annoying
fr
how far wicks?
Stealing my mlibc and gcc build scripts and patches
Which I got from astral for the psyches partly 
i use newlib
Mlibc is the most POSIX libc right
also just finished my kernel rewrite
Almost done.
i did ask you for permission though
almsot completed the OS??
Oh nice
my rewrite is almost done too
Yes. And Matt told me to look at theirs
i just completed and pushed the changes
well my rewrite is a big one
I did try and do it manually but
things were being fucky
git was having a stroke for some reason and refused to push it but fixed it smh
i got the total files i need to rewrite if i want to port it to another arch down to 8
its a maximum of 1k loc
I’m gonna be in for a doozy when going to another arch
I've been abstracting hella lot lately.
But il cross that bridge when I get there
And then abstract where needed
And same for SMP
i have no worries as my OS is uni-arch of x86_64
same, ive been preparing to do it for like 1 month now
im still not brave enough to even try
I think il port to arm/risc-v whenever they have good desktop options that are open source
Mainly looking at the milkV titan with the VM extention
And or the PI5 once it’s a qemu target
I need to make a devfs before i can even think about porting to other arches tbh
also happy 1000+ messages
and maybe ext2 or ext4 drivers
:D yea
all bits set
At the same thing im maintaing this im a lead dev for a rblx game so funny
yee
Im also comitee for this club: were pretty active tbh
Only 44k messages
where?
GG
oh i see
okay
DevFS is really easy
only if you have proper VFS
Just set the read and write function pointers to handlers for your drivers
That’s also not too hard
ASTERISK is must here
It is.
but i reworked my whole fs
like everything
cuz i didnt have a vfs before
so now i have to rewrite a big portion of my code.
its fine though right
relatable
theres been a lot of work into making mlibc posix compliant, mostly for os-test memeing 
I think its already better than glibc at this
🙏
Honestly I don’t even think it’s a meme. It’s a good achievement
glibc gives me stroke when i try to read it
Mathewnd ehmm do yk what im missing
I think it’s above Linux now
mlibc is way more readable
u are missing that abi-bit
For context they are basing thier mlibc/gcc/binutils port off mine which is based off yours
u need to get it from linux or write your own or whatever
And I got no idea why it’s missing
probably was added recently and your patch is a bit old
ima just copy it from linux
yea
also big fact that mlibc is portable whereas glibc is not because of linux
I think my patches are from let me check the commit
I'm working on getting a mlibc-linux ostest thing to compare against the other libcs with a common kernel
https://git.evalyngoemer.com/evalynOS/mlibc-evalynos/commit/552440d5c9eccec94e44322de6b5d0c4865bbaa9
this commit
Linux doesnt either have that abi-bit.
I mean it can be done its just a huge ass codebase
mintsuki had to use an llm to sift through it and the patch file is like 17k lines
if the OS is linux like
God damn
yk what ima steal it from u thanks :D
cuz evalynos has it for some reason
lool
Has what?
ur os is better than linux just so yk
That abi bit
LMAO XD
that would've taken more than 6 months if was done manually
Honestly good use for LLMs as long as a human verifies it
LLM can be used to automate lots of stuff, which saves time
high quality idt i see
17 k lines waaa
@quaint cape How’s it going
Terribly.
What error
Outdated mlibc stuff or sum
.
even though ive added the abi bit to my abi bits
now ive decided to clone ur mlibc and insert the auroraos sysdep to see if it helps
it might be something with the mlibc version ig
Hmmmm
What sysdeps do you have?
Did you delete any of mine or set them to to stubs
That can break things
Maybe do a fzf for that file @quaint cape ?
shouldnt be a rpoblem:
it is right there
sigset_t
but when u check the sysroot they aint there
What happens if you do a clean build
Delete the headers build folder
And start from ground zero
https://youtu.be/wbO3p7_Mf30
@quaint cape Put this song on while compiling. It may or may not have a slightly probability to increase the change of it not certainly failing
Listen elsewhere: https://materia.to/undertaleID
Full credits: https://www.materiacollective.com/music/undertale-soundtrack
Acceptable usage guidelines and licensing: https://materiamusicpub.com/youtube-faq/
Sounds good
Still same issue.
check_exception old: 0xd new 0xd
1: v=08 e=0000 i=0 cpl=0 IP=0028:ffffffff800008e5 pc=ffffffff800008e5 SP=0030:ffff80003ff95f80 env->regs[R_EAX]=0000000000000028
RAX=0000000000000028 RBX=0000000000000000 RCX=ffff800000000000 RDX=00000000000003f8
RSI=0000000000000031 RDI=00000000000003f8 RBP=ffff80003ff95fa0 RSP=ffff80003ff95f80
R8 =ffff80003ff63000 R9 =ffff80003ff69088 R10=0000000000000000 R11=0000000000000000
R12=ffffffff80015160 R13=0000000000000000 R14=0000000000000001 R15=0000000000000000
RIP=ffffffff800008e5 RFL=00000046 [---Z-P-] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0030 0000000000000000 00000000 00009300 DPL=0 DS [-WA]
CS =0028 0000000000000000 00000000 00209b00 DPL=0 CS64 [-RA]
SS =0030 0000000000000000 00000000 00009300 DPL=0 DS [-WA]
DS =0030 0000000000000000 00000000 00009300 DPL=0 DS [-WA]
FS =0030 0000000000000000 00000000 00009300 DPL=0 DS [-WA]
GS =0030 0000000000000000 00000000 00009300 DPL=0 DS [-WA]
LDT=0000 0000000000000000 00000000 00008200 DPL=0 LDT
TR =0000 0000000000000000 0000ffff 00008b00 DPL=0 TSS64-busy
GDT= ffff800000014f18 00000037
IDT= ffffffff8001cc40 00000fff
CR0=80010011 CR2=0000000000000000 CR3=000000003ff60000 CR4=00000020
DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000
DR6=00000000ffff0ff0 DR7=0000000000000400
CCS=0000000000000008 CCD=0000000000000000 CCO=LOGICB
EFER=0000000000000d00
check_exception old: 0x8 new 0xd
``` yeayyy when i try to run the rewrite.
funny thing is that it fails in CPU which has never failed on the old system.
extremely relatable
damn my fs tweaked out
@mental otter do u yk of any freestanding printf implementation that i can borrow
im starting to get anoyed of my current system
Nanoprintf
Check how I use it in src/kernel/libc/stdio.c
shouldnt be that hard tbh
ik right
its lit included here
Yup XD
Although I implement a few other functions to make them wrap the same
There is a way to do it without a buffer like that too
Happy new year from the AuroraOS devs
-# or ig im the only dev so ye happy new year from me :D
Ill try to focus more on AuroraOS next year, maybe get xorg ported
so i can finally do something better than this colored bs screen
Ooooo nice
Is it a working mlibc?
That screen no.
I made the OS run itself after the rewrite though
I run into the same mlibc error about that missing abi bit.
Hm? In what way
damn
Ik right its crazy
Lemme push it to codeberg and u can download itself and try running it to see if its just something about my machine.
I have a hard time beliving that though
why not try my OS build in your machine?
Did it, it works then its something wrong with my setup somehow ig.
@mental otter do yk whats wrong?
Did you ever compile mlibc as sudo before?
hmm think i fixed it
progerss
now im on the mlibc building part
anyways i cant manage to be up more
its 2 in the morning
gn
Youre missing some abi bits definitions, make sure u have it symlinked and in your sysdep's meson.build
Ehmm Mathwend how would i modify the bits to include the ABI bit sigset_t without changing it every time manually
@mental otter do yk how this is even possible
missing it even though its right there under abi-bits/limits.h
what is the right one:
its also in the auroraos abi-bits folder
if not no_headers
install_headers(
'include/abi-bits/auxv.h',
'include/abi-bits/auxv.h',
'include/abi-bits/blkcnt_t.h',
'include/abi-bits/blksize_t.h',
'include/abi-bits/clockid_t.h',
'include/abi-bits/dev_t.h',
'include/abi-bits/errno.h',
'include/abi-bits/fcntl.h',
'include/abi-bits/gid_t.h',
'include/abi-bits/ino_t.h',
'include/abi-bits/limits.h',
'include/abi-bits/mode_t.h',
'include/abi-bits/nlink_t.h',
'include/abi-bits/pid_t.h',
'include/abi-bits/seek-whence.h',
'include/abi-bits/signal.h',
'include/abi-bits/stat.h',
'include/abi-bits/uid_t.h',
'include/abi-bits/vm-flags.h',
'include/abi-bits/wait.h',
'include/abi-bits/riscv-hwprobe.h',
'include/abi-bits/sigevent.h',
'include/abi-bits/sigval.h',
'include/abi-bits/sa_family_t.h',
'include/abi-bits/sockaddr_storage.h',
'include/abi-bits/sig-limits.h',
'include/abi-bits/suseconds_t.h',
'include/abi-bits/access.h',
'include/abi-bits/socklen_t.h',
'include/abi-bits/socket.h',
'include/abi-bits/poll.h',
'include/abi-bits/resource.h',
'include/abi-bits/in.h',
'include/abi-bits/rlim_t.h',
'include/abi-bits/utsname.h',
'include/abi-bits/fd_set.h',
'include/abi-bits/sem.h',
'include/abi-bits/time.h',
'include/abi-bits/ipc.h',
'include/abi-bits/statvfs.h',
'include/abi-bits/fsblkcnt_t.h',
'include/abi-bits/fsfilcnt_t.h',
'include/abi-bits/shm.h',
'include/abi-bits/termios.h',
'include/abi-bits/msg.h',
'include/abi-bits/mqueue.h',
'include/abi-bits/utmp-defines.h',
'include/abi-bits/utmpx.h',
'include/abi-bits/sigset_t.h',
subdir: 'abi-bits',
follow_symlinks: true
)
it has it too
seems valid to me
First sign of life after rewrite:
Only problem is that the fs is cooked
Also added Limine wallpaper.
So ye I mainly have two problems to solve.
- The mlibc ahh weird issues.
- The FS malfunctioning ten times. (and yes with the fs i mean both tmpfs, vfs and tarfs)
no VFS???
U need to add it manualy
The vfs needs no init lol
fs.c and fs.h is vfs
just that i dont call it vfs
really.
Another stupid question, but how can this even happen:
../options/ansi/include/limits.h:161:10: fatal error: abi-bits/limits.h: No such file or directory
161 | #include <abi-bits/limits.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
[14/311] Compiling C object options/ansi/libmlibc-musl-math.a.p/musl-gen
. If you consider this conversation
cuz i aint for sure missing a header
Maie sure u have both it on meson.build and the symlink and tbat it points to a valid file
U might need to reconfigure meson too
As in, recreate the buiold dir
its crazy as i have it in my meson.build, its symlinked points to a valid file, its in the sysroot/include/abi-bits dir.
I've already tried rebuilding it, (full rebuild)
meson setup --cross-file=${SRC_DIR}/auroraos.cross --prefix=/usr -Ddefault_library=static -Dno_headers=true build
Do u install headers properly and if so did you rerun that step?
Thats the thing thats weird.
The headers are properly there.
. Look at this SS, this is from the abi-bits dir in the sysroot. You can clearly see "limits.h"
and when you click on it you get.
Want me to push the current state to codeberg?
Sure
Damn it wont let me have my git repo
pushed
Also keep in mind that you need to modify the sysroot file /bits/sigset_t.h and add #include <abi-bits/sigset_t.h> each time you rebuild lol
Why would u need to add that include
would be good if you fix it.
its to prevent the missing sigset_t types
That doesnt happen on my end nor in ci
thats not mlibc thats gcc build
wait have you built it?
No like not on astral nor in mlibc ci this happens
When u upload the code Ill take a look
its pushed already
clone dev btw
and the build script is ./ports/mlibc/mlibc.sh (from root)
Can u send the link I dont jabe it
git clone https://codeberg.org/aurora-org/AuroraOS -b dev
Ok so found an issue already
U dont set the include dir anywhere
rtld_include_dirs += include_directories('sysdeps/menix/include')
libc_include_dirs += include_directories('sysdeps/menix/include')
For example the menix ones
I dont see that in your code anywhere
I could reinclude those im pretty sure I removed them.a feel free to copy astrals and then replace astral with AuroraOS, that might an issue.
Ima try rebuilding with those defined.
Didn't make any change.
What was the issue?
Absolutely no idea.
I just cloned the main branch and dropped in my sysdeps.
And it worked.
Damn i really succeded at making a great fs: 😭
@quaint cape The elf’s a loading now?
No the FS is broken.
Development paused for 5 days.
Ima be away from my computer
Still can respond to DMs from my phone though.
First day of camp guys, it's been kind of crazy tbh. Great lads though.
Back today guys, can anyone remind me of what I've been doin.
your filesystem
Mr snub the greatest.
wtf is wrong with this fs
hmm does directory creating work or not
okay path handling scuffed.
/init.elf works
but not /init/init.elf
hmm this darn fs
@quaint cape I wonder if you can make the FS as a userspace app on your system and run test suites on it to better get it working?
Then port it back
maybe.
i know whats failing, just not why its failing lol
Guys what does uacpi actually need?
Could you take a look at the fs if you have time, right now I'm really stuck cuz i have no idea why it's failing. Would be good to have a second pair of eyes.
leme finish my merge conflict rq and il take a looksie
@quaint cape link to code?
this looks really fuckin sus
it's weird. you don't need strlen
iterate the string once.
normalise paths before basename so the end / isn't a problem and just keep a ptr to the last / and then the basename is all after that ptr when you see \0
assuming the path is stored normalised so you only normalise once not in each function call:
static inline const char *basename(const char *path){
const char *base = path;
const char *p = path;
while(*p){
if(*p == '/'){
base = p + 1;
}
p++;
}
return base;
}
Will test once i get home.
Our school had a fire alarm so freezing my butt off rn standing outside.
Unfortunately didnt fix anything
if you look on the bright side as long as its not in a long path it works.
like aslong as its not really a path it works fine right :D
/text.txt works
but not /txt/text.txt
negative.
its something with the dir setup
it can create dirs
but cant create anything in them
It can’t do nesting
It should be able to do it.
it complains about create method not being there
Hmmm
like look at this 🙏 I do populate it with create func
Are inode flags set to dir though
yes and no, i didnt look into that before as i just assumed that process did work but whenever a dir has a file inside of it all of a sudden its marked with file 🙏
then there has to be something wrong with my tar fs or sum
how tf did /bin/ become a file
ohh wait no, its a dir
my debug outputs are so messy they are unreadable.
wait im suspecting everything is flipped
all files are created as dirs and then all dirs are files
@mental otter is it only me but this looks completely flipped, all files are dirs and all dirs are files
Hmm idk... This just seems so weird.
Reworked a bit more in the arch directory.
Now I realised i prob need to rework my logging implementation as it's messy asf.
I have to port bash before this summer at least.
Also thanks to everyone who starred AuroraOS, I'm hoping to hit 10 stars as I had on my old gh repo.
damn guys look im able to write negative bytes to a file loool
anyways its cuz everything is flipped
ima fix it today hopefully.
got sidetracked impl sysfs now
@mental otter do yk how capable your kernel needs to be to run uacpi
i think its mostly PMM VMM and other stuff related?
@mental otter Rate my contributor introduction: https://codeberg.org/aurora-org/AuroraOS/src/branch/dev/docs/contributor_introduction.md I spent the last hour writing it lol
🙏 ur one of the better people that has even been interested at looking at AuroraOS lol

If I’m not too busy with my own I can take a looksie
Maybe I can port my new timer drivers
lol would be great i only have PIT rn

I know what I must do
But from myself
Implemented sysfs
Also fixed all fs issues yeeeee
Im hopeful i fixed all issues but im unsure.
@mental otter you have any ideas on how i would organize my syscalls
i feel like its super messy rn as they are all in one single 1k lines file
yk what ima just put them all in seperate files in a folder.
call it a day

What’s all in one files like that
I got a lot of questionable things in my os lol
welcome to unreadable bs
absolute pathetic
ehh this os sucks tbh
anyways ima try to make it suck less
so ill switch them up.
i think this rewrite was really needed.
ohh damn thats even more unreadable than my bs.
you barely need 5 for mlibc lol
newlib 
fixed it now they are all in seperate files.
You need like 3
Take a look at the kernel api header in uacpi, thats what you need to provide.
Its the core stuff a kernel needs really, some basic virtual memory stuff, spinlocks and mutexes, heap allocator, and raw pci access.
What is that formatting …
I copied evelyns
ik right
fact of the day: linux kernel formatting just says you should indent with 8 characters. it does not say what that character is. brb, submitting a change to the linux kernel with 8-tab indents.
lol
That’s not my formatting 🥀
I mean if it’s an actual good important patch if it comes up just say they don’t specify and have them fix it

i copied your screenshot
Like it’s not the strangest thing to happen on the mailing lists
It's kind of mid actually but it works atleast
now my documentation is a tiny tad better.
these classes are so boring i just write docs the whole time since that is the only thing you can do on your school chromebook
Damn my proc logic is broken smh
now proc_exec wont work 😭
it just goes to idle and complains about no new proc being found.
Fixed.
It was me somehow commenting out thread create
😭
Now i dont even know what the issue is anymore.
I'm going to try to fix the scheduler tmrw ig. Still unsure what the issue is.
relatable
Damn might have to rewrite some more proc logic.
after that i can hopefully run bash
Even more docs work: https://codeberg.org/aurora-org/AuroraOS/src/branch/dev/docs
If you're ever bored feel free to read the AuroraOS docs.
I need to document my kernel
I only have in code comments as documentation
And even those are minimal in a lot of places
Like for example my vmm isn’t commented at all
Damn still unsure about what this sched issue is
Ehmm well i dont document a lot of the code
thats more general kernel information.
i like how my IDT doesnt even catch this exception
something has to be really messed up
Best way to fix the issue is to rewrite the whole scheduler right!!!
So that's what ima be doin.
What was your old scheduler btw
And was it the logic on switching tasks
Like the code to build the iretq frame and stuff
Making it crash
Or the picking of tasks
BTW it may break if the next task is the same as the old task so should check for that case and return normally rather than attempt a switch
That was an issue I faced
I'm unsure anymore tbh, it just crashes when entering anything so im thinking that its the iretq, the weird thing is that it double faults.
no, the first one didnt even return.
Looks like some sort of PF, i haven't been debugging it more than a few hours.
Double fault would mean your fault handler is fucking up
it doesnt handle double faults ig idk
havent looked at it for a year
If you don’t handle a double fault it goes to a triple fault
Yes, i know.
it goes all the way to a triple fault.
You could steal my scheduler code

For task switching
It’s only like 7 pounds of glue and duct tape
It’s really fucking picky
I think I found out why a while ago
I think I was fucking ip alignment
But I CBA to fiddle with it when it works
🙏 ima make a double fault handler.
but first ima watch jetlag the game
Wait you don’t have a double fault handler 😭
no
ohh damn i do have double fault why tf is this failing
Your double fault is faulting

ohh my god why 😭
check_exception old: 0xffffffff new 0xe
check_exception old: 0xe new 0xe
check_exception old: 0x8 new 0xe
The thing interesting is that it's all just pointing to userspace RIP so it's impossible to debug lol
How would it be doin that lol
I mean you’re saying it’s pointing to userspace RIP?
Right now I'm just looking at the qemu debug traces.
The exceptions occur as soon as i jump into userspace.
Maybe I dont map the IDT into the pml4? idk
Ima just give u the relevant code: https://codeberg.org/aurora-org/AuroraOS/src/branch/dev/kernel/task/exec.c https://codeberg.org/aurora-org/AuroraOS/src/branch/dev/kernel/arch/x86_64/paging.c you are good at finding mistakes
Il just tell you how it’s meant to be done
Okay so the PML4 is one page
Right
You get a new page copy the entire thing
And then zero out the user half
So that the kernel mappings are the same
Aswell you need to ensure the entire upper half is filled with PML3s
And that they will never be deallocated by your VMM
That way your kernel always stays mapped across all mappings
Welp, let me check my stupid paging impl.
anyways theres my page code.
This nukes kernel mappings
You memset the entire thing
i just thought i were supposed to memset the whole thing to wipe it
The kernel needs to stay mapped to everyone through right
Its also why you do higher half kernels
It’s an optimization to do it like this
And also makes checking if it’s a user pointer easier
Yes, it was me being stupid. Or well my whole process related code is stupid asf. It was written a while ago.
ohh wait that didnt work
Welp time to get to work writing more docs
my main function is so short nowadays
imo id inline that or replace it with arch spesific things for asbtraction
huh wdym
its a full fletched init routine stolen from Mathewnd, so i can add or remove whatever I want.
what
put this function inside the main function
it doenst matter what i put in there
just a mess
really?
the good thing with the init routine is that it doesnt matter what arch i have
really?
yea
how does it work internaly
i know how id arch abstract this though
macro magic, basically you define dependencies.
i have one dependencie "arch_ok" which signals the arch stuff is done.
And that one is defined in each arch.
whatever is before arch_ok doesnt matter, its arch dependent.
does this look okay?
use the HHDM request
not a fixed thing
wait what is this for?
https://codeberg.org/aurora-org/AuroraOS/src/branch/dev/kernel/task/exec.c# could you take a look at this file, its only like 70 lines so it should be fast.
see if anything is terribly wrong.
where is it crashin
looks like PF
my handler doesnt catch it somehow
also why tf is RIP 00000 all of a sudden
bad stack?
put the error code in here for PF
hmm
Reserved right?
Yes
You wana steal my fancy new paging code XD
Just dosnt have page table freeing yet 
idk, i dont think its the paging.
i think its the setup
Thanks grok :D
might be lemme check
for sure hope its not.
Bit 3 (RSVD) indicates whether a reserved bit was set in some page-structure entry
Damn this things actually good
Yeah it is!
ngl, to fix my problems i rely on my kernel exception or just manual tracing 
looking at code obviously
Same tbh
Welp my parents just told me to use Windows instead of Linux (dw i will still keep linux on my laptop) so now I have to translate all build instructions to windows.
or use jinx or sum
wsl
🙏
Possibility
yall should I do a full sched rewrite?
I feel like it might be nessecary
I might have to i just realised how much bs it is
ehh so i did rewrite quite a bit of the scheduler
ima have to rewrite my fd system lol
its so scuffed
it didnt fix the page fault though
current todo:
- fix this PF thing
- rework it to be per process specific fds
reworked stack setup so its in assembly
Might need to focus on fds
what policy?
huh?
what scheduler policy you use?
round robin
might have to remake that too
implemented per cpu run-queue
Which policy would you recommend
GREATTT
always love when the PID is -2321312312312
CFS
completely fair scheduler 🤓
well personally i use the MLFQ
just that CFS is way better
hmm
I like how in the latest rewrite the arch.c file has become the trash file where i throw everything which doesnt have a place in.
lol
Just enabled logging each page that maps
its taking so long to even map the initial memory
@mental otter How long do you think this will take
Oh it’s gonna take fucking ages
I did this too for a log dump
I had to lower the memory to 96MB
To make it bearable at all
ohh shit
i just realised i have 1 gb memory
💀
I ended up lowering it to 25 mb
also you could maybe speed it up by disabling flanterm and just spitting out to E9
well its pretty fast as it is

I'm pretty sure I tested AuroraOS a while back and it couldnt run on anything less than 20
mb
IIRC the lower I went it had a random chance of crashing with limine OOMing
Maybe my newer version can handle some things a bit better
Fixed the first page fault it was me passing phys addr instead of virt addr into my map_page func
now i get another one yeee
What should I do guys?
- Keep the name AuroraOS.
- Change to snowix
There's so many people confusing AuroraOS with arch linux and the linux dist AuroraOS
I we're also able to highjack the codeberg org name snowix: https://codeberg.org/snowix
@ionic palm what do you think
If it's confusing people, ig change?
1 vote for change.
Anyways ima try to find a good name for Axeial.
Thanks
I want something legacy-like
my OS is unix-like
I have never heard of that Linux distribution
Keep it the same
tbh the reason i want to change it is cuz i think aurora-org looks ugly
This is much nicerrr.
maybe yea
it's just a snowflake in ascii art though
Blue theme doesnt work well.
good new name. i knew i'd heard auroraos somewhere else, but figured it was one of those names which was inevitably going to be reused a lot.
yea
https://codeberg.org/snowix/snowix Still some stuff broken but this is the rough overlay
i'm sure someone has 😂
sweet ascii snowflake
wait, yahoo mail is still working? i migrated and lost my login details years ago because i thought it was shutting down
good building instructions. i normally don't bother trying oss unless they have a disk image, but this had me thinking about it. but i don't really want to try building on cygwin when i'm half asleep ☺️
why your repo has 0 stars?, lemme give one
Thanks :D
It's brand new so it's appreciated.
Nice
Ehmm so do I open a new thread for it?
yk what ima maintain AuroraOS until I get bash running on snowix
Then ima quit this thread and close it
oh? snowix is a whole restart, not a rename?
Rename + Rewrite.
Not a whole restart
I'll prob restructure a bit but not remake the whole thing.
ah yeah, rewrites can be good
I'm thinking of creating my own programming language called snow, and then rewriting the os in that
just a crazy idea on my mind
that'll up the workload. you won't be bored!
it will.
Well, theoretically it wont be thaat hard if it just is a transpiler and not compiler.
yeah, you won't need to optimize
Then the question is if it should transpile to C or LLVM?
exactly.
though with modern cpus essentially being optimizing machine-code transpilers themselves... idk 🙂
lol
honestly C might be cooler imo?
would be good for osdev too
yea i can still use uacpi, flanterm etc
ya, c optimization is nuts
well thats the game plan then
Ima leave this thread as AuroraOS
but I'll prob be busy making the language.
have fun!
@quaint cape you got this
thanks it will take a while
but its gonna be worth it
i think i got a basic version working
looks like *lexer for some programming lang?
*lexer
*lexer
its for snow
This is the syntax im aiming for:
import builtin.stdio
func main(i32: argc, string[]: argv) -> i32 { // 1 arg = name
stdio.printf("Hello, %s", argv[1]);
return 0;
}
Therefore the main function in snowix would be:
import arch.arch as arch
import lib.print as io
import core.init as init
import task.exec as exec
import task.proc as proc
import task.sched as sched
func main() -> ! {
init.run_all_routines();
proc.proc_t * init_p = proc.create();
exec.exec(init_p, "/init/init.elf");
sched.start();
io.kprint(ERROR, "Ohh no something terrible happened :skull:, looping forever.");
for (;;) {
arch.hcf!() ;
}
}
This is just me purely dreaming on how a perfect lang would be
@mental otter Does this look good?
looks very C
with the semi-colons and braces
its a mix between C, rust and Python lol
I personally hate rust and python syntax and the -> stuff but it’s not too bad 
Python syntax is fine, indented but rust is pure BS
you should make a void retirn implicit tbh
I find some stuff in rust pleasing.
I love the -> but python also has that
Some stuff in rust is garbage though
Iirc it would transpile to C
So apparently I can specify the domain of my values now in terms of the types.
It's not bad per se but your usage of : is kinda weird
in rust -> exists because it borrows it of ML family languages, function types are denoted as a -> b
e.g. in OCaml:
let rec factorial : int -> int = function
| 0 -> 1
| n -> n * factorial (n - 1)
Although usually you'd write it as
let rec factorial (n : int) : int = match n with
| 0 -> 1
| n -> n * factorial (n - 1)
Not sure what motivated Graydon to use ->, even in ML languages you'd not see many people write functions that way (some times in special cases), however rust does allow named arguments (and it doesn't curry as well) with this syntax so it's a little weird. IMO it would have been fine if it did the Zig thing.
please don't follow C conventions, it's better to have a primitive infinite loop {} construct
also use void instead of !, try to minimize symbol soup
What’s wrong with while(1) {}
that works too
idk this for (;;) {} just bugs me >:M
Honestly anything that’s not C like pisses me off
C++ gets a pass because it’s still mostly just C
fair enough
I guess you won't like my language at all then
lel
this. when i saw ! { i wondered why and how we were trying to not a code block. 😉 (i must have forgotten lisp, where a code block always has a return value.) otherwise, i think i could learn to read it as well as i ever do
for(;;) bugged me when i was new to it, but that was long ago. i'm fine with it now, though i prefer breaking out of always-infinite loops. what i don't like is when languages have all possible loop options because it's a lot of mental clutter and they're never enough, lol.
another option is unit if you're a pedantic type theory person like me
wouldn't want to be doing ex falso quodlibet in our type systems
what kind of type is unit?
uhhh, you know category theory? the basic is that unit is a type with only one inhabitant, the empty tuple
oh i see
i'd call that 'empty', of which 'void' is pretty-much a synonym
except the type itself isn't really empty, is it? ponders
the more theory bs is that:
- in category theory it's called a terminal object, every object has a unique outgoing morphism to
1(e.gf : X -> 1) - in type theory it's a type with a single inhabitant, a
()or any arbitrary literal that the implementor decides - in formal logic it corresponds directly to truth (⊤)
no it isn't
in fact there is such a type as well!
we call it bottom, void, 0 or false
same thing as this just reverse it
interesting
the more theory bs is that:
- in category theory it's called a initial object, there's a unique outgoing object from
0to every other object (e.gf : 0 -> X) - in type theory it's a type with NO inhabitant (
Bottomin haskell IIRC) - in formal logic it corresponds directly to falsehood (⊥)
some people like to call it Void or Empty because it's like a empty set
even tho it isn't
oof. my brain's imploding, but i'll remember that there are types which aren't empty although containing only 1 empty object, and i can understand there are reasons for that even though i can't (at the moment) understand what the reasons are.
empty tuple is just a pragmatic choice for familiarity AFAIK
you can have a nonsense literal as well
fun
I’m too used to C and void just refers to nothing and void* is a pointer to an unknown type
i'm grounded in bits and bytes. (c fits right into that, though i started with basic and asm.) theory is like another planet which looks intriguing but getting there seems like a big journey. 😉
you would find this really odd as an advice, but what helped me was turning off my brain
in rocq:
Inductive unit : Type := tt.
hehe
You can do the same in haskell:
data Unit = Tt
and the same thing in any other FP
and uhh in typed racket as well:
(define-type Unit 'tt)
i think
I'm not too deep into analytical philosophy but as far as I am aware ⊥/0/Void symbolizes nothingness or chaos
so uhh C does that perfectly fine IME 
when my brain turns off, no new understanding is going to happen. 😄 what works is accepting that my previous understanding is only one way to look at it.
Fair, hehe, I say this is because this sort of theory is more symbolic than other things, like flip these symbols, move this here and there, that's why I found turning off the brain useful, you feel like a child playing with those shapes and trying to fit circles in place of triangles
yeah 😄
anyways we've gone pretty far, I guess I shouldn't scare Wick X)
hehe yeah
what has been happening
I've just been hanging out with friends lol
just theory discussion 🙂
And it resulted in that u should change?
i'm a little confused, (seriously fatigued today,) but i think it resulted in me describing how i change
Okay, damn I'm getting a lot of projects to maintain.
AuroraOS, AuroraDB, Snowix, Snow, Snowerr, RoofNut...
I'ma drop everything exept AuroraOS, Snowix, Snow and Snowerr.
And I'll give some more updates to AuroraOS
too weak
be me and have a thousand tiny projects
well uhhhh currently focused on maelstrom: diagram
greyed out means done, yes I have only completed one 
I don't compile it to anything yet tho
Well tbh AuroraOS is 100 hundred small project in itself, also I have more that I didnt include cuz they are tooo small.
Anyways this is how far I've come:
import random as random
import lib.print as io
fn main() -> i32 {
i32 random_num = random.random();
if (random_num != "21") {
io.printf("Yeaaaa");
} else {
return -1;
}
return 0;
}
This works
Ima clean up the codebase and commit later today or tmrw.
I have to add a better semantic analyzer and error system though.
And make it cleaner and less libc dependent.
nice
Ima rewrite the messy backend tmrw and also work a bit on maybe adding classes and doing some general bug fixes and improvement, maybe adding some runtime support too
what is your object system like?
this kind of looks like rust prehistory, in that rust, you also declared values this way:
let i32 x = 3;
lol
umm not exactly prehistory, that's a different repo
i am inspired by rust yes.
don't understand the “lol” factor here. lol X)
its funny that it looks like rust yes.
quite very much
its a mix between C, C++, Rust and Python.
That just transpiles into C.
so it's a glorified preprocessor? X)
ofc what did you think
Still it's nice, what are your goals outside of improved-syntax
in your opinion
Better OOB.
for Aurora as well
Aurora will stay the same, few updates.
that's.... every C-like hobby lang ever?
still fine though
gl
you aren't working on it or are you focusing on snowix?
I will rewrite Aurora source code in snow and call it snowix
:D
I will be focusing on snowix
Once I get a bit further with snowix I'll open a new thread.
ofc.
What should I do to make it different.
Try to get better runtime support?
no, really I was just saying, don't mind me
was looking forward to something different maybe
what could i do to make it different.
not sure how that'd help, but if you ever want to, check out https://github.com/jart/cosmopolitan
that depends on what you want to do to make it different, what interestests you etc etc
I'm not trying to sound discouraging btw, sorry if I sounded like that
im asking what you would like lol
it didnt
all of what I'd like to see will make your language finish in 2074
but in general what I'd like to see is a different memory management approach, although that's a pretty hard task, something I'm kind of struggling with my self
well, that's yea....
memory management would be quite hard to change.
since it's only a transpiler.
another thing are some niche new academic topics, like effect handlers, or stuff like that. but that'd get too out of topic nvm
you can do it but you'd have your own library for memory allocations
Yea.
I need to create my builtin library.
and whatever static analysis method (RAII, regions, lifetimes, substructural, borrows in the compiler)
this way you perform analysis on the source, and compile it to C according to the analysis (allocate value here, move here, free here) etc
https://codeberg.org/snowix/snow/src/branch/main first commit lol
This is how far it has came.
import builtin.math as math
extern C {
#include <stdio.h>
}
fn main() {
i32 result = math.add(1, 20);
printf("%d", result);
}
sometimes it hangs just randomly lolll
parser.
thats just on my hand though.
some more bugfixing needed.
Fixed extern statements being buggy.
Ima also have to fix the parser infinite loop soon.
Anyways, might take up AuroraOS development for now.
I'll meanwhile work on snow and fix bugs and develop the language. After a month or two I'll rewrite AuroraOS in snow.
I need some time on this language, dont want to rush it and then be needing to change everything each 10 minutes.
I might try to make some sort of borrowing system.
So far this even I:
- fixed elf loading issues. (auroraos)
- fixed some vfs issues. (auroraos)
- fixed types being broken (snow)
fixed timer issues
Adding more stuff to snow now ig.
Thinking about adding some sort of config file in my initrd module to allow me to have better config.
@mental otter Do yk what format I should use? I thought about TOML, it might be good.
Why not a kernel cmdline?
Like how Linux and other things do it to config the kernel
Could do, my initial thought process was to have the init config state if you're supposed to boot into the init proc or kernel cmdline.
And also regulate debug prints etc..
The cmdline can be parsed right away before mounting an initrd
True.
Before paging and crap too
You could have both? And have your init program read the config file and then tell the kernel certain things
I could use kernel cmdline and then store it in the config file, and then having some presets in the config file.
I mean that would duplicate things no?
A cmdline parser is really simple too
Depending on what your confinging
If it can wait to initramfs mount
It can wait for the init server to tell the kernel and parse the full file
A TOML or other parser would be heavy in your kernel
Look at how my kernel handles it
Kind of yea.
There's a prebuilt library for it :D
toml-c
Still like stack size limits or something
And now comes the hardest part, which file should the config parser be in 😭
FInally fixed all mlibc build error.
So now you dont have to do 3 hours of manual setup when trying to build mlibc
Why do you restore non callee-saved registers in your scheduler?
If I understand correctly, RAX, RCX, RDX, R8, R9, R10, and R11 shouldn't be saved by the scheduler
looks like old code.
Check out newest commit.
@prime river
Ah I see
Actually I might have been mistaken
I'm implementing my own scheduler, that's why I was looking at yours. I think you do it right
Well yea.
And I would have to say that after the rewrite my scheduler is actually semi decent.
it depends. If you're calling your context switch code like a function you can rely on the ABI to save some registers for you, in this case they're doing it inline so everything must be saved.
I saw someone use [[gnu::no_callee_saved_registers]] for their context switch function the other day too, thats a neat trick if you dont need access to them (the attribute is target specific, maybe dont do this).
Ah I see. Yes I'm calling to it from C. That means my initial presumption of leaving out those registers from the stack frame in my case is correct?
yes
Thanks
np 🙂
yea
I'ma have to work a bit more on my scheduler tbh
It still crashes.
Once jumping into a userspace program.
imm so stupid
im a fcking idiot
i marked something as static instead of extern in a header
thats why the PF happens 😭
Im just that idiotic
ohh and now I get another PF-
fun :D
mine is too

