Showing posts with label ARM. Show all posts
Showing posts with label ARM. 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 August 2021

Raspberry Pi OS on QEMU raspi2b - System Information

Raspberry Pi OS

The popular Raspberry Pi (Wikipedia) is often used with a tuned Linux distribution: Raspberry Pi OS (formerly Raspbian), which is based on Debian Linux.

QEMU

The system emulator QEMU provides machine profiles for a selection of Raspberry Pi models:

The 32-bit ARM models, ARMv6 & ARMv7:

$ qemu-system-arm -machine help | grep rasp
raspi0               Raspberry Pi Zero (revision 1.2)
raspi1ap             Raspberry Pi A+ (revision 1.1)
raspi2               Raspberry Pi 2B (revision 1.1) (alias of raspi2b)
raspi2b              Raspberry Pi 2B (revision 1.1)

The 64-bit ARM models, ARMv8:

$ qemu-system-aarch64 -machine help | grep rasp
raspi0               Raspberry Pi Zero (revision 1.2)
raspi1ap             Raspberry Pi A+ (revision 1.1)
raspi2               Raspberry Pi 2B (revision 1.1) (alias of raspi2b)
raspi2b              Raspberry Pi 2B (revision 1.1)
raspi3ap             Raspberry Pi 3A+ (revision 1.0)
raspi3               Raspberry Pi 3B (revision 1.2) (alias of raspi3b)
raspi3b              Raspberry Pi 3B (revision 1.2)

The 64-bit emulation presumably includes the 32-bit models in order to allow for hypothetical upgraded versions of these systems by swapping the ARM processor core. This also provides support for the revisions of the Raspberry Pi 2B, the original board used a BCM2836 SoC with a 32-bit ARM v7 processor, but later versions of the 2B board used a BCM2837 with a 64-bit ARM v8 processor.

These options cover three processors:

  • Broadcom BCM2835 SoC in the Zero and A+
    • ARM1176JZF-S @ 700 Mhz core, 32-bit ARMv6
  • Broadcom BCM2836 SoC in the 2B
    • ARM Cortex-A7 @ 900 MHz, quad-core, 32-bit ARMv7
  • Broadcom BCM2837 SoC in the 3A+ and 3B
    • ARM Cortex-A53 @ 1.2 GHz or 1.4 GHz, quad-core, 64-bit ARMv8

That is three generations of the ARM architecture and coverage of the older models.