IRC channel logs

2024-08-20.log

back to list of logs

<oriansj>lrvick: yeah, legacy code sadly will retain in bootstrapping hot paths for a long time. Fortunately guix hides most of that nicely.
<oriansj>bootstrap-seeds x86/POSIX/hex0 is now 190bytes
<lrvick>nice!
<nimaje>andydude: I wrote a hex0.py that I find more reasonable https://0x0.st/XJWT.py
<nikolar>does anyone have a working example of compiling the kernel with tcc
<stikonas>nikolar: we only have this https://github.com/fosslinux/live-bootstrap/blob/master/steps/fiwix-1.5.0-lb1/pass1.kaem
<stikonas>it compiles Fiwix kernel with tcc
<nikolar>thanks
<nikolar>what's a fiwix kernel though
<stikonas>it's just a small x86 only kernel that is POSiX compatible
<nimaje>*the* fiwix kernel, not 'a' fiwix kernel (as opposed to the linux kernel)
<stikonas>and no modern linux kernel is compatible with tcc as far as I know... Current releases don't even build with C-only GCC (up to 4.7.4) though there are still long-term supported versions that can be built with GCC 4.6
<nikolar>Interesting
<aggi>nikolar: i could re-produce tccboot on a slackware11 buildhost (JIT), and once i had an AoT compiled kernel too
<nikolar>i couldn't though
<aggi>that didn't panic, but i had to reduce the kconfig further than the one from tccboot (due to linking issues and/or missing symbols)
<nikolar>not that there are good instructions heh
<aggi>haven't got time to proceed with kernel-2.4 yet, becaus i transitioned the system-profile of mine to tcc-toolchain, just recently
<aggi>i will retry linux-5.9 too, which may be possible if i add some "pre-generated" files, that's the ones gcc -E emits with Kbuild
<aggi>and maybe, yasm can cope with the 16bit bootcode assembly parts
<aggi>and, there is some linking problem, which may need binutils
<aggi>btw.; the ancient AR utility gave me more headache than i expected
<aggi>tcc-implementation of it behaves slightly different than binutils
<nikolar>of course
<aggi>currently i got only util-linux and nilfs-utils remaining on todo, that got static-linking issues due to this
<aggi>and of cause, i need to address the perl issue, which isn't suitable for autotools when statically linked, not yet
<nikolar>sounds like a mess
<aggi>i maintain it with a gentoo-overlay, keep all emerge/build logs, and everything is tracked with git in detail
<aggi>the python/portage and perl/autotools issue are a giant blocker, on the user-space side
<nikolar>makes sense
<aggi>i must repair perl, because i cannot re-write 500 makefiles to avoid autotools
<aggi>that's just too much
<aggi>i can live with avoiding python/portage however
<nikolar>heh
<aggi>sorry, i'll keep quiet, just had my coffee to squeeze a few more hours of brainpower
<nikolar>nah it's alright
<andydude>nimaje: that's certainly shorter than mine
<andydude>nimaje: my goal was to visualize the DFA, not brevity
<lechner>Hi, which tool does the reverse of hex0, please, i.e. produce a perhaps even annotated hex string that can serve as input to hex0. Thanks!
<stikonas>lechner: no such tool exist
<stikonas>well, disassembler can do a bit of that
<stikonas>objdump doesn't like stage0-posix binaries though...
<stikonas>gdb works better though
<lechner>stikonas / thanks!
<stikonas>oh, interestingly llvm-objdump works better on stage0-posix binaries
<stikonas>oh, but also not perfectly...
<stikonas>it doesn't properly recognize elf header
<andydude>I would say objdump is probably the closest, xxd would be the second runner up
<andydude>My favorite description of hex0 is sed -e "GET RID OF COMMENTS" | xxd -r -p