#bentobox

1 messages ยท Page 4 of 1

icy wyvern
#

i prefer x1b ngl

faint knot
#

they are the same thing

icy wyvern
#

i prefer the hex repr tho

#

rather than octal

craggy nacelle
#

yea i'll do that

#

cause that works

craggy nacelle
#

its fun seeing all the abi breakages ive had in the past 7 months

#

(a LOT)

#

just a few linker errors

frail fog
#

a few linker error

#

47 kb log

craggy nacelle
#

i am astonished

#

this is the first run and it didn't fully explode, incredible

craggy nacelle
#

this is more like what i was expecting lol

craggy nacelle
#

oh my god it can't just be this easy

#

but holy shit i can use the serial tty just fine

#

it actually works

craggy nacelle
#

i can't run more than one command in bash before it will crash

#

not sure if this is aarch64 specific or what (probably is tho) but its calling sigaction with some funky arguments

#

and since i dont have a safe user copy fail i just panic

#
[    2.992875] EL1-EL1 fault: Data Abort (current EL) on CPU 0
[    2.993222] // System consumed all the paper for paging!
[    2.993492] x0:  0x0000000000000001 x1:  0x0000555555b80000 x2:  0x0000555555bbeec0 x3:  0x000000000003ff90
[    2.993924] x4:  0x0000000000000000 x5:  0x0000555555b3ef00 x6:  0x0000000000000000 x7:  0x0000000000518000
[    2.994380] x8:  0x000000000000001a x9:  0x0000000000000000 x10: 0x0000000000000000 x11: 0x0000000000000000
[    2.994809] x12: 0x000000000000002c x13: 0x0000000000000000 x14: 0x0000000000000000 x15: 0x0000000000000000
[    2.995247] x16: 0x000000000050e598 x17: 0x000000004126df48 x18: 0x000000000000002d x19: 0x0000555555bbeec0
[    2.995597] x20: 0x00000000413220a0 x21: 0x00000000ffffffff x22: 0x00000000ffffffff x23: 0x0000555555bbef20
[    2.995895] x24: 0x0000000000000000 x25: 0x0000555555bbeea0 x26: 0x0000555555bbef10 x27: 0x0000000000000001
[    2.996191] x28: 0x000000000051ec30 x29: 0x0000555555653ac0 x30: 0x000000000042eb4c PC:  0xffffffff8000d95c
[    2.996484] ESR_ELx:  0x0000000096000046
[    2.996643] FAR_ELx:  0x000000000003ff91
[    2.996796] SPSR_ELx: 0x0000000020000345
[    2.996950] Call Trace:
[    2.997085]  #0 0x000000000042eb4c in (userspace)
[    2.997269]  #1 0x000000000043207c in (userspace)
[    2.997434]  #2 0x0000000000432a2c in (userspace)
[    2.997595]  #3 0x00000000004186d4 in (userspace)
[    2.997754]  #4 0x00000000004166c4 in (userspace)
[    2.997911]  #5 0x0000000041217214 in (userspace)
[    2.998064]  #6 0x00000000004171d8 in (userspace)
craggy nacelle
#

i have no fucking clue what is going on

#

seems like a race where the context is saved incorrectly but i can't even fucking find who is calling memset

#

i mean memcpy

clear warren
#

or memset too

craggy nacelle
#

is it

#

either way

clear warren
craggy nacelle
#

i have not been able to get a good backtrace

#

not even one frame

#

thanks arm

clear warren
#

XD

craggy nacelle
#

i should be sleeping for an hour

#

but fuck this

craggy nacelle
#

welp its the next day and i fixed it

#

i... forgot to set current_irq in fault handlers so interrupts were being enabled by some stuff and kaboom

faint knot
#

glad u fixed it

#

this is one of the most impressive projects tbh

faint knot
craggy nacelle
#

-smp 8 also seems to work (gicv2 cpu limit)

#

(ignore the mangled output i don't have working virtio drivers on aarch64 yet, i got rid of the mmio one since it sucked and i haven't gotten my pci one working there yet)

faint knot
#

can i ask a question?

#

im curious but why is ur os named bentobox?

craggy nacelle
#

just what i came up with

craggy nacelle
#

segfaults work

craggy nacelle
#

user copy is safe on arm now

#

(i had to borrow arm's own assembly memcpy implementation to be able to do this properly)

frail fog
craggy nacelle
#

virtio works

#

turns out i just forgot to add virtio-keyboard-pci to qemu ๐Ÿ’€

craggy nacelle
#

just a few changes

faint knot
#

like 3.5k lines added 500 lines removed

#

for a single commit

#

and i didnt even know what i added

#

so i just said "Big refactor (see diff)"

#

in the commit

#

๐Ÿ˜ญ๐Ÿ˜ญ

craggy nacelle
#

41 files changed, 524 insertions(+), 681 deletions(-)

faint knot
#

one time i switched to busybox userspace and deleted my own userspace

#

7k lines removed

#

๐Ÿ˜ญ

craggy nacelle
#

not bad

craggy nacelle
#

sdfjghskdlfjghskldfg

#

virtio tablet scaling is COMPLETELY fucked in xorg

#

not just in the y axis but also the x axis somehow??

craggy nacelle
#

it was pointer accel ๐Ÿ˜ญ

craggy nacelle
#

fvwm3 time

#

hmm the wallpaper doesn't work for some reason and opening st will just have it hang and after a bit it will crash

faint knot
craggy nacelle
#

yes

#
[    9.156978] /usr/libexec/fvwm3/1.1.4/FvwmIconMan: Segmentation fault

hmm

#

might be missing something

craggy nacelle
#

and its only when i launch st where everything breaks

#

its specifically running bash that's fucking everything because i can open vim in st just fine

faint knot
#

bash is pretty difficult to get working perfectly

#

im still working on fixing my syscalls

#

so it works

#

๐Ÿ˜ญ

craggy nacelle
#

classic

#

my signals were implemented wrong for a looong time

faint knot
#

yeah no it dosent print unless i specifically press a key after i pressed enter

#

and pipe2 isnt implemented

#

๐Ÿ˜ญ

#

so it dosent really work

craggy nacelle
#

mmm

faint knot
#

gives ENOSYS

#

yeah no i have like over 100 syscalls but thats still not enough

#

for to run something properly

craggy nacelle
#

i have ~70

faint knot
#

wtf

#

๐Ÿ˜ญ

craggy nacelle
#

yea cause its my own syscalls

#

not linux's 345789 variants

#

for 1 syscall

faint knot
#

ahh its not posix, right?

craggy nacelle
#

anyway yeah its spamming shit with signals wtf

craggy nacelle
#

but not linux

faint knot
craggy nacelle
#

yea it shouldnt be able to do that

craggy nacelle
#

the mouse cursor isn't feeling too good

#

i have absolutely no clue what would be causing this but its hilarious

faint knot
craggy nacelle
#

this honestly feels about as stable as fvwm3 was on x86-64 when i first ported it

#

hmmm

#

i mean the arch-specific code is around from that time so idk

#

except that i've changed a bunch of it

#

i'm confused

#

at first it seems to be a heap address that's just big but that's unusally big no?

#

oh nvm it isn't actually

#

its only 21mb so seems like a not properly mapped page?

faint knot
#

which one is the instruction pointer

craggy nacelle
#

PC

faint knot
faint knot
#

no that looks standard

#

are u using a static binary?

craggy nacelle
#

no its all dynamically linked

faint knot
#

thats sus

craggy nacelle
#

rtld links it there iirc

#

not really

faint knot
#

it should be at around 0x100000000, no?

craggy nacelle
#

not necessarily

#

if you look at rtld code its at around 0x41000000 iirc

#

and the fault is not at PC its at FAR_ELx

#

its a page fault reading from that address

#

maybe my cow code is fucked

craggy nacelle
#

not sure why the handling is not working... but i should probably fix the reason why its doing this

#

the issue now is that its just good old memory corruption

faint knot
#

good news: i got bash to work ok!!

#

yay

craggy nacelle
#

so i think i have fixed one of the two issues

#

one was with signals and it was a mismatch between my arm and x86 code

#

and this one is still it trying to access something that's not mapped...

#

woah this is trippy

#

wtf happened to the background

clear warren
craggy nacelle
#

no shit

craggy nacelle
#

i think i have to rebuild my entire toolchain yay

#

oh and the userspace too

#

yeah i think that'll be the easiest solution

#

because i have zero fucking scrap registers to do what i want to do in arm

#

i cant just msr TPIDR_EL1, sp

#

but if i have x18 then i can do what i wanna do

#

(x18 is reserved in some abis from what i could find)

craggy nacelle
faint knot
craggy nacelle
#

yay i got it working without reserving a register

craggy nacelle
#

so yeah it was it using x16 which i was also using ๐Ÿ’€

#

i call that fully working

craggy nacelle
#

i still need to get virtio interrupts working but the system works and im happy

craggy nacelle
#

of course it couldn't be the last issue of course... not sure why this happens from time to time

#

but other than that seems pretty stable

craggy nacelle
#

bruh i just realized gcc 16 released like a month after this ๐Ÿ’€

craggy nacelle
#

the temptation to write an esoteric kernel...

#

i want to experiment with some real mode multitasking

#

but tomorrow

#

its literally 4am

mossy tiger
craggy nacelle
#

that'd be ultra cursed

#

i'd have to use unreal mode to be able to set up the apic tho

#

which is even more cursed

craggy nacelle
#

got back to work on the sdl2 port

#

the issue is that my scheduler has quite a bit of latency if you sleep

sullen crag
#

Good job tho

craggy nacelle
#

if i reduce the timeslice from 5ms to 1ms it does 58fps but i think i can fix it without doing that hack

#

but yeah i had my sdl2 port stashed for a while cause i couldn't get the emulator running

#

turns it was just really picky about wanting audio support

#

and i had to dig through the source code to remove the bail

#

but now it works

craggy nacelle
#

i think my terminal is fucked

#

ok reset fixed it

#

not bad

#

still a little bit of latency

#

i don't think i can do much about it, i reckon on real hardware it'll be fully smooth

daring tendon
#

are you doing hda?

craggy nacelle
#

not yet

#

but it would be cool to

daring tendon
#

which one are you doing?

craggy nacelle
#

no clue yet

#

i have nothing audio related implemented

daring tendon
#

What was that thing measuring then lmao

craggy nacelle
#

oh lmfao

#

sdl's dummy audio driver sample rate ig

daring tendon
#

ah

craggy nacelle
#

i didn't even notice it was reporting audio stuff

#

lol

daring tendon
#

lol

craggy nacelle
#

i just realized how outdated this post's first message is

#

bentobox is a 64-bit SMP-enabled operating system targeting x86_64.
It can do cool stuff like running bash, busybox, doomgeneric and figlet

#

dang i can't make it embed the github link after removing the old screenshot

#

oh well

#

slightly better but i don't have an embed anymore :(

craggy nacelle
#

tried booting it on my main rig and ps2 emulation does work if i boot with csm

#

but for some reason the mouse is broken and if i move it then the keyboard stops working

craggy nacelle
#

quake soon

craggy nacelle
#

it works

craggy nacelle
#

next time i work on this maybe i will do msix

#

and maybe nvme or virtioblk

#

cause polling virtio drivers aint too good ๐Ÿ’ค

craggy nacelle
#

so uh i tried running it on my laptop and my other rig and its freezing on both machines initializing the idt ๐Ÿ’€

#

not sure how i'll fix this

#

apparently acquiring the vma's lock in vma->expand was causing a deadlock???

#

what the fuck man

#

im so confused

#

because i swear the crash was before mmu_initialize

#

whatever

#

i rearanged some code so i could remove that lock and it boots again

#

oh my i think i know why

#

maybe it was the vma calling itself recursively? idfk man ive been trying to get this to boot for an hour ๐Ÿ’€

craggy nacelle
#

havent worked on this at all in the past few days nooo

#

while i want to work on more virtio drivers i do want to write nvme and xhci drivers as well and they defeat the point of doing that

#

so yeah i may be writing an nvme driver soon or something

#

i literally fixed this in my latest patch

craggy nacelle
#

i fucking love debian

#

im trying to bootstrap aarch64 on my laptop to see if it works instead and every fucking time i run jinx init some random package will fail to download

#

and i have to make it download everything fucking again only for it to give me some other random package that failed to download

#

thanks jinx

#

literally unusable

#

i guess i wont be working on this today either

craggy nacelle
#

its my fucking internet

#

movistar is absolute hot garbage

craggy nacelle
#

maybe today i can actually fucking work on this?

sullen crag
#

Good boy

craggy nacelle
#

nope

sullen crag
#

Yes

craggy nacelle
#

it failed to download libcap-ng0

#

and now the whole jinx bootstrap will fail

#

thank you movistar

sullen crag
#

Lmao

#

Just make it workKEKW

craggy nacelle
#

i dont control this shit ๐Ÿ˜ญ

#

i cant use my mikrotik because i still havent figured out how to get iptv fully working

#

since the mikrotik seems to fix everything

#

(i tried to ssh into my other desktop and cloned my repo there and it bootstraps just fine)

#

and increasing the apt timeout to 3 minutes doesnt fucking fix it

craggy nacelle
#

:(

whole falcon
#

:)

craggy nacelle
#

wip c64 emulator a friend and i have been working on

frail fog
#

when ps5 emulator

daring tendon
#

ps5 emulator
looks inside, libc and gfx api hooks

primal quest
#

ps5 is an x86_64 machine