Showing posts with label Debian. Show all posts
Showing posts with label Debian. Show all posts

Friday, 27 May 2022

Linux for ARM on QEMU (virt) - System Information

Linux for ARM

Processor designs from Arm Ltd. are used in a plethora of microprocessors and SoC (System on a Chip) components. Which power a wide range of devices including: smartphones, tablets, PDAs, network routers, NAS systems, set-top boxes, etc. Some (non-exhaustive) lists of devices using the ARM architecture can be found in:

The initial port of the Linux kernel to ARM began back in 1994, then targeting an Acorn A5000 running RISCOS, and grew from there through to being part of the mainline Linux kernel.

The use of ARM cores in microprocessors, microcontrollers and SoC devices, for many different vendors, meant that supporting Linux on a device would often require a specific kernel built for that specific device. This limited the availability of general purpose Linux distributions, while making vendor specific embedded Linux kernels common. Fortunately since most user-space applications use the kernel abstractions to access devices, the same user-space can be used with any kernel built for the same flavor of the architecture (see ArmPorts - Debian Wiki).

Support for a selection of ARM based systems ('arm') appeared in the Debian GNU/Linux 2.2 (`potato') release in 2000. The current Debian Linux 11 (bullseye) supports ARM through the 'armel', 'armhf' and 'arm64' (aka. 'aarch64') ports.

QEMU

The diversity of devices using the ARM processor means the QEMU system emulators for ARM provide a large number of emulated systems, with the QEMU 5.2.0 build I'm using listing 90 systems for the 64-bit system emulator (qemu-system-aarch64), and 84 for the 32-bit system emulator (qemu-system-arm). While most systems appear in the lists for both emulators (suggesting they could be implemented with 32-bit or 64-bit processor cores) a small set of systems are 64-bit only.

While most of the available systems correspond to physical hardware, the "QEMU ARM Virtual Machine" system ('virt') is a virtual system based on the use of paravirtualized devices. This provides performance improvements, particularly for I/O, and is useful for software development and testing, for cases where specific hardware features are not required.

Monday, 23 May 2022

Linux for PowerPC on QEMU (g3beige) - System Information

QEMU g3beige running Debian Linux 8 with XFCE desktop

QEMU & Linux for PowerPC

A recent post (see Linux for PowerPC on QEMU (mac99) - System Information) looked at Linux on QEMU's 'mac99' machine, an emulation of an Apple PowerMac G4 (AGP Graphics). But what about QEMU's other Power Macintosh system?

QEMU

QEMU provides an emulation of the older, Apple Power Macintosh G3 ("beige").

Checking Apple Support, EveryMac.com, Wikipedia the hardware specification for the 'g3beige' would be:

SystemApple Power Macintosh G3 ("beige")
Mac FirmwareOldWorld
CPUPowerPC 750 @ 233, 266, 300, or 333 MHz; upgrade to G4 @ 350 or 400 MHz
RAM32, 64 or 128 MiB (768 MiB max.)
BusPCI
Storagebuilt-in IDE controller; 128GB max. HD
built-in SCSI controller
4GB SCSI, 2x 4GB SCSI or 8GB IDE hard disk(s)
24x ATAPI/IDE CD-ROM
Floppy3.5" 1.44MB
VideoATI 3D Rage II+, ATI 3D Rage Pro, or ATI 3D Rage Pro Turbo, 6 MiB VRAM
AudioWhisper or Wings personality card
Networkbuilt-in RTL-8029(AS) 10 Mb/s 10baseT ethernet
Keyboard & MouseADB

Third-party processor upgrades offered higher spec. G3 and G4 options. Since the emulation will determine the processor speed, we'll go with the default processor.

Emulation Command

For reference the QEMU command used:

qemu-system-ppc \
    --machine g3beige \
    -hda hda_DebianLinux_g3beige.qcow2 \
    -cdrom debian-8.11.0-powerpc-DVD-1.iso \
    -g 1024x768x8 \
    -net nic \
    -net "user,guestfwd=:10.0.2.1:22-cmd:netcat 127.0.0.1 22,hostfwd=::2222-:22" \
    -kernel vmlinux-3.16.0-6-powerpc \
    -initrd initrd.img-3.16.0-6-powerpc \
    -append 'root=/dev/sda3' \
    -name 'Debian Linux 8 (jessie) on Power Macintosh G3 (Beige)'

Note that due to issues with the boot loader, a kernel and ramdisk extracted from the installed system are used to start the system.

Friday, 20 May 2022

Linux for PowerPC on QEMU (mac99) - System Information

QEMU mac99 running Debian Linux 8 - XFCE desktop

Linux for PowerPC

Back in the 1990s Apple, IBM and Motorola (Wikipedia) got together and created the PowerPC architecture (Wikipedia), which would be used in IBM's RS/6000 series systems, Apple's Power Macintosh systems and many Motorola products, including desktop computers and embedded processors. Apple's short lived licensing of Macintosh clones during the mid-1990s, Microsoft Windows NT supporting PowerPC (alongside Alpha, MIPS, and x86), and Apple supporting MkLinux development, drove additional interest in the platform and saw production of affordable PowerPC desktop computers.

While IBM would continue development of PowerPC into their 64-bit POWER architecture, Apple had cut-off the Macintosh clone business in 1997, and then Apple switched away from PowerPC in 2006. Leaving a lot of PowerPC based hardware in circulation, with few operating system options remaining.

Linux on PowerPC has a long, and somewhat complex history, with initial work beginning in 1994, the first Linux distributions appearing in 1996, and PowerPC support being integrated in the mainline Linux kernels with Linux 2.2 in 1999. While the PowerPC architecture has been sunset by many distributions, a few remain.

Debian Linux

Debian added support for PowerPC to its Linux distribution in 2000 with the release of Debian GNU/Linux 2.2 (potato), and while official support for 'powerpc' (32-bit PowerPC and 64-bit big-endian PowerPC) ended in 2020 with Debian 8 (jessie), Debian ports continues to make unstable/testing builds for the 'powerpc' architecture, and has official releases for the 64-bit POWER based systems ('ppc64le').

In the interests of simplicity, reproducibility and ease of comparison, I'm going to use Debian Linux 8 (jessie) for PowerPC, since it has a DVD image available, which means the lack of online repositories won't be a problem and we don't have to consider package version variation.

QEMU

The widespread use of PowerPC processors in computers and embedded systems has driven a need for emulators capable of supporting development and testing for those platforms. The QEMU emulator includes a wide range of processor and system emulations for PowerPC processors, making it a excellent options for these roles at minimal cost.

Saturday, 29 May 2021

Linux for SPARC64 on QEMU

Linux for SPARC64

Linux is an open source UNIX-like operating system kernel that supports a wide range of platforms. This includes the 64-bit SPARC platforms (sparc64), commonly seen in Sun Microsystems UNIX workstations and servers.

Since SPARC64 processors support both 32-bit and 64-bin SPARC binaries, Linux distributions for SPARC based systems can come in three broad classes:

  1. 32-bit kernel with 32-bit user-land - 32-bit & 64-bit SPARC processors
  2. 64-bit kernel with 32-bit user-land - 64-bit SPARC processors
  3. 64-bit kernel with 64-bit user-land - 64-bit SPARC processors

The Debian Linux distribution has provided for all three of these scenarios with its 'sparc' and 'sparc64' ports:

Since the 'sparc64' in-official port provides the most recent Linux version, and is fully 64-bit and thus provides more of a contrast with the 32-bit Linux environment used in Linux for SPARC (32-bit) on QEMU (sun4m) - System Information, it's our selected target.