9 ms·
ELKS: Linux for 16-bit Intel Processors
- marcodiego 2y agoWhat would be really interesting: porting DOSEMU 1.4.0 to it. This would give us a maintained unix-like OS combined with a huge abandonware dos library turning those old machines into something fun and maybe useful.
- devit 2y agoThat makes no sense, since DOSEMU is based on virtual 8086 mode, which requires a 80386, while ELKS is for 8086-286 CPUs. You can just run MS-DOS or FreeDOS directly on those machines, that's what the machines were made for.
- anthk 2y agoThis. I literally rebuild DOSEMU yesterday after years of not using it. It used that mode extensively. A good thing about DOSEMU against DOSBOX is that the first could run high end DOS game at amazing speeds as the environment was more like Wine than emulating the whole machine, so you could run Tomb Raider, Need For Speed, Duke Nukem 3D... on a Pentium II while 'simulating' a Pentium MMX or a Pentium 90-like speeds, if not more, being far closer to the performance you got under W95/W98. And, as you said, booting SvarDOS either from a floppy or from an IDE->CF card it's straightforward.
- duskwuff 2y agoComputers which use 16-bit Intel processors (80286 or earlier) are quite rare nowadays - most of them are 30-40 years old, and are more valuable to collectors than newer and more capable hardware would be. If you want something "useful", this isn't where you'd find it.
- yjftsjthsd-h 2y agoI don't know that it's really Unix like, but I feel like freedos covers that use?
- forinti 2y agoWait, "ROM-based systems"? Were there such x86 micros and is this saying you could run Linux from ROM? That's super interesting.
- retrac 2y agoThe 8086 and 8088 etc. were relatively popular for embedded devices. For example some early 90s Apple printers used an 80186 as the controller. Such designs were often incompatible with the IBM PC; 8086 doesn't necessarily mean PC compatible.
- snerbles 2y agoThe Tandy 1000 SL/2 I grew up with had DOS 3.3 in ROM, mounted on D:\
- dfe 2y agoSort of. It’s merely a ROM drive implemented in the BIOS. Drive 8 is used. There’s also an INT 18h hook that operates by simply booting drive 8. This is the fallback bootstrap hook. No disks? No problem. Boots to DOS vs. IBM which booted BASIC or everyone else who just prints an error. On one of these Tandy’s, DOS is really running from RAM, it is merely loaded from ROM, and even then it’s just a virtual disk. I wrote a little tool to make the ROM drive accessible on non-Tandy DOS: https://github.com/dfelliott/tandy1000-romdrive https://github.com/dfelliott/tandy1000-romdrive There are versions of DOS that can be run directly from ROM, but this isn’t one of them. Curiously, Deskmate runs from ROM for real. Meaning the code is actually running in the Exxx segment backed by the actual ROM chip. The Deskmate files on the ROM drive are relatively small and are only a small part. The bulk of the code runs direct from ROM.
- EvanAnderson 2y agoI've never seen a fully ROM-based PC, but I have worked with ISA NE2000 NICs with boot ROMs that allowed them to diskless boot into a DOS-based Novell NetWare client. It wouldn't surprise me if there were ROM-based local boot environments on ISA cards. The Cisco PIX firewall, in it's original incarnation, booted from non-volatile memory (I don't know if it was EEPROM or flash) an ISA card.
- jvanderbot 2y agoThey mention "SBC"s. Is this something that is intended also for modern 16bit SBCs?
- snvzz 2y agoYes absolutely. There are success stories with it on 8088 book, pocket 8086 and similar such hardware.
- IgorPartola 2y agoI do wonder in today’s landscape of single board computers what the right bit width is. A 64-bit system with like 1-2GB or RAM doesn’t make a ton of sense since your program size and data structure size grows by quite a bit but you don’t need it to since you don’t get to have more than 4GB of RAM. On the other hand there you do have SBCs with 8-16GBs of RAM but that’s a far cry from needing full 64 bits. Would an optimal bit width be 48 bits? 40?
- mixmastamyk 2y agoYes, this already happens. Address bus width is usually different from register width due to cost. I found this, old CPU's address bus only getting to 44 bits wide on Itanium. https://www.tech-faq.com/address-bus.html https://www.tech-faq.com/address-bus.html My newish AMD laptop: `grep 'address sizes' /proc/cpuinfo` address sizes : 48 bits physical, 48 bits virtual Looks like 36 bits wide is already plenty for anything typical, up to 68 GB: >>> f'{2**32:>30_}' ' 4_294_967_296' >>> f'{2**36:>30_}' ' 68_719_476_736' >>> f'{2**40:>30_}' ' 1_099_511_627_776' >>> f'{2**48:>30_}' ' 281_474_976_710_656' >>> f'{2**64:>30_}' ' 18_446_744_073_709_551_616'
- ChocolateGod 2y agoI guess no point wasting hardware supporting things that will never be possible for the lifetime of the processor.
- p_l 2y agoAMD64 mandates 48bit virtual addressing minimum, with the rest sign-extended unless certain optional features are enabled.
- Retr0id 2y agoMany "64-bit" systems only have ~48 bits of virtual address space, and while canonical pointers have all the high bits equal, you can put the otherwise-wasted bits to work by storing metadata. If you're writing really space-optimised code, you can pack pointers closer together.
- tialaramex 2y agoCool. A quarter of a century ago a friend of mine worked on this and you can still see his name in some copyright notices (Alistair Riddoch) Most recently Al was learning Rust because he needs that for his current role, it might be fun to see whether you can write an ELKS target for Rust.
- ghaerr 2y agoIs Alistair Riddoch still around? I've been wondering about him, his name is all over the early dev86 and ELKS C library code :)
- tialaramex 2y agoWell I mean, he's a friend and in fact hosted the NYE party I was at so, in that sense he's still around. I might see him later this week and if so I'll try to remember to mention that ELKS is still going.
- alriddoch 2y agoHi! I'm not really doing much in the Free Software space any more, mostly due to inflexible employment situations, but I'm delighted to see ELKS still ticking along.
- tmzt 2y agoDoes anybody have the archive of the original ELKS site with the quote from Linus that Linux is not suitable for anything but 486 or higher or something like that?
- jagged-chisel 2y agoHow recent was the quote? Anywhere near 486 through Pentium, and the quote makes absolute sense. He wouldn’t have been optimizing for smaller architectures. Since then, some (many?) contributors have supplied support for smaller systems.
- mepian 2y agoLinux started on the 386. “It is NOT portable (uses 386 task switching etc), and it probably never will support anything other than AT-harddisks, as that's all I have :-(.”
- gregw2 2y agoCouldnt find that quote on the 2001 version of the site. https://web.archive.org/web/20010626233912/http://www.elks.ecs.soton.ac.uk/faq-1.php3#1.2 https://web.archive.org/web/20010626233912/http://www.elks.e... Not sure if you are confusing that with the original Linux/Linus announcement post: https://groups.google.com/g/comp.os.minix/c/dlNtH7RRrGA/m/SwRavCzVE7gJ?pli=1 https://groups.google.com/g/comp.os.minix/c/dlNtH7RRrGA/m/Sw...
- tmzt 2y agoI searched archive a while ago and couldn't find it. It's probably referencing the announcement but I clearly remember a pull quote on the ELKS site, probably the same one quoted above. I happened upon the site when first playing with a (z80) Gameboy compiler (probably SDCC) and wanting to port Linux to it. I fully admit i could be imagining it. Yes, I should have said 386.
- garaetjjte 2y agoI'm confused what relation this has with Linux.
- pm215 2y agoThe "getting started" doc briefly mentions the history: it began in 1995 as a fork of the standard Linux kernel (initially named Linux-8086), by Linux kernel developers Alan Cox and Chad Page. So it does share both code roots and some initial community with the "real" mainline Linux.
- lproven 2y agoWhat isn't explained by the name? ELKS: Embeddable Linux Kernel Subset. It'a a subset of the Linux kernel, which is suitable for embedded systems. Meaning, "don't expect this to be a usable desktop OS."
- nh2 2y agoCould somebody with a good understanding of microchip production economics explain what the price difference would be if all 8-bit chips (such as the Atmega328) were replaced by otherwise equivalent 32-bit or 64-bit chops tomorrow (that is, same production capacity and unit counts sold)? How much would it cost, in cents, to just have those extra bits?
- omeid2 2y agoSupply-chains are more complicated than merely the unit price. Things like existing stock, talent, software, product design, certifications (both chip and products based on chip), and hundreds of other things play just as substantial role.
- LeFantome 2y agoProbably more about ecosystem compatibility at this point. There are already RISC-V chips that sell for less than a 6502.
- anthk 2y agoI doudbt about that stance, you can have 6502's on every keybard at ridiculous prices.
- Palomides 2y agoa cheap 32 bit RISC-V chip like the CH32V003 goes for about $0.10, and the cheapest MCU I've heard of (PMS150C, barely useful for anything) goes for around $0.03 there's little real point in 8 bit chips anymore
- fulafel 2y agoEven without special knowledgeon production economics, I dare say there would be a race to produce replacement compatible 8-bit microcontrollers to get people's stuff working again.
- vkoskiv 2y agoI recently added dual screen support to the ELKS console-direct driver, so if your system has both MDA and CGA cards, you enable CONFIG_CONSOLE_DUAL in your kernel config and select runlevel 5 in /bootopts, it will allocate 4 ttys, with one of them on the MDA display. You can see this setup running on my hardware in this pic in the README: https://raw.githubusercontent.com/ghaerr/elks/refs/heads/master/Screenshots/ELKS_Matrix.jpg https://raw.githubusercontent.com/ghaerr/elks/refs/heads/mas... I could use some help testing it on EGA and VGA hardware, as I don’t have any 8 bit cards for those in my collection.
- LeFantome 2y agoWe are removing 32 bit support from the Linux kernel because nobody uses that hardware anymore. Yet, this 16 bit version has commits from today.
- happycube 2y agoIt's a hobby, not big and professional like GNU^H^H^HLinux. Seriously, I haven't worked on this in a long time (I'm Chad) and I'm very impressed by the changelog! Wouldn't have ever thought it'd run DOOM. ;) (and the use of OS/2 for medium model is clever too)
- userbinator 2y agoTons of embedded stuff use 32-bit Linux.
- grishka 2y agoBut that stuff is usually not x86.
- PhilipRoman 2y agoEmbedded projects where intel was involved often use something like Atom.
- rurban 2y agoYes, but this is being replaced by meaty Intel UpSquared boards
- philistine 2y agoThere is a temporal element to your statement. 32-bit support is being removed from the kernel of today. No one uses that hardware for a modern OS anymore. But a small band of hobbyists use old OSes with old machines.
- pantalaimon 2y agoNobody is removing 32 bit support from the kernel.
- snvzz 2y agoTangentially related, DOS is a popular choice in this category of hardware. Freedos has released 1.4rc1 recently, thus 1.4 is close. Svardos switched to EDR-DOS kernel, which is derived from DR-DOS. That's a very nice kernel, written in assembly. Notably, Windows 3.1 works with it, including protected mode.
- lproven 2y agoYup. I wrote about it: https://www.theregister.com/2024/12/23/svardos_drdos_reborn/ https://www.theregister.com/2024/12/23/svardos_drdos_reborn/ I have built a hobby project around it: https://github.com/lproven/usb-dos https://github.com/lproven/usb-dos
- ghaerr 2y agoThanks for the comments! ELKS will run on an 8088, but also runs on any x86 PC using the legacy "real mode" which runs in 16-bit segmented architecture without an MMU or any hardware protection. It can be fun to boot a PC and see a close resemblance to Linux, but run the way things used to be, using only 16-bits. It'll also run in ROM, e.g. using a 8018x CPU w/onboard PIT and PIC. The point of ELKS today is about "small is beautiful" and seeing what can be done when limited to 64k code and 64k data, and 640k RAM. It's based on a very old fork of Linux and many of the internal structures are similar to what was found in Linux 2.0, without the changes for SMP support. We just recently got a native C compiler/assembler/linker toolchain up and running. I must say making that happen provided some vivid comparisons of what programmers had to go through in decades past in both slower speeds and small executable file sizes, versus what we all have and expect today at our fingertips.
- helf 2y ago[dead]
- ikari_pl 2y agoThis is what I've been looking for! Can you fit a workable version on a 1.44 floppy?
- cricalix 2y agoAround 1996/97 timeframe, you could fit a kernel and userspace. I remember building a 1.44 setup that booted a compressed kernel and had enough user space tooling to bring up telnet, ftp, and the radio stack to drive the long haul radio cards (we were replacing JNOS [0] IIRC at an ISP ). Even had writable space at the end of the floppy (the kernel etc were readonly) to write overrides of the config; poor man's overlay I think, but it is rather a long time ago. Given we were working with 286 era hardware (maybe 386?), I'd be surprised if ELKS doesn't fit on a 1.44. Indeed, simply looking at the downloads page linked from the original link would have answered your question.. [1] 0 - https://www.langelaar.net/jnos2/documents/about.html https://www.langelaar.net/jnos2/documents/about.html 1 - https://github.com/ghaerr/elks/releases https://github.com/ghaerr/elks/releases
- accrual 2y agoMy oldest working systems are now a 386/DX40 and 486/DX2-66, but I never had a chance to run Linux on them back then. Did anybody here have a favorite distro for such early 90s hardware? When I find a 286 or earlier I'd love to give ELKS a try.
- fulafel 2y agoSounds optimal for microservices.
- squarefoot 2y agoThe memories. I had it run ("installed" would be a big word ona 2 flopppy and no hard drive system) on a super cute Carry-1 8088 computer ages ago, which I stupidly sold on Ebay shortly after as I had no use for it. Here's one of the very rare photos online. http://vintagescan.blogspot.com/2015/12/flytech-carry-i-1990.html http://vintagescan.blogspot.com/2015/12/flytech-carry-i-1990...
- cloudsec9 2y agoAnother operating system that deserves mention for 286 class machines is Coherent. This was an Unix like OS you could buy for $99, and it had all of the various Unix utilities and came with a HUGE manual to help you learn it. They had a 386 version as well, but went all in on getting X-windows and graphics working, and ignored TCP/networking just as the Internet started to gain a lot of traction. Still an interesting OS to look at!
- lproven 2y agoThe final version of Coherent is FOSS now: https://github.com/gspu/Coherent https://github.com/gspu/Coherent
- knorker 2y agoI used elks back when I was too poor to buy a real laptop. My laptop was a 286 (old even then), with a shot battery. So I used elks and lugged around a lead acid motorcycle battery. It was great for my circumstances, but I wouldn't say I miss it compared to my many cores and gigs laptop.
- deleted 2y ago[deleted]
- chriscappuccio 2y agoThere was a version of KA9Q NOS with multitasking that could serve telnet, ftp, smtp, bbs, convers, and more plus give you multiple switchable terminals for telnet, ftp, all at the same time on an 8088 and connect to a packet driver for modem, ethernet, or AX25. It was a port of BSD networking with its own multitasking capability. Also PC/MIX was pretty cool.
- incanus77 2y agoI had tried to get some version of Linux running on my 386SX / 25MHz / 8MB RAM but only succeeded in getting BasicLinux[1] running bootstrapped from a DOS boot first. Somehow I had never found ELKS! But I was just able to trivially make a floppy and boot the system[2]. Amazing. Looking forward to playing with this. [1] https://distro.ibiblio.org/baslinux/ https://distro.ibiblio.org/baslinux/ [2] https://mastodon.social/@incanus/113777573079528868 https://mastodon.social/@incanus/113777573079528868
- anthk 2y agoIf you can compile and install TCC you might compiler further useful software and games. Also, check delicate linux: http://delicate-linux.net/ http://delicate-linux.net/ Do not try X under Delicate Linux, it will run dog slow with 8MB of RAM. If you can upgrade it to 16MB and some 486, X would be fine, with icewm set to a light plain theme, no desktop icons.
- incanus77 2y agoI've been able to cross-compile from Linux (in Docker on my Mac; things didn't work well on macOS) to make binaries that run on the 386 under ELKS. Just had to juggle a few stock games to grab a couple dozen KB on the floppy to make room.
- hudecekdev 2y agoI don't know exactly why, but this makes me happy.