Difference between revisions of "Windows IoT Enterprise"

From ESS-WIKI
Jump to: navigation, search
 
(41 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
  
 
== BSP Version ==
 
== BSP Version ==
  
BSP : NXP W1.0.0
+
Windows : W21H2 (19044.1288.211006-0501.21h2_release_svc_refresh_CLIENT_ENTERPRISES_OEM_A64FRE_en-us.iso)
  
Windows : W21H2
+
NXP BSP&nbsp;:<br/> W1.0.0 → ROM-5720<br/> W1.1.0 → RSB-3720(sd)、ROM-5721(emmc)、ROM-5722(sd)
<div id="gtx-trans" style="position: absolute; left: -7px; top: 45px;"><div class="gtx-trans-icon">&nbsp;</div> </div>
 
  
 
== Released Image ==
 
== Released Image ==
  
*[[IoTGateway/BSP/Linux/OS_Support_List_Jetpack_4.5.1_L4T_R32.5.1|OS Support List ( Jetpack 4.5.1 / L4T R32.5.1 )]]  
+
*[[IoTGateway/BSP/Linux/OS_Support_List_Windows_On_Arm|OS_Support_List_Windows_On_Arm]]  
  
 
== Build Environment on Host ==
 
== Build Environment on Host ==
Line 19: Line 17:
  
 
Docker command:
 
Docker command:
<pre>$ docker pull advrisc/u18.04-imx8lbv1</pre>
+
<pre>$ docker pull advrisc/u18.04-imx8lbv1:latest</pre>
  
 
== Run Docker example ==
 
== Run Docker example ==
  
 
Step1 Run docker container (example)
 
Step1 Run docker container (example)
<pre>sudo docker run -it --name jetson_linux_risc -v /home/bsp/myLinux:/home/adv/BSP:rw --privileged 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>
  
 
Step2 In container, change the user. (example)
 
Step2 In container, change the user. (example)
 
<pre> adv@7cc0fa834366:~$ sudo chown adv:adv -R BSP</pre>
 
<pre> adv@7cc0fa834366:~$ sudo chown adv:adv -R BSP</pre>
 
== Install Some tools ==
 
<pre>$sudo apt-get install expect
 
</pre>
 
  
 
== Getting Linux Source Code ==
 
== Getting Linux Source Code ==
<pre>$ export GIT_SSL_NO_VERIFY=1</pre>
 
  
EPC-R7200
+
<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
 
<pre>$ cd ~/BSP
 
<pre>$ cd ~/BSP
$ mkdir jetson_linux_risc
+
$ git clone https://AIM-Linux@dev.azure.com/AIM-Linux/ms-iot-ent/_git/NXP_BSP_W1.0.0 .
$ cd jetson_linux_risc
 
$ git config --global user.name "Your Name"
 
$ git config --global user.email you@example.com
 
$ ../repo/repo init -u https://AIM-Linux@dev.azure.com/AIM-Linux/EPC-R7200/_git/manifests
 
$ ../repo/repo sync
 
 
</pre>
 
</pre>
  
AIR-020
+
NXP_BSP_W1.1.0
<pre>$ cd ~/BSP
+
<pre>$ git clone https://AIM-Linux@dev.azure.com/AIM-Linux/ms-iot-ent/_git/NXP_BSP_W1.1.0 .
$ mkdir jetson_linux_risc
 
$ cd jetson_linux_risc
 
$ git config --global user.name "Your Name"
 
$ git config --global user.email you@example.com
 
$ ../repo/repo init -u https://AIM-Linux@dev.azure.com/AIM-Linux/AIR-020/_git/manifests
 
$ ../repo/repo sync
 
 
</pre>
 
</pre>
  
== Build Image - AIR-020 / EPC-R7200 ==
+
NXP_BSP_W1.4
 +
<pre>$ git clone -b rsb3720_6g https://AIM-Linux@dev.azure.com/AIM-Linux/ms-iot-ent/_git/NXP_BSP_W1.4.0 .
 +
</pre>
  
Build Release Image
+
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 ./scripts/build_release.sh -s <SOC> -v <VERSION>
+
<pre>$ export GIT_SSL_NO_VERIFY=1
Where
+
</pre>
"-v&nbsp;: Image version" 00001~99999
 
"-s&nbsp;: 186 - Jetson TX2 NX"
 
"  &nbsp;: 194 - Jetson Xavier NX"
 
"  &nbsp;: 210 - Jetson Nano"</pre>
 
  
== Build Kernel - AIR-020 / EPC-R7200 ==
+
or
<pre>sudo ./scripts/build_ota.sh -s <SOC> -v <VERSION></pre>
+
<pre>$ git config --global http.sslverify false
 +
</pre>
  
== Enter Download Mode ==
+
== Setting up build environment ==
  
Press following button +&nbsp;power ON, or
+
Set up UEFI
 
+
<pre>$ python3.8 -m venv ~/venv/win_fw_build
{| border="1" cellpadding="1" cellspacing="1" style="width:500px;"
+
$ source ~/venv/win_fw_build/bin/activate
|-
+
$ pushd mu_platform_nxp
| style="width: 389px; background-color: rgb(80, 80, 80); color: rgb(255, 255, 255); text-align: center;" | EPC-R7200
+
$ pip3 install -r requirements.txt --upgrade
| style="width: 389px; background-color: rgb(80, 80, 80); color: rgb(255, 255, 255); text-align: center;" | AIR020
+
$ pip3 install pycryptodome
|-
+
$ pip3 install pyelftools
| style="text-align: center;" | [[File:Epcr7200 recovery button.jpg|200px|Epcr7200 recovery button.jpg]]]
+
$ python3 NXP/${uefi_folder}/PlatformBuild.py --setup
| style="text-align: center;" | [[File:Air020 recovery button.png|200px|Air020 recovery button.png]]
+
$ python3 NXP/${uefi_folder}/PlatformBuild.py --update
|}
+
$ popd
 
+
</pre>
Enter following command in the device,
 
<pre>$ sudo reboot --force forced-recovery</pre>
 
 
 
== Flash Image ==
 
 
 
Before flashing the image, power off the DUT, press recovery button and power on.
 
 
 
{| border="1" cellpadding="1" cellspacing="1" style="width: 1100px;"
 
|-
 
! scope="row" | &nbsp;
 
! scope="col" style="width: 389px;background-color:rgb(80, 80, 80);color:#FFFFFF" | EPC-R7200
 
! scope="col" style="width: 438px;background-color:rgb(80, 80, 80);color:#FFFFFF" | AIR-020
 
|-
 
! scope="row" | Xavier NX
 
| style="width: 700px;" |
 
$ cd $TOP/Linux_for_Tegra/186/<br/> $ sudo ./flash.sh -d <span style="color:#800080;">./kernel/dtb/</span><span style="color:#0000FF;">tegra194-epcr7200.dtb</span> &nbsp;<span style="color:#0000FF;">jetson-xavier-nx-devkit-emmc</span> mmcblk0p1<br/> or<br/> $ sudo ./flash.sh <span style="color:#0000FF;">jetson-xavier-nx-devkit-emmc</span> mmcblk0p1
 
 
 
| style="width: 438px;" | $ cd $TOP/Linux_for_Tegra/186/<br/> $ sudo ./flash.sh <span style="color:#0000FF;">jetson-xavier-nx-devkit-emmc</span> mmcblk0p1
 
|-
 
! scope="row" | TX2 NX
 
| style="width: 700px;" | $ cd $TOP/Linux_for_Tegra/186/<br/> $ sudo ./flash.sh -d ./<span style="color:#800080;">kernel/dtb/</span><span style="color:#0000FF;">tegra186-epcr7200.dtb</span> &nbsp;<span style="color:#0000FF;">jetson-xavier-nx-devkit-tx2-nx</span> mmcblk0p1<br/> or<br/> $ sudo ./flash.sh <span style="color:#0000FF;">jetson-xavier-nx-devkit-tx2-nx</span> mmcblk0p1
 
| style="width: 438px;" | $ cd $TOP/Linux_for_Tegra/186/<br/> $ sudo ./flash.sh <span style="color:#0000FF;">jetson-xavier-nx-devkit-tx2-nx</span> mmcblk0p1
 
|-
 
! scope="row" | Nano
 
| style="width: 700px;" |
 
$ cd $TOP/Linux_for_Tegra/210/<br/> $ sudo ./flash.sh -d ./<span style="color:#800080;">kernel/dtb/</span><span style="color:#0000FF;">tegra210-epcr7200.dtb</span> &nbsp;<span style="color:#0000FF;">jetson-nano-devkit-emmc</span> mmcblk0p1<br/> or<br/> $ sudo ./flash.sh <span style="color:#0000FF;">jetson-nano-devkit-emmc</span> mmcblk0p1
 
 
 
| style="width: 438px;" | $ cd $TOP/Linux_for_Tegra/210/<br/> $ sudo ./flash.sh <span style="color:#0000FF;">jetson-nano-devkit-emmc</span> mmcblk0p1
 
|}
 
  
== Flash DTB ==
+
Download the Arm64 cross-compiler.
 
+
<pre>$ pushd ~
{| border="1" cellpadding="1" cellspacing="1" style="width: 891px;"
+
$ 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
! scope="row" | &nbsp;
+
$ tar xf gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz -C ~/
! scope="col" style="width: 389px;background-color:rgb(80, 80, 80);color:#FFFFFF" | EPC-R7200
+
$ rm gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz
! scope="col" style="width: 438px;background-color:rgb(80, 80, 80);color:#FFFFFF" | AIR-020
+
$ popd
|-
 
! scope="row" | Xavier NX
 
| style="width: 389px;" | $ cd $TOP/Linux_for_Tegra/186/<br/> $ sudo ./flash.sh -r -k kernel-dtb <span style="color:#0000FF;">xavier-nx-epcr7200</span> mmcblk0p1
 
| style="width: 438px;" | $ cd $TOP/Linux_for_Tegra/186/<br/> $ sudo ./flash.sh -r -k kernel-dtb <span style="color:#0000FF;">jetson-xavier-nx-devkit-emmc</span> mmcblk0p1
 
|-
 
! scope="row" | TX2 NX
 
| style="width: 389px;" | $ cd $TOP/Linux_for_Tegra/186/<br/> $ sudo ./flash.sh -r -k kernel-dtb <span style="color:#0000FF;">tx2-nx-epcr7200</span> mmcblk0p1
 
| style="width: 438px;" | $ cd $TOP/Linux_for_Tegra/186/<br/> $ sudo ./flash.sh -r -k kernel-dtb <span style="color:#0000FF;">jetson-xavier-nx-devkit-tx2-nx</span> mmcblk0p1
 
|-
 
! scope="row" | Nano
 
| style="width: 389px;" | $ cd $TOP/Linux_for_Tegra/210/<br/> $ sudo ./flash.sh -r -k DTB <span style="color:#0000FF;">nano-epcr7200</span> mmcblk0p1
 
| style="width: 438px;" | $ cd $TOP/Linux_for_Tegra/210/<br/> $ sudo ./flash.sh -r -k kernel-dtb <span style="color:#0000FF;">jetson-nano-devkit-emmc</span> mmcblk0p1
 
|}
 
 
 
== Flash Mac Address ==
 
 
 
=== <span style="color:#0000CD;">GBE in eeprom</span> ===
 
<pre>$ sudo ./eeprom $SOC $mac_address</pre>
 
 
 
Where SOC
 
<pre>  186&nbsp;: TX2-NX
 
  194&nbsp;: XavierNX
 
  210&nbsp;: Nano
 
 
</pre>
 
</pre>
  
=== <span style="color:#0000CD;">Intel I210</span> ===
+
The cross compiler prefix is required to be exported later into AARCH64_TOOLCHAIN_PATH variable.
<pre>$ sudo -s
+
<pre>export AARCH64_TOOLCHAIN_PATH=~/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
$ BDF=`lspci | grep 210 | awk '{print $1}'`
 
$ setpci -s $BDF COMMAND=0007
 
 
</pre>
 
</pre>
  
Get NIC
+
== Building ==
<pre>$./EepromAccessTool</pre>
 
  
Flash I210 address with mac_address = D4E5F6123456 ( If mac address = D4:E5:F6:12:34:56 )
+
ROM-5720
<pre>$ ./EepromAccessTool -nic=<NIC> -f=Dev_Start_I210_Copper_NOMNG_8Mb_A2_3.25_0.03.hex -mac=$mac_address</pre>
+
<pre>$ cd ~/<BSP>/
 
+
$ source ~/venv/win_fw_build/bin/activate
Cold reboot the device.
+
$ 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
== Reference ==
 
 
 
<span style="font-size:medium;"><span style="color:#006400;">'''Boot Device'''</span></span>
 
 
 
In CBoot, there is bootable menu,
 
<pre>[0002.262] I> Using default boot order
 
[0002.265] I> boot-dev-order&nbsp;:-
 
[0002.268] I> 1.sd
 
[0002.270] I> 2.usb
 
[0002.272] I> 3.nvme
 
[0002.274] I> 4.emmc
 
[0002.276] I> 5.net
 
[0002.277] I> Hit any key to stop autoboot:    4      3      2      1
 
 
</pre>
 
</pre>
  
Change the boot order, you may type
+
RSB-3720
<pre>$ setvar boot-order emmc, sd, usb, net
+
<pre>$ cd ~/<BSP>/
 +
