A Tiny RISC-V Emulator Runs Linux With No MMU. And Yes, It Runs DOOM!

It’s something of an article of faith, that to run Linux your computer must include a hardware memory management unit, or MMU. To an extent it’s true, in that for a Linux-based system to shine it must have that hardware, but in fact there has been support for MMU-less Linux for many years now. Prolific hacker [cnlohr] has created an emulated simple RISCV processor without an MMU, and not only does it run Linux, it also runs DOOM.

The videos below the break go into significant depth on writing and debugging an emulator not to mention the inner workings of DOOM, but fear not if it’s not your thing. Everything can be found in a GitHub repository, and there are straightforward instructions should you wish to try it yourself.

All this is entertaining stuff, but it becomes of much more interest when viewed as part of an ongoing chain of projects working on no-MMU Linux for low-end RISC-V microcontrollers. Imagine the prospect of running Linux on a CPU costing relative pennies, and you can see why that’s an interesting prospect. Even if it’s not the most unexpected way to run Linux without an MMU.

Continue reading “A Tiny RISC-V Emulator Runs Linux With No MMU. And Yes, It Runs DOOM!”

Showing the scope screen and the BeagleBone setup side by side, with GPIO input and output traces shown on the scope screen.

How Realtime Is Your Kernel? Scope A GPIO To Find Out

When debugging something as involved as kernel scheduler timings, you would typically use one of the software-based debugging mechanisms available. However, in cases when software is close to bare metal, you don’t always need to do that. Instead, you can output a signal to a GPIO, and then use a logic analyzer or a scope to measure signal change timing – which is what [Albert David] did when evaluating Linux kernel’s PREEMPT_RT realtime operation patches.

When you reach for a realtime kernel, latency is what you care about – realtime means that for everything you do, you need to get a response within a certain (hopefully very short) interval. [Albert] wrote a program that reads a changing GPIO input and immediately writes the new state back, and scoped both of the signals to figure out the latency of of the real-time patched kernel as it processes the writes. Overlaying all the incoming and outgoing signals on the same scope screen, you can quickly determine just how suitable a scheduler is when it comes to getting an acceptable response times, and [Albert] also provides a ready-to-go BeagleBone image you can use for your own experiments, or say, in an educational environment.

What could you use this for? A lot of hobbyists use realtime kernels on Linux when building CNC machine controllers and robots, where things like motor control put tight constraints on how quickly a decision in your software is translated into real-world consequences, and if this sounds up your valley, check out this Linux real-time task tutorial from [Andreas]. If things get way too intense for a multi-tasking system like Linux, you might want to use a RTOS to begin with, and we have a guide on that for you, too.

Using I²C Sensors With Any Linux Via USB And IIO

Hooking up I2C sensors is something which is generally associated with microcontrollers and SBCs, yet it’s very easy to use such I2C sensors from basically any system that runs Linux. After all, I2C (that is, SMBus) is one of the interfaces that is highly likely to be used on your PC’s mainboard as well as peripherals. This means that running our own devices like the well-known BME280 temperature, pressure and humidity sensor, or Si1145 light sensor should be a piece of cake.

In a blog post from a few years ago, [Peter Molnar] explains in detail how to wire up a physical adapter to add a USB-connected I2C interface to a system. At its core is the ATtiny85 AVR-based MCU, which provides a built-in USB interface, running the I2C-Tiny-USB firmware.

The essential part here is that the MCU shows up to the Linux kernel as an i2c device, requiring the i2c-dev driver to be loaded. After this the I2C device that is connected to the adapter MCU’s I2C bus can be used via the Linux module’s API calls, either directly or via existing drivers. [Peter] found that the BMP280 driver came with Debian Sid, for example.

When Pi Supply Falls Short, Thin Clients Stand Tall For Home Automation And Low Power Computing

Do you need a cheap, small computer for a low power computing project? Historically, many of us would reach straight for a Raspberry Pi, even if we didn’t absolutely need the GPIO. But with prices elevated and supplies in the dumps, [Andreas Spiess] decided that it was time to look for alternatives to now-expensive Pi’s which you can see in the video below the break.

Setting up Debian for IOTstack

Many simply use the Pi for its software ecosystem, its lower power requirements, and diminutive size. [Andreas] has searched eBay, looking for thin PC clients that can be had for as little as $10-15. A few slightly more expensive units were also chosen, and in the video some comparisons are made. How do these thin clients compare to a Pi for power consumption, computing power, and cost? The results may surprise you!

Software is another issue, since many Pi projects rely on Raspbian, a Pi-specific ARM64 Linux distribution. Since Raspbian is based on Debian, [Andreas] chose it as a basis for experimentation. He thoughtfully included such powerful software as Proxmox for virtualization, IOTstack, and Home Assistant, walking the viewer through each step of running Home Assistant on x86-64 hardware and noting the differences between the Linux distributions.

All in all, if you’ve ever considered stepping out of the Pi ecosystem and into general Linux computing, this tutorial will be an excellent starting point. Of course [Andreas] isn’t the first to bark up this tree, and we featured another thin client running Klipper for your 3D printer earlier this month. Have you found your own perfect Pi replacement in these Pi-less times? Let us know in the comments below.

Continue reading “When Pi Supply Falls Short, Thin Clients Stand Tall For Home Automation And Low Power Computing”

A Single Board Computer From A TV

It is an annoyance for some members of our community, that it has become almost impossible to buy a TV that’s not a so-called “smart” TV. These units contain a computer as well as the display, and it boots into a locked-down OS with a user interface and a load of streaming apps. Can anything be done with them other than what their manufacturers intended? [Nina Kalinina] has managed it, taking the mainboard from a discarded LCD TV and liberating the ARM Linux board within.

On the board are all the inputs you’d expect from a TV, along with Ethernet, and a couple of extra USB ports hidden in the WiFi interface. There’s a UART available on the SCART connector, and accessing the U-boot menu is achieved by the unusual means of sending a character to the infrared port using a Palm Pilot. Surprisingly the device tree in the Flash was editable, so with the Linux OS accessed, the board was revealed as having a dual-core Novatek SoC.

This is reminiscent of the days when the new hotness was dragging a Linux box out of a home router, and just as those were quickly eclipsed by inexpensive boards such as the Raspberry Pi, so might these TV boards meet the same fate. If, however, they can be made to drive a screen with something more useful than the TV interface then that might change, as who wouldn’t want to make an old smart TV a bit more useful?

Bye Bye Linux On The 486. Will We Miss You?

A footnote in the week’s technology news came from Linus Torvalds, as he floated the idea of abandoning support for the Intel 80486 architecture in a Linux kernel mailing list post. That an old and little-used architecture might be abandoned should come as no surprise, it’s a decade since the same fate was meted out to Linux’s first platform, the 80386. The 486 line may be long-dead on the desktop, but since they are not entirely gone from the embedded space and remain a favourite among the retrocomputer crowd it’s worth taking a minute to examine what consequences if any there might be from this move.

Is A 486 Even Still A Thing?

Block diagram of the ZFx86 SoC
An entire 486 PC in a chip that only uses 1W, that would have been amazing in 1994!

The Intel 80486 was released in 1989, and was substantially an improved version of their previous 80386 line of 32-bit microprocessors with an on-chip cache, more efficient pipelining, and a built-in mathematical co-processor. It had a 32-bit address space, though in practice the RAM and motherboard constraints of the 1990s meant that a typical 486 system would have RAM in megabyte quantities. There were a range of versions in clock speeds from 16 MHz to 100 MHz over its lifetime, and a low-end “SX” range with the co-processor disabled. It would have been the object of desire as a processor on which to run WIndows 3.1 and it remained a competent platform for Windows 95, but by the end of the ’90s its days on the desktop were over. Intel continued the line as an embedded processor range into the 2000s, finally pulling the plug in 2007. The 486 story was by no means over though, as a range of competitors had produced their own take on the 486 throughout its active lifetime. The non-Intel 486 chips have outlived the originals, and even today in 2022 there is more than one company making 486-compatible devices. RDC produce a range of RISC SoCs that run 486 code, and according to the ZF Micro Solutions website they still boast of an SoC that is a descendant of the Cyrix 486 range. There is some confusion online as to whether DM&P’s Vortex86 line are also 486 derivatives, however we understand them to be descendants of Rise Technology’s Pentium clone. Continue reading “Bye Bye Linux On The 486. Will We Miss You?”

Linux Fu: Easy VMs

It wasn’t long ago that we looked at easily creating Docker containers from the command line so you could just easily spin up a virtual environment for development. Wouldn’t it be nice if you could do the same for virtual machines? You can. Using Multipass from Canonical, the makers of Ubuntu, you can easily spin up virtual machines under Linux, Mac, or Windows. Granted, most of the virtual machines in question are variations of Ubuntu, but there are some additional images available, and you can create your own.

Once you have it installed, starting up a new Ubuntu instance is trivial. If you have a set configuration, you can even set up predefined setups using a YAML file.

Continue reading “Linux Fu: Easy VMs”