klange changed the topic of #osdev to: Operating System Development || Don't ask to ask---just ask! || For 3+ LoC, use a pastebin (for example https://gist.github.com/) || Stats + Old logs: http://osdev-logs.qzx.com New Logs: https://libera.irclog.whitequark.org/osdev || Visit https://wiki.osdev.org and https://forum.osdev.org || Books: https://wiki.osdev.org/Books
junon has left #osdev [#osdev]
nyah has quit [Ping timeout: 245 seconds]
sm2n_ is now known as sm2n
h4zel has joined #osdev
gateway2000 has joined #osdev
hbag has joined #osdev
mctpyt has quit [Ping timeout: 252 seconds]
<hbag> i still prefer boneless wings but man these frank's red hot wings were fuckin GOOD
Bonstra has quit [Ping timeout: 252 seconds]
gateway2000 has quit [Read error: Connection reset by peer]
Bonstra has joined #osdev
gateway2000 has joined #osdev
mctpyt has joined #osdev
gateway2001 has joined #osdev
gateway2000 has quit [Read error: Connection reset by peer]
isaacwoods has quit [Quit: WeeChat 3.2]
gateway2001 has quit [Ping timeout: 256 seconds]
dutch has quit [Quit: WeeChat 3.2]
freakazoid343 has quit [Read error: Connection reset by peer]
dutch has joined #osdev
freakazoid343 has joined #osdev
zaquest has quit [Quit: Leaving]
zaquest has joined #osdev
gog has quit [Ping timeout: 240 seconds]
sts-q has joined #osdev
freakazoid343 has quit [Ping timeout: 252 seconds]
skipwich has quit [Ping timeout: 250 seconds]
diamondbond has joined #osdev
srjek has quit [Ping timeout: 240 seconds]
diamondbond has quit [Ping timeout: 245 seconds]
ElectronApps has joined #osdev
brettgilio has joined #osdev
brettgilio has left #osdev [The Lounge - https://thelounge.chat]
nur has quit [Quit: Leaving]
freakazoid12345 has joined #osdev
ZombieChicken has joined #osdev
bradd has quit [Ping timeout: 252 seconds]
bradd has joined #osdev
h4zel has quit [Quit: WeeChat 3.0.1]
devcpu has quit [Ping timeout: 245 seconds]
Jmabsd has joined #osdev
GeDaMo has joined #osdev
ElectronApps has quit [Remote host closed the connection]
xenos1984 has quit [Remote host closed the connection]
xenos1984 has joined #osdev
ElectronApps has joined #osdev
h4zel has joined #osdev
Jmabsd has quit [Ping timeout: 240 seconds]
ZombieChicken has quit [Quit: WeeChat 3.2]
mctpyt has quit [Ping timeout: 252 seconds]
mctpyt has joined #osdev
mahmutov has joined #osdev
ElectronApps has quit [Remote host closed the connection]
kuler has quit [Ping timeout: 276 seconds]
<ori_sky> hello, I'm having some issues trying to build bash for my OS and wondered if anyone has thoughts on how to solve this? context is here: https://gist.github.com/ori-sky/dea74f8f895d1610552264349773b542
<bslsk05> ​gist.github.com: make.log · GitHub
<ori_sky> from what I can tell, config.h has been generated by the configure script to define u_int and u_long, since my OS doesn't define these. however, this same config.h is being used when attempting to build bash's internal tool, mksyntax, using the current host compiler rather than the target cross-compiler
<ori_sky> I'm not sure how to solve this as I don't think there's a way to make the configure script generate two separate config.h files (I've not seen this before for stuff based on autotools), and I'd like to not have to define u_int and u_long in my libc
<zid> some packages will need patches if your OS doesn't match the env closely enough
<zid> it may just be a general problem with cross compiling bash in general
<ori_sky> hmm right, I guess I'm wondering if there's a more general way of solving this (i.e. on the autoconf side) because it seems to me that any difference in detected features (i.e. what ends up in config.h) for autoconf-based builds would end up breaking cross-compilation whenever the package builds an internal build machine tool as part of its build
<ori_sky> process
<zid> klange has done a lot of cross compiling to his stuff
<ori_sky> or rather, could end up breaking*
<zid> maybe he's the one to wait around for
<ori_sky> thanks, I'll keep an eye out
<kazinsal> yeah, I'd say talk to them, while their OS is mostly NIH now they've ported a bunch of stuff before
<j`ey> and sortie
<ori_sky> another frustration I've had which makes me wonder if I'm doing something wrong is, when trying to build bash (or dash for that matter), the configure script doesn't correctly detect that it's meant to be cross-compiling, because even though I specify --host=i386-shk, autoconf does some test to see if the compiler output can run on the build
<ori_sky> machine
<ori_sky> but to do that it just checks if int main() { return 0; } can compile/run, which.. isn't really a good test of whether or not it needs to cross-compile, so I had to go and manually edit the configure script to force cross_compiling=yes always
<ori_sky> I don't think it'd normally be an issue if not for bash/dash compiling internal tools to be run on the build machine
brenns101 has joined #osdev
<kazinsal> Unfortuantely I don't have any real helpful hints for porting software because I haven't had any r eason to port any software to my OS :(
ElectronApps has joined #osdev
brenns10 has quit [Ping timeout: 276 seconds]
brenns101 is now known as brenns10
Electron has joined #osdev
ElectronApps has quit [Ping timeout: 240 seconds]
hl has quit [Quit: ZNC - https://znc.in]
hl has joined #osdev
AssKoala has joined #osdev
fwg has joined #osdev
<klange> ori_sky: It should be checking host != build for cross compilation, but you can override most of those things with cv_ vars.
<klange> That said, bash is very much "here be dragons".
<clever> klange: and ive got a polygon! https://i.imgur.com/2Fxr0U3.jpg
<klange> Interesting choice of test display, but I won't complain.
<clever> i havent gotten to figuring out hdmi init yet
<clever> so my only working display is ntsc out
<ori_sky> klange: ahh I see, I'll take a closer look and see if I can get that part of it working properly, thanks -- do you have any thoughts on the whole config.h headache and how I might resolve that?
<klange> Probably try to run the mksyntax stuff in a separate build and copy its results so the cross compile isn't trying to do it, but that whole thing is a mess
<klange> tangentially related, I have a dash port I'm trying to clean up; job control is being a bit problematic: https://klange.dev/s/unhappy_dash.png
<klange> I suspect I may have taken too many shortcuts in my own shell and will need to rework some things with waitpid() so that stopped jobs work as expected.
diamondbond has joined #osdev
<zid> sounds like it's time for someone to rewrite bash's makefiles to not suck
<clever> klange: next on my todo list, is overhauling the api i made for the 2d subsystem, to make it just better overall
<zid> or just build it on the target, but that would need a shell :p
<ori_sky> zid: I'm not volunteering
<clever> currently, it re-creates the entire displaylist from scratch, by calling various draw functions
<clever> so if i want something on screen, i have to modify the render loop to call it
<clever> but i instead should have an array of things to render and where, and just modify that array
<kazinsal> I think at the point of ubiquity that bash resides, fixing technical debt in the build system is kind of a lost cause
<zid> that's the same problem I have with imgui as a concept
tenshi has joined #osdev
diamondbond has quit [Ping timeout: 252 seconds]
nyah has joined #osdev
elastic_dog has quit [Ping timeout: 256 seconds]
AssKoala has quit [Ping timeout: 252 seconds]
gog has joined #osdev
elastic_dog has joined #osdev
gateway2000 has joined #osdev
aleamb has joined #osdev
sortie has joined #osdev
diamondbond has joined #osdev
diamondbond has quit [Client Quit]
srjek has joined #osdev
devcpu has joined #osdev
devcpu has quit [Client Quit]
fwg has quit [Quit: .oO( zzZzZzz ...]
mahmutov has quit [Ping timeout: 245 seconds]
Electron has quit [Remote host closed the connection]
tacco has joined #osdev
gateway2000 has quit [Quit: Leaving]
AssKoala has joined #osdev
AssKoala has quit [Read error: Connection reset by peer]
AssKoala has joined #osdev
AssKoala has quit [Read error: Connection reset by peer]
AssKoala has joined #osdev
immibis has quit [Remote host closed the connection]
mahmutov has joined #osdev
brynet has quit [Quit: leaving]
brynet has joined #osdev
vdamewood has joined #osdev
AssKoala has quit [Ping timeout: 245 seconds]
freakazoid12345 has quit [Ping timeout: 256 seconds]
h4zel has quit [Ping timeout: 252 seconds]
pretty_dumm_guy has joined #osdev
pretty_dumm_guy has quit [Client Quit]
freakazoid343 has joined #osdev
fwg has joined #osdev
gateway2000 has joined #osdev
tenshi has quit [Quit: WeeChat 3.2]
gareppa has joined #osdev
gareppa has quit [Remote host closed the connection]
gog has quit [Ping timeout: 252 seconds]
pounce has quit [Remote host closed the connection]
diamondbond has joined #osdev
diamondbond has quit [Remote host closed the connection]
pounce has joined #osdev
pounce has quit [Remote host closed the connection]
pounce has joined #osdev
GeDaMo has quit [Quit: Leaving.]
h4zel has joined #osdev
Izem has joined #osdev
AssKoala has joined #osdev
<j`ey> how can I tell if my bss section is atually taking up space in the binary?
<zid> by.. looking at the binary?
<Izem> dump the binary?
<j`ey> true
<zid> "how can I tell if my cupboard is full of cereal"
<j`ey> im just having one of those 'wtf is going on moments' and going crazy :D
<j`ey> is it just the name '.bss' that the linker looks for?
<kazinsal> there should be a flag on the program section for it
<zid> bss is weird cus technically you don't /need/ to explicitly mention it
<zid> just carry around 'data is longer than the number of bytes in it' aspect
<j`ey> because Im trying to explicitly include this programs bss
<zid> yea getting tools to *forget* things like that sounds hard
<zid> you might be able to use _start_bss and _end_bss to manually place some padding
<kazinsal> right yeah you just have to zero the whole requested space for that LOAD segment and then actually load <size on disk> bytes
<zid> idk how you'd actually produce a baked version of bss if that linker script hack doesn't owrk
<bslsk05> ​github.com: lk/elf.c at master · littlekernel/lk · GitHub
<clever> kazinsal: this code will skip zeroing the part that has actual data
<kazinsal> yeah that's probably the smart way to do it
<kazinsal> save a few cycles
<clever> yep
<zid> I just map the full size
<zid> my pages are already clean, tada
<j`ey> well, I think i got the bss section in the data now.. but it crashes lol
mahmutov has quit [Quit: WeeChat 3.1]
gog has joined #osdev
mahmutov has joined #osdev
sortie has quit [Ping timeout: 240 seconds]
sortie has joined #osdev
Izem has quit [Quit: Going offline, see ya! (www.adiirc.com)]
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<j`ey> does objcopy do anything special with bss sections?
Arthuria has joined #osdev
<j`ey> dunno why this has NOBITS... .oss_data NOBITS
<j`ey> how can i set PROGBITS on that section?
Arthuria has quit [Ping timeout: 252 seconds]
dutch has quit [Quit: WeeChat 3.2]
<clever> j`ey: if you tell objcopy to make a binary file, it will copy everything from the first byte to the last byte, ignoring bss sections
<clever> j`ey: if a bss exists between 2 things, or there are any holes between sections, it zero-fills them
<j`ey> ok so maybe I can try create a fake section after the bss
gateway2000 has quit [Read error: Connection reset by peer]
gateway2000 has joined #osdev
<j`ey> it doesnt seem to :/
<clever> j`ey: why do you need the bss to exist in the .bin file?
<j`ey> ok no, that seemed to have done something
<j`ey> because im trying to concatenate two files
<clever> ftruncate can be used to expand it to a known size
<j`ey> then I have to figure out how big the bss is
<clever> you could also skip that concat step entirely
<j`ey> well no, cos I need them as a single file
<clever> one sec
<bslsk05> ​github.com: lk-overlay/payload.S at master · librerpi/lk-overlay · GitHub
<j`ey> hmm
<clever> j`ey: this will let you embed any binary file you want, into the elf file, and put some symbols arroung it
<clever> objcopy will then copy it to the .bin for you
<clever> no more concat, its already in the file
<j`ey> yeah... I guess I can try that... but I really wanted to just make the bss show up properly
<j`ey> if I can work out how to force that thing from NOBITS to PROGBITS, it might work
<clever> that should just be a matter of editing the linker script
gateway2000 has quit [Read error: Connection reset by peer]
<j`ey> well yes
<j`ey> but how :)
<j`ey> I have .oss_data : { *(.bss*) }
<clever> one sec
gateway2000 has joined #osdev
<zid> :filly
<zid> PROGRAM { filly PT_LOAD PROGBITS; } or such
<zid> I forget the exact syntax, but the ld man page with the PT_LOAD example should have it
<j`ey> oh.. PROGBITS there.. let me try
<zid> I'd have to read the ELF spec for this gritty stuff it's a bit vague heh
<j`ey> nope, PROGBITS cant go there
<zid> it's a section thing then>
<zid> I know how to do it from the assembler side, don't remember how to do it on the linker side
<j`ey> yeah :/
<zid> I think cheating might be bestest
<j`ey> cheating how?
<zid> or just.. not requiring broken ELFs :D
<zid> just throw some 0s into the file with dd :P
<j`ey> yeah, but it have to be really sure I get the exact right amount
sortie has quit [Quit: Leaving]
<zid> _bss_start and _bss_end
<zid> nm + awk + bc ;P
<zid> (pls don't do this)
tacco has quit []
mahmutov has quit [Ping timeout: 245 seconds]
mctpyt has quit [Quit: me voy yendo]
dutch has joined #osdev
chartreuse has joined #osdev
vdamewood has joined #osdev
srjek has quit [Ping timeout: 252 seconds]
pretty_dumm_guy has joined #osdev
pretty_dumm_guy has quit [Client Quit]