$ ./adv-buildme64.sh -b 3720 -t all -c -fw
 
</pre>
 
</pre>
  
or
+
The firmware will be generated in the
<pre>$ setvar boot-order emmc
+
<pre>~/<BSP>/imx-windows-iot/BSP/firmware/<PRODUCT>/firmware.bin
 
</pre>
 
</pre>
  
And boot the system
+
== Flash ==
<pre>$ boot
+
<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>
 
</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>  
For example, there are two of bootable devices - NVME SSD and EMMC If the NVME SSD was plugged-in, the system will always boot NVME SSD.
+
RSB-3720
 
+
<pre>flash_bootloader.cmd /device ROM3720_iMX8MP_6GB /target_drive e:
<span style="font-size:medium;"><span style="color:#006400;">'''Boot to Rootfs in external storage'''</span></span>
 
 
 
<span style="font-size:bold;">'''Make Rootfs'''</span>
 
 
 
1.Check the external drive’s device name (e.g. NVME&nbsp;: /dev/nvmeXn1, U-Disk&nbsp;: /dev/sdX): The <search_keyword> will be NVME&nbsp;: nvme and U-Disk&nbsp;: sd
 
<pre>$ lsblk -d -p | grep <search_keyword> | cut -d\  -f 1</pre>
 
 
 
Note that there must be two spaces after the ‑d\.
 
 
 
2.Create a new GPT:
 
<pre>$ sudo parted /dev/<device> mklabel gpt</pre>
 
 
 
Where <device> is the device name that your host computer assigns to the external drive. For example, if the host computer assigns the NVMe drive device name nvme0n1, the command is:
 
<pre>$ sudo parted /dev/nvme0n1 mklabel gpt</pre>
 
 
 
3.Add the APP partition:
 
<pre>$ sudo parted /dev/<device> mkpart APP 0GB <size></pre>
 
 
 
Where <size> is the size of the partition. It must be at least 16 GB. It may be larger if the external drive has enough space. For example, if <device> is nvme0n1 and the partition is to contain 16 GB, enter:
 
<pre>$ sudo parted /dev/nvme0n1 mkpart APP 0GB 16GB</pre>
 
 
 
The NVME device name of the APP partition <DPART> is then <nvmeXn1>p1.<br/> The U-Disk device name of the APP partition <DPART> is then <sdX>1.
 
 
 
4.Format APP as an ext4 partition and mount it.
 
<pre>$ sudo mkfs.ext4 /dev/<DPART>
 
$ sudo mount /dev/<DPART> /mnt
 
 
</pre>
 
</pre>
  
You may format APP as ext2 or ext3, but ext4 is strongly recommended because it is faster, more compact, and more reliable.
+
ROM-5722
 
+
<pre>flash_bootloader.cmd /device ROM5722_iMX8MP_6GB /target_drive e:
5.Connect the Jetson device to a host computer and put it into recovery mode, then enter the following commands to generate the rootfs without flashing the device:
 
<pre>$ cd Linux_for_Tegra/
 
$ sudo BOOTDEV=<DPART> ./flash.sh --no-flash <board> <DPART>
 
$ sudo mkdir tmp_system
 
$ sudo mount bootloader/system.img.raw ./tmp_system
 
$ sudo rsync -axHAWX --numeric-ids --info=progress2 --exclude=/proc ./tmp_system/ /mnt
 
 
</pre>
 
</pre>
  
Where <DPART> is the device name that the Jetson device will assign to APP.
+
ROM-5721
 
+
<pre>flash_bootloader.cmd /device ROM5721_iMX8MM_2GB
6.Unmount the external drive and disconnect it from the host computer:
 
<pre>$ sudo umount /mnt
 
$ sudo umount ./tmp_system
 
 
</pre>
 
</pre>
  
7.Plug the external drive into the target device and power on.
+
ROM-5720
 
+
<pre>flash_bootloader.cmd /device ROM5720_iMX8M_2GB
reference&nbsp;: [https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/flashing.html#wwpID0E0VM0HA nVidia]
 
 
 
<span style="font-size:bold;">'''Set up boot menu for multi-rootfs'''</span>
 
 
 
During system boot to u-boot, it will check the file&nbsp;/boot/extlinux/extlinux.conf&nbsp;to select one of rootfs.<br/> The following example added NVME and SD card for candidate. the default rootfs will be&nbsp;'''''primary'''''. You may choose one of option in console termianl or default if there was&nbsp;no any selection.<br/> Modify the root path to the&nbsp;<DPART> for every external storage
 
<pre>TIMEOUT 30
 
DEFAULT primary
 
 
 
MENU TITLE L4T boot options
 
 
 
LABEL primary
 
      MENU LABEL primary kernel
 
      LINUX /boot/Image
 
      INITRD /boot/initrd
 
      FDT /boot/tegra194-epcr7200.dtb
 
      APPEND ${cbootargs} quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0
 
 
 
LABEL sdcard
 
      MENU LABEL Boot from SD Card
 
      LINUX /boot/Image
 
      INITRD /boot/initrd
 
      FDT /boot/tegra194-epcr7200.dtb
 
      APPEND ${cbootargs} quiet root=/dev/sda1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0
 
 
 
LABEL UIO-4040
 
      MENU LABEL Boot from UIO-4040
 
      LINUX /boot/Image
 
      INITRD /boot/initrd
 
      FDT /boot/tegra194-epcr7200.dtb
 
      APPEND ${cbootargs} quiet root=/dev/sda1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0
 
 
</pre>
 
</pre>
  
<span style="font-size:medium;"><span style="color:#006400;">'''Calculate GPIO value from pin number'''</span></span>
+
== Miscellaneous ==
  
[[:File:AIR-020-nVidia_GPIO.docx|AIR-020-nVidia_GPIO.docx]]
+
'''Flash mac address'''
  
<span style="font-size:medium;"><span style="color:#006400;">'''Device PID VID'''</span></span>
+
- 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
  
Open a terminal window on your host and enter the command '''''lsusb'''''.<br/> The Jetson module is in Force Recovery mode if you see this message:
+
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;
<pre>Bus <bbb> Device <ddd>: ID 0955: <nnnn> Nvidia Corp.</pre>
 
  
Where:
+
== Test ==
  
•<bbb> is any three-digit number<br/> •<ddd> is any three-digit number<br/> •<nnnn> is a four-digit number that represents the type of Jetson module:
+
'''UART'''
  
[[File:Nvidia pidvid.png|RTENOTITLE]]
+
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
  
<span style="font-size:medium;"><span style="color:#006400;">'''Simultaneous flashing to multiple target devices.'''</span></span>
+
\\?\ACPI#NXP0113#2#{86e0d1e0-8089-11d0-9ce4-08003e301f73}\SERCX
 +
    PortName: UART2
 +
    In System Container: TRUE
 +
    Restricted: FALSE
 +
    UWP Accessible: TRUE
  
'''Create MFI'''
+
\\?\ACPI#NXP0113#3#{86e0d1e0-8089-11d0-9ce4-08003e301f73}\SERCX
<pre>$ sudo BOARDID=<boardid> BOARDSKU=<boardsku> FAB=<fab> BOARDREV=<boardrev> FUSELEVEL=fuselevel_production ./nvmassflashgen.sh <BOARD> <DEV_PART>
+
    PortName: UART3
 +
    In System Container: TRUE
 +
    Restricted: FALSE
 +
    UWP Accessible: TRUE
 
</pre>
 
</pre>
  
ex&nbsp;: Create a MFI tarball for a TX2 board.
+
Test UART3 (連接到Linux,開啟Minicom,直接輸入任意值看是否另外一邊有顯示)
<pre>$ cd Linux_for_Tegra
+
<pre>MinComm.exe \\?\ACPI#NXP0113#3#{86e0d1e0-8089-11d0-9ce4-08003e301f73}\SERCX baud=115200 parity=n data=8 stop=1
$ sudo BOARDID=3636 BOARDSKU=0001 FAB=100 BOARDREV=B.0 FUSELEVEL=fuselevel_production ./nvmassflashgen.sh jetson-xavier-nx-devkit-tx2-nx mmcblk0p1</pre>
+
</pre>
 
 
The tarball mfi_<BOARD>.tbz2 will be created in the Linux_for_Tegra/
 
 
 
[[File:Jetson board nvmassflashgen.jpg|RTENOTITLE]]
 
 
 
'''Flash this tarball to device'''
 
 
 
1.Download mfi_jetson-xavier-nx-devkit-emmc.tbz2 to each flashing hosts.<br/> 2.Untar mfi_<BOARD>.tbz2.
 
<pre>$ tar xvjf mfi_mfi_<BOARD>.tbz2
 
$ cd mfi_jetson-xavier-nx-devkit-emmc</pre>
 
 
 
3. Connect Jetson boards(jetson-xavier-nx-devkit-emmc only) and put them in RCM mode.
 
<pre>$ ./nvmflash.sh</pre>
 

Latest revision as of 04: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