Module Integration Guides
...
Linux
Device Setup

Raspberry Pi

7min

Selecting the OS

This section explains how to do an initial setup, for an off-the-shelf Raspberry Pi. To get started, the following things are needed.

  1. Raspberry Pi Board (In this example we use Raspberry Pi Model 3B+).
  2. An SD Card (of size 64GB)
  3. An adapter for power supply (with at least 15W of power)
  4. ByteBeam RPI image

ByteBeam RPI image can be downloaded from this link.

Install the RPI-imager software by following the instructions in this link.

Once the installation is done, connect the SD card to the Linux machine and launch the RPI-imager software. To do so, simply type in rpi-imager on the terminal.

Shell

FigRaspberry Pi Imager GUI
FigRaspberry Pi Imager GUI


Then click on Choose OS. A new window will open up, that has the list of all available Operating Systems for the Raspberry Pi.

Document image


Select the Custom Image option.

Document image


Select the downloaded ByteBeam RPI image.

Select Bytebeam RPi Image
Select Bytebeam RPi Image


Flashing the image to the SD Card

Using RPI-imager, it’s possible to enable SSH, set a username and password for the Pi, and also input the WiFi credentials. Click on the settings icon on the rpi-imager GUI.

RPI-Imager Settings
RPI-Imager Settings




Setup the necessary configurations.

WiFi and User Credential setup
WiFi and User Credential setup


Save the configuration and click on Write, for the image to be flashed on the SD Card.

Partition Schema

The SD Card is now setup to contain 4 partitions.

  1. Partition 1 - Boot partition (/dev/mmcblk0p1)
  2. Partition 2 - Root partition 1  (/dev/mmcblk0p2)
  3. Partition 3 - Root partition 2 (/dev/mmcblk0p3)
  4. Partition 4 - Download partition (/dev/mmcblk0p4)
Raspberry Pi Partition Scheme
Raspberry Pi Partition Scheme


At any given point in time either "Partition 2" or "Partition 3" will be the active rootfs partition, and the other partition is referred to as the inactive partition. The download partition is where application data is stored. During kernel & rootfs updates, the contents of inactive partitions are replaced with the new rootfs.

Once the flashing is complete, insert the SD card into the Pi and power on the Pi. If everything is alright, the Pi can be accessed either through SSH or via UART. Refer to this link on how to connect the Pi to the system via UART.

SDK Setup

Once the Pi is up run the below one-time setup script. This script installs Bytebeam's Linux agent uplink as well as scripts required for over-the-air updates



Shell