#Yauc (Yet Another Unix Clone)

1 messages Β· Page 1 of 1 (latest)

hexed ridge
#

i686 or x86-64

lyric cairn
hexed ridge
#

I see

#

I'd suggest porting it to x86-64 eventually

oblique orchid
#

no x64? Smh πŸ˜” jokes aside, neato!

lyric cairn
#

theres literally nothing about this kernel to be interested in i just wanna keep a progress tracker 😭 im not planning on adding anything special

hexed ridge
#

No it's fine, it's just that x86-64 sometimes removes headaches (it also introduces some but we don't talk about that)

lyric cairn
#

then again it was my first kernel

#

but i dont wanna touch long mode for a long while

hexed ridge
#

Oh you're the same guy

lyric cairn
#

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

hexed ridge
#

It's fine bentobox is like my 47382847493th kernel

lyric cairn
#

haha okay fair

hexed ridge
lyric cairn
#

jesus christ okay you probably have a little bit more experience than me πŸ’”

hexed ridge
#

Tbf most of them were short lived

lyric cairn
#

if we count rewrites im on like my eighth kernel but the first kernel hardly got past a GDT till i left

hexed ridge
#

My first kernel didn't even have GDT KEKW

oblique orchid
#

no GDT Init... OK? πŸ₯€

lyric cairn
hexed ridge
#

Perfect

lyric cairn
#

what is the liklihood that i can get an IDT done before 2am (its 12:28am)

#

wait i need paging

#

ignore me

hexed ridge
#

What? Do IDT first

lyric cairn
#

have i been doing it in the wrong order this WHOLE TIME

oblique orchid
lyric cairn
hexed ridge
#

I recommend GDT -> IDT -> page frame allocator (PMM) -> paging (VMM)

lyric cairn
#

that would explain my countless issues

oblique orchid
lyric cairn
hexed ridge
oblique orchid
#

IDT isn't too much harder than the GDT

#

GAH, JUMPSCARE

lyric cairn
hexed ridge
#

Np

lyric cairn
#

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 πŸ’”

lyric cairn
#

IDT worksn't

oblique orchid
#

wah wah... πŸ™

lyric cairn
oblique orchid
#

sorri

lyric cairn
#

oh okay sorry i misunderstood you 😭

oblique orchid
#

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
lyric cairn
#

wait

#

where did i get that from

#

wtf

#

brb

oblique orchid
#

I think you need to do something like

mov edi, %1
``` in your macros (I think that's how you do it?)
lyric cairn
#

ohh its from my switch statement

#

if you can't tell ive repurposed some old code 😭

oblique orchid
#

all good lol

lyric cairn
#

yeah okay it was my old code fucking with it πŸ’”

lyric cairn
#
%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
oblique orchid
#

nah, just add that line before the call exception_handler

lyric cairn
#

okay thank you 😭

#

in both of them?

oblique orchid
#

ye

lyric cairn
#

i gotta relearn assembly its been a while

grand mango
#

Also change your GDT message to "GDT init... ok"

lyric cairn
oblique orchid
grand mango
#

Lmfao

#

I'll check out the repo

#

And leave a star

lyric cairn
#

im pretty happy with the progress ive made today considering i started writing this like 6 hours ago

grand mango
#

very bare bones

#

but cool

lyric cairn
#

amongst doing other things

lyric cairn
grand mango
#

Oh that's already ok

lyric cairn
#

the IDT actually works i just gotta implement errors πŸ™

grand mango
#

They're called exceptions

lyric cairn
#

yeah thats what i meant

#

im tired its 2am and i got 4 hours sleep πŸ’”

grand mango
#

this code is making me cry a tiny bit

oblique orchid
#

go to sleep XD

grand mango
#

Can't hate too much tho because my exception handler is exactly the same lmao

grand mango
lyric cairn
grand mango
#

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

lyric cairn
grand mango
#

also you reminded me to fix my terrible code that page faults on a sunday

#

so thanks

lyric cairn
#

your welcome 😭

grand mango
#

Don't forget paging

lyric cairn
#

ill get it done asap

lyric cairn
#

got a better exception handler πŸ™

hexed ridge
#

do a regdump and a backtrace too

lyric cairn
lyric cairn
#

how do i do a regdump and backtrace πŸ’” i cant find any resources on them

void ferry
#

and print them like you get it

lyric cairn
lyric cairn
#

this shit does not make sense to me πŸ’”

#

do i NEED to do this or can i leave it for now

oblique orchid
lyric cairn
#

obviouslly ill need it eventually but for now i can just use gdb and shit πŸ’”

oblique orchid
#

and -d int true

lyric cairn
lyric cairn
hexed ridge
#

add -M smm=off to that

lyric cairn
#

i feel like removing the logo shouldn't change the exception 😭

hexed ridge
#

wtf

oblique orchid
#

wot the heck flobsh

lyric cairn
#

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

lyric cairn
#

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

lyric cairn
#

installing stuff for gcc πŸ™

grand mango
lyric cairn
grand mango
#

Thats what happens when you use M*cOS

lyric cairn
#

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 😭

grand mango
#

So when's yauc getting unixed intot the unix unixes of Ken Thompson

lyric cairn
#

as soon as its feature complete enough to start implementing unix things 😭

#

happy new years

grand mango
grand mango
#

Also take a look at Free95 to see how NOT to make an OS trl

lyric cairn
grand mango
#

timezones yewh

#

timezones

lyric cairn
lyric cairn
grand mango
lyric cairn
#

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

grand mango
#

yeah yeah

#

OK now make Yauc a free95 fork and sell all your online accounts to Kap to become free95 advertising bots trl

lyric cairn
#

compiling grub and ALL of its dependencies FeelsBadMan

#

ahssdhja theres an emoji from another server that i wanna use but i dont have nitro

grand mango
lyric cairn
grand mango
#

anyways

#

can I contribute to yauc

#

I need green squares

lyric cairn
# grand mango can I contribute to yauc

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

grand mango
#

I mean

lyric cairn
#

BUT im sure they'd be happy to take to

#

you**

#

i say contributors it was one person

#

and they would want help

grand mango
#

The point of open source is that you can contribute to other projects

#

But you do you bro

lyric cairn
#

yeah i know, i guess its going against foss but i am not good to work with

#

at all

oblique orchid
#

meh, I'm kind of the same with my project tbh 🀣

lyric cairn
#

eventually ill open it up but for now i gotta relearn the basics πŸ’”

grand mango
oblique orchid
grand mango
#

My personal access token expired fuck

#

OK bye

lyric cairn
#

the crosscompiler page on the osdev site needs updating why does it still reference OS X 10.4/5 and GCC 4.x.x

lyric cairn
#

im switching to debian 😭

lyric cairn
#

since macOS is abysmal to compile gcc and shit for i got nothing done

lyric cairn
#

could somebody try compiling my kernel cause im getting errors that dont make sense

#

nevermind i found it πŸ’”

#

i didnt read it properly

void ferry
lyric cairn
#

theres some progress

#

well same error except its actually sure now

lyric cairn
#

IDT definitely works since disabling the PIC results in device not available YIPPEE

#

I FIXED IT

#

i didn't enable PIC properly πŸ’” πŸ’”

oblique orchid
#

Ayy! πŸŽ‰

lyric cairn
#

I GOT SERIAL WORKING

#

oh yes also basic paging if forgot to post that

void ferry
#

is it identity map or what

west canyon
#

I thought curl was everything

lyric cairn
# void ferry is it identity map or what

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

lyric cairn
#

what the fuck

hexed ridge
lyric cairn
#

ahh okay thank you

hexed ridge
#

so translate LF to CRLF in your serial driver

lyric cairn
#

WORKS ON REAL HARDWARE

#

that's to be expected to be fair

#

BUT STILL

unborn marsh
#

Why Serial init... FAIL?

lyric cairn
#

most things don't

#

i dont think

#

not laptops generally at the very least

#

either way its working as intended 😭

unborn marsh
#

How do u detect if it exists?

hexed ridge
potent mural
#

uacpi shilling time

hexed ridge
#

i still need to move to uacpi in bentobox

#

will do soonβ„’

lyric cairn
lyric cairn
unborn marsh
lyric cairn
unborn marsh
#

Ah, the magic number technique KEKW

potent mural
#

Doing it with uacpi is so much cleaner

unborn marsh
#

Damn Mathew is the biggest uACPI shill KEKW

#

Based, what can I say

potent mural
lyric cairn
lyric cairn
#

got line and file reporting working in the exception handler πŸ™

potent mural
#

mitosis

unborn marsh
#

Wait did it post two

lyric cairn
#

got a registry dump now too

hexed ridge
#

regedit dump? KEKW

lyric cairn
#

i might've called it the wrong thing πŸ’”

grand mango
#

@lyric cairn do you have printf

lyric cairn
lyric cairn
#

i use this

lyric cairn
#

switched to clang πŸ”₯

oblique orchid
#

clang ftw πŸ”₯

lyric cairn
#

where the fuck has my magic gone

grand mango
lyric cairn
#

anyway ive completely changed my thing for it so now the alignments fucked

grand mango
#

also remove that fuckass decimal (...) thing

lyric cairn
#

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

tawdry flint
#

yauc tuah, spit on that thang

-# I'll see myself out now, sorry

lyric cairn
#

i am so confused

lyric cairn
#

fuck this im using limine

lyric cairn
#

and hence the rewrite begins

lyric cairn
#

does anyone know how to set colours in flanterm?

#

in text

#

never mind i think ive worked out my issue

hexed ridge
#

Ansi

lyric cairn
# hexed ridge 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

lyric cairn
#

got the log functions reimplemented

empty dagger
#

another one succumbs to flanterm :(

lyric cairn
#

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

grand mango
#

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);

void ferry
#

flanterm is kewl

grand mango
#

Mint has apparently never heard of a return value /j

void ferry
#

eh that kinda sucks

#

(doing a ret value for this)

#

i personally like that

unborn marsh
#

A return value is more complicated for language interop

grand mango
#

operandinion

oblique orchid
#

I wanna replace flanterm in my OS at some point simply because I can :3

grand mango
#
struct flanterm_fb_char {
    uint32_t c;
    uint32_t fg;
    uint32_t bg;
};

uint32_t ctrl

void ferry
#

the c standard recommends int c

#

iirc

grand mango
void ferry
#

😭

grand mango
#

pid_t ctrl

void ferry
#

ctrl_t c

grand mango
lyric cairn
#

at least the idt works πŸ’”

lyric cairn
#

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

lyric cairn
#

got a function to move the cursor around πŸ™