This README file provides instructions on building and deploying firmware and drivers for various NXP chipsets on a Raspberry Pi 4.
NXP Chipset | u-blox Module | Wi-Fi Standard | Bluetooth Standard | Host Interface |
---|---|---|---|---|
88W8801 | LILY-W1 | Wi-Fi 4 1x1 | - | SDIO |
88W8987 | JODY-W2 | Wi-Fi 5 1x1 | Bluetooth 5 | SDIO, UART |
88W9098 | JODY-W3 | Wi-Fi 6 2x2 | Bluetooth 5 | PCIe, SDIO, UART |
IW416 (SD8978) | MAYA-W1 | Wi-Fi 4 1x1 | Bluetooth 5 | SDIO, UART |
IW61x (SD9177) | MAYA-W2 | Wi-Fi 6 1x1 | Bluetooth 5, 802.15.4 | SDIO, UART |
AW61x (SD9177) | JODY-W5 | Wi-Fi 6 1x1 | Bluetooth 5 | SDIO, UART |
- Raspberry Pi (3/4/4b/5) host board. Link
- USB Flash Drive / SD card with USB SD card reader (32GB or more)
- u-blox module EVK kit
- power cable USB -C type cable Link
- USB to TTL serial cable Link
- Set up a Raspberry Pi with the latest image.
- Set up a cross-toolchain
-
Download Raspberry Pi OS (64-bit):
- Go to the Raspberry Pi website and download the Raspberry Pi OS (64-bit) with desktop or Raspberry Pi OS Lite (64-bit) if you prefer a minimal version.
-
Prepare the microSD Card/USB driver:
- Use a tool like Raspberry Pi Imager or balenaEtcher to write the Raspberry Pi OS image to your microSD card.
-
Flashing the Image:
- Insert the microSD/USB drive card into your computer.
- Open the Raspberry Pi Imager or balenaEtcher.
- Select the Raspberry Pi OS image.
- Choose the microSD card as the target.
- Click "Write" and wait for the process to complete.
-
Initial Setup:
- To enable the serial console, re-insert the prepared image microSD/USB drive open
bootfs
drive, and update theconfig.txt
file by adding this parameterenable_uart=1
- To enable the serial console, re-insert the prepared image microSD/USB drive open
# For more options and information see
# http://rptl.io/configtxt
# Some settings may impact device functionality. See link above for details
# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
# Additional overlays and parameters are documented
# /boot/firmware/overlays/README
# Automatically load overlays for detected cameras
camera_auto_detect=1
# Automatically load overlays for detected DSI displays
display_auto_detect=1
# Automatically load initramfs files, if found
auto_initramfs=1
# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2
# Don't have the firmware create an initial video= setting in cmdline.txt.
# Use the kernel's default instead.
disable_fw_kms_setup=1
# Run in 64-bit mode
arm_64bit=1
# Disable compensation for displays with overscan
disable_overscan=1
# Run as fast as firmware / board allows
arm_boost=1
[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1
enable_uart=1
[all]
-
Connect the UART pins on the Raspberry Pi to the USB TTL converter on the PC. Then, open Tera Term or any serial terminal tool using the COM port associated with the Raspberry Pi.
-
Insert the microSD/USB drive into Raspberry Pi 4's USB port and power it on. ( See image)
-
connect the u-blox module over the SD card slot
-
Update and Upgrade: Open a terminal and run the following commands:
sudo apt update sudo apt upgrade -y
-
Install Necessary Packages:
sudo apt install -y git build-essential bc libncurses5-dev bison flex libssl-dev
-
Download Driver Sources:
git clone https://github.com/nxp-imx/mwifiex cd mwifiex/ git checkout lf-6.1.1-1.0.0
-
Ensure the Chipset is Enabled:
- Check that the chipset for the u-blox module is enabled in the driver Makefile.
- On non-NXP platforms, set
CONFIG_IMX_SUPPORT=n
.
-
Build the Driver:
cd mxm_wifiex/wlan_src/ export ARCH=arm64 export CROSS_COMPILE=<cross-toolchain prefix> # e.g., aarch64-linux-gnu- export KERNELDIR=<path to kernel build dir> # e.g., /usr/src/linux-headers-$(uname -r) make build
- The build results will be located in
../bin_wlan/
and includemlan.ko
andmoal.ko
.
Note:
mlanutl
is not included sincelf-5.15.71-2.2.0
. - The build results will be located in
git clone https://github.com/NXP/imx-firmware.git
cd imx-firmware/nxp/
git checkout lf-6.1.1-1.0.0
-
Copy the Driver Kernel Modules:
sudo cp mxm_wifiex/bin_wlan/mlan.ko /lib/modules/$(uname -r)/extra/ sudo cp mxm_wifiex/bin_wlan/moal.ko /lib/modules/$(uname -r)/extra/ sudo depmod
-
Copy the Firmware Images:
sudo cp imx-firmware/nxp/<chipset>/* /lib/firmware/nxp/ sudo cp imx-firmware/nxp/wifi_mod_para.conf /lib/firmware/nxp/
-
Copy
mlanutl
Tool to the Target File System (if applicable):sudo cp mlanutl /usr/bin/mlanutl
-
Configure Wi-Fi Driver Parameters:
sudo modprobe moal mod_para=nxp/wifi_mod_para.conf sudo iw dev
-
Enable Bluetooth Kernel Configuration:
- Ensure
CONFIG_BT_HCIUART
andCONFIG_BT_HCIUART_H4
are enabled in the kernel configuration.
- Ensure
-
Load the Bluetooth Driver:
sudo modprobe hci_uart
-
Attach UART Serial Device to Blue-Z Stack and Set Baud Rate:
sudo hciattach /dev/ttyUSB0 any 3000000 flow
sudo iw dev
For more detailed information, please refer to the official NXP and u-blox documentation.
This guide should help you build and deploy the firmware and drivers for NXP chipsets on a Raspberry Pi 4. Ensure all prerequisites are met and follow the steps carefully for a successful setup.