Skip to main content

NXP Windows on ARM BSP Guide

1. BSP Version Information

ItemDetails
Windows VersionW21H2 (19044.1288.211006-0501.21h2_release_svc_refresh_CLIENT_ENTERPRISES_OEM_A64FRE_en-us.iso)
NXP BSP W1.0.0Supports: ROM-5720
NXP BSP W1.1.0Supports: RSB-3720 (sd), ROM-5721 (emmc), ROM-5722 (sd)
Released ImageRefer to: [[IoTGateway/BSP/Linux/OS_Support_List_Windows_On_Arm]]

2. Build Environment on Host

Currently, we adopt Docker as the build environment.

You can get the latest version of advrisc/u18.04-imx8lbv1 Docker image for developing nVidia jetson projects.

Docker command: $ docker pull advrisc/u18.04-imx8lbv1:latest

Run Docker example

Step 1: Run docker container $ docker run -it --name <CONTAINER_NAME> -v <BSP_PATH>:/home/adv/BSP:rw advrisc/u20.04-woabv1 /bin/bash

Step 2: Change the user in container adv@7cc0fa834366:~$ sudo chown adv:adv -R BSP


3. Getting Linux Source Code

Important:

  • PLEASE contact with Product Team to get the source code
  • PLEASE DOWNLOAD SOURCE CODE IN THE DOCKER (both download code and build code are the same user.)

NXP_BSP_W1.0.0

$ cd ~/BSP
$ git clone https://AIM-Linux@dev.azure.com/AIM-Linux/ms-iot-ent/_git/NXP_BSP_W1.0.0 .

NXP_BSP_W1.1.0

$ git clone https://AIM-Linux@dev.azure.com/AIM-Linux/ms-iot-ent/_git/NXP_BSP_W1.1.0 .

NXP_BSP_W1.4

$ git clone -b rsb3720_6g https://AIM-Linux@dev.azure.com/AIM-Linux/ms-iot-ent/_git/NXP_BSP_W1.4.0 .

Troubleshooting: If you suffer "server certificate verification failed", you can use the following command to disable SSL verification in git repositories with self-signed certificates.

$ export GIT_SSL_NO_VERIFY=1 or $ git config --global http.sslverify false


4. Setting up Build Environment

Set up UEFI $ python3.8 -m venv ~/venv/win_fw_build

$ source ~/venv/win_fw_build/bin/activate

$ pushd mu_platform_nxp

$ pip3 install -r requirements.txt --upgrade

$ pip3 install pycryptodome

$ pip3 install pyelftools

$ python3 NXP/${uefi_folder}/PlatformBuild.py --setup

$ python3 NXP/${uefi_folder}/PlatformBuild.py --update

$ popd

Download the Arm64 cross-compiler

$ pushd ~

$ wget https://releases.linaro.org/components/toolchain/binaries/7.4-2019.02/aarch64-linux-gnu/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz

$ tar xf gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz -C ~/

$ rm gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz

$ popd

Export Toolchain Path The cross compiler prefix is required to be exported later into AARCH64_TOOLCHAIN_PATH variable.

$ export AARCH64_TOOLCHAIN_PATH=~/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-


5. Building

ROM-5720

$ cd ~/BSP/

$ source ~/venv/win_fw_build/bin/activate

$ export AARCH64_TOOLCHAIN_PATH=~/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-

$ ./adv-buildme64.sh -b 5720 -t all -c -fw

RSB-3720

$ cd ~/BSP/

$ ./adv-buildme64.sh -b 3720 -t all -c -fw

The firmware will be generated in:

~/BSP/imx-windows-iot/BSP/firmware/<PRODUCT>/firmware.bin


6. Flash

Important: Please do WIN OS INSTALLER first then do firmware flash later if you would like to boot the system from SD card

OS Installer (Linux)

(RSB-3720 / ROM-5722)

Where X is disk drive in system

$ sudo dd if=XXX_os_installer_${EVK_BOARD_NAME}.img of=/dev/sdX bs=10M; sync

Firmware (Windows)

The RSB-3720 support OS boot from SD card ONLY.

  1. Unzip firmware image

  2. Go to image folder and type following command (if SD card is mounted on e drive)

RSB-3720

flash_bootloader.cmd /device ROM3720_iMX8MP_6GB /target_drive e:

ROM-5722

flash_bootloader.cmd /device ROM5722_iMX8MP_6GB /target_drive e:

ROM-5721

flash_bootloader.cmd /device ROM5721_iMX8MM_2GB

ROM-5720

flash_bootloader.cmd /device ROM5720_iMX8M_2GB


7. Miscellaneous

Flash MAC address

  1. Open Registry Editor

  2. Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\xxxx

  3. Check the folders xxxx e.g. 0000, 0001.. and find your wanted ethernet interface (iMX Ethernet or imx ethernet Qos adapter)

  4. Add new string variable called NetworkAddress and set address in format xx-xx-xx-xx-xx-xx

  5. Restart board


8. Test

UART

List all uart devices

C:\Users\1\Desktop\tool\BusTools\BusTools\Release>MinComm.exe -list
\\?\ACPI#NXP0113#4#{86e0d1e0-8089-11d0-9ce4-08003e301f73}\SERCX

PortName: UART4

In System Container: TRUE

Restricted: FALSE

UWP Accessible: TRUE

\\?\ACPI#NXP0113#2#{86e0d1e0-8089-11d0-9ce4-08003e301f73}\SERCX

PortName: UART2

In System Container: TRUE

Restricted: FALSE

UWP Accessible: TRUE

\\?\ACPI#NXP0113#3#{86e0d1e0-8089-11d0-9ce4-08003e301f73}\SERCX

PortName: UART3

In System Container: TRUE

Restricted: FALSE

UWP Accessible: TRUE

Test UART3

(Connect to Linux, open Minicom, check if input displays on the other side)

MinComm.exe
\\?\ACPI#NXP0113#3#{86e0d1e0-8089-11d0-9ce4-08003e301f73}\SERCX baud=115200 parity=n data=8 stop=1