Post B5tJyw9IWTTbwtLvO4 by mrmasterkeyboard@mastodon.social
(DIR) More posts by mrmasterkeyboard@mastodon.social
(DIR) Post #B5tJyvITgrE3J4dk3c by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@projectanchorage Right. Echium, we have a problem.I did try 4.4BSD-lite2 prior to the end of the poll out of curiosity but couldn’t figure it out.Old versions of NetBSD (prior to 1.0, basically just commits) didn’t want to compile at all.I’m at a loss. I don’t want to use anything new like current NetBSD because what’s the point in forking that? I like 90’s - 00’s software more than current stuff.Does anyone else have any suggestions?
(DIR) Post #B5tJyvWeq8ZI13H49w by f4grx@chaos.social
0 likes, 0 repeats
@mrmasterkeyboard @projectanchorage Do you have links to codebases you tried to build? Do you think it would be feasible and useful to share effort to get one of these built?
(DIR) Post #B5tJyvqVeKRp0cYv6O by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@f4grx @projectanchorage I do, I’ll pull em up soon.However, 4.4BSD-lite has files removed that are needed to compile so there’s no point in giving that out, however I could share the commit for NetBSD when I find it.I did find 4.4BSD-Encumbered however which is full 4.4BSD before -lite and Net/2 which I could try.
(DIR) Post #B5tJyw054k6VUJ2Z1M by f4grx@chaos.social
0 likes, 0 repeats
@mrmasterkeyboard @projectanchorage I'll start by trying to get a netbsd up and running, to see how much linux specific stuff my brain has to get rid of.
(DIR) Post #B5tJyw9IWTTbwtLvO4 by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@f4grx @projectanchorage IIRC, this was the commit I used: https://github.com/NetBSD/src/commit/91cf0fbaf30a1dc5bc188ee0948e3d59b3f3ac88
(DIR) Post #B5tJywHS29zyMBAR60 by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@f4grx @projectanchorage Doing a lot of work right now. I got my hands on Net/2, can't remember if I said that earlier.So far I've stripped sys/ (the entire kernel) out from the source tree and I'm slowly getting some parts of the kernel to compile for i386 under i686-elf-gcc albeit with some hacks! If I can get a full working Net/2 kernel booting and compiled reliably I'll probably push that to https://codeberg.org/ProjectAnchorage/Echium/.This could hit a big roadblock so don't hold out hope though.
(DIR) Post #B5tJywTVJLdixYo3sm by mirabilos@toot.mirbsd.org
0 likes, 0 repeats
@mrmasterkeyboard @f4grx @projectanchorage you’ll neet a.out in the BSD flavour, not ELF. The way the C symbols are named on the assembly side differs, and you won’t be able to link a kernel if you build the C side with an ELF compiler.For many of the older BSDs, you’ll have more success building for SPARC or MIPS or so than for i386. Some of them, I’ve learnt from Miod, have two config(8) tools, because some architectures had not yet been converted to newconfig.
(DIR) Post #B5tKiG35NmA0hM3dpY by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@mirabilos @f4grx @projectanchorage ah, right... hmm... I wanted to do i386 because I don't have MIPS and SPARC hardware.I only need the kernel, not really the rest of the BSD system. It would be nice however.
(DIR) Post #B5tKiGFqcKMvKw1piq by mirabilos@toot.mirbsd.org
0 likes, 0 repeats
@mrmasterkeyboard @f4grx @projectanchorage best to build the BSD tooling like config, as, ld, nm, ranlib, etc. and cc first thoughAnd best to start from an i386 BSD, even if a modern one. Sometimes things from the host do leak into builds.OpenBSD 2.9 comes to mind, still a.out (and the one I started with).
(DIR) Post #B5tMFTRIiXzPjrmpcG by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@mirabilos @f4grx @projectanchorage I would have done this in a VM, only problem being that I don't think people want to spin up a VM of an old BSD every time they want to compile my fork.
(DIR) Post #B5tMFTv4vpoDEDic1w by mirabilos@toot.mirbsd.org
0 likes, 0 repeats
@mrmasterkeyboard @projectanchorage @f4grx but to go even that far, when you don’t know if what you have fails due to cross-compiling or due to bugs… you can always add cross-compiling later if you think of it from the beginning
(DIR) Post #B5tOAZXeniW97rYAgC by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@mirabilos @projectanchorage @f4grx Yeah, good point... I have been contemplating if I should use a VM now and see what is broken outside of it... better yet, I have an SSD with FreeBSD on it (albeit, it's 15.0-RELEASE so maybe that won't suffice) that could help?
(DIR) Post #B5tOAZiIAB1ZeqWfFw by mirabilos@toot.mirbsd.org
0 likes, 0 repeats
@mrmasterkeyboard @projectanchorage @f4grx very unlikely to even remotely help
(DIR) Post #B5tPRzO048Y09otzFY by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@mirabilos @projectanchorage @f4grx oh...
(DIR) Post #B5tPRza3LKBklCXc2K by mirabilos@toot.mirbsd.org
0 likes, 0 repeats
@projectanchorage @mrmasterkeyboard @f4grx too close to Linux, and probably amd64Start with an OpenBSD 2.x or NetBSD 0.x (one of the others here can likely weigh in when the latter transitioned to ELF, you want to be before that)
(DIR) Post #B5tPYf344xnD6mI760 by mirabilos@toot.mirbsd.org
0 likes, 0 repeats
@f4grx @mrmasterkeyboard @projectanchorage also, an old gcc helps, depending also maybe pcc but probably not at that point
(DIR) Post #B5tRBJeNfdLBzVk1aa by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@mirabilos @f4grx @projectanchorage Honestly, considering the scale of the project I'm doing here I'm not even sure all of this is really worth the effort.I'll probably have to go with modern kernels (which I don't really like a whole lot, there's just something about them that I can't seem to put my finger on which makes me avoid them...) or write my own kernel with some other people maybe which will take a decade.
(DIR) Post #B5tRBJqQwoywatNeNM by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@mirabilos @f4grx @projectanchorage There's also the factor of "how much pain do I have to go through to get something working".How much pain do I have to go through to:1. get an old BSD compiling in a VM2. make it reproducible over and over to avoid flukes3. get it to compile on my host Mac and then make sure it still boots while dealing with code from the late 80's - early 90's that clang and GCC need multiple arguments to handle alongside a whole metric fuckton of patches to build
(DIR) Post #B5tRBK1mGe3XA4gi3c by mirabilos@toot.mirbsd.org
0 likes, 0 repeats
@f4grx @projectanchorage @mrmasterkeyboard you will need an old GCC cross compiler, newer GCC (before LLVM+Clang even existed) interprets ISO C too strictly and will miscompile the old code
(DIR) Post #B6AknHps4DViBRFnzU by f4grx@chaos.social
0 likes, 0 repeats
@mrmasterkeyboard @projectanchorage this is cool! Best of luck!
(DIR) Post #B6AknI7wyzyL5ViFAe by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@f4grx @projectanchorage Now I'm stuck on getting wait4 to be recognised by the compiler... it hates me. I believe it'll work soon however.
(DIR) Post #B6AknIcR9eMIc3yagq by landley@mstdn.jp
0 likes, 0 repeats
@kkarhan @mrmasterkeyboard @f4grx @projectanchorage It did 386 just fine. And m68k and sh4 and...
(DIR) Post #B6AknIwdwWWPcjQjBY by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@kkarhan @f4grx @projectanchorage Idea! Use the #Minix kernel for Echium.It's old but still modern, not updated since 2018 (according to master branch of Minix on GitHub), doesn't have AI slop, looks fun to hack on, it's BSD-like and a descendant of #UNIX. It's perfect because it compiles. We also continue Minix!Might copy the src to the Echium #Codeberg repo, push, modify, strip and get others on. I'm open to peeps asking to join too given they're against genAI.#Tech #Technology
(DIR) Post #B6AknJDevG8ITVOJhw by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@kkarhan @f4grx @projectanchorage News! I've almost got Minix 3 compiling entirely under GCC again using build.sh on macOS!This has required a patch to GCC itself, many build flags to cut out unneeded failing parts and patches to build files and code which has been fun to decipher.When I'm done and get a fully reproducible build hopefully tonight or tomorrow, I'll upload it to the Echium repo along with build command used albeit it might needed to be altered for other systems.
(DIR) Post #B6AknJPMDlUT3mrewS by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@kkarhan @f4grx @projectanchorage I guess in a way, you could say that I did go with old NetBSD...
(DIR) Post #B6AknJZzaDztalq9WC by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@kkarhan @f4grx @projectanchorage Now I've almost got a proper build done. Not many changes were needed but I've almost got an ISO. After I can verify that ISO boots, I"ll do a clean build with cleandir and empty obj and everything and then verify that ISO boots too and then push to Codeberg!
(DIR) Post #B6AknJjD1xN03M9Vsu by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@kkarhan @f4grx @projectanchorage turns out my ISO was really broken. I'm rebuilding with different commands now that should hopefully have less interference and will get back to you all soon.
(DIR) Post #B6AknK0ZzNGSvEHNxY by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@kkarhan @f4grx @projectanchorage thanks! Right now, I'm trying to sort the build process into one where tools is ran with certain flags and then the actual build is done with different flags. Basically, system compiler flags for tools and Minix compiler flags for release.I might just make a script to do it for people. I've also done my best to modify Makefiles among other things so most errors and mishaps are automatically fixed in build, albeit maybe jankily.
(DIR) Post #B6AknKArN9UJR75az2 by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@kkarhan @f4grx @projectanchorage The upside is that after you build tools and it's all downloaded, extracted and patched, building all tools again from scratch (at least on my 10-core M4 Air with -j10 and no Low Power Mode) takes around 3 minutes. Yeah that's for GCC, binutils, gmp, mpfr, basically everything Minix needs which isn't much. Most are pretty small or there isn't a lot to build in them...the OS is a different story though. needs -j1 or you'll get sometimes some race conditions.
(DIR) Post #B6AknKOKZ4GO6tOLyq by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@kkarhan @f4grx @projectanchorage I also think me disabling Objective-C too in an attempt to get the build process to stop complaining about it must have cut down tool build time too. We're barely really compiling much other than C and some C++ stuff. It's clearly not all of GCC or it's C/C++ stuff. Only three libs are built and it's libgcc, libiberty and libgomp in the lib Makefile.
(DIR) Post #B6AknKYxvWlodsMqYa by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@kkarhan @f4grx @projectanchorage right now, I'm just resolving some minor OS build issues that have been flaky in passing successfully due to... honestly, I dunno.
(DIR) Post #B6AknKiBNG8v6SgCvI by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@kkarhan @f4grx @projectanchorage Now I got release and tools to complete first try without errors. I made the ISO and now Minix panicks because it's only finding 11 boot modules instead of 12???
(DIR) Post #B6AknKs6mM5BbFK8OW by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@kkarhan @f4grx @projectanchorage so now it seems like it didn't copy init to mod12_init for some reason???time to find out why.
(DIR) Post #B6AknL0yFPAi2jTDCy by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@kkarhan @f4grx @projectanchorage that took forever but I think I got it.releasetools/Makefile was looking for sbin/init/init when init was actually in sbin/init...going to recompile and FUCKING PRAY.
(DIR) Post #B6AknLABh8XoVJmZZg by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@kkarhan @f4grx @projectanchorage I had to go to sleep, it was 5AM. Anyway, after some fixes...I GOT A COMPILE WORKING FROM GCC IN MACOS, CLEANBUILD FROM THE START!!!I'll see what I can do about getting the code in the Echium repo later, but for now, it works!!
(DIR) Post #B6AknLLszdtz5bFuoC by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@kkarhan @f4grx @projectanchorage it's now up!!! :3333https://codeberg.org/ProjectAnchorage/Echium
(DIR) Post #B6AknLTgWe8lTmu8xs by f4grx@chaos.social
0 likes, 0 repeats
@mrmasterkeyboard @kkarhan@c.im @projectanchorage yay congrats, I'll try to build it!
(DIR) Post #B6AknLdxuQMbzfiLzM by mrmasterkeyboard@mastodon.social
0 likes, 0 repeats
@f4grx @projectanchorage good luck! build_to_iso.sh might need to be changed from arm-apple-darwin to something like x86_64-elf-linux.
(DIR) Post #B6AknLkLWhT4JShRw0 by f4grx@chaos.social
0 likes, 0 repeats
@mrmasterkeyboard @projectanchorage oh my, having system utilities along with the kernel is so cool! it's all built in the same place!
(DIR) Post #B6AknLnXKq1ITMBzuK by f4grx@chaos.social
0 likes, 0 repeats
@mrmasterkeyboard @projectanchorage It is apparently starting to build. so far there were complaints about C variables defined in header files which produced linker errors because of multiply defined symbols, I fixed that by making these extern, and defining the actual variables in a relevant c file. No idea if thats the right method but this helps the build process it seems. I can submit changes even if I have no idea what I'm doing, just so you can have a look at them.
(DIR) Post #B6AknM2QRTvhDX9t7A by mirabilos@toot.mirbsd.org
0 likes, 0 repeats
@f4grx @mrmasterkeyboard @projectanchorage in most cases, it is, yes
(DIR) Post #B6CMjkUPa6yLJGusjY by f4grx@chaos.social
0 likes, 0 repeats
@mirabilos @mrmasterkeyboard @projectanchorage the main issue seems to rather be that this code was compiled with -fcommon in mind, which is no longer the default in gcc. I need to find how to reactivate that.
(DIR) Post #B6CMjkhsm1kPz3DdjM by mirabilos@toot.mirbsd.org
0 likes, 0 repeats
@f4grx @mrmasterkeyboard @projectanchorage wait until you see code compiled with the assumption that variables show up in the order they are defined, so you can just memcpy them around…