Installing the Operating System

The installation of the operating system is not a trivial task, in addition there is a shortage of detailed and complete documentation explaining how to install the operating system on the embedded computer, soon the procedures necessary for installing an operating system will be documented in this section. In the current phase of the work, we installed both systems, so that we can decide later which of the two systems will be best for our application.

Note

Official tutorials can be found on the Gumstix website and on the GitHub repositories of the Yocto and Ubuntu project for Gumstix products.

Obtaining OS images

Essentially, the device only needs to run a small program, usually located in a non-volatile memory of the type Read-Only Memory (ROM), to access another non-volatile memory device that stores the operating system, and load the operating system on volatile quick access memory or Random Access Memory (RAM) where it can be executed. In more robust systems, there is, in fact, a chain of these small programs, called bootloaders, where a first stage executes a second stage that loads more complex programs and, in turn, executes a third stage and so on until the operating system is fully loaded and ready to run on its own.

There are two methods for obtaining the operating systems for Gumstix Overo. The first method is to download a precompiled image directly from Gumstix. The second method is to build the image on your computer yourself. Creating the operating system image manually has additional benefits, such as customizing or adding additional binary packages to your base image. The possibility of personalization will be very important in the development of the project.

Preparing the Memory Card

Once the image of the operating system is obtained, we can transfer the files to the embedded computer in order to connect it. This task will be performed using an SD card that will act as the hard disk of the embedded computer. Therefore, the SD card will contain both the programs needed for boot, which will be used only when starting the computer, and the other programs can be used at any time and will make constant changes to the SD card. So, the best way to deal with this division is to partition the SD card into two partitions that will be called boot and rootfs.

The file management system defines the method that the operating system will use to store files and their information, or file metadata, in memory spaces, such as name, occupied memory space, dates of changes and last accesses. There is a wide variety of file management systems with the most diverse complexities. But what we may need in this work and in future works is the “FAT” system, an old system generally used in media and, usually, universal. “Ext” is a system designed specifically for Linux and it is not possible to access it from another operating system without a program for this purpose.

This is a very common procedure and there are numerous ways to do it, however, here we will use Linux’s own disk manager to perform partitioning, as it is a simple, intuitive tool and allows for future changes without major difficulties. It is worth mentioning that this is not the method indicated by the manufacturer, since the procedures recommended by them on the page Create Bootable MicroSD Card presented the most diverse errors, however, the results obtained using the procedures of the topic below are the same.

Writing the image on the MicroSD Card

After dividing the SD card, we can proceed with the installation of the system by mounting its partitions and copying the files obtained previously, the two bootloaders files, to the folder where the boot partition was mounted and extracting the system directories to the folder where the rootfs partition has been mounted.

After that, the procedure for mounting a memory partition is an activity of the operating system to ensure that the transfer of information will be done correctly, basically the connected device is read in its entirety to identify the files stored in it and where new information can be written to without overlapping data. However more important than mounting the partition is to unmount the partition before disconnecting the peripheral, as it ensures that no write activity on the partition is taking place at the time the device is removed. This procedure also ensures that all requested changes have been made on the peripheral and are not saved in temporary files or system buffers.

The procedure described below is based on the manufacturer’s recommendations and is specific for installing the Yocto Project system on Gumstix Overo devices.

Tip

Remember to unmount the partitions before removing the SD card.

References

  • PITA, H. C. Desenvolvimento de sistema de comunicação multiplataforma para veículos aéreos de asa fixa. Faculdade de Tecnologia, Universidade de Brasília, 2018.