IOT-GATE-RPI4: Raspberry Pi OS image installation
This article provides instructions needed to install the Raspberry Pi OS image onto the Compulab IOT-GATE-RPI4 internal storage. The recommended installation procedure is using a host PC with a Debian-based operating system.
Downloading the OS image
- Download IOT-GATE-RPI4 Raspberry OS image archive.
- It's referred to as iot-gate-rpi4_raspios-linux_YYYY-MM-DD.zip further in the article.
Preparing the workstation
- Obtain a Debian-based workstation with a free USB port.
- Install required packages build-essential and libusb by using the command
sudo apt-get install build-essential libusb-1.0-0-dev pkg-config
- Ensure Git is installed on the workstation:
sudo apt-get install git
- Clone the usbboot git repository by using the command
git clone --depth=1 https://github.com/raspberrypi/usbboot
- Change directories to the usbboot directory
- Build the usbboot tool
- Run the usbboot tool
- The tool will wait for the connection.
- Connect the IOT-GATE-RPI4 micro-USB Programming (PROG) port with the workstation USB port using a standard micro-USB cable.
- Power on the IOT-GATE-RPI4. The rpiboot tool will discover the IOT-GATE-RPI4 and send boot code to allow access to its internal storage (eMMC).
Flashing the OS image into the device storage (eMMC)
- When rpiboot completes, a new device, /dev/sdX (X being the lower case letter indicating the device drive letter), will appear. Check /dev/ or run lsblk before and after running rpiboot to see which new device has appeared.
- Unmount the devices that appeared (in case it is mounted automatically)
sudo umount /dev/sdX*
- Flash the raw OS image into the device:
unzip -p /path/to/iot-gate-rpi4_raspios-linux_YYYY-MM-DD.zip | sudo dd of=/dev/sdX bs=1M status=progress conv=fsync
- To verify the flashing has completed successfuly, unplug and re-plug the USB cable. Two partitions will appear: /dev/sdX1 a FAT partition, and /dev/sdX2 an ext4 Linux filesystem partition.
Booting IOT-GATE-RPI4 after installation
- Power-off IOT-GATE-RPI4.
- Unplug the USB cable from the micro-USB Programming (PROG) port.
- Power-on IOT-GATE-RPI4.