#Yauc (Yet Another Unix Clone)
1 messages Β· Page 1 of 1 (latest)
i686
no x64? Smh π jokes aside, neato!
theres literally nothing about this kernel to be interested in i just wanna keep a progress tracker π im not planning on adding anything special
No it's fine, it's just that x86-64 sometimes removes headaches (it also introduces some but we don't talk about that)
i worked on https://discord.com/channels/440442961147199490/1330994677226406010 and for a while before i started Sun32 i worked on Sun64 and it was HELL
then again it was my first kernel
but i dont wanna touch long mode for a long while
Oh you're the same guy
yeah π
but i had NO CLUE what i was doing there i was fucking around and contributors were joining and taking it seriously and i didn't have the time to contribute properly so i thought it'd be best in the long run to leave and let the people that actually know what they're doing do the serious projects
It's fine bentobox is like my 47382847493th kernel
haha okay fair
https://github.com/GBX9570/yauc github π
Correction: it's my 10th kernel (counting the rewrite)
jesus christ okay you probably have a little bit more experience than me π
Tbf most of them were short lived
if we count rewrites im on like my eighth kernel but the first kernel hardly got past a GDT till i left
My first kernel didn't even have GDT 
no GDT Init... OK? π₯
Perfect
what is the liklihood that i can get an IDT done before 2am (its 12:28am)
wait i need paging
ignore me
What? Do IDT first
have i been doing it in the wrong order this WHOLE TIME
bootiful :3
uh, pretty likely
fml
I recommend GDT -> IDT -> page frame allocator (PMM) -> paging (VMM)
that would explain my countless issues
wut, isn't that a good thing?
wait no i thought you responded to something else sorry π
okay thank you
this is actually extremely useful thank you π
Np
fighting the urge to copy my last kernels IDT even though i know its gonna come out the exact same because i follow the OSDev guide π
wah wah... π
im just reporting progress theres no need to mock π
ono I wasn't trying to mock lol
sorri
oh okay sorry i misunderstood you π
this is a bit weird tho
void exception_handler(uint8_t vector)
``` this expects a vector to be passed to it, yet I don't see either isr macros move anything into edi
https://wiki.osdev.org/Interrupts_Tutorial
i just followed this, thats what it said to do and it worked last time π
wait
where did i get that from
wtf
brb
I think you need to do something like
mov edi, %1
``` in your macros (I think that's how you do it?)
ohh its from my switch statement
if you can't tell ive repurposed some old code π
all good lol
yeah okay it was my old code fucking with it π
uhhh i hope i do that my old assembly code doesn't make sense to me
%macro isr_err_stub 1
isr_stub_%+%1:
cli
pusha
call exception_handler
popa
sti
iret
%endmacro
; if writing for 64-bit, use iretq instead
%macro isr_no_err_stub 1
isr_stub_%+%1:
cli
pusha
call exception_handler
popa
sti
iret
%endmacro
nah, just add that line before the call exception_handler
ye
i gotta relearn assembly its been a while
mov eax, rip 
Also change your GDT message to "GDT init... ok"
#1404603635928666275 message
they did 
im pretty happy with the progress ive made today considering i started writing this like 6 hours ago
amongst doing other things
yeah im gonna be doing A LOT tomorrow
IDT init.. ok
Oh that's already ok
the IDT actually works i just gotta implement errors π
Exceptions
They're called exceptions
this code is making me cry a tiny bit
go to sleep XD
Can't hate too much tho because my exception handler is exactly the same lmao
Lmfao "debig"
its VERY temporary don't worry π
I check if cs is 0x08 (kernel gdt init ok) and if it is I panic
and if it isn't the heat death of the universe occurs
bit dramatic but fair enough
Yeah just a tiny bit
also you reminded me to fix my terrible code that page faults on a sunday
so thanks
your welcome π
ill get it done asap
got a better exception handler π
do a regdump and a backtrace too
will do
how do i do a regdump and backtrace π i cant find any resources on them
about regdump just put regs into a interrupt frame in isr handler and then read that from c
and print them like you get it
im going to read up on interrupts more and assembly because i have no clue how to do this π
this shit does not make sense to me π
do i NEED to do this or can i leave it for now
eeeh, you don't need it, but it can be kind of a pain to debug without it
obviouslly ill need it eventually but for now i can just use gdb and shit π
and -d int 
yeah okay ill take the harder route i guess π
i forgot about this tysm for reminding me π
add -M smm=off to that
i feel like removing the logo shouldn't change the exception π
wtf
wot the heck 
something tells me my idt or isr is fucked so ill go rewrite that
probably for the best, i used old code written when i barely understood it
no updates because my arch install broke and i havent been arsed to reinstall yet so ive been using my mac π
should hopefully have an update tonight
at some point
installing stuff for gcc π
130 hours
apple is never right it took 20 minutes π
Thats what happens when you use M*cOS
my PC is on its last legs it literally can't boot unless i press reset 4 times and/or hit it
not even joking about the last part π
So when's yauc getting unixed intot the unix unixes of Ken Thompson
as soon as its feature complete enough to start implementing unix things π
happy new years
??
It is feature complete enough
Also take a look at Free95 to see how NOT to make an OS 
it just struck 00:00
free95 
im in the UK so im 2 hours behind you π
i literally only just got an IDT π
How does it feel to be living in real life 1984
they are on their way to get me for thought crime
in all seriousness though the osa hasn't really affected me that much (yet) π
and when/if it does ill just get a VPN
yeah yeah
OK now make Yauc a free95 fork and sell all your online accounts to Kap to become free95 advertising bots 
id rather actually live in 1984
compiling grub and ALL of its dependencies 
ahssdhja theres an emoji from another server that i wanna use but i dont have nitro
what the FUCK
mods give us this π
uhh maybe eventually but i kinda wanna keep this project solo for now, one of the reasons i stopped contributing to my last kernel is cause i wanted to make decisions and learn how to do everything myself cause i kinda ran out of things to do as other contribs were doing EVERYTHING
and i stopped learning anything
I mean
BUT im sure they'd be happy to take to
you**
i say contributors it was one person
and they would want help
The point of open source is that you can contribute to other projects
But you do you bro
meh, I'm kind of the same with my project tbh π€£
eventually ill open it up but for now i gotta relearn the basics π
Love procrastinating for an entire year because you forgot 1 line in cmake
shh, don't talk about that 
the crosscompiler page on the osdev site needs updating why does it still reference OS X 10.4/5 and GCC 4.x.x
im switching to debian π
since macOS is abysmal to compile gcc and shit for i got nothing done
could somebody try compiling my kernel cause im getting errors that dont make sense
nevermind i found it π
i didnt read it properly
sure
IDT definitely works since disabling the PIC results in device not available YIPPEE
I FIXED IT
i didn't enable PIC properly π π
Ayy! π
is it identity map or what
Wait you have Time Expectations ?
I thought curl was everything
yeah it just maps all the memory it can access (which is anything under ~4gb cause x86), i am gonna rewrite it to be more dynamic eventually since identity mapping won't work forever
or won't be practical to use forever more accurately
or at the very least thats what i think it does
i copied it from my old kernel cause i planned on rewriting it after ive made my PMM i dont remember exactly how it works ππ
i should probably read the code
qemu serial expects CRLF
ahh okay thank you
so translate LF to CRLF in your serial driver
Why Serial init... FAIL?
this laptop doesn't have serial at all
most things don't
i dont think
not laptops generally at the very least
either way its working as intended π
How do u detect if it exists?
i suppose check if a loopback test works
uacpi shilling time
i just do a check to see if serial works its more or less the same code as on the OSdev site
i dont even have a PMM yet i dont even think i can implement uacpi π
Ah
Ah, the magic number technique 
Doing it with uacpi is so much cleaner
Once I finish reworking my scheduler Ill rework devices and uacpi will be a central part of astral's device system
i literally cannot π


mitosis
Wait did it post two
regedit dump? 
i might've called it the wrong thing π
@lyric cairn do you have printf
indeed i do
switched to clang π₯
clang ftw π₯
align your edx damn
it was aligned i dont know why its gone out of alignment
anyway ive completely changed my thing for it so now the alignments fucked
also remove that fuckass decimal (...) thing
what the fuck
what are these results
this is just after the stack is set up and shit so nothing should have messed with EAX or EBX
yauc tuah, spit on that thang
-# I'll see myself out now, sorry
fuck this im using limine
and hence the rewrite begins
does anyone know how to set colours in flanterm?
in text
never mind i think ive worked out my issue
Ansi
my issue was that it wasn't working after putting in more than 6 characters so i assumed that I didn't do it right just to realise that sizeof() only takes 8 bytes
2 bytes obviously being colour
another one succumbs to flanterm :(
its nice to use π
im not the type of person to care about whether everything in my project is mine as long as it works and is mine enough that i can call it my own project
GDT reimplemented
ig
I personally don't like flanterm that much
Due to stuff like this
void flanterm_get_dimensions(struct flanterm_context *ctx, size_t *cols, size_t *rows);
flanterm is kewl
Mint has apparently never heard of a return value /j
What's wrong with this
A return value is more complicated for language interop
I wanna replace flanterm in my OS at some point simply because I can :3
struct flanterm_fb_char {
uint32_t c;
uint32_t fg;
uint32_t bg;
};
uint32_t c
int32_t c
π
pid_t c
ctrl_t c
Use free95 putchar instead
OK I should stop mentioning that
at least the idt works π
okay so its been a while
basically i used to just copy shit off guides and pretend it was my code
brilliant development work i know
but ive actually taken some time to learn C myself and start doing things properly
ive just made my own basic TTY driver myself and i am SO proud of myself
expect much more to come because this has given me a million times more motivation than copying off guides ever did and ive only written one tiny thing
got a function to move the cursor around π