Flashing to eMMC via a USB drive

1 Overview

Introduce the background and applicable scope of flashing to eMMC via a USB drive.

1.1 Background

Currently, our company's ED-IPC and ED-HMI products support eMMC flashing via Micro USB. However, for some older models (e.g., ED-CM4SEN), the Micro USB port is located inside the device, requiring the removal of the outer casing to perform flashing, which complicates the process.

For devices with externally accessible Micro USB ports, frequent plugging/unplugging may lead to port damage, and the flashing speed via Micro USB is relatively slow.

To address these issues, customers have requested the ability to flash to eMMC using a Type-A USB port with an external USB drive. For this application scenario, our engineers have conducted validation and developed a step-by-step guide to assist users in flashing to eMMC via a USB drive.

1.2 Applicability

Applicable device models for this solution are as follows:

  • ED-IPC2100
  • ED-IPC2600
  • ED-HMI2120-070C
  • ED-HMI2120-101C
  • ED-HMI2630-101C

2 Configuration Guide

To flash to eMMC via a USB drive, follow these steps:

  1. Install Raspberry Pi OS on the USB drive.
  2. Configure the device's boot order to prioritize USB boot.
  3. Insert the USB drive and allow the device to boot normally.
  4. Copy the Raspberry Pi OS to the device's directory.
  5. Use the built-in Raspberry Pi Imager tool on the device to flash the eMMC.

The following steps use the ED-IPC2100 device as an example to demonstrate the detailed process of eMMC flashing via a USB drive.

2.1 Flash the image to the USB drive

It is recommended to use the official Raspberry Pi flashing tool, which can be downloaded from the following path:

Preparation:

  • The flashing tool has been downloaded and installed on the Windows PC.
  • The image file to be flashed has been obtained.

Steps:

The operating steps are explained using the Windows system as an example.

  1. Insert the USB drive into a USB port on the Windows PC.

  2. Open SD Card Formatter, select the drive to be formatted, and click the "Format" button at the bottom right to proceed with formatting.

    image-20241011153629436
  3. In the pop-up dialog box, click "Yes".

  4. After formatting is completed, click "OK" in the dialog box.

  5. Close SD Card Formatter.

  6. Open Raspberry Pi Imager, click "CHOOSE OS", and select "Use custom" in the pop-up pane.

    img
  7. Follow the prompts to select the obtained image file from the custom path, then return to the flashing main interface.

  8. Click "CHOOSE STORAGE", then in the "Storage" interface, select the default SD card and return to the main flashing interface.

    image-20250403172611047
  9. Click "NEXT", then in the pop-up dialog box "Use OS customization?", select "NO".

    image-20241011154241786
  10. In the pop-up "Warning" dialog box, select "Yes" to start writing the image.

    installation-
  11. After the image writing is completed, file verification will be performed.

    installation-2
  12. After verification is completed, a "Write Successful" dialog box will appear. Click "CONTINUE" to complete the flashing process.

  13. Close Raspberry Pi Imager and safely remove the USB drive.

2.2 Configure the device to boot from USB

Configuring the device to boot from USB includes two methods:

  • Using the Raspberry Pi Imager tool
  • Configuring via a Linux device

2.2.1 Configure via the Raspberry Pi Imager Tool

We recommend using the official Raspberry Pi Imager tool. The download link is as follows:

Preparation:

  • The flashing tool has been downloaded and installed on the Windows PC.
  • A Micro USB to Type-A USB cable (USB flashing cable) has been prepared.

Steps:

  1. Connect the ED-IPC2100 device’s power cable and USB flashing cable.

    • Power cable connection:
      • One end connects to the 2-pin Phoenix terminal on the device side.
      • The other end connects to an external power supply.
    • USB flashing cable connection:
      • One end connects to the Micro USB port on the device side.
      • The other end connects to a USB port on your PC.
  2. Disconnect the power supply, then reconnect it.

  3. Open the installed rpiboot tool to automatically mount the drive.

img
  1. After the drive is recognized and assigned a letter, a notification with the drive letter (e.g., E:) will appear in the system tray (lower-right corner of the screen), as shown in the image below.

  2. Open Raspberry Pi Imager, click "CHOOSE OS", and select "Misc utility images" in the pop-up pane.

image-20250326152206851
  1. Based on the product model (ED-IPC2100), select "Bootloader (Pi 4 family)" in the interface.

TIP

The selection here depends on the specific product:

  • For CM5/Pi5 platform-based products, choose "Bootloader (Pi 5 family)".
  • For CM4/Pi4 platform-based products, choose "Bootloader (Pi 4 family)".
image-20250326154109888
  1. Select "USB Boot" in the open interface.
image-20250326154147173
  1. Click "NEXT", then select "Yes" in the pop-up dialog box to start writing the image.
image-20250326154147173
  1. After flashing is completed, file verification will be performed.
image-20250326154147173
  1. In the pop-up dialog box, click "CONTINUE" to complete the flashing process.
image-20250403171407328
  1. After flashing is completed, disconnect the Micro USB to Type-A USB cable (USB flashing cable).
  2. Insert the USB drive flashed with the OS into the device’s Type-A USB port, then power off the device and restart it. The device will boot from the USB drive.

2.2.2 Configure via a Linux device

Configure the ED-IPC2100 to boot from USB using another Linux device. The following example uses a Raspberry Pi 4 as the Linux host for configuration.

Preparation:

  • A Raspberry Pi 4 has been prepared, is bootable, and connected to the network via an Ethernet interface.
  • A Micro USB to Type-A USB cable (USB flashing cable) has been prepared.

Steps:

  1. Power on the Raspberry Pi 4 to ensure it boots normally, then open the terminal and execute the following command to install Git.
sudo apt install git libusb-1.0-0-dev pkg-config build-essential
image-20240523164353630
  1. Execute the following commands to clone and install the usbboot tool.
git clone --depth=1 https://github.com/raspberrypi/usbboot
image-20240531142958847
  1. Execute the following commands in sequence to configure the environment.
cd usbboot
make
image-20240531144448183
  1. Execute the following commands in sequence to copy the "customer" folder and navigate into it.
cp -r recovery customer
cd customer
image-20240531144623329
  1. Execute the following commands to open the boot.conf file and modify the value after "BOOT_ORDER=" to "0xf25614".
nano boot.conf
image-20240531144731516
  1. Press Ctrl+O followed by Ctrl+X to save the file and exit the editor.

  2. Connect the Raspberry Pi 4 to the ED-IPC2100 using a Micro USB to Type-A USB flashing cable, then power cycle the ED-IPC2100 (turn it off and restart).

  • Connect the Micro USB end of the cable to the Micro USB port on the ED-IPC2100.
  • Connect the Type-A USB end of the cable to a USB port on the Raspberry Pi 4.
  1. Execute the following command in the terminal window of the Raspberry Pi 4 to update the EEPROM.
./update-pieeprom.sh
image-20240531145040441
  1. Execute the following commands in the terminal window of the Raspberry Pi 4 to mount the drive.
sudo ../rpiboot -d .
image-20240531145140319
  1. Disconnect the Micro USB to Type-A USB flashing cable between the Raspberry Pi 4 and the ED-IPC2100.

  2. Insert the USB drive flashed with the OS into the ED-IPC2100 device's Type-A USB port, then power cycle the device (turn it off and back on). The device will now boot from the USB drive.

TIP

If the ED-IPC2100's eMMC contains an operating system, follow these steps:

  1. Use a disk utility and erase tool to wipe the existing OS from the eMMC.
  2. Insert the USB drive flashed with the new OS into the Type-A USB port of the ED-IPC2100.
  3. Power cycle the device (turn it off and restart) to boot from the USB drive.

3 Flash the image to eMMC

Steps to Flash eMMC on the ED-IPC2100 Using the Built-in Raspberry Pi Imager Tool.

Preparation:

  • The ED-IPC2100 device has successfully booted from the USB drive.
  • The image file to be flashed has been obtained

Steps:

The following steps are explained using a Windows system as an example.

  1. Copy the downloaded image file to the pi directory on the ED-IPC2100 device.

  2. After copying is completed, check the image file in the pi directory on the device.

image-20240531134417479
  1. Click the icon image-20240531134417479 in the upper-left corner of the desktop, then select "Accessories" → "Imager" from the menu to open Raspberry Pi Imager.
image
  1. Click "CHOOSE OS", then in the pop-up "Operating System" interface, select "Use custom".
image-20240523153712179
  1. In the opened "Select image" interface, choose the image file to be flashed.
image
  1. Click "Open" to return to the Raspberry Pi Imager main interface.

  2. Click "CHOOSE STORAGE", then in the pop-up "Storage" interface, select the eMMC as the target storage device.

image-20250328100402439
  1. On the Raspberry Pi Imager main interface, click "NEXT", then select "NO" in the pop-up "Use OS customization?" dialog.
image-20240603175405588
  1. In the pop-up "Authenticate" window, enter the login password (raspberry), then click "Authenticate" to start writing the image.
image-20240523154314747
  1. After flashing is completed, file verification will be performed.
image
  1. After verification is completed, re-enter the login password (raspberry) in the pop-up "Authenticate" window, then click "Authenticate".

  2. In the pop-up "Write Successful" interface, click "CONTINUE" to return to the Raspberry Pi Imager main interface.

  3. After completing the flashing process, power off the device, remove the USB drive, then power it back on. The ED-IPC2100 device will boot from the eMMC.