[personal profile] muwlgr
In Aug 1991, Linus Torvalds rolled out to the world his creation, the Linux OS, which he developed and debugged on his PC/AT-386 with 4 MB RAM.
Long time since then, 80386SX with 2MB RAM was the lowest specification allowing you to run a full-featured Unix-like OS.
But to our great regret, with Linux 3.8 released at the beginning of 2013, 80386 support had been removed from its kernel.
So you had to own at least 80486SX to run Linux which of course was much less encouraging for historically-curious IT hardware researchers.
Moreover, in their respective times, 80386 support had also been removed from once-everywhere-portable NetBSD (since v5.0 in Apr 2009) and from BuildRoot (since 2016.05 in May 2016).

Now it is a turn to tell about my personal part in this story.

In about Aug 2000, I had been donated a beautiful, Japan-designed, Chinese-made AT-386 PC of "Laser" brand.
It worked since about 1992..1993 at a local FM radio station.
They donated it to me for Internet services I helped provide to them at that time, when they decommissioned this PC after some upgrade.
It has a quite advanced motherboard, compared to most PCs of its epoch, with IDE/Floppy/COM/LPT ports built-in (while you had to plug an additional Multi-IO card into most of then-time MoBos).
It has 16 30-pin SIMM slots, and I got it with 16 1-MB SIMMs plugged in, which is a significant amount of RAM for a system on which you would run MS-DOS, Novell Netware or Windows 3.11.
It also has an 6-port ISA bus riser or a "fir-tree" as it was called in Russian/Ukrainian.
The CPU is a real Intel 386DX, not some of AMD/Cyrix clones. Without 80387, there is a free socket for it.
It has a sticker "Yes it runs with Netware" but surely you needed to plug your own Ethernet adapter to be able to do any networking.
It had a Realtek RTG3105 VGA adapter, very typical for its times.
To bring it back to life, I had to revive its DS1287 CMOS chip (you know, file off its plastic case over certain pins, where its built-in CMOS battery is soldered, cut off the battery outputs, and solder your own external 3V battery box with 1*CR2032 or 2*AA cells to the chip's inputs instead).
For a very small money, I was able to buy a used Realtek 8019 NE2000-compatible 10BaseT Ethernet adapter (which, besides CAT5/RJ45, has a BNC 10Base2 and a DIX 10Base5 connectors).
Also I replaced its IDE HDD with IDE-CF adapter and 32MB CF SSD plugged into it.

Having all this wealth at my hands, I started to think how to exploit it in the most advanced way.
As a DOS platform, it worked perfectly, with DPMI your Doom or C&C would reasonably fly on it.
But I wanted to run something more modern.
Somewhere in Apr..May 2012 I downloaded BuildRoot 2012.02 and was able to build Linux userland with uClibc, Busybox and OpenSSH 6.0, Linux kernel 3.3.2, SysLinux/EXTLinux, and boot it on this hardware.
My host system was most probably Ubuntu 12.04 (Precise) with GCC 4.6.
The target kernel failed on boot since it started blindly using 486's instructions not available on 386, so I had to do some patching to make it work on 386. To do this, I had to build the kernel with debug information and then find the crash places with objdump -d .
Having achieved and enjoyed its bootability, network auto-configuration and even SSH access, I stashed the whole system into my closet for another 10+ years.

Sorting out my legacy boxes in Sep 2023, I decided to check if this "Laser" still works. To my surprise, it only lost HDD geometry from its CMOS setup, but it kept almost the proper RTC date&time. The battery box had discharged to abot 2.9V but after re-entering HDD geometry (490C, 4H, 32S for a 32MB CF card) it did not ever complain about discharged battery as it did before the "revival".

Now I wanted to bring some improvements into the small system I built and put on a CF card. First problem I had in 2012 was that DropBear SSH service did not start, having segmentation fault which I could neither easily debug on the target system, nor easily reproduce on my then-host (which had much more modern Core i3-380UM CPU with hardware virtualization and without these specific 80386 restrictions in its command set). Which is why I had to use heavier OpenSSH.

One more problem was that OpenSSH v6.0 which I had to use instead of DropBear, used only SHA1 hash in key exchange, while OpenSSH v9.3 on Ubuntu host required using SHA256. As a result, public-key SSH login from host to target stopped working.

And the biggest problem was that Ubuntu 23.10 (Mantic), then heading to its soon initial release, had GCC v13 which was unable to build either older kernels including v3.7.9, or older GCC versions (v4.*, v5.*). I got the oldest x86-i686-uclibc-2017.05 toolchain from https://toolchains.bootlin.com/releases_x86-i686.html (gcc 5.4, uClibc-ng-1.0.24, binutils 2.27) which allowed me to complete building BuildRoot 2016.02, but as its uClibs used i686 commands, it was unable to run BusyBox/init on the target 80386.

Fortunately I kept a copy of 2012.02 BuildRoot tree, unpacked, configured and built at these happy times in 2012 when everyone mostly honored 80386 architecture. So I could bump DropBear version from 2012.55 up to 2022.83, rebuild it with needed options and update its installation on the CF card. After that, DropBear started working as expected, so I would not need OpenSSH anymore. Only had to replace OpenSSH host key with DropBear's in my known_hosts.

So now I am again able to update my target system over the network, instead of re-plugging its CF card between target and host every time. SSH login with a public key and running a short command ( like ssh user@target date ) takes about 21 seconds. Definitely not a "speed demon" but still it allows more control and comfort. BogoMIPS value in dmesg is about 6.40 which probably corresponds to 33MHz CPU clock.

Some of my planned future steps for this ancient box would include: replacing its AT PSU with ATX-AT adapter and a DC ATX PSU. Will compare its power consumption before and after. BTW, this will make the system completely fanless and solid-state. Then, I would replace its AT/DIN5 keyboard with PS/2-DIN5 adapter and a PS/2 keyboard which is more accessible in the local market. Also, bumping CF card up to 512MB would not hurt.
On the software side, it would be kernel upgrade to 3.7.9, and trying to find a way of building 80386-only uClibc+gcc+binutils toolchain which I could provide to BuildRoot 2016.02. Also I am curious in enabling IPv6 support in the kernel to impress everyone interested remotely in this way :>

Update from Oct 03rd: I received ATX-AT adapter and put it into work. For its power switch, I used a tumbler button bought at local car parts market. For its ATX PSU, I used LR1106 which performed poorly with my main ATX box. For its external 12V DC source, I used SC-120-12 and TS-IPS-V02 mentioned at https://muwlgr.dreamwidth.org/50053.html and some times before. The overall setup is quite stable, fanless, that's completely silent, and draws <24W when its SLA battery is fully charged.

Update from Oct 17th: I received PS2->AT convertor and was able to plug a PS2 keyboard into AT motherboard's DIN5 connector. AT/DIN5 keyboards are close to disappearing on the local market, while PS2 KBs are still sold readily.

Profile

Volodymyr Mutel

May 2025

S M T W T F S
    123
45678910
11 121314151617
18192021222324
25262728293031

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 9th, 2025 04:18 am
Powered by Dreamwidth Studios