Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to index page
Thread view  Board view
RayeR(R)

Homepage

CZ,
18.01.2013, 13:42
 

Linux drops 386 and some 486 supports (Announce)

I know some Linux users are here too, do you know about it?
http://forums.theregister.co.uk/forum/2/2012/12/12/linux_no_longer_runs_on_386_cpus/#c_1659603
This is also related to GCC not only kernel.
We used some Vortex 86 (high speed 486SX) fanless miniPC and I'm not sure if it is icluded in dropped group or not. And what's the key they selected dropped CPUs - if it is absence of FPU (like it looks because also includes NexGen 5x86 which lacked FPU too) then Vortex might not be supported because it also lacks FPU...

---
DOS gives me freedom to unlimited HW access.

bocke(R)

18.01.2013, 16:10
(edited by bocke, 18.01.2013, 16:40)

@ RayeR
 

Linux drops 386 and some 486 supports

I browsed through the original patch and I didn't see any mention of FPU emulation code. It's mostly related to some CPU instructions 386 and some 486 clones (and Nexgen 5x86) might not have: cmpxchg, invlpg and xadd.

> -config X86_XADD
> - def_bool y
> - depends on !M386

> -#ifndef CONFIG_X86_CMPXCHG
> -/*
> - * Building a kernel capable running on 80386. It may be necessary to
> - * simulate the cmpxchg on the 80386 CPU. For that purpose we define
> - * a function for each of the sizes we support.
> - */

> -#if defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_64)
> -# define cpu_has_invlpg 1
> -#else
> -# define cpu_has_invlpg (boot_cpu_data.x86 > 3)
> -#endif

This will be effective from Linux 3.8 and on. So any other long term support version can still be used with 386 and unsuppported clones (2.34, 3.0, 3.2, 3.4). Some of those might be supported for the years to come.

Hope this helps. ;)

Edit:
You can find a list of LTS kernel versions on Wikipedia:
http://en.wikipedia.org/wiki/Linux_kernel#Maintenance

I guess 3.2 LTS might be the best bet. It's used by Debian, Slackware and Ubuntu LTS.

marcov(R)

18.01.2013, 16:44

@ bocke
 

Linux drops 386 and some 486 supports

> I browsed through
> the
> original patch and I didn't see any mention of FPU emulation code.
> It's mostly related to some CPU instructions 386 and some 486 clones (and
> Nexgen 5x86) might not have: cmpxchg, invlpg and xadd.

Note that it is often hard to find a distribution that will install on such a machine. Afaik most distribution's base kernels are slowly becoming ppro+

In the past (before the newer series of lowpower machines) we had a bunch of older VIA cpus for firewall and branch office servers, and getting something modern on those was regularly trouble.

Quite often, after a while the damage was repaired and/or additional media fabricated, but it was getting annoying, so we gave up on those machines.

bocke(R)

18.01.2013, 17:05
(edited by bocke, 18.01.2013, 17:22)

@ marcov
 

Linux drops 386 and some 486 supports

Yes, GNU development toolkit might have some problems with some CPUs. Not sure of details. I remember the case with one i686 clone that lacked a specific instruction so i686 compiled packages didn't work on it.

Had to change my post. If you read the previous, sorry for the missinformation.

bocke(R)

18.01.2013, 17:10
(edited by bocke, 18.01.2013, 17:24)

@ bocke
 

Linux drops 386 and some 486 supports

Ok, I have to correct my post. Haven't read carefully your response. Yes, the most distributions use i686 only kernel. That's not the problem if userspace is compiled with generic x86 support (you can prepare your own kernel before the installation), but might be the problem if some packages use i686 specific instructions.

Rugxulo(R)

Homepage

Usono,
18.01.2013, 18:04

@ bocke
 

Linux drops 386 and some 486 supports

> Ok, I have to correct my post. Haven't read carefully your response. Yes,
> the most distributions use i686 only kernel. That's not the problem if
> userspace is compiled with generic x86 support (you can prepare your own
> kernel before the installation), but might be the problem if some packages
> use i686 specific instructions.

The 686(ish) CMOV is overrated, as even Linus himself has admitted. But that's basically all GCC does (not counting scheduling and alignment). Dare I say that GCC is suboptimal in its x86 instruction output? Compilers are very complicated, so writing a decent backend for so many x86 subarchitectures can't be easy. Though I can't imagine speed being that big an issue for modern machines, but "nobody" likes old machines enough to care much for them.

Anyways, Clang is gaining a lot of ground, though I think it too probably assumes at least 686 (PPro) + SSE2. So while that is considered an alternative to GCC, for this particular problem it may not help much.

There are of course other C compilers (PCC, TCC, LCC, ACK), and other languages have their own compilers too (FPC, FBC, XPL0), so I don't think it's the end of the world unless you need a specific version of a specific tool prebuilt for older hardware.

bocke(R)

19.01.2013, 22:08

@ marcov
 

Linux drops 386 and some 486 supports

I found some more info on something I mentioned before I changed my post:

ChangeLog for Slackware 10.0 (2005?):
> Why i486 and not i386? Because the shared C++ libraries in gcc-3.2.x will
> require 486 opcodes even when a 386 target is used (so we already weren't
> compatible with the i386 for Slackware 9.0, didn't notive, and nobody
> complained :-). gcc-3.3 fixes this issue and allows you to build a 386
> compiler, but the fix is done in a way that produces binaries that are not
> compatible with gcc-3.2.x compiled binaries. To retain compatibility with
> Slackware 9.0, we'll have to use i486 (or better) as the compiler target
> for gcc-3.3.

So it was one time problem. Not glibc, but libstdc++.

Anyway Slackware still uses i486 compatible packages (but optimized for i686) and provides a kernel compatible with i486 (thought it's not the default anymore) and Pentium clones that lack some genuine Pentium instructions. But some of the packages are indeed i686 only.

Other distros are probably not so concerned with compatiblity with older Pentium clones. I think even Debian uses i686 only nowadays.

So, for now, Slackware based or derived solutions are maybe the best for those machines that are not supported anymore by other major distributions.

RayeR(R)

Homepage

CZ,
19.01.2013, 23:22
(edited by RayeR, 20.01.2013, 00:26)

@ bocke
 

Linux drops 386 and some 486 supports

> Other distros are probably not so concerned with compatiblity with older
> Pentium clones. I think even Debian uses i686 only nowadays.

We installed Debian on vortex86 machine at work about 1 year ago and all packages worked except kernel that required FPU by default, if I remember well...

---
DOS gives me freedom to unlimited HW access.

bocke(R)

20.01.2013, 19:06

@ RayeR
 

Linux drops 386 and some 486 supports

I checked it out and you are right. My bad.

> However, Debian GNU/Linux squeeze will not run on 386 or earlier processors.
> Despite the architecture name "i386", support for actual 80386 processors
> (and their clones) was dropped with the Sarge (r3.1) release of Debian[2].
> All i486 and later processors are still supported[3].

http://www.debian.org/releases/stable/i386/ch02s01.html.en#id583669

The same is also valid for Wheezy.

Anyway, FPU code seems to still be available as an configuration option. Slackware se alternative "huge.s" kernel does come with this option precompiled in:
> CONFIG_MATH_EMULATION=y
ftp://ftp.slackware.org.uk/slackware/slackware-14.0/kernels/huge.s/config

This is an alternative kernel and needs to be specifically chosen during the installation. The default is huge smp (which requires i686 and PAE).

Rugxulo(R)

Homepage

Usono,
09.01.2018, 01:57

@ RayeR
 

Linux drops 386 and some 486 supports

One group has tested Linux on an actual (beefy) 486:

= http://www.osnews.com/story/30152/The_oldest_x86_processor_still_supported_by_a_modern_Linux_kernel_
= http://yeokhengmeng.com/2018/01/make-the-486-great-again/
= https://www.chenhuijing.com/blog/hardware-hacks-super-silly-hackathon/

These are really links to the same thing, just making it somewhat easier to find.

bocke(R)

10.01.2018, 08:58

@ Rugxulo
 

Linux drops 386 and some 486 supports

> One group has tested Linux on an actual (beefy) 486:

It's good to know that modern linux still works on 486. Thanx for posting.

I wonder what would be the minimal memory requirements for modern kernels. 32 mb? Less? More?

Even in the early versions the requirements were around 4 mb. But there was also a hacked version that could boot with only 1 mb of ram (linux-lite by Paul Gortmaker).

bocke(R)

10.01.2018, 09:04

@ bocke
 

Linux drops 386 and some 486 supports

> linux-lite

The elf version (libc5) is available on ibiblio: http://ibiblio.org/pub/linux/kernel/!INDEX.html

Back to index page
Thread view  Board view
15317 Postings in 1383 Threads, 254 registered users, 14 users online (0 registered, 14 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum