[HN Gopher] Gray386Linux - Linux for 386 Machines
       ___________________________________________________________________
        
       Gray386Linux - Linux for 386 Machines
        
       Author : marmolak
       Score  : 49 points
       Date   : 2022-09-20 14:16 UTC (8 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | SoftTalker wrote:
       | OpenBSD still builds releases for i386. I don't know for how much
       | longer; they note that "Due to the increased usage of
       | OpenBSD/amd64, as well as the age and practicality of most i386
       | hardware, only easy and critical security fixes are backported to
       | i386. The project has more important things to focus on."
       | 
       | https://www.openbsd.org/i386.html
        
         | chungy wrote:
         | OpenBSD dropped support for the 80386 around 2005, and the
         | 80486 sometime later.
         | 
         | The arch name i386 doesn't actually mean 386.
        
           | vikingerik wrote:
           | Right. In this context, i386 really means the 32-bit x86
           | architecture, as opposed to 64-bit.
           | 
           | I don't know of any architectural differences that would
           | require a Pentium over a 386 or 486 (besides a FPU.) The
           | Pentium runs the same software in the same memory and address
           | space, just faster. Unless something requires Pentium MMX or
           | SSE instructions.
        
             | kimixa wrote:
             | Things like CMOV were introduced in the pentium pro (i686),
             | which often is the cut-off for reasonably modern OS
             | support.
        
         | marmolak wrote:
         | 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.
        
           | myself248 wrote:
           | Nor the hordes of embedded 486 cores (the AMD Elan series, et
           | al) that powered many of the first-gen 802.11b hardware.
        
         | anthk wrote:
         | OpenBSD i386 (atom n270) user here runs fine. No Firefox, but I
         | have Lynx/Links/Netsurf/Luakit and Seamonkey.
        
       | magnat wrote:
       | > Currently, it's not possible to run gray386linux on i486
       | machines (but it's possible to run gray386linux on Cyrix 486DLC
       | and similar CPUs)
       | 
       | What's the cause? Incompatible/missing peripheral or some
       | breaking changes in instruction set?
        
         | pajko wrote:
         | This hack might be a cause:
         | https://github.com/marmolak/gray386linux/commit/81f9adb4656f...
        
         | marmolak wrote:
         | Hi. I don't know for now. There is ton's of issues while
         | switching to protected mode (ipxe for example: https://github.c
         | om/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.
        
           | andrewf wrote:
           | But what about folks who want to give their 386DX system a
           | speed boost with RapidCAD? Will they have to re-install their
           | OS? :) https://www.youtube.com/watch?v=UM4NPh5qg8Y
           | 
           | But seriously this stuff is very subtle. An issue (probably
           | different) from a HN thread on similar matters:
           | https://news.ycombinator.com/item?id=30801836
        
       | marmolak wrote:
       | Able to be booted via network with current (2022) busybox
       | userland.
        
       | contingencies wrote:
       | Serious question: if you are that in to Linux on old boxes, why
       | not just run period distributions?
       | https://en.wikipedia.org/wiki/Slackware#Releases is a good
       | breakdown of history.
        
         | marmolak wrote:
         | 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.
        
           | contingencies wrote:
           | OK, I see the general approach. Some sort of hack to get
           | modern code to run on CPUs without the normally assumed
           | instruction set present.
           | 
           | Perhaps consider writing "what problem does this solve" and
           | "how does it solve it" and "why is this approach a good one"
           | at the top of your repo. It would help to generate interest.
        
             | marmolak wrote:
             | Good point. Thanks. Note to my TODO added.
        
       | hulitu wrote:
       | Hm. "Install nix. --disable-shadow". musl. Better run an old
       | distribution. Anyone knows where can i find 386, 486 era
       | computers besides ebay ?
        
         | kjs3 wrote:
         | There are hundreds of thousands if not more chugging away in
         | the embedded world. And there are still many running in less
         | developed countries.
        
         | ok123456 wrote:
         | This might be a case for PCEm.
         | 
         | https://www.pcem-emulator.co.uk
        
           | chungy wrote:
           | PCem was abandoned and 86box is an actively maintained fork
           | that's almost entirely better. Includes an actual UI, too!
        
             | selfhoster11 wrote:
             | PCem recently resumed development.
        
           | hulitu wrote:
           | I extensively tested PCem. A lot of the systems do not work.
           | Though i found a Socket 7 Asus Pentium MMX that was able to
           | boot a particular Slackware (10 i think)
        
             | ok123456 wrote:
             | Did you locate the full rom set?
        
               | hulitu wrote:
               | I took the ROM set which was referenced, if i remember
               | correctly, on the github page. There were a lot of XT, AT
               | and other machines. My goal was to run an old Slackware
               | on a 486 era machine but all of them hang at boot. The
               | only luck was with the pentium and slackware 10. I would
               | have preffered 7.
        
         | marmolak wrote:
         | 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.
        
         | anthk wrote:
         | Use qemu, -cpu 486, -vga cirrus, -soundhw sb16
        
           | marmolak wrote:
           | 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.
        
         | MisterTea wrote:
         | > Anyone knows where can i find 386, 486 era computers besides
         | ebay ?
         | 
         | Older businesses and factories. I saved tons of 386/486/pentium
         | stuff form my workplace. Though I was lucky because my
         | predecessor was a pack rat and never threw anything out.
        
       | selimthegrim wrote:
       | An Iranian film buff, I see.
        
       | anthk wrote:
       | For a 486 I'd use NetBSD with ctwm.
       | 
       | On support, it's odd no one tested Alpine Linux on a 486, necause
       | Alpine will run perfectly on it. No, Nix, no complex setup, a
       | huge repo of packages.
       | 
       | Alpine Linux with a patched X for VLB/ISA:
       | 
       | https://github.com/scanlime/avc-edge-linux
        
         | marmolak wrote:
         | 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
         | :).
        
       ___________________________________________________________________
       (page generated 2022-09-20 23:02 UTC)