Installing CuBox-i firmware on Debian Linux (CuBox-i1, CuBox-i2, CuBox-i2eX, or a CuBox-i4Pro)

After installing Debian Linux on the CuBox-i1, CuBox-i2, CuBox-i2eX, or CuBox-i4Pro, additional firmware files are required for Wi-Fi, SDMA, and hardware-accelerated video decoding. Specifically, the VPU needs proprietary firmware, the Wi-Fi module relies on symlinking files from an official Debian package, and the SDMA engine depends on the non-free firmware package. For context, the following dmesg output from a CuBox-i4Pro demonstrates the missing firmware warnings:

coda 2040000.vpu: firmware: failed to load vpu_fw_imx6q.bin (-2)
coda 2040000.vpu: Direct firmware load for vpu_fw_imx6q.bin failed with error -2
coda 2040000.vpu: firmware: failed to load vpu/vpu_fw_imx6q.bin (-2)
coda 2040000.vpu: Direct firmware load for vpu/vpu_fw_imx6q.bin failed with error -2

coda 2040000.vpu: firmware: failed to load v4l-coda960-imx6q.bin (-2)
coda 2040000.vpu: Direct firmware load for v4l-coda960-imx6q.bin failed with error -2

brcmfmac mmc0:0001:1: firmware: failed to load brcm/brcmfmac4330-sdio.solidrun,cubox-i-q.bin (-2)
brcmfmac mmc0:0001:1: firmware: failed to load brcm/brcmfmac4330-sdio.solidrun,cubox-i-q.bin (-2)
brcmfmac mmc0:0001:1: firmware: failed to load brcm/brcmfmac4330-sdio.solidrun,cubox-i-q.bin (-2)
brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac4330-sdio.solidrun,cubox-i-q.bin failed with error -2

This article explains how to install the missing firmware.

Firmware 1: The integrated Video Processing Unit (VPU)

The CuBox-i computers includes an integrated Video Processing Unit (VPU) for hardware-accelerated video encoding and decoding. The Debian non-free repositories do not package the proprietary Video Processing Unit firmware files. You can download the files directly from the Armbian firmware repository.

For the CuBox-i2eX or CuBox-i4Pro VPU

Run the following command as root to download the Video Processing Unit firmware for the CuBox-i2eX or CuBox-i4Pro:

wget -O /lib/firmware/vpu_fw_imx6q.bin https://github.com/armbian/firmware/raw/refs/heads/master/vpu/vpu_fw_imx6q.bin
wget -O /lib/firmware/v4l-coda960-imx6q.bin https://github.com/armbian/firmware/raw/refs/heads/master/v4l-coda960-imx6q.bin

For the CuBox-i1 or CuBox-i2 VPU

Run the following command as root to download the Video Processing Unit firmware for the CuBox-i1 or CuBox-i2:

wget -O /lib/firmware/v4l-coda960-imx6dl.bin https://github.com/armbian/firmware/raw/refs/heads/master/v4l-coda960-imx6dl.bin
wget -O /lib/firmware/vpu_fw_imx6d.bin https://github.com/armbian/firmware/raw/refs/heads/master/imx/vpu/vpu_fw_imx6d.bin

Firmware 2: SDMA

The mainline i.MX6 device tree specifies imx/sdma/sdma-imx6q.bin for the SDMA engine (Smart Direct Memory Access). If the external firmware is unavailable, the Linux driver can fall back to firmware embedded in the SoC ROM. The external firmware provides additional and updated SDMA scripts for peripherals that use SDMA.

To provide the required firmware files, install the firmware-misc-nonfree package:

apt-get install firmware-misc-nonfree

Once the package is installed, update the initramfs to ensure the binaries are included in the boot image:

update-initramfs -u -k all

Firmware 3: Broadcom Wi-Fi firmware

Step 1: Install the Broadcom Wi-Fi firmware package

Install the firmware-brcm80211 package:

apt-get install firmware-brcm80211

The firmware-brcm80211 package provides the generic firmware file. The Linux driver can additionally request a board-specific firmware and NVRAM file based on the device tree.

Step 2: Configure the missing Broadcom Wi-Fi firmware files

Run the following commands as root to symlink the installed firmware and fallback configuration to the board-specific filenames:

ln -s /lib/firmware/brcm/brcmfmac4330-sdio.bin /lib/firmware/brcm/brcmfmac4330-sdio.solidrun,cubox-i-q.bin
ln -s /lib/firmware/brcm/brcmfmac4329-sdio.bin /lib/firmware/brcm/brcmfmac4329-sdio.solidrun,cubox-i-q.bin
ln -s /lib/firmware/brcm/brcmfmac4330-sdio.bin /lib/firmware/brcm/brcmfmac4330-sdio.solidrun,cubox-i-dl.bin
ln -s /lib/firmware/brcm/brcmfmac4329-sdio.bin /lib/firmware/brcm/brcmfmac4329-sdio.solidrun,cubox-i-dl.bin

Step 3: Download the CuBox-i Broadcom NVRAM configuration

The Linux brcmfmac driver expects a board-specific NVRAM file. Download the configuration provided by SolidRun and install it under /lib/firmware/brcm/.

wget -O /lib/firmware/brcm/brcmfmac4330-sdio.solidrun,cubox-i-q.txt https://raw.githubusercontent.com/SolidRun/meta-solidrun-arm-imx6/jethro/recipes-bsp/broadcom-nvram-config/files/solidrun-imx6/brcmfmac4330-sdio.txt
wget -O /lib/firmware/brcm/brcmfmac4329-sdio.solidrun,cubox-i-q.txt https://raw.githubusercontent.com/SolidRun/meta-solidrun-arm-imx6/jethro/recipes-bsp/broadcom-nvram-config/files/solidrun-imx6/brcmfmac4329-sdio.txt
wget -O /lib/firmware/brcm/brcmfmac4330-sdio.solidrun,cubox-i-dl.txt https://raw.githubusercontent.com/SolidRun/meta-solidrun-arm-imx6/jethro/recipes-bsp/broadcom-nvram-config/files/solidrun-imx6/brcmfmac4330-sdio.txt
wget -O /lib/firmware/brcm/brcmfmac4329-sdio.solidrun,cubox-i-dl.txt https://raw.githubusercontent.com/SolidRun/meta-solidrun-arm-imx6/jethro/recipes-bsp/broadcom-nvram-config/files/solidrun-imx6/brcmfmac4329-sdio.txt

Step 4: The WiFi regulatory domain

The NVRAM file needs to have the correct WiFi regulatory domain set. This can be done by setting the value of the ccode parameter to the country code in which the device will be operating in. For example, to set the WiFi regulatory domain for the United States:

sed -i 's/^ccode=.*/ccode=US/' /lib/firmware/brcm/brcmfmac4330-sdio.solidrun,cubox-i-q.txt
sed -i 's/^ccode=.*/ccode=US/' /lib/firmware/brcm/brcmfmac4329-sdio.solidrun,cubox-i-q.txt
sed -i 's/^ccode=.*/ccode=US/' /lib/firmware/brcm/brcmfmac4330-sdio.solidrun,cubox-i-dl.txt
sed -i 's/^ccode=.*/ccode=US/' /lib/firmware/brcm/brcmfmac4329-sdio.solidrun,cubox-i-dl.txt

Note: Replace 'US' with your country code.

Reboot

Rebooting the system will allow the drivers to load the firmware files and clear the initialization failures.

Similar articles

Leave a Reply

Your email address will not be published. Required fields are marked *