Skip Navigation

Milestone 1: Initial Assembly

For this milestone, you will assemble your Raspberry Pi 5. You will also refresh your skills with the Vi editor, which will be needed in future milestones.

Page Contents

Milestone Worksheet

Please download the following worksheet Milestone 1. To be sure your browser downloads the file instead of trying to open it, right-click the following link and choose “Save As,” “Save Link As,” or similar language from the menu. (Each browser is a little different in what wording it uses.)

Procedure

Background

As you begin your Raspberry Pi journey, I suggest watching the How Raspberry Pis are made (Factory Tour) YouTube video from Jeff Geerling. The video shows the assembly of an earlier version of the Pi, but it helps to explain some things about the hardware.

Assemble the Pi

For this part of the procedure, you will need to assemble your Raspberry Pi 5 kit. The parts of the kit you need are:

  1. The Raspberry Pi 5,
  2. The case,
  3. The active cooler, and
  4. The RTC battery.

To assemble the Pi, active cooler, and case, I suggest watching this Raspberry Pi 5 setup video on YouTube. Please note that I have already removed the original fan from the case before I handed them out, if you are borrowing your kit from the department. Also, you may need to remove and discard a plastic plug from the fan connector before you can plug in the fan on the active cooler. You Pi may or may not have this plastic plug, as it often gets removed during the manufacturing process (but sometimes doesn’t).

In order to connect the Real Time Clock (RTC) battery, please take a look at the Real Time Clock official Raspberry Pi documentation. You simply need to plug the battery connector into the right location on the Pi board. Once again, it is possible that a small plastic plug could remain inside this connector after manufacturing.

There is an adhesive pad for attaching the RTC battery, although the case really doesn’t have a great place to put it. I normally attach it to the underside of the lid, out in the middle so that the lid closes properly. The only catch is that you need to remember to open the lid carefully so as not to pull on the battery cable.

Once you have your Pi assembled, use your phone to take a photo of the assembled Pi with the case lid off, so that I can see that the active cooler and battery are installed. You will need to include this photo in your milestone worksheet, so you’ll need to get the photo from your phone onto your computer. There are several ways that you can accomplish this transfer, including emailing the photo to yourself and plugging your phone into your computer to access your photo files directly.

Vi

Once you have your Raspberry Pi assembled and photographed, the next step of this milestone is to review your Vi editing commands. In future milestones, the only editor that we will have is BusyBox Vi, and editing text files will be part of the setup process. We’ll get a much nicer version of Vi in Milestone 5 when we install Neovim. However, the basic editing commands will remain the same.

The vi editor was originally created by Bill Joy in 1976 as an improvement to the line-oriented ex editor. Joy was using an ADM-3A terminal at the time, which included a keyboard without arrow keys. Hence, vi was designed as a modal editor, meaning that it has several different modes of operation. The initial mode, known as normal mode (or command mode), is for giving commands to the editor. Actually changing the text in the document requires first switching to insert mode or one of its special cases (such as append mode).

On UNIX-like systems, which include Linux, FreeBSD, and macOS, the relevant specifications require that the vi editor be present. As such, it is the one editor that you can assume is installed on any standards-compliant, UNIX-like system. For this reason, it is important to have at least a basic working knowledge of vi even if you prefer to use something else as your regular editor.

There are multiple different re-implementations of vi, some of which have extra features (notably Vim and Neovim). However, the UNIX specifications only require a basic vi implementation that follows a set of conventions used for the editor, so the exact editor will vary by system. On many Linux systems, for example, the base environment includes Vim running in vi compatibility mode.

Alpine Linux makes use of BusyBox, which is a lightweight suite of tools that provide the basic userspace commands for a UNIX-like system. BusyBox is widely used in a variety of “smart” devices, including routers, TVs, and other equipment running embedded Linux. One of the utilities supplied by BusyBox is vi.

BusyBox is an example of a multi-call binary. There is a command named busybox that can be used to run any of the programs it implements. For its vi implementation, one could run busybox vi. However, it is also possible to create a symbolic link to the busybox program named vi. If the busybox program sees that it is being called with the vi name, then it will automatically run the vi implementation. This approach with symbolic linking is used in Alpine Linux, which we’ll be using in future milestones.

Now when it comes to actually using vi, there are resources “out there” with plenty of documentation. However, I’ve tried to simplify things with the following video:


Watch at Internet Archive

If you’ve never used Vi at all before, then I suggest trying the online interactive OpenVim or VimHero tutorials. The only complaint I have about these tutorials is that they force the use of h, j, k, and l for cursor motions in normal mode. I prefer to use the arrow keys myself, as I find these movement keys to be uncomfortable, and my practical efficiency isn’t really affected by moving to the arrow keys and back.

Hints and Tips

As a reminder, here are the instructions for editing the worksheet in either LibreOffice or Word Online:

Submitting the Milestone

After you’ve finished editing the Milestone Worksheet, save your work, and then export the completed worksheet to a PDF file. Instructions for exporting to PDF are provided under Hints and Tips above. Upload the PDF file as the submission to the Moodle assignment activity for Milestone 1.

To stay on track in this course, be sure that you submit your work before the published due date for Milestone 1. Use the extra time available before the end of the Discovery Phase to make any revisions you need to make after I give you feedback.

ABET Assessment

This activity supports the following ABET performance indicators: