How it works...

In the first step, we install the QEMU emulator. Without the loadable code images, this virtual machine doesn't have much use. Then, we can fetch the three images required to run a Linux operating system:

  • The Linux root filesystem: Contains a snapshot of Raspbian Linux, used on Raspberry Pi devices
  • The Linux kernel
  • The Device tree blob: Contains a description of the hardware components of a system

Once all the images are fetched and put into the ~/raspberry directory, we run QEMU, providing paths to the images as command-line parameters. Additionally, we configure the virtual network, which allows us to connect to the Linux system running in the virtual environment from our native environment.

After QEMU starts, we can see a window with a Linux login prompt:

After logging into the system, we can run a quick sanity check by running the uname command:

Similar to the sanity check we ran in the previous recipe, Setting up the build system in a Docker container, this shows that we are running a Linux operating system, but, in this case, we can see that the target architecture is ARM.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.93.221