Difference between revisions of "Windows IoT Enterprise"

From ESS-WIKI
Jump to: navigation, search
 
(39 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
Windows : W21H2 (19044.1288.211006-0501.21h2_release_svc_refresh_CLIENT_ENTERPRISES_OEM_A64FRE_en-us.iso)
 
Windows : W21H2 (19044.1288.211006-0501.21h2_release_svc_refresh_CLIENT_ENTERPRISES_OEM_A64FRE_en-us.iso)
  
NXP BSP : W1809 (W21H2-1-0-0-imx-windows-bsp.zip)
+
NXP BSP&nbsp;:<br/> W1.0.0 → ROM-5720<br/> W1.1.0 → RSB-3720(sd)、ROM-5721(emmc)、ROM-5722(sd)
  
 
== Released Image ==
 
== Released Image ==
  
*[[IoTGateway/BSP/Linux/OS_Support_List_Windows_On_Arm_for_ROM5720|OS_Support_List_Windows_On_Arm_for_ROM5720]]  
+
*[[IoTGateway/BSP/Linux/OS_Support_List_Windows_On_Arm|OS_Support_List_Windows_On_Arm]]  
  
 
== Build Environment on Host ==
 
== Build Environment on Host ==
Line 22: Line 22:
  
 
Step1 Run docker container (example)
 
Step1 Run docker container (example)
<pre>$ docker run -it --name <CONTAINER_NAME> -v <BSP_PATH>:/home/adv/BSP:rw advrisc/u18.04-imx8lbv1:latest /bin/bash
+
<pre>$ docker run -it --name <CONTAINER_NAME> -v <BSP_PATH>:/home/adv/BSP:rw advrisc/u20.04-woabv1 /bin/bash
 
</pre>
 
</pre>
  
Line 28: Line 28:
 
<pre> adv@7cc0fa834366:~$ sudo chown adv:adv -R BSP</pre>
 
<pre> adv@7cc0fa834366:~$ sudo chown adv:adv -R BSP</pre>
  
== Install Dependency Packages ==
+
== Getting Linux Source Code ==
<pre>$ sudo apt-get update
+
 
$ sudo apt-get upgrade -y
+
<span style="color:#CD0000;">'''PLEASE contact with Product Team to get the source code'''</span><br/> <span style="color:#CD0000;">'''PLEASE DOWNLOAD SOURCE CODE IN THE DOCKER''' (both download code and build code are the same user.)</span><br/> NXP_BSP_W1.0.0
$ sudo apt-get install attr build-essential python3.8 python3.8-dev python3.8-venv device-tree-compiler bison flex swig iasl uuid-dev wget git bc libssl-dev zlib1g-dev python3-pip mono-devel gawk -y
+
<pre>$ cd ~/BSP
$ python3.8 -m venv ~/venv/win_fw_build
+
$ git clone https://AIM-Linux@dev.azure.com/AIM-Linux/ms-iot-ent/_git/NXP_BSP_W1.0.0 .
$ source ~/venv/win_fw_build/bin/activate
+
</pre>
$ pushd mu_platform_nxp/
+
 
$ pip3 install -r requirements.txt --upgrade
+
NXP_BSP_W1.1.0
$ sudo apt remove python3-crypto
+
<pre>$ git clone https://AIM-Linux@dev.azure.com/AIM-Linux/ms-iot-ent/_git/NXP_BSP_W1.1.0 .
$ pip3 install pycryptodome
+
</pre>
$ git config --global --add safe.directory /home/adv/BSP
+
 
$ git submodule sync
+
NXP_BSP_W1.4
$ python3 NXP/<PROJECT>/PlatformBuild.py --setup
+
<pre>$ git clone -b rsb3720_6g https://AIM-Linux@dev.azure.com/AIM-Linux/ms-iot-ent/_git/NXP_BSP_W1.4.0 .
 
</pre>
 
</pre>
  
If get python error at last command, please do following command
+
If you suffer "server certificate verification failed", you can use the following command to disable SSL verification in git repositories with self-signed certificates.
<pre>$ sudo apt install gnupg ca-certificates
+
<pre>$ export GIT_SSL_NO_VERIFY=1
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
 
$ echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
 
$ sudo apt update
 
$ sudo apt-get install attr build-essential python3.8 python3.8-dev python3.8-venv device-tree-compiler bison flex swig iasl uuid-dev wget git bc libssl-dev zlib1g-dev python3-pip mono-devel gawk -y
 
$ python3.8 -m venv ~/venv/win_fw_build
 
$ pip3 install pycryptodome
 
 
</pre>
 
</pre>
  
Do the final set up
+
or
<pre>$ python3 NXP/<PROJECT>/PlatformBuild.py --setup
+
<pre>$ git config --global http.sslverify false
$ python3 NXP/<PROJECT>/PlatformBuild.py --update
+
</pre>
 +
 
 +
== Setting up build environment ==
 +
 
 +
Set up UEFI
 +
<pre>$ 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
 
</pre>
 
</pre>
  
Line 62: Line 69:
 
$ wget https://releases.linaro.org/components/toolchain/binaries/7.4-2019.02/aarch64-linux-gnu
 
$ 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
 
/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
+
$ 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
 
$ rm gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz
 
$ popd
 
$ popd
Line 68: Line 75:
  
 
The cross compiler prefix is required to be exported later into AARCH64_TOOLCHAIN_PATH variable.
 
The cross compiler prefix is required to be exported later into AARCH64_TOOLCHAIN_PATH variable.
<pre>export AARCH64_TOOLCHAIN_PATH=~/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu  
+
<pre>export AARCH64_TOOLCHAIN_PATH=~/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
 
</pre>
 
</pre>
  
 
== Building ==
 
== Building ==
 +
 +
ROM-5720
 
<pre>$ cd ~/<BSP>/
 
<pre>$ cd ~/<BSP>/
 
$ source ~/venv/win_fw_build/bin/activate
 
$ 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-
 
$ 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
+
$ ./adv-buildme64.sh -b 5720 -t all -c -fw
 +
</pre>
 +
 
 +
RSB-3720
 +
<pre>$ cd ~/<BSP>/
 +
$ ./adv-buildme64.sh -b 3720 -t all -c -fw
 
</pre>
 
</pre>
  
 
The firmware will be generated in the
 
The firmware will be generated in the
 
<pre>~/<BSP>/imx-windows-iot/BSP/firmware/<PRODUCT>/firmware.bin
 
<pre>~/<BSP>/imx-windows-iot/BSP/firmware/<PRODUCT>/firmware.bin
 +
</pre>
 +
 +
== Flash ==
 +
<div><span style="color:#CD0000;">'''Please do WIN OS INSTALLER first then do firmware flash later if you would like to boot the system from SD card''' </span>
 +
<span style="color:#0070c0">RSB-3720 ROM-5722</span>
 +
'''OS Installer'''</div> <pre>$ sudo dd if=XXX_os_installer_${EVK_BOARD_NAME}.img of=/dev/sdX bs=10M; sync
 +
</pre>
 +
<div>(Where X is disk drive in system)<br/> <br/> '''Firmware'''<br/> The RSB-3720 support OS boot from SD card ONLY<br/> 1).Unzip firmware image<br/> 2).Go to image folder and type following command (if SD card is mounted on e drive)</div>
 +
RSB-3720
 +
<pre>flash_bootloader.cmd /device ROM3720_iMX8MP_6GB /target_drive e:
 +
</pre>
 +
 +
ROM-5722
 +
<pre>flash_bootloader.cmd /device ROM5722_iMX8MP_6GB /target_drive e:
 +
</pre>
 +
 +
ROM-5721
 +
<pre>flash_bootloader.cmd /device ROM5721_iMX8MM_2GB
 +
</pre>
 +
 +
ROM-5720
 +
<pre>flash_bootloader.cmd /device ROM5720_iMX8M_2GB
 +
</pre>
 +
 +
== Miscellaneous ==
 +
 +
'''Flash mac address'''
 +
 +
- Open Registry Editor<br/> - <span style="color:#0000ff">HKEY_LOCAL_MACHINE</span>\<span style="color:#0000ff">SYSTEM</span>\<span style="color:#0000ff">CurrentControlSet</span>\<span style="color:#0000ff">Control</span>\<span style="color:#0000ff">Class</span>\<span style="color:#0000ff">'''{4D36E972-E325-11CE-BFC1-08002BE10318}'''</span>\xxxx<br/> - Check the folders xxxx e.g. 0000, 0001.. and find your wanted ethernet interface (iMX Ethernet)<br/> - Add new string variable called <span style="color:#0000ff">'''NetworkAddress'''</span> and set address in format '''xx-xx-xx-xx-xx-xx'''<br/> - Restart board
 +
 +
There are two of lan interfaces on NXP solution. It may be placed on one of path under&nbsp;<span style="color:#0000ff">'''{4D36E972-E325-11CE-BFC1-08002BE10318}.'''</span><br/> '''imx ethernet adapter<br/> [[File:Woa imx eth adapter.jpg|400px|Woa imx eth adapter.jpg]]<br/> imx ethernet Qos adapter'''<br/> [[File:Woa imx eth qos adapter.jpg|400px|Woa imx eth qos adapter.jpg]] &nbsp;
 +
 +
== Test ==
 +
 +
'''UART'''
 +
 +
List all uart devices
 +
<pre>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
 +
</pre>
 +
 +
Test UART3 (連接到Linux,開啟Minicom,直接輸入任意值看是否另外一邊有顯示)
 +
<pre>MinComm.exe \\?\ACPI#NXP0113#3#{86e0d1e0-8089-11d0-9ce4-08003e301f73}\SERCX baud=115200 parity=n data=8 stop=1
 
</pre>
 
</pre>

Latest revision as of 05:05, 27 September 2023

BSP Version

Windows : W21H2 (19044.1288.211006-0501.21h2_release_svc_refresh_CLIENT_ENTERPRISES_OEM_A64FRE_en-us.iso)

NXP BSP :
W1.0.0 → ROM-5720
W1.1.0 → RSB-3720(sd)、ROM-5721(emmc)、ROM-5722(sd)

Released Image

Build Environment on Host

Currently, we adopt Docker as 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

Step1 Run docker container (example)

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

Step2 In container, change the user. (example)

 adv@7cc0fa834366:~$ sudo chown adv:adv -R BSP

Getting Linux Source Code

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 .

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

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

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- 

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 the

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

Flash

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

RSB-3720 ROM-5722

OS Installer
$ sudo dd if=XXX_os_installer_${EVK_BOARD_NAME}.img of=/dev/sdX bs=10M; sync
(Where X is disk drive in system)

Firmware
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

Miscellaneous

Flash mac address

- Open Registry Editor
- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\xxxx
- Check the folders xxxx e.g. 0000, 0001.. and find your wanted ethernet interface (iMX Ethernet)
- Add new string variable called NetworkAddress and set address in format xx-xx-xx-xx-xx-xx
- Restart board

There are two of lan interfaces on NXP solution. It may be placed on one of path under {4D36E972-E325-11CE-BFC1-08002BE10318}.
imx ethernet adapter
Woa imx eth adapter.jpg
imx ethernet Qos adapter

Woa imx eth qos adapter.jpg  

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 (連接到Linux,開啟Minicom,直接輸入任意值看是否另外一邊有顯示)

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