HNHacker News
TopNewBestAskShowJobs

marmolak

68 karma · joined September 20, 2022

submissionscomments
marmolak··on Gray386Linux – Linux for 386 Machines
And another plan is to review my patches for 3.7.10 kernel, because it's just bunch of hacks and I still learn much more from work on them.

Basically, main goal has been: make machine with 3COM card with lanworks proprietary boot rom boots from network on old machine... but what do I going to boot? As a side effect of this effort were gray486linux born (yep. It was first). After some issues (CET instructions emited by gcc aka multinop instructions not supported by i486) it finally booted. Then... how hard it can be to do the same on 386 machine ;P. It was harder and I learned tons of stuff during the process.

Also. I would like to have something small which still can be booted over network and I can deploy prepared base images with DOS/Windows 3.11 etc... just that easy (with help of Ontrack or XTIDE bios). Or I can deploy prepared Windows NT 4.0, because it looks like my SCSI cdrom died on one of my machines.

But if you have some ideas what to do with it, don't hesitate and let me know.

marmolak··on Gray386Linux – Linux for 386 Machines
X would be great addition. Someone here point me to linux distro for 486 machines with working X. However, I don't think it will be bootable from network with full X window and window manager support. So I need to find a way how to use network storage.

BTW: only few ethernet cards are supported now (3com fan here ;)). Maybe I can enable support for NE2000 compatible clones, because it was very common.

marmolak··on Gray386Linux – Linux for 386 Machines
Maybe and maybe another hacks and also not compiled support for 486 cpus. This hack is invoked only on CPUs, which doesn't support cmpxchg instruction. For example, 486 DLC from Cyrix is basically 386 with i486 instruction set but I'm not able to boot linux for 486 machines. https://en.wikipedia.org/wiki/Cyrix_Cx486DLC But gray386 runs perfectly on 486 DLC without hack involved.
marmolak··on Gray386Linux – Linux for 386 Machines
Great! But don't expect much for now. But personally, I'm happy with result, because I'm able to deploy dos machines with bigger HDDs (with help of XTIDE bios - still playing around) or just put dos images to HDDs via network without too much time spend with real hw. Don't get me wrong. I really like real hw but prepare basic machine setup is soooo convenient in virtual environment nowadays.

Also, booting real 386 via network... My childhood dreams come true ;P.

marmolak··on Gray386Linux – Linux for 386 Machines
Not all i386 in name are real 386. Sometimes they think about i586 or i686 (which is way how to mark generations of CPU).

From provided page:

Processors All CPUs compatible with the Intel Pentium or later, with Intel-compatible hardware floating point support should work.

So no support for real 386 CPU.

marmolak··on Gray386Linux – Linux for 386 Machines
Hi. I don't know for now. There is ton's of issues while switching to protected mode (ipxe for example: https://github.com/ipxe/ipxe/commit/bc35b24e3ebd2996b2484b7f...). It just stuck when I select it from PXE menu and I didn't debugged it further. Maybe someone can figure it out and send patches or advices.

Also it's not my goal to run gray386linux on i486 machines because I have another distribution: gray486linux, which aims specially to systems with 486 CPUs.

marmolak··on Gray386Linux – Linux for 386 Machines
Good point. Thanks. Note to my TODO added.
marmolak··on Gray386Linux – Linux for 386 Machines
Old distribution with old userspace :). I understand that it looks hard. But you can download precompiled kernel and initrd. Yeah, there is only busybox for now.
marmolak··on Gray386Linux – Linux for 386 Machines
But this emulates 486 systems and not precisely. For example, endbr32 instruction is not a problem under emulation but it's real issue on real i386/i486 hw. Simply because real 386/486 cpus doesn't support multi nop instructions.
marmolak··on Gray386Linux – Linux for 386 Machines
Yeah, but 486 is not 386.

Nix is used to preserve development environment of linux kernel. Without nix, setup would be much, much more complex.

Thank you for info about avc-edge-linux. Going to take a look :).

marmolak··on Gray386Linux – Linux for 386 Machines
It's easy. There seems to be nothing directly support i386 (I mean: real 386 chip) with latest supported kernel version (as I know) and newest busybox.

i386 doesn't support cmpxchg instruction for example and I'm not able (maybe someone can help) to force gcc 12 not to emit these instructions. So I added some kind of emulation of cmpxchg (code is very straightforward and stupid. Only few combinations are supported because it just works for me now).

And linux itself it's another story. 3.7.10 should be last with real i386 support, but it's not that much true :). Because I wasn't able to compile 3.7 kernel without some hacks.

Main goals were: 1) use as newest software as possible 2) be able to boot from network with 4 MB RAM (8 MB RAM is much better) on real hardware.

Also, this distro can be used to bootstrap machines with prepared dos images or other operatin systems. Don't get me wrong. I love floppy disks however I'm too lazy to install systems from them.

marmolak··on Gray386Linux – Linux for 386 Machines
Able to be booted via network with current (2022) busybox userland.