dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
mctpyt has quit [Ping timeout: 252 seconds]
mctpyt has joined #osdev
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pwng has joined #osdev
ElectronApps has quit [Read error: Connection reset by peer]
ElectronApps has joined #osdev
theruran has quit [Quit: Connection closed for inactivity]
justyb11 has quit [Quit: Leaving]
sprock has quit [Quit: brb]
sprock has joined #osdev
Izem has joined #osdev
radens has joined #osdev
<radens>
Is anyone here very familiar with the Cheri project/ISA extensions? Is there a good description of the format of the capability table which isn't expressed as an ML dialect I'm not familiar with?
<radens>
Thanks, I was looking at something like that
<radens>
Is there a way to tell a linker to generate a completely flat binary with no relocations?
<Mutabah>
`OUTPUT_FORMAT(binary)`
<kazinsal>
^^
<kazinsal>
not sure why you'd really want to as it'll make finding eg. bss difficult but it's a thing you can do
<kazinsal>
though I guess you could hardcode symbols defined as the start and end of bss and extern them
<Mutabah>
It's not an uncommon thing
<kazinsal>
then just ensure the first thing you do is clear bss
GeDaMo has joined #osdev
pwng has joined #osdev
PapaFrog has quit [Remote host closed the connection]
LostFrog has joined #osdev
gioyik has quit [Quit: WeeChat 3.1]
Izem has quit [Quit: Connection closed]
pwng has quit [Ping timeout: 268 seconds]
bleb has quit [Ping timeout: 240 seconds]
ZipCPU has quit [Ping timeout: 246 seconds]
bleb has joined #osdev
freakazoid333 has quit [Read error: Connection reset by peer]
tacco has joined #osdev
YuutaW has quit [Ping timeout: 255 seconds]
YuutaW has joined #osdev
MarchHare has quit [Ping timeout: 255 seconds]
wgrant has quit [Ping timeout: 252 seconds]
wgrant has joined #osdev
zaquest has quit [Quit: Leaving]
zaquest has joined #osdev
iorem has joined #osdev
dennis95 has joined #osdev
kingoffrance has quit [Ping timeout: 255 seconds]
gog has joined #osdev
dormito has quit [Ping timeout: 246 seconds]
iorem has quit [Quit: Connection closed]
kingoffrance has joined #osdev
radens has quit [Quit: Connection closed for inactivity]
dormito has joined #osdev
divine has quit [Ping timeout: 250 seconds]
sortie has joined #osdev
dormito has quit [Ping timeout: 256 seconds]
divine has joined #osdev
ElectronApps has quit [Remote host closed the connection]
ElectronApps has joined #osdev
vdamewood has joined #osdev
sortie has quit [Ping timeout: 256 seconds]
kingoffrance has quit [Ping timeout: 240 seconds]
dormito has joined #osdev
iorem has joined #osdev
pg12 has quit [Ping timeout: 240 seconds]
henistein has joined #osdev
<henistein>
I am trying to make an assembler in python but I have some questions. Since I have a file.asm I can translate each instruction to hex, so I can make a file with all the instructions translated to hex, but how can I execute that file? How can I create an ELF file?
<j`ey>
you read about the ELF format and create a file with the right structure!
<henistein>
alright, another question, I don't need to have an elf file to execute instructions right?
<vdamewood>
henistein: Well, macOS and Windows can't even run ELF files.
<henistein>
exactly
<vdamewood>
henistein: But, you will need to make the executable file in a format the OS's launcher can handle.
<henistein>
I mean I don't need elf, or mach-o
<j`ey>
but on linux you want ELF
<henistein>
oh ok
<henistein>
so if I wanna execute files on linux I really need to make an elf file?
<vdamewood>
Yes.
<henistein>
ok nice, thank you
<vdamewood>
Linux only ever supported one other format, and that format hasn't been supported since Linux 2.0 was released.
<gog>
binfmt_misc
<gog>
you can do anything (with the appropriate interpreter)
<vdamewood>
Of course, you can just use machine code if you can get it to fit in 512 bytes and it's in real mode.
<vdamewood>
... and you copy it to the boot sector of a floppy.
<gog>
machine code meeme
<GeDaMo>
Or you could write it into memory, set the permissions and execute it directly :P
<j`ey>
GeDaMo: like linux does with ELF files :P
Skyz has joined #osdev
<klange>
wait you _load executables_? I was just randomly flipping bits until a GUI appeared
<gog>
i spilled water on my laptop and for a split second i had a complete operating system
<gog>
it was perfect
<gog>
so we need an infinite number of laptops and an infinite number of water cups
<gog>
and one of them is bound to fritz out in the right pattern of bits to recapture this phenomenon
<Skyz>
Klange, if I were you I would put a big download .iso button on the toaru website
<Skyz>
and make an arm port ;)
tacco has quit []
<Skyz>
I'm liking how wikipedia keeps getting better
<Skyz>
It doesn't list any new executable formats, there's really just EXE ELF and Mach-o
<sortie>
Cost of adding a .iso link: One hour
<sortie>
Cost of adding an ARM port: (Still computing...)
<sortie>
Skyz, I mean, yeah? It's a container. ELF is a flexible format that can store lots of stuff. The E is for extensible. Or executable, actually.
<Skyz>
I'm trying to understand what makes windows stand out
<sortie>
All the toolchains supports ELF and it's proven to be an extensible format that has allowed innovation, so that's why we didn't make a new thing
<sortie>
Windows is very different because it evolved completely separately
<sortie>
There's a bunch of key design choices that were made early in Windows' history that really mattered and stuck around. Like the layout of the filesystem, the newline sequence, executable format, etc.
<Skyz>
There's something about windows that I really like, I'm gonna think about it for the next hour while I swim, ttyl
<Skyz>
There's a lot of urban legends in my town who knows
pyzozord has joined #osdev
<pyzozord>
hello, what does bash's "disown" do really?
<pyzozord>
I mean I know what it does, but how does it do it
zoey has joined #osdev
Skyz43 has joined #osdev
Skyz43 is now known as Skyz2
Skyz has quit [Ping timeout: 246 seconds]
Matt|home has joined #osdev
<geist>
hmm, dunno. never seen it before
<nur>
morning geist
<nur>
if geist is up it must be time for me to sleep
<geist>
hah
<geist>
yah up a teensy it early
<geist>
pyzozord: looks like it simply forgets about a background job
<geist>
doesn't look like it kills it, just removes it from the jobs table, such that you can't resume it
<geist>
also looks like you can set it such that the job continues to run after logout
<geist>
probably changes the owner process is my guess
<geist>
moves it up the heirarchy, or re-pairs it with init
<geist>
i forget the syscalls for that, but there's a general way to do that
<pyzozord>
geist: oh that part of changing the owner and moving up the hierarchy is the interesting bit, I wasn't sure if that was possible
Robbe has joined #osdev
nvmd has joined #osdev
<Skyz2>
I'm learning racket now, apparently it can be used for system programming
<Skyz2>
This is the first language that's clicking for me
<gog>
geist: setsid() i think
<gog>
and then you have to "fork off and die"
<gog>
similar to daemonizing
<gog>
no that's not it
<gog>
setpgid()
<j`ey>
anyone built gcc on rpi?
<j`ey>
(wondering how long it takes)
<jimbzy>
j`ey, They started the build on a first gen model, and as far as I know it's still building as we speak.
<j`ey>
lol
<jimbzy>
Someday...
<gog>
ok after digging into the bash code, it doesn't reparent the job
<gog>
(as far as i can tell)?
Skyz2 has quit [Ping timeout: 246 seconds]
dennis95 has quit [Quit: Leaving]
pyzozord has left #osdev [#osdev]
flx has joined #osdev
martums has joined #osdev
Matt|home has quit [Ping timeout: 255 seconds]
<geist>
j`ey: a) which rpi and b) which gcc?
<j`ey>
rpi4, aarch64-gcc
<geist>
probably about an hour
<geist>
binutils + gcc + gdb. last i remember my toolchain script ran about that long
<j`ey>
ok, ty, about what I was expecting
<Bitweasil>
Hm. Speaking of "Pi" and "build," is there a mature ILP32 toolchain for aarch64 one could use on the Pi?
<geist>
dunno, does the regular toolchain have an ilp32 mode?
<geist>
i'd think the toolchain is the easy part, having a bunch of libs and a loader and whatnot may be more difficult?
<Bitweasil>
Not sure, I haven't really pulled the string on that yet.
<heat>
you can't reparent processes in linux
<heat>
s/linux/unix/
<heat>
you can only do that by having your parent process die
<heat>
you can also use setsid and whatnot to get rid of your controlling terminal
<geist>
yah that's probably what it is, as gog pointed out
<geist>
set pgid or setsid or whatnot
<geist>
seems easy enough to observe
<Bitweasil>
Prosecutor in TV Drama: "And so, you see, ladies and gentleman of the jury, the parent process did not 'die' - the parent process was MURDERED! Why? To get a new parent!"
<gog>
i dug through the code and disown either deletes it from job control or removes it from the list but keeps it open for SIGHUP
<gog>
setpgid() and setsid() are not used there
<heat>
yeah
<heat>
that would stop it from using the current terminal I think
<bslsk05>
'Every Single Scandinavian Crime Drama' by Alasdair Beckett-King (00:00:36)
<gog>
yes
<heat>
unix job control is too complex lol
<Bitweasil>
^^
<Bitweasil>
Linux process corner cases are a popular interview question set for a reason.
<Bitweasil>
It's a good indicator of how far into the insanity you've delved.
<geist>
and whether or not you get a twinkle in your eye when asked
<clever>
Bitweasil: and where would you rank me, if i say that threads are purely a figment of linux's imagination? :D
<Bitweasil>
If you answer all questions perfectly, that's not a twinkle, that's an evil glint.
<heat>
linux threads are easy
<Bitweasil>
clever, "sane." :D
<Bitweasil>
... or you were the person who wrote one of the schedulers, which, at least at Google, is a distinct possibility.
<heat>
process -> process thread group(one of the processes is the thread group leader) -> process group (one of the process thread groups is the leader) -> session
<clever>
Bitweasil: threads are just processes that share ram and have a flag to hide them from the "process" list
<heat>
(one of the process group leaders is the leader)
<Bitweasil>
I enjoy that their interview "rate your skills 1-10" rating has something like, "10: Founded the field or wrote a book on it (there must be a book)".
<heat>
lol
<Bitweasil>
And IIRC the guy who developed Python refused to rate himself above an 8 or 9 on it, under the (very reasonable) logic that he no longer knew all the weird corners, there were other maintainers of some of it.
<Bitweasil>
It's an oddly concrete scale, I quite like it.
<bslsk05>
pastebin.com: Google Ranking Scale - Pastebin.com
<Bitweasil>
10 - wrote the book on the subject area (there actually has to be a book). Recognized industry expert in the field, might have invented it.
<heat>
if I got asked this question I would crumble under the pressure
<heat>
i'd be scared to say I know a lot lol
<heat>
because what if I dont
<dzwdz>
can a mov fit into 2 bytes in x86?
<GeDaMo>
A register to regsiter mov can
<GeDaMo>
89 d8 mov eax,ebx
<dzwdz>
i need to somehow store a byte, somewhere
<dzwdz>
in the smallest amt of bytes
<GeDaMo>
Somewhere? In memory?
<dzwdz>
in some register
<dzwdz>
the best i can come up is 4 bytes - xor eax, eax; xor eax, [value]
<dzwdz>
i shouldn'tve used square brackets, i meant that i'd put a constant value there
<heat>
yeah you can't do that with immediates I think
<GeDaMo>
movzx only work from memory
<heat>
why do you need a mov this small?
<dzwdz>
i want to separate the interrupt handlers from the rest of the kernel, so i can map them wherever i want
<dzwdz>
and i want to keep them as small as possible
<heat>
what do you mean?
<dzwdz>
i think an example will be easier
<froggey>
if it's just a byte: xor eax, eax; mov al, the_byte
<heat>
also I wouldn't care about making the irq stubs small
<dzwdz>
(also i've already realized a better way to do what i wanted to_
<heat>
if you save a byte in 256 handles you saved 256 bytes! congrats! you saved the world
<heat>
handlers*
<froggey>
well, that's 4 bytes, not an improvement on yours
<j`ey>
as long as they fit in a page
<heat>
they don't need to fit in a page
<dzwdz>
but the example: i get interrupt 9, the 9th interrupt handler sets some register to 9, and calls the "main" handler, which changes pages and jumps to the real one
<dzwdz>
the thing is - i want them to fit in a page
<dzwdz>
for the hell of it
<GeDaMo>
You could try asking in ##asm
<dzwdz>
i think that i've already figured it out
<heat>
the largest stub I have is 12 bytes long
<heat>
12 * 256 ~= 3000 bytes
<heat>
it always fits
<dzwdz>
i can just make each interrupt handler a CALL, and then i can do math on the return address to find out which one it was
<heat>
there's literally no way you can be spanning multiple pages
<dzwdz>
heat: don't ruin the fun with your silly maths
<heat>
:(
<dzwdz>
btw, could y'all send links to your OSes? i'm curious what you're working on
<klange>
< j`ey> im not sure what hosted means here? ← I suggest you do some reading on this. C has a well-defined concept of a "hosted" implementation and a "freestanding" implementation. Generally kernels are the latter.
<j`ey>
I just hadn't heard the term 'hosted'
<j`ey>
aw, I thought gcc could build mpfr etc, i thought the --with-mpfr was to the source of mpfr
<klange>
It can, you plop the mpfr source dir into the gcc source dir
<j`ey>
hm
<j`ey>
ok thanks that worked
<j`ey>
I knew I had done it like that before
<klange>
same for the other two, btw
<heat>
actually I was wrong, the should-use-libc logic in dependent on whether or not it finds headers(and what options you pass)
<heat>
it's still good practice to add e.g --with-newlib that sets inhibit_libc for libgcc
<heat>
that way even if it finds headers, it won't do anything that needs the libc
flx has quit [Remote host closed the connection]
<heat>
I wonder if you can also get llvm to build in an inhibit_libc-like mode
<sortie>
I'm now the proud owner of a self-hosting CI system that runs every night and does a native self-hosting build of my OS (full with all the ports, on x86_64 and cross-compiling i686) and publishes it in the www release dir. Takes about 5-6 hours to run, but, *damn*, it works!
<gog>
nice
<sortie>
Naturally the self-hosting CI runs the version of my OS that it built the previous day
<heat>
but does it have a stockfish port? no? literal checkmate.
<klange>
there is no way this can possibly come back to bite you ;)
flx has joined #osdev
<sortie>
A cool thing is that this native build ancestry is going to diverge from the standard CI builds that rebootstraps every night
<sortie>
There... are... differences
riposte has quit [Quit: Quitting]
<sortie>
klange, I also render my html manual natively now :)
flx has quit [Remote host closed the connection]
<sortie>
I'm fairly scared to looking into porting something like latex / texlive or whatever that whole thing is
<klange>
my build is heavily predicated on first building a Kuroko, so at least I've got that going for me.
<sortie>
I'm actually *this* close to sneaking a little python 3 into my build.. a quick hack I built a while back to make the html manual sections self-link
<klange>
meanwhile I still haven't replaced `createramdisk.py`
<sortie>
I should get around to package and publish my perl port
<heat>
I have default-initrd.sh
<heat>
:)
<klange>
or update-extents.py, that one is slightly more embarrassing to not have been replaced as it only needs a `struct` module...
flx has joined #osdev
<klange>
`createramdisk.py` at least directly writes a compressed tarball and I don't have a gzip compressor, so that's more understandable
riposte has joined #osdev
dormito has joined #osdev
<zid>
what's an eram disk
<sortie>
zid, it's loaded into the extended RAM (after 1 MB)
<zid>
ahh
archenoth has quit [Quit: Leaving]
gog has quit [Quit: bye]
archenoth has joined #osdev
<j`ey>
hmm one of the gcc build commands has taken 5mins so far..
<dzwdz>
on the rpi?
<dzwdz>
maybe it's thermal throttling?
<heat>
gcc is slow(er) to build
<j`ey>
rip it failed: ar: aarch64-builtins.o: No such file or directory
<clever>
root@pi400:~# vcgencmd get_throttled
<zid>
5 mins for gcc would be amazing :D
<clever>
j`ey: if its an rpi, check this cmd, what does it say?
<zid>
Mine takes that long to link at least
<heat>
LFS says it takes 11 binutils build times to build gcc
<heat>
in a relatively minimal gcc+g++ + libgcc
<j`ey>
zid: 5mins for a single g++ command
<j`ey>
clever: I dont have that installed atm
<heat>
maybe it's a link?
<j`ey>
could have been
<klange>
It takes about two minutes to run my CI builds. It would take twenty times that if I wanted to actually build gcc instead of using a prebuilt package.
<heat>
my binutils+gcc toolchain builds in about 20 minutes in github actions
<heat>
my llvm toolchain takes 2h40min lol
<heat>
without LTO
<j`ey>
on github?
Skyz has joined #osdev
<heat>
yup
<Skyz>
What's a usecase for a general os?
<Skyz>
That will have someone use it
<Skyz>
I'm like really stuck on this idea
<Skyz>
I think people want to type documents, but there's got to be some type of power user
<heat>
the nice part is that you can cache the build so it has big rebuilds when changes are made to the toolchain build scripts/patches and just regular builds otherwise
Skyz was banned on #osdev by klange [*!*Skyz@user/skyz]
Skyz was kicked from #osdev by klange [You have been asked a dozen times not to ask inane questions about why one would write an OS. I have lost my patience.]
<klange>
I really don't want to have to make this a hard, written rule, but... seriously.
<kazinsal>
There's a reason I've had them on my ignore list since we moved to libera
kingoffrance has joined #osdev
Matt|home has joined #osdev
ahalaney has quit [Quit: Leaving]
<geist>
yah everyone has a different level of tolerance for it. figured once we get a defacto consensus it was time
<j`ey>
gcc/lto/lto-dump.c is the file that took 5mins
<klange>
I much prefer when people clearly are breaking global network rules, so much easier..
<clever>
klange: i was wondering what to do with him, was considiering a /ignore
<geist>
yah now he's just spamming the same thing at me
<geist>
he just wants an audience i guess. i kinda feel bad for him, but damn it's annoying and it never stops
<j`ey>
I just got PM'd too
<geist>
he'll just start saying the same things there. 'i just want to learn how to program' etc etc
<geist>
like, what the hell do you want me to do about it?
<sortie>
klange, reluctantly I concur
<sortie>
I suppose some people are a better fit for a community hangout channel than a topical one
<geist>
yah he should just go hang out in the discord thing
<geist>
unless they booted him there, but they have general blather channels
<sortie>
They feel like someone that well does want to learn and hang out and isn't malicious but absolutely the signal/noise ratio
<geist>
right. and it's pretty subjective since we're not totally on topic all the time, but there's sort of a midpoint. you have to read the room
<geist>
which i understand is hard for some folks, but nothing is perfect
<jimbzy>
geist, There are a couple like that in a game development channel I hang out in.
<geist>
and i guess this is where the discord server stuff is superior, since you can create an offtopic room and then point people at that, i guess
<jimbzy>
"I want to create games, but I don't want to actually learn anything about game development. What should I do?"
<sortie>
Well it's a valid growth phase
<klange>
Wallow in self-pity somewhere else.
<sortie>
The right thing to do is to get people at that growth phase together with like minded people at that stage that just kinda want to play and dream
<sortie>
It's totally valid for people to be anxious and not at all ready for the journey yet but still kinda dream
<jimbzy>
I can dig that, but this is more along the lines of "Thanks for all the helpful advice you've given me. Now, I'm going to ignore it and ask the same question again."
<sortie>
Naturally they can't disrupt the communities for people that are actually doing it, but you also don't want to make them feel bad, after all, they're overcoming their own issues and may well be the devs of tomorrow
<sortie>
jimbzy, totally and that's why I reluctantly concurred
<jimbzy>
In a lot of ways, it reminds me of the comp science majors I've encountered in college over the last few years.
<geist>
yah i have had long discussions with him with various poiinters
<geist>
and he seems to listen, for about a day
<jimbzy>
I think people like that just wait around hoping someone with an established project will include their name in the credits.
<geist>
i just suggested to him that he check out the discord server
<kazinsal>
The early growth phases are fine but they need to be *early*
<kazinsal>
Not "we're still seeing you do the same thing five years later"
<zid>
There's a lot of people on IRC who are "I want to learn x"
<zid>
and have had it explained to them twice a week for the past 6 months
<zid>
`replayer` is the current one sniffing around a bunch of chans
<kazinsal>
I've seen this elsewhere
<kazinsal>
At a certain point people don't want to be *helped*, they just want to be a local beloved posting gimmick.
<j`ey>
zid: ive seen them in a linux channel a lot
<kazinsal>
The problem of course is that it's not beloved, it's just fucking annoying.
gog has joined #osdev
<sortie>
Honestly I don't want to judge people for what they do to have some sort of connection.. especially these days
<sortie>
Obviously we do need boundaries for it to be a healthy interaction.. but I still wish them well
heat has quit [Remote host closed the connection]
<gog>
oh skyz finally got the boot i see
<zid>
sortie: or are you just enabling them?
<jimbzy>
kazinsal, That's kind of my job here, though. :p
<j`ey>
i give up on rpi gcc, will build it on my desktop
<jimbzy>
j`ey, did you get binutils to build at least, or is it just a straight up, "Nope."?
<j`ey>
binutils built, bu t not GCC
<geist>
did you try my build script?
<j`ey>
if gcc builds in 20mins for heat on github actions, im sure it'll only be 10mins on my desktop, so that will give me much quicker turn around time
iorem has joined #osdev
<jimbzy>
Well... Do you really need a compiler? ;)
<geist>
lots of folks here use it, it's not just a one off thing
<j`ey>
geist: it's just something about the config stuff Ive changed that is wrong I think
doug16k has joined #osdev
<kazinsal>
tbh wouldn't be surprised if the rpi is somehow enough of a mess that compiling standard software on it just doesn't work right
<zid>
stick gentoo on it ;)
<j`ey>
it's not that much of a mess lol
<geist>
i have ubuntu on mine
<geist>
so it's pretty standard
<j`ey>
same
iorem has quit [Client Quit]
<j`ey>
just the nearly 1h turn around is too much to make progress
iorem has joined #osdev
dutch has quit [Quit: WeeChat 3.2]
doug16k has quit [Quit: Leaving]
dutch has joined #osdev
mctpyt has quit [Ping timeout: 265 seconds]
mctpyt has joined #osdev
<sortie>
OK.. I seem to have tamed my unruly perl port, looks like I can package it fairly cleanly
<geist>
j`ey: yeah totally. i have the beefy arm workstation to do heavy lifting stuff
<geist>
but... that's rare to have
<sortie>
perl is a difficult port because it doesn't cross-compile, and there's this other perl-cross project you're supposed to patch onto perl, and that's not something my ports system is quite set up to support
<sortie>
Well it wasn't so unsupported after all, I found a way of adding a tiny feature to support it
mhall has quit [Quit: Connection closed for inactivity]