Layerscape Knowledge Base

cancel
Showing results for 
Search instead for 
Did you mean: 

Layerscape Knowledge Base

Knowledge Base Articles

NXP provides support for a variety of embedded and server Linux distros in addition to the Layerscape components and hybrid Ubuntu support. NXP works together with various open-source communities like Yocto project, OpenWRT, ONIE/ONL, and OpenIL to ensure that support for NXP's platforms is available as part of the regular releases from these distro communities.    This section lists brief how-tos for Layerscape SDK (LSDK)   to help you modify/update individual LSDK components such as, U-Boot, Linux kernel, DPL, DPC, on a reference design board when booting the board from a specific boot source, such as QSPI or SD.  For example, these how-tos can be helpful if you wish to program a customized Linux kernel image on an SD card.   The section also provides basic Ethernet network interface information, such as Ethernet port mapping (Ethernet port names in U-Boot and Linux) and steps to create Ethernet interfaces in Linux.   LSDK - How-to topics   Board Booting medium How to topic All QorIQ Reference Design Boards NA LSDK memory layout for TF-A boot flow NA Flash layout for boot flow with PPA – LSDK 18.09 and older releases LS2088ARDB NA New  LS2088ARDB Ethernet port mapping QSPI flash     New  How to update MC firmware, DPC, and DPL images in QSPI NOR flash   New  How to deploy TF-A binaries in QSPI NOR flash NOR flash   New   How to deploy TF-A binaries in NOR flash   New  How to update MC firmware, DPC, and DPL images in NOR flash LX2160ARDB NA How to configure a new flash device for a Layerscape board via CodeWarrior for ARMv8 LX2160ARDB Ethernet port mapping FlexSPI NOR flash LX2160ARDB - How to update MC firmware, DPC, and DPL images in FlexSPI NOR flash LX2160ARDB - How to deploy TF-A binaries in FlexSPI NOR flash FlexSPI NOR flash SD/eMMC LX2160ARDB – How to update composite firmware in FlexSPI NOR Flash and SD/eMMC card using an SD card SD/eMMC LX2160ARDB - How to update Linux kernel and device tree on SD card LX2160ARDB - How to update Linux kernel and device tree on eMMC card LX2160ARDB - How to deploy TF-A binaries on SD/eMMC card LX2160ARDB - How to update MC firmware, DPC, and DPL images on SD/eMMC card LS1043ARDB NA Ethernet and FMC port mapping NOR flash How to deploy TF-A binaries in NOR flash How to update DPAA1 FMan microcode (ucode) image in NOR flash SD card How to deploy TF-A binaries on SD card How to update Linux kernel and device tree on SD card How to update DPAA1 FMan microcode (ucode) image on SD card NAND flash How to deploy TF-A binaries in NAND flash LS1046ARDB NA Ethernet port mapping QSPI flash How to update U-Boot binary in QSPI NOR flash How to update DPAA1 FMan microcode (ucode) image in QSPI NOR flash How to update PBL/RCW binary in QSPI NOR flash How to update composite firmware image in QSPI NOR flash SD card How to update U-Boot binary on SD card How to update PBL/RCW binary on SD card How to update Linux kernel and device tree on SD card How to update DPAA1 FMan microcode (ucode) image on SD card LS1088ARDB/LS1088RDB-PB NA How to create a DPAA2 network interface (DPNI) in Linux Ethernet port mapping QSPI flash How to deploy TF-A binaries in QSPI NOR flash How to update PBL/RCW binary in QSPI NOR flash How to update composite firmware image in QSPI NOR flash How to update U-Boot binary in QSPI NOR flash How to update MC firmware, DPC, and DPL images in QSPI NOR flash SD card How to deploy TF-A binaries on SD card How to update PBL/RCW binary on SD card How to update U-Boot binary on SD card How to update MC firmware, DPC, and DPL images on SD card How to update Linux kernel and device tree on SD card    
View full article
Trusted Firmware for Cortex-A (TF-A) is an implementation of EL3 secure firmware. TF-A replaces PPA in secure firmware role. Note: Please note the steps listed in this topic can only be performed with LSDK 18.12 and newer releases.   To migrate to the TF-A boot flow from the   previous   boot flow (with PPA), you need to compile the TF-A binaries,  bl2_<boot_mode>. pbl   and   fip.bin , and flash these binaries on the specific boot medium on the board. For FlexSPI NOR flash boot, you need to compile the following TF-A binaries. TF-A binary name Components bl2_flexspi_nor.pbl BL2 binary: Platform initialization binary RCW binary for FlexSPI NOR flash fip.bin BL31: Secure runtime firmware BL32: Trusted OS, for example, OPTEE (optional) BL33: U-Boot/UEFI image   Follow these steps to compile and deploy TF-A  binaries ( bl2_flexspi_nor.pbl   and   fip.bin)  in FlexSPI NOR flash. Compile PBL binary from RCW source file Compile U-Boot binary [Optional] Compile OPTEE binary  Compile TF-A binaries   ( bl2_flexspi_nor.pbl  and  fip.bin)  for FlexSPI NOR flash Program TF-A binaries to FlexSPI NOR flash Step 1: Compile RCW binary  You need to compile the RCW binary to build the bl2_flexspi_nor.pbl   binary. Clone the   rcw   repository and compile the RCW binary.   $ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/rcw $  cd rcw $  git checkout  -b <new branch name>  <LSDK tag> .  For example,  $  git checkout  -b LSDK-20.04  LSDK-20.04   Compile the RCW binary for Rev 1 or Rev 2 board. For LX2160ARDB Rev 1: $ cd lx2160ardb For LX2160ARDB Rev 2:  $ cd lx2160ardb_rev2 If required, make changes to the rcw files. $ make   The compiled PBL binary for FlexSPI NOR flash on  LX2160ARDB  for core frequency 2000 MHz, platform frequency 700 MHz and DDR memory data rate 2900 MT/s, with serdes1 = 19 serdes2 = 5 serdes3 = 2,  rcw_2000_700_2900_19_5_2.bin is available at: rcw/lx2160ardb/XGGFF_PP_HHHH_RR_19_5_2 (For LX2160ARDB Rev 1) rcw/lx2160ardb_rev2/XGGFF_PP_HHHH_RR_19_5_2 (For LX2160ARDB Rev 2) Note:  See the  rcw/lx2160ardb/README  or rcw/lx2160ardb_rev2/README file for an explanation of the naming convention for the directories that contain the RCW source and binary files. Step 2: Compile U-Boot binary You need to compile the  u-boot.bin   binary to build the  fip.bin   binary. Clone the  u-boot   repository  and compile the U-Boot binary for TF-A. $ git clone  https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot.git $  c d  u-boot $  git checkout  -b <new branch name>  LSDK-<LSDK version> .   For example,   $   git checkout  -b LSDK-20.04  LSDK-20.04   $ export  ARCH=arm64 $ export CROSS_COMPILE= aarch64-linux-gnu- $ make  distclean $  make lx2160ardb_tfa_defconfig $ make Note:  If the  make  command shows the error   "*** Your GCC is older than 6.0 and is not supported" , ensure that you are using Ubuntu 18.04 64-bit version for building LSDK 18.12 and above U-Boot binary.  The compiled U-Boot image,  u-boot .bin , is available at   u-boot / . Step 3: [Optional]  Compile OP-TEE binary You need to compile the   tee.bin   binary to build fip.bin   with OPTEE. However, OPTEE is optional, you can skip the procedure to compile OPTEE i f you want to build the FIP binary without OPTEE. Clone the   optee_os   repository and build the OPTEE binary.  $ git clone   https://source.codeaurora.org/external/qoriq/qoriq-components/optee_os $   cd optee_os $  git checkout  -b <new branch name>  LSDK-<LSDK version> .  For example,  $   git checkout  -b LSDK-20.04  LSDK-20.04 $ export  ARCH=arm $ export CROSS_COMPILE=aarch64-linux-gnu- $ make CFG_ARM64_core=y PLATFORM=ls-lx2160ardb $ aarch64-linux-gnu-objcopy -v -O binary out/arm-plat-ls/core/tee.elf out/arm-plat-ls/core/tee.bin The compiled OPTEE image,   tee.bin , is available at  optee_os/out/arm-plat-ls/core/. Step 4: Compile TF-A binaries for FlexSPI NOR flash Clone the  atf  repository and compile the TF-A binaries, bl2_flexspi_nor.pbl   and   fip.bin . $ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/atf $ cd atf $   git checkout  -b <new branch name>  LSDK-<LSDK version> .   For example,   $  git checkout  -b LSDK-20.04  LSDK-20.04 $ export ARCH=arm64 $ export CROSS_COMPILE=aarch64-linux-gnu- Build BL2 binary with OPTEE. $  make PLAT=lx2160ardb bl2 SPD=opteed  BOOT_MODE=flexspi_nor BL32= <path_to_optee_binary>/ tee.bin  pbl RCW= <path_to_rcw_binary>/ rcw_2000_700_2900_19_5_2.bin   The compiled BL2 binaries,  bl2.bin and bl2_flexspi_nor.pbl  are available at atf/build/lx2160ardb/release/ . For any update in the BL2 source code or RCW binary, the bl2_flexspi_nor.pbl  binary needs to be recompiled.   To compile the BL2 binary without OPTEE: make PLAT=lx2160ardb bl2 BOOT_MODE=flexspi_nor pbl RCW=<path_to_rcw_binary>/rcw_2000_700_2900_19_5_2.bin Build FIP binary with OPTEE and without trusted board boot. $ make PLAT= lx2160ardb fip BL33= <path_to_u-boot_binary>/ u-boot.bin SPD=opteed BL32= <path_to_optee_binary>/ tee.bin The compiled BL31 and FIP binaries,  bl31.bin ,  fip .bin , are available at  atf/build/ lx2160ardb /release/ . For any update in the BL31, BL32, or BL33 binaries, the  fip.bin  binary needs to be recompiled. To compile the FIP binary without OPTEE and without trusted board boot: make PLAT=lx2160ardb fip BOOT_MODE= flexspi_nor BL33=<path_to_u-boot_binary>/u-boot.bin To compile the FIP binary with trusted board boot, refer the read me at   <atf repository>/plat/nxp/README.TRUSTED_BOOT Step 5: Program TF-A binaries to FlexSPI NOR flash Boot  LX2160ARDB   from FlexSPI. Ensure that the switches are set to boot the board from FlexSPI.  For booting from FlexSPI: SW1[1:8] = 1111 100X [X is 0 for FlexSPI NOR flash0 and X is 1 for FlexSPI NOR flash1] SW2[1:8] = 0000 0110 SW3[1:8] = 1111 1100 SW4[1:8] = 1011 1000 Boot from FlexSPI NOR  flash0:  => qixis_reset   For LX2160ARDB Rev 1 , in boot log, you'll see: Board: LX2160ACE Rev1.0-RDB, Board version: B, boot from FlexSPI DEV#0   For LX2160ARDB Rev 2, in boot log, you'll see: Board: LX2160ACE Rev2.0-RDB, Board version: B, boot from FlexSPI DEV#0 Set up Ethernet connection When board boots up, U-Boot prints a list of enabled Ethernet interfaces. DPMAC2@xlaui4, DPMAC3@xgmii [PRIME], DPMAC4@xgmii, DPMAC5@25g-aui, DPMAC6@25g-aui, DPMAC17@rgmii-id, DPMAC18@rgmii-id, e1000#0  Set server IP address to the IP address of the host machine on which you have configured the TFTP server.  => setenv serverip <ipaddress1> Set ethact and ethprime as the ethernet interface connected to the TFTP server. Note: SeeLX2160ARDB Ethernet port mapping   for the mapping of Ethernet port names appearing on the chassis front panel w ith the port names in U-Boot and Linux. =>  setenv ethprime <name of interface connected to TFTP server> For example: =>   setenv ethprime DPMAC3@xgmii =>   setenv ethact <name of interface connected to TFTP server> For example: =>   setenv ethact DPMAC3@xgmii Set IP address of the board. You can set a static IP address or, if the board can connect to a dhcp server, you can use the   dhcp   command.  Static IP address assignment: => setenv ipaddr <ipaddress2> => setenv netmask <subnet mask>   => setenv gatewayIP <gateway IP> Dynamic IP address assignment: => dhcp Save the settings.   =>  saveenv Check the connection between the board and the TFTP server. => ping $serverip Using DPMAC3@xgmii device host 192.168.1.1 is alive Load TF-A binaries from the TFTP server Note: For details about the flash image layout for TF-A binaries, refer LSDK memory layout for TF-A boot flow . Program FlexSPI NOR flash1:  => sf probe 0:1 Flash bl2_flexspi_nor.pbl : =>  tftp  0x a 0000000 bl2_flexspi_nor.pbl =>  sf erase 0x0 +$filesize && sf write 0xa0000000 0x0 $filesize   Flash fip.bin : => tftp 0xa0000000 fip.bin =>  sf erase 0x1 00000 +$ fil esize  && sf write 0xa0000000 0x1 00000 $ filesize Boot from FlexSPI  NOR flash1 :   => qixis_reset altbank LX2160ARDB will boot with TF-A. In the boot log, you will see: => NOTICE: BL2: v1.5(release):LSDK-20.04 NOTICE: BL2: Built : 22:01:10, Aug 20 2020 NOTICE: UDIMM 18ADF2G72AZ-3G2E1 NOTICE: DDR4 UDIMM with 2-rank 64-bit bus (x8) NOTICE: 32 GB DDR4, 64-bit, CL=22, ECC on, 256B, CS0+CS1 NOTICE: BL2: Booting BL31 NOTICE: BL31: v1.5(release):LSDK-20.04 NOTICE: BL31: Built : 22:02:07, Aug 20 2020 NOTICE: Welc U-Boot 2019.10 (Aug 14 2020 - 17:43:28 +0530) SoC: LX2160ACE Rev2.0 (0x87360020) Clock Configuration: CPU0(A72):2000 MHz CPU1(A72):2000 MHz CPU2(A72):2000 MHz CPU3(A72):2000 MHz CPU4(A72):2000 MHz CPU5(A72):2000 MHz CPU6(A72):2000 MHz CPU7(A72):2000 MHz CPU8(A72):2000 MHz CPU9(A72):2000 MHz CPU10(A72):2000 MHz CPU11(A72):2000 MHz CPU12(A72):2000 MHz CPU13(A72):2000 MHz CPU14(A72):2000 MHz CPU15(A72):2000 MHz Bus: 700 MHz DDR: 2900 MT/s Reset Configuration Word (RCW): 00000000: 50777738 24500050 00000000 00000000 00000010: 00000000 0c010000 00000000 00000000 00000020: 02e001a0 00002580 00000000 00000096 00000030: 00000000 00000000 00000000 00000000 00000040: 00000000 00000000 00000000 00000000 00000050: 00000000 00000000 00000000 00000000 00000060: 00000000 00000000 00027000 00000000 00000070: 08b30010 00150020 Model: NXP Layerscape LX2160ARDB Board Board: LX2160ACE Rev2.0-RDB, Board version: B, boot from FlexSPI DEV#1      
View full article
Trusted Firmware for Cortex-A (TF-A) is an implementation of EL3 secure firmware. TF-A replaces PPA in secure firmware role. Note: Please note the steps listed in this topic can only be performed with LSDK 18.12 and newer releases.                                                                 To migrate to the TF-A boot flow from the previous boot flow (with PPA), you need to compile the TF-A binaries,  bl2_<boot_mode>. pbl and fip.bin , and flash these binaries on the specific boot medium on the board. For SD/eMMC boot, you need to compile the following TF-A binaries. TF-A binary name Components bl2_sd.pbl/bl2_emmc.pbl BL2 binary: Platform initialization binary RCW binary for SD/emmc boot  fip.bin BL31: Secure runtime firmware BL32: Trusted OS, for example, OPTEE (optional) BL33: U-Boot/UEFI image   Follow these steps to compile and deploy TF-A  binaries ( bl2_sd. pbl/bl2_emmc.pbl   and   fip.bin)  on the SD/eMMC card. Compile RCW binary Compile U-Boot binary [Optional] Compile OPTEE binary  Compile TF-A binaries ( bl2_sd. pbl/bl2_emmc.pbl   and   fip.bin)  for SD/eMMC boot Program TF-A binaries to the SD/eMMC card Step 1: Compile RCW binary You need to compile the RCW   binary to build the bl2_sd.pbl/bl2_emmc.pbl binary. Clone the   rcw  repository and compile the RCW binary.   $ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/rcw $  cd rcw $  git checkout  -b <new branch name>  <LSDK tag> .  For example,  $     git checkout  -b LSDK-20.04  LSDK-20.04 Compile RCW for Rev 1 or Rev 2 board. For LX2160ARDB Rev1: $ cd lx2160ardb For LX2160ARDB Rev2: $ cd lx2160ardb_rev2 If required, make changes to the rcw files. $ make The compiled RCW binary for SD/eMMC boot on  LX2160ARDB  for core frequency 2000 MHz, platform frequency 700 MHz and DDR memory data rate 2900 MT/s, with serdes1 = 19 serdes2 = 5 serdes3 = 2, rcw_2000_700_2900_19_5_2.bin   is available at: rcw/lx2160ardb/XGGFF_PP_HHHH_RR_19_5_2 (For LX2160ARDB Rev 1) rcw/lx2160ardb_rev2/XGGFF_PP_HHHH_RR_19_5_2 (For LX2160ARDB Rev 2) Note: See the  rcw/lx2160ardb/README  or rcw/lx2160ardb_rev2/README  file for an explanation of the naming convention for the directories that contain the RCW source and binary files. Step 2: Compile U-Boot binary You need to compile the u-boot.bin binary to build the  fip.bin binary. Clone the  u-boot   repository and compile the U-Boot binary for TF-A. $   git clone  https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot.git $  cd  u-boot $   git checkout  -b <new branch name>  LSDK-<LSDK version> .   For example,   $  git checkout  -b LSDK-20.04  LSDK-20.04   $ export  ARCH=arm64 $ export CROSS_COMPILE= aarch64-linux-gnu- $   make  distclean $  make lx2160ardb_tfa_defconfig $ make Note: If the  make  command shows the error   "*** Your GCC is older than 6.0 and is not supported" , ensure that you are using Ubuntu 18.04 64-bit version for building the LSDK 18.12 and above U-Boot binary.              The compiled U-Boot binary,  u-boot .bin , is available at   u-boot / . Step 3: [Optional] Compile OPTEE binary  You need to compile the tee.bin binary to build fip.bin  with OPTEE. However, OPTEE is optional, you can skip the procedure to compile OPTEE i f you want to build the FIP binary without OPTEE. Clone the optee_os repository and build the OPTEE binary.  $   git clone https://source.codeaurora.org/external/qoriq/qoriq-components/optee_os $   cd optee_os $ git checkout  -b <new branch name>  LSDK-<LSDK version> .   For example,   $  git checkout  -b LSDK-20.04  LSDK-20.04 $ export  ARCH=arm $   export CROSS_COMPILE=aarch64-linux-gnu- $ make CFG_ARM64_core=y PLATFORM=ls-lx2160ardb $ aarch64-linux-gnu-objcopy -v -O binary out/arm-plat-ls/core/tee.elf out/arm-plat-ls/core/tee.bin The compiled OPTEE image, tee.bin , is available at  optee_os/out/arm-plat-ls/core/. Step 4: Compile TF-A binaries for SD/eMMC boot Clone the atf repository and compile the TF-A binaries,  bl2_sd. pbl/bl2_emmc.pbl   and   fip.bin . $ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/atf $ cd atf $  git checkout  -b <new branch name>  LSDK-<LSDK version> .   For example,   $   git checkout  -b LSDK-20.04  LSDK-20.04 $ export ARCH=arm64 $ export CROSS_COMPILE=aarch64-linux-gnu- Build BL2 binary with OPTEE. For SD boot: $ make PLAT=lx2160ardb bl2 SPD=opteed BOOT_MODE=sd BL32= <path_to_optee_binary>/ tee.bin pbl RCW= <path_to_rcw_binary> / rcw_2000_700_2900_19_5_2.bin For eMMC boot:  $ make PLAT=lx2160ardb bl2 SPD=opteed BOOT_MODE=emmc BL32= <path_to_optee_binary>/ tee.bin pbl RCW= <path_to_rcw_binary> / rcw_2000_700_2900_19_5_2.bin   The compiled BL2 images,  bl2.bin and bl2_sd.pbl/bl2_emmc.pbl  are available at atf/build/lx2160ardb/release/ . For any update in the BL2 source code or RCW binary, the  bl2_sd.pbl/bl2_emmc.pbl  binary needs to be recompiled.   To compile the BL2 binary without OPTEE: For SD boot: $  make PLAT=lx2160ardb bl2  BOOT_MODE=sd pbl RCW= <path_to_rcw_binary>/ rcw_2000_700_2900_19_5_2.bin     For emmc boot: $  make PLAT=lx2160ardb bl2  BOOT_MODE=emmc pbl RCW= <path_to_rcw_binary>/ rcw_2000_700_2900_19_5_2.bin   Build FIP binary with OPTEE and without trusted board boot. $ make PLAT=lx2160ardb fip BL33= <path_to_u-boot_binary> /u-boot.bin SPD=opteed BL32= <path_to_optee_binary> /tee.bin The compiled BL31 and FIP binaries,  bl31.bin ,  fip .bin , are available at  atf/build/lx2160ardb/release/ . For any update in the BL31, BL32, or BL33 binaries, the  fip.bin  binary needs to be recompiled.   To compile the FIP binary without OPTEE and without trusted board boot: For SD boot: $ make PLAT=lx2160ardb fip BOOT_MODE=sd BL33= <path_to_u-boot_binary>/ u-boot.bin   For eMMC boot: $ make PLAT=lx2160ardb fip BOOT_MODE=emmc BL33= <path_to_u-boot_binary>/ u-boot.bin To compile the FIP binary with trusted board boot, refer the read me at <atf repository>/plat/nxp/README.TRUSTED_BOO Step 5: Program TF-A binaries to SD/eMMC card Boot  LX2160ARDB   from FlexSPI. Ensure that the switches are set to boot the board from FlexSPI.  For booting from   FlexSPI: SW1[1:8] = 1111 100X [X is 0 for  FlexSPI NOR  flash0 and X is 1 for  FlexSPI NOR  flash1] SW2[1:8] = 0000 0110 SW3[1:8] = 1111 1100 SW4[1:8] = 1011 1000 Boot from   FlexSPI NOR  flash0:  => qixis_reset For   LX2160ARDB Rev 1 , in boot log, you'll see: Board: LX2160ACE Rev1.0-RDB, Board version: B, boot from FlexSPI DEV#0 For LX2160ARDB Rev 2, in boot log, you'll see: Board: LX2160ACE Rev2.0-RDB, Board version: B, boot from FlexSPI DEV#0 Set up Ethernet connection When board boots up, U-Boot prints a list of enabled Ethernet interfaces. DPMAC2@xlaui4, DPMAC3@xgmii [PRIME], DPMAC4@xgmii, DPMAC5@25g-aui, DPMAC6@25g-aui, DPMAC17@rgmii-id, DPMAC18@rgmii-id, e1000#0 Set server IP address to the IP address of the host machine on which you have configured the TFTP server.  => setenv serverip <ipaddress1> Set ethact and ethprime as the Ethernet interface connected to the TFTP server. Note: See   LX2160ARDB Ethernet port mapping   for the mapping of Ethernet port names appearing on the chassis front panel w ith the port names in U-Boot and Linux.                                 =>  setenv ethprime <name of interface connected to TFTP server> For example: =>   setenv ethprime DPMAC3@xgmii =>   setenv ethact <name of interface connected to TFTP server> For example: =>   setenv ethact DPMAC3@xgmii Set IP address of the board. You can set a static IP address or, if the board can connect to a dhcp server, you can use the   dhcp   command.  Static IP address assignment: => setenv ipaddr <ipaddress2> => setenv netmask <subnet mask> => setenv gatewayIP <gateway IP> Dynamic IP address assignment: => dhcp Save the settings.   =>  saveenv Check the connection between the board and the TFTP server. => ping $serverip Using DPMAC3@xgmii device host 192.168.1.1 is alive Load TF-A binaries for SD boot from the TFTP server Note: For details about the flash image layout for TF-A binaries, refer LSDK memory layout for TF-A boot flow. Flash bl2_sd.pbl : => tftp 82000000 bl2_sd.pbl => mmc dev 0; mmc write 82000000 8  <blk_cnt> Here, blk_cnt refers to number of blocks in SD card that need to be written as per the file size. For example, when you load bl2_sd.pbl from the TFTP server, if the bytes transferred is 103353 (193b9 hex), then  blk_cnt is calculated as "103353/512 = 201 (C9 hex)" + "few sectors for rounding up so that last block is not missed" . So, if you round up by 10 (A hex) sectors, for this example, mmc write command will be:  => mmc write 82000000 8  D3 Flash fip.bin : => tftp 82000000 fip.bin => mmc dev 0;   mmc write 82000000 800 <blk_cnt> Here,  blk_cnt  refers to number of blocks in SD card that need to be written as per the file size. Fo r example, when you load fip.bin from the TFTP server, if the bytes transferred is 1178967 (11fd57 hex) , then  blk_cnt   is calculated as  "1178967 /512 = 2302 (8FE hex)" + "few sectors for rounding up so that last block is not missed". So, if you round up by 10 (A hex) sectors, for this example, mmc write command will be: =>   mmc write 82000000 800 908 Boot from  SD card :   => qixis_reset sd LX2160ARDB will boot with TF-A. In the boot log, you will see: => NOTICE: BL2: v1.5(release):LSDK-20.04 NOTICE: BL2: Built : 22:01:10, Aug 20 2020 NOTICE: UDIMM 18ADF2G72AZ-3G2E1 NOTICE: DDR4 UDIMM with 2-rank 64-bit bus (x8) NOTICE: 32 GB DDR4, 64-bit, CL=22, ECC on, 256B, CS0+CS1 NOTICE: BL2: Booting BL31 NOTICE: BL31: v1.5(release):LSDK-20.04 NOTICE: BL31: Built : 22:02:07, Aug 20 2020 NOTICE: Welc U-Boot 2019.10 (Aug 14 2020 - 17:43:28 +0530) SoC: LX2160ACE Rev2.0 (0x87360020) Clock Configuration: CPU0(A72):2000 MHz CPU1(A72):2000 MHz CPU2(A72):2000 MHz CPU3(A72):2000 MHz CPU4(A72):2000 MHz CPU5(A72):2000 MHz CPU6(A72):2000 MHz CPU7(A72):2000 MHz CPU8(A72):2000 MHz CPU9(A72):2000 MHz CPU10(A72):2000 MHz CPU11(A72):2000 MHz CPU12(A72):2000 MHz CPU13(A72):2000 MHz CPU14(A72):2000 MHz CPU15(A72):2000 MHz Bus: 700 MHz DDR: 2900 MT/s Reset Configuration Word (RCW): 00000000: 50777738 24500050 00000000 00000000 00000010: 00000000 0c010000 00000000 00000000 00000020: 02e001a0 00002580 00000000 00000096 00000030: 00000000 00000000 00000000 00000000 00000040: 00000000 00000000 00000000 00000000 00000050: 00000000 00000000 00000000 00000000 00000060: 00000000 00000000 00027000 00000000 00000070: 08b30010 00150020 Model: NXP Layerscape LX2160ARDB Board Board: LX2160ACE Rev2.0-RDB, Board version: B, boot from SD Load TF-A binaries for eMMC boot from the TFTP server Note: For details about the flash image layout for TF-A binaries, refer LSDK memory layout for TF-A boot flow. Flash bl2_emmc.pbl : => tftp 82000000 bl2_emmc.pbl => mmc dev 1; mmc write 82000000 8  <blk_cnt> Here, blk_cnt refers to number of blocks in SD card that need to be written as per the file size. For example, when you load bl2_emmc.pbl from the TFTP server, if the bytes transferred is 103353 (193b9 hex), then  blk_cnt is calculated as "103353/512 = 201 (C9 hex)" + "few sectors for rounding up so that last block is not missed" . So, if you round up by 10 (A hex) sectors, for this example, mmc write command will be:  => mmc write 82000000 8  D3 Flash fip.bin : => tftp 82000000 fip.bin => mmc dev 1;  mmc write 82000000 800 <blk_cnt> Here,  blk_cnt  refers to number of blocks in SD card that need to be written as per the file size. Fo r example, when you load fip.bin from the TFTP server, if the bytes transferred is 1178967 (11fd57 hex) , then  blk_cnt  is calculated as "1178967/512 = 2302 (8FE hex)" + "few sectors for rounding up so that last block is not missed". So, if you round up by 10 (A hex) sectors, for this example, mmc write command will be: =>   mmc write 82000000 800 908 Boot from  eMMC card :   => qixis_reset emmc LX2160ARDB will boot with TF-A. In the boot log, you will see:   => NOTICE: BL2: v1.5(release):LSDK-20.04 NOTICE: BL2: Built : 22:01:10, Aug 20 2020 NOTICE: UDIMM 18ADF2G72AZ-3G2E1 NOTICE: DDR4 UDIMM with 2-rank 64-bit bus (x8) NOTICE: 32 GB DDR4, 64-bit, CL=22, ECC on, 256B, CS0+CS1 NOTICE: BL2: Booting BL31 NOTICE: BL31: v1.5(release):LSDK-20.04 NOTICE: BL31: Built : 22:02:07, Aug 20 2020 NOTICE: Welc U-Boot 2019.10 (Aug 14 2020 - 17:43:28 +0530) SoC: LX2160ACE Rev2.0 (0x87360020) Clock Configuration: CPU0(A72):2000 MHz CPU1(A72):2000 MHz CPU2(A72):2000 MHz CPU3(A72):2000 MHz CPU4(A72):2000 MHz CPU5(A72):2000 MHz CPU6(A72):2000 MHz CPU7(A72):2000 MHz CPU8(A72):2000 MHz CPU9(A72):2000 MHz CPU10(A72):2000 MHz CPU11(A72):2000 MHz CPU12(A72):2000 MHz CPU13(A72):2000 MHz CPU14(A72):2000 MHz CPU15(A72):2000 MHz Bus: 700 MHz DDR: 2900 MT/s Reset Configuration Word (RCW): 00000000: 50777738 24500050 00000000 00000000 00000010: 00000000 0c010000 00000000 00000000 00000020: 02e001a0 00002580 00000000 00000096 00000030: 00000000 00000000 00000000 00000000 00000040: 00000000 00000000 00000000 00000000 00000050: 00000000 00000000 00000000 00000000 00000060: 00000000 00000000 00027000 00000000 00000070: 08b30010 00150020 Model: NXP Layerscape LX2160ARDB Board Board: LX2160ACE Rev2.0-RDB, Board version: B, boot from eMMC  
View full article
  The below steps are used to update composite firmware image in FlexSPI NOR flash and SD/eMMC card using an SD card. Load composite firmware image on SD card Option 1: Using HxD editor on Windows system Option 2: Using Linux system Program updated composite firmware in SD card Program updated composite firmware in FlexSPI NOR flash (DEV#0 and DEV#1) Program updated composite firmware in eMMC card NOTE: Examples shown below use the LX2160ARDB Rev 2 image names. The same examples are applicable for LX2160ARDB Rev 1 also by replacing the Rev 2 image name with the corresponding Rev 1 image name. Step 1: Load composite firmware image in SD card Option 1: Using HxD editor on Windows system The below steps describe how to use an HxD editor on a Windows machine to program firmware image on SD card without partitioning the card. NOTE: Use the following link to download the HxD editor for Windows: https://mh-nexus.de/en/hxd/. Download composite firmware image on Windows machine using the following links: For LX2160ARDB Rev1: For SD boot: https://www.nxp.com/lgfiles/sdk/lsdk2004/firmware_lx2160ardb_uboot_sdboot.img For FlexSPI boot: https://www.nxp.com/lgfiles/sdk/lsdk2004/firmware_lx2160ardb_uboot_xspiboot.img For eMMC boot: https://www.nxp.com/lgfiles/sdk/lsdk2004/firmware_lx2160ardb_uboot_emmcboot.img For LX2160ARDB Rev 2: For SD boot: https://www.nxp.com/lgfiles/sdk/lsdk2004/firmware_lx2160ardb_rev2_uboot_sdboot.img For FlexSPI boot: https://www.nxp.com/lgfiles/sdk/lsdk2004/firmware_lx2160ardb_rev2_uboot_xspiboot.img For eMMC boot: https://www.nxp.com/lgfiles/sdk/lsdk2004/firmware_lx2160ardb_rev2_uboot_emmcboot.img Format SD card. Open HxD editor and run as administrator. Open firmware_lx2160ardb_rev2_uboot_sdboot.img binary file in HxD editor. Copy the binary file (CTRL + A and CTRL + C). Plug the SD card either directly into the slot available on your Windows machine or using a memory card adapter/reader. Open disk (SHIFT + CTRL +D). Open disk  NOTE: Uncheck the 'Open as Readonly' option while opening the disk. Go to SD block (or sector) 8 (0x1000). HxD Editor - Sector 8 Paste the copied binary image content (CTRL + B). Make sure to copy the image at SD block no. 8. Save the content. Repeat above steps to load firmware_lx2160ardb_rev2_uboot_xspiboot.img and firmware_lx2160ardb_rev2_uboot_emmcboot.img binary image in SD card. For example: Load firmware_lx2160ardb_rev2_uboot_xspiboot.img image in SD card at block no. 150500 and firmware_lx2160ardb_rev2_uboot_emmcboot.img image in SD card at block no. 300500. NOTE: Make sure that you load these images in SD blocks so that the images do not get overwrite. Eject the SD card. Option 2: Using Linux system Download composite firmware image on Linux machine using the following links: For LX2160ARDB Rev1: For SD boot: $ wget https://www.nxp.com/lgfiles/sdk/lsdk2004/firmware_lx2160ardb_uboot_sdboot.img For FlexSPI boot: $ wget https://www.nxp.com/lgfiles/sdk/lsdk2004/firmware_lx2160ardb_uboot_xspiboot.img For eMMC boot: $ wget https://www.nxp.com/lgfiles/sdk/lsdk2004/firmware_lx2160ardb_uboot_emmcboot.img For LX2160ARDB Rev 2: For SD boot: $ wget https://www.nxp.com/lgfiles/sdk/lsdk2004/firmware_lx2160ardb_rev2_uboot_sdboot.img For FlexSPI boot: $ wget https://www.nxp.com/lgfiles/sdk/lsdk2004/firmware_lx2160ardb_rev2_uboot_xspiboot.img For eMMC boot: $ wget https://www.nxp.com/lgfiles/sdk/lsdk2004/firmware_lx2160ardb_rev2_uboot_emmcboot.img Format SD card (optional, required if the card already has some data so to ensure that images have been loaded to card without conflicting with the existing data). Load composite firmware image to SD card. For SD boot: dd if= firmware_lx2160ardb_rev2_uboot_sdboot.img of=/dev/sdb bs=512 seek=8 For FlexSPI boot: dd if= firmware_lx2160ardb_ rev2_uboot_xspiboot.img of=/dev/sdb bs=512 seek=150500 For eMMC boot: dd if= firmware_lx2160ardb_ rev2_uboot_emmcboot.img of=/dev/sdb bs=512 seek=300500 Eject the SD card. Step 2: Program updated composite firmware in SD card NOTE: Since the updated composite firmware is now available at required block (SD start block no. 😎 in SD card, therefore, you can boot the board using SD card using following steps. Insert the SD card in SD slot of LX2160ARDB. Set switch settings to boot from SD card : SW1[1:4] = 1000  Restart the board. The board boots from updated composite firmware (SD boot) image loaded in the SD card. The U-Boot log displays: Model: NXP Layerscape LX2160ARDB Board Board: LX2160ACE Rev2.0-RDB, Board version: B, boot from SD Step 3: Program updated composite firmware in FlexSPI NOR flash (DEV#0 and DEV#1) Insert the SD card in SD slot of LX2160ARDB. Set switch settings to boot from SD card=> SW1[1:4] = 1000 Restart the board and stop at U-Boot prompt. Load firmware_lx2160ardb_rev2_uboot_xspiboot.img at 0xa0000000 (DDR address) using the following command: => mmc read 0xa0000000 <start_block_number> <block_count> where, <start_block_number> - start block number in SD card where you have loaded the firmware. <block_count> - number of blocks in SD card that needs to be read as per the file size. It is calculated as ‘file size /512’ + ‘few sectors for rounding up so that last block is not missed’. If firmware file size is 52158124 (31bdeac hex), block_count is 52158124/512 = 101871 (18DEF hex) + 10 (A hex) = 101881 (18DF9 hex). For example: => mmc read 0xa0000000 150500 18DF9 Program default FlexSPI NOR flash: =>sf probe 0:0 =>sf update 0xa0000000 0x0 <firmware_lx2160ardb_rev2_uboot_xspiboot.img _filesize_in_hex> For example: => sf update 0xa0000000 0x0 31BDEAC    Program alternate FlexSPI NOR flash: => sf probe 0:1 => sf update 0xa0000000 0x0 <firmware_lx2160ardb_rev2_uboot_xspiboot.img _filesize_in_hex>  Restart the board to boot from FlexSPI NOR flash 0 (DEV#0). Switch settings to boot from DEV#0: SW1[1:8] = 1111 1000 The U-Boot log shows the following message: Model: NXP Layerscape LX2160ARDB Board Board: LX2160ACE Rev2.0-RDB, Board version: B, boot from FlexSPI DEV#0 Restart the board to boot from FlexSPI NOR flash 1 (DEV#1) as well. Switch settings to boot from DEV#1 SW1[1:4] = 1111 1001  The U-Boot log shows the following message: Model: NXP Layerscape LX2160ARDB Board Board: LX2160ACE Rev2.0-RDB, Board version: B, boot from FlexSPI DEV#1 Step 4: Program updated composite firmware in eMMC card Insert the SD card in SD slot of LX2160ARDB. Set switch settings to boot from SD card: SW1[1:4] = 1000 Restart the board and stop at U-Boot prompt. Load firmware_lx2160ardb_rev2_uboot_emmcboot.img at 0xa0000000 (DDR address) using the following command: => mmc dev 0; mmc read 0xa0000000 <start_block_number> <block_count> where, <start_block_number> - start block number in SD card where you have loaded the firmware. <block_count> - number of blocks in SD card that needs to be read as per the file size. It is calculated as ‘file size /512’ + ‘few sectors for rounding up so that last block is not missed’. If firmware file size is 52158124 (31bdeac hex), block_count is 52158124/512 = 101871 (18DEF hex) + 10 (A hex) = 101881 (18DF9 hex). For example: => mmc read 0xa000000 300500 18DF9 Program eMMC card. => mmc dev 1; mmc write 0xa0000000 8 18DF9 Restart the board to boot from eMMC. Set switch settings to boot from eMMC card. SW1[1:8] = 1001 1000 The U-Boot log shows the following message: Model: NXP Layerscape LX2160ARDB Board Board: LX2160ACE Rev2.0-RDB, Board version: B, boot from eMMC
View full article
Follow these steps to update the DPAA2 MC firmware, DPC, and DPL images for the LX2160ARDB on the SD/eMMC card.  Below steps are valid for both LX2160ARDB Rev 1.0 and Rev 2.0 revisions. Compiling MC firmware Clone the qoriq-mc-binary repository. $  git clone https://github.com/NXP/qoriq-mc-binary.git $   cd qoriq-mc-binary/lx2160a/ $ git checkout LSDK-<LSDK version> . For example,  $ git checkout  LSDK-20.04 The prebuilt MC firmware image, mc_10.20.4_lx2160a.itb , is available at  qoriq-mc-binary/lx2160a/ . Note: The exact name of the MC firmware image may vary depending on the LSDK release version used.                  Compiling DPC and DPL images Clone the mc-utils repository and compile the DPC and DPL images. $  git clone  https://source.codeaurora.org/external/qoriq/qoriq-components/mc-utils $  cd mc-utils/ $ git checkout LSDK-<LSDK version> . For example,  $ git checkout LSDK-20.04 If required, make changes to the DPC and DPL files. $  make -C config/ The compiled dpc-usxgmii.dtb and dpl-eth.19.dtb images are  available at  /mc-utils/config/lx2160a/RDB/ . Note: The exact name of the DPL and DPC images may vary depending on the LSDK release version used.             SD/eMMC card start block number for MC, DPL, and DPC images Image  SD/eMMC card start block number DPAA2 MC firmware 0x05000 = 20480 DPAA2 DPL  0x06800 = 26624 DPAA2 DPC 0x07000 = 28672   Refer th e  LSDK firmware and SD card start block number  for  complete listing of the SD card start block numbers for all LSDK firmware images.     Programming MC, DPC, and DPL images to SD/eMMC card Boot LX2160ARDB from FlexSPI. Ensure that the switches are set to boot the board from FlexSPI. SW1[1:8] = 1111 1000 SW2[1:8] = 0000 0110 SW3[1:8] = 1111 1100 SW4[1:8] = 1011 1000 Boot from FlexSPI NOR flash0:  => qixis_reset For example: For LX2160ARDB, in U-Boot log, you’ll see: Board: LX2160ACE Rev2.0-RDB, Board version: B, boot from FlexSPI DEV#0 Set up Ethernet connection When board boots up, U-Boot prints a list of enabled Ethernet interfaces. DPMAC2@xlaui4, DPMAC3@xgmii, DPMAC4@xgmii, DPMAC5@25g-aui, DPMAC6@25g-aui, DPMAC17@rgmii-id, DPMAC18@rgmii-id    Set server IP address to the IP address of the host machine on which you have configured the TFTP server.  => setenv serverip <ipaddress1> Set ethact and ethprime as the ethernet interface connected to the TFTP server. NOTE: See  LX2160ARDB Ethernet Port Mapping  for the mapping of Ethernet port names appearing on the chassis front panel with the port names in U-Boot and Linux. =>   setenv ethprime <name of interface connected to TFTP server> For example: => setenv ethprime DPMAC3@xgmii  => setenv ethact <name of interface connected to TFTP server> For example: => setenv ethact DPMAC3@xgmii  Set IP address of the board. You can set a static IP address or, if the board can connect to a dhcp server, you can use the dhcp command.  Static IP address assignment: => setenv ipaddr <ipaddress2> => setenv netmask <subnet mask> Dynamic IP address assignment: => dhcp Save the settings.        => saveenv Check the connection between the board and the TFTP server. => ping $serverip Using DPMAC3@xgmii device host 192.168.2.1 is alive  Load images from TFTP server Flash MC firmware ( mc_10.20.4_lx2160a.itb) : => tftp 82000000 mc_10.20.4_lx2160a.itb  Flash MC firmware to SD card: => mmc dev 0; mmc write 8200000 5000 <blk_cnt>  Flash MC firmware to eMMC card: => mmc dev 1; mmc write 8200000 5000 <blk_cnt> Here, blk_cnt refers to number of blocks in SD/eMMC card that need to be written as per the file size. For example, when you load mc_10.20.4_lx2160a.itb from the TFTP server, if the bytes transferred is 1092272 (10aab0 hex), then  blk_cnt is calculated as "1092272 /512 = 2133 (855 hex)" + "few sectors for rounding up so that last block is not missed" . So, if you round up by 10 (A hex) sectors, for this example, mmc write command will be:  => mmc write 82000000 5000 85F Flash DPAA2 DPL image . => tftp 82000000 dpl-eth.19.dtb Flash DPL image to SD card: => mmc dev 0; mmc write 8200000 6800 <blk_cnt>    Flash DPL image to eMMC card: => mmc dev 1; mmc write 8200000 6800 <blk_cnt> Here,  blk_cnt  refers to number of blocks in SD/eMMC card that need to be written as per the file size. Fo r example, when you load dpl-eth.19.dtb from the TFTP server, if the bytes transferred is 4583 (11e7 hex) , then  blk_cnt   is calculated as  "4583 /512 = 8 (8 hex)" + "few sectors for rounding up so that last block is not missed". So, if you round up by 18 (12 hex) sectors, for this example, mmc write command will be:  =>  mmc write 82000000 6800 12 Flash DPAA2 DPC image.    => tftp 82000000 dpc-usxgmii.dtb   Flash DPC image to SD card: => mmc dev 0; mmc write 8200000 7000 <blk_cnt> Flash DPC image to eMMC card: => mmc dev 1; mmc write 8200000 7000 <blk_cnt> Here,  blk_cnt  refers to number of blocks in SD card that need to be written as per the file size. Fo r example, when you load dpc-usxgmii.dtb   from the TFTP server, if the bytes transferred is 736 (2e0 hex) , then  blk_cnt   is calculated as  "736 /512 = 1 (1 hex)" + "few sectors for rounding up so that last block is not missed". So, if you round up by 11 (B hex) sectors, for this example, mmc write command will be:  =>  mmc write 82000000 7000 B Boot the board. Boot from  SD card :   => qixis_ reset sd Boot from eMMC card: => qixis_reset emmc LX2160ARDB will boot with updated MC firmware and DPC and DPL images. In the U-Boot log, you will see:   Model: NXP Layerscape LX2160ARDB Board Board: LX2160ACE Rev2.0-RDB, Board version: B, boot from SD ... ... fsl-mc: Booting Management Complex ... SUCCESS fsl-mc: Management Complex booted (version: 10.20.4, boot status: 0x1) Hit any key to stop autoboot:  0 =>   OR   Model: NXP Layerscape LX2160ARDB Board Board: LX2160ACE Rev2.0-RDB, Board version: B, boot from eMMC ... ... fsl-mc: Booting Management Complex ... SUCCESS fsl-mc: Management Complex booted (version: 10.20.4, boot status: 0x1) Hit any key to stop autoboot:  0 =>
View full article
Follow these steps to update the DPAA2 MC firmware, DPC, and DPL images in FlexSPI NOR flash of LX2160ARDB. NOTE: Below steps are valid for both LX2160ARDB Rev 1.0 and Rev 2.0 revisions. NOTE: qixis_reset  boots the board from FlexSPI NOR flash0 and qixis_reset altbank  boots the board from FlexSPI NOR flash1. NOTE: sf probe 0:1 means that the alternate bank will be written to. So, if the board boots from FlexSPI NOR flash0 and sf probe 0:1 is entered at the U-Boot prompt, the  commands that follow will program FlexSPI NOR flash1. Obtaining  MC firmware Clone the qoriq-mc-binary   repository. $  git clone https://github.com/NXP/qoriq-mc-binary.git $   cd qoriq-mc-binary/lx2160a/ $  git checkout  -b <new branch name>  <LSDK tag> .   For example,  $  git checkout  -b LSDK-20.04  LSDK-20.04 The prebuilt MC firmware image, mc_10.20.4_lx2160a.itb , is available at / qoriq-mc-binary/lx2160a/ . NOTE: The name of the MC firmware image may vary depending on the LSDK release version used.  Obtaining DPC and DPL images Clone the  mc-utils repository and compile the DPC and DPL images. $ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/mc-utils $ cd mc-utils $  git checkout  -b <new branch name>  <LSDK tag> .   For example,  $  git checkout  -b LSDK-20.04 LSDK-20.04 If required, make changes to the DPC and DPL files. $ make -C config/ The compiled dpc-usxgmii.dtb and dpl-eth.19.dtb images are available at  /mc-utils/config/lx2160a/RDB/ . NOTE: The name of the DPC and DPL images may vary depending on the LSDK release version used.  Flashing MC firmware, DPC, and DPL images to FlexSPI NOR flash Boot LX2160ARDB from FlexSPI. Ensure that the switches are set to boot the board from FlexSPI. SW1[1:8] = 1111 1000 SW2[1:8] = 0000 0110 SW3[1:8] = 1111 1100 SW4[1:8] = 1011 1000 Boot from FlexSPI NOR flash0:  => qixis_reset For example: For LX2160ARDB, in U-Boot log, you’ll see: Board: LX2160ACE Rev2.0-RDB, Board version: B, boot from FlexSPI DEV#0   The images can be loaded to the LX2160ARB from a TFTP server or from a mass storage device (SD, USB, or SATA).   Option 1: Load image from the TFTP server   Set up Ethernet connection When board boots up, U-Boot prints a list of enabled Ethernet interfaces. DPMAC2@xlaui4, DPMAC3@xgmii, DPMAC4@xgmii, DPMAC5@25g-aui, DPMAC6@25g-aui, DPMAC17@rgmii-id, DPMAC18@rgmii-id  Set server IP address to the IP address of the host machine on which you have configured the TFTP server.  => setenv serverip <ipaddress1> Set ethact and ethprime as the ethernet interface connected to the TFTP server. See LX2160ARDB Ethernet Port Mapping for the mapping of Ethernet port names appearing on the chassis front panel with the port names in U-Boot and Linux. =>   setenv ethprime <name of interface connected to TFTP server> For example: => setenv ethprime DPMAC3@xgmii => setenv ethact <name of interface connected to TFTP server> For example: => setenv ethact DPMAC3@xgmii Set IP address of the board. You can set a static IP address or, if the board can connect to a dhcp server, you can use the dhcp command.  Static IP address assignment: => setenv ipaddr <ipaddress2> => setenv netmask <subnet mask> Dynamic IP address assignment: => dhcp Save the settings.    => saveenv Check the connection between the board and the TFTP server. => ping $serverip Using DPMAC3@xgmii device host 192.168.2.1 is alive   Load images from a TFTP server to FlexSPI NOR flash1 NOTE: Ensure that the board boots from FlexSPI NOR flash1 before programming updated MC firmware and DPL and DPC images to FlexSPI NOR flash1. If board fails to boot successfully from FlexSPI NOR flash1, you can program composite firmware image to FlexSPI NOR flash1 by following the steps available in section "LSDK Quick Start Guide or LX2160ARDB" in LSDK User Guide. Program FlexSPI NOR flash1:  sf probe 0:1 Flash MC firmware: => tftp 0x80000000 mc_10.20.4_lx2160a.itb =>  print filesize => sf erase 0xa00000 +$filesize && sf write 0x80000000 0xa00000 $filesize Address  0xa00000  is the location of MC firmware in FlexSPI NOR flash.  Refer Flash layout for new boot flow with TF-A  for  t he complete flash memory layout. Flash DPC image: => tftp 0x80000000 dpc-usxgmii.dtb => print filesize   => sf erase 0xe00000 +$filesize && sf write 0x80000000 0xe00000 $filesize Address  0xe00000  is the location of DPC image in FlexSPI NOR flash.  Refer   Flash layout for new boot flow with TF-A  for  t he complete flash memory layout. Flash DPL image: =>   tftp 0x80000000 dpl-eth.19.dtb =>   print filesize   =>   sf erase 0xd00000 +$filesize && sf write 0x80000000 0xd00000 $filesize Address  0xd00000  is the location of DPL image in FlexSPI NOR flash.  Refer   Flash layout for new boot flow with TF-A  for  t he complete flash memory layout. Boot from QSPI NOR flash1:  =>  qixis_reset altbank In U-Boot log, you’ll see: Board: LX2160ACE Rev2.0-RDB, Board version: B, boot from FlexSPI DEV#1   Ensure that SD card, USB flash drive, or SCSI hard disk installed with LSDK Ubuntu distribution is plugged into the board to boot the board to Ubuntu. If U-Boot does not find LSDK on a mass storage device, it will boot TinyDistro from lsdk_linux_arm64_ tiny.itb stored in FlexSPI NOR flash.   Option 2: Load images from partition on mass storage device (SD, USB, or SATA) Select mass storage device to use. => mmc rescan => mmc info Or => usb start => usb info Or => scsi scan => scsi info Optional – List files on the storage device => ls mmc <device:partition> For example: => ls mmc 0:2 Or => ls usb <device:partition> For example: => ls usb 0:1 Or => ls scsi <device:partition> For example: => ls scsi 0:2 Program QSPI NOR flash1 :  => sf probe 0:1 Flash MC firmware: Load MC firmware image from the storage device => load mmc 0:2 80000000 <mc firmware> For example: => load mmc 0:2 80000000 mc_10.20.4_lx2160a.itb => print filesize Or => load usb 0:2 80000000 <image name> => print filesize Or => load scsi 0:2 80000000 <image name> => print filesize   Program MC firmware image to FlexSPI NOR flash: => sf erase 0xa00000 +$filesize && sf write 0x80000000 0xa00000 $filesize   Address 0xa00000 is the location of MC firmware in FlexSPI NOR flash.  Refer   Flash layout for new boot flow with TF-A  for  t he complete flash memory layout. Flash DPL image: Load DPL image from the storage device => load mmc 0:2 80000000 <dpl image> For example: => load mmc 0:2 80000000 dpl-eth.19.dtb => print filesize Or => load usb 0:2 80000000 <image name> => print filesize Or => load scsi 0:2 80000000 <image name> => print filesize   Program DPL image to FlexSPI NOR flash:   => sf erase 0xd00000 +$filesize && sf write 0x80000000 0xd00000 $filesize   Address   0xd00000   is the location of DPL image in FlexSPI NOR flash.  Refer   Flash layout for new boot flow with TF-A  for  t he complete flash memory layout.   Flash DPC image: Load DPC image from the storage device => load mmc 0:2 80000000 <dpc image> For example: => load mmc 0:2 80000000 dpc-usxgmii.dtb => print filesize Or => load usb 0:2 80000000 <image name> => print filesize Or => load scsi 0:2 80000000 <image name> => print filesize   Program DPC image to FlexSPI NOR flash:  => sf erase 0xe00000 +$filesize && sf write 0x80000000 0xe00000 $filesize Address 0xe00000  is the location of DPC image in FlexSPI NOR flash.  Refer   Flash layout for new boot flow with TF-A  for  t he complete flash memory layout. Boot from FlexSPI NOR flash1:  => qixis_reset altbank In U-Boot log, you’ll see: Board: LX2160ACE Rev2.0-RDB, Board version: B, boot from FlexSPI DEV#1   Ensure that SD card, USB flash drive, or SCSI hard disk installed with LSDK Ubuntu distribution is plugged into the board to boot the board to Ubuntu. If U-Boot does not find LSDK on a mass storage device, it will boot TinyDistro from   lsdk_linux_arm64_ tiny.itb   stored in FlexSPI NOR flash.  
View full article
Follow these steps to update the Linux kernel image and device tree on the eMMC card. NOTE: Below steps are valid for both LX2160ARDB Rev 1.0 and Rev 2.0 revisions. Compiling Linux kernel images and device tree   On Linux host, clone the repository with Linux kernel image and device tree: $git clone https://source.codeaurora.org/external/qoriq/qoriq-components/linux $ cd Linux $ git checkout -b <new branch> <start point> For example, $ git checkout -b LSDK-20.04-V5.4 LSDK-20.04-V5.4 where LSDK-20.04-V5.4 refers to a tag in the format LSDK-<LSDK version>- V<kernel version> $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig lsdk.config If you want to make changes to the device tree, open and edit arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts  You can make changes in the Linux kernel source code also if required. $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- The binary kernel image Image and compressed kernel image Image.gz are in arch/arm64/boot/. The device tree blob fsl-lx2160a-rdb.dtb is in arch/arm64/boot/dts/freescale/. Copying the compiled kernel images and device tree to the eMMC card   Step1: Copy the kernel images and device tree from Linux host machine Ensure the eMMC card available on the reference board. Check DIP switch settings for the desired boot type. Power on the board and let the board boot to LSDK distro prompt. In case LSDK image is not deployed on the storage device on the board, execute the following command under U-Boot prompt to boot the board to TinyDistro. For FlexSPI NOR boot: => run xspi_bootcmd For SD/eMMC boot: => run sd_bootcmd Log in to LSDK distro as root/root or TinyDistro as “root”. Bring up a network interface with Linux host. Dynamic IP address assignment: # udhcpc -i <port name in Tiny/LSDKDistro> Static IP address assignment: # ifconfig <port name in Tiny/LSDKDistro> <IP address> netmask <netmask address> up For example: # ifconfig enp1s0 192.168.2.120 netmask 255.255.255.0 up  Copy the Kernel, Kernel.gz images and device tree blob fsl-lx2160a-rdb.dtb from host machine. # mkdir <destination folder> # scp <user>@<ipaddress>:<file path>/<filename> <destination folder> For example: # mkdir /kernelfiles # scp user1@192.168.2.1:/tftpboot/Image.gz /kernelfiles   Step2: Copy the kernel image and device tree to the eMMC card sudo fdisk -l to list the disks that are accessible on board. Mount the eMMC card partition that contains Linux kernel images and device tree. NOTE: Use the command cat /proc/partitions to see the list of devices, their partitions along with their sizes to make sure that the correct device and partition name have been chosen. The eMMC storage drive in the Linux PC is detected as /dev/sdX, where X is a letter such as a, b, c. Make sure to choose the correct device name, because data on this device will be replaced. If your Linux host machine supports read/write eMMC card directly without an extra eMMC card reader device, the device name of eMMC card is typically mmcblk1. In general, the Linux kernel images and device tree are stored in the second partition of the eMMC device (mmcblk1p2). For detail on storage layout on SD/eMMC/USB/SATA for LSDK images deployment, refer to section "LSDK memory layout and Userland" in Layerscape Software Development Kit User Guide. # sudo mkdir <mount_folder> # sudo mount /dev/sdX <mount_folder>  For example: # sudo mkdir /carddata # sudo mount /dev/mmcblk1p2 /carddata Replace Image, Image.gz, and fsl-lx2160a-rdb.dtb on the eMMC card with the new files copied in <destination folder> in the steps above. # sudo cp <destination folder>/Image <destination folder>/Image.gz <destination folder>/fsl-lx2160a-rdb.dtb <mount_location> For example: # sudo cp /kernelfiles/Image /kernelfiles/Image.gz /kernelfiles/fsl-lx2160a-rdb.dtb /carddata Unmount the card. for example: # sudo umount /dev/mmc1blk1p2 Reboot the board. At U-Boot prompt, run the following command to boot the board to LSDK distro using eMMC card. => run bootcmd_mmc1 If U-Boot does not find LSDK on the eMMC card, it will boot  TinyDistro from lsdk_linux_arm64_ tiny.itb  stored on the eMMC card.    
View full article
Follow these steps to update the Linux kernel image and device tree for LX2160ARDB on an SD card.  NOTE: Below steps are valid for both LX2160ARDB Rev 1.0 and Rev 2.0 revisions. STEP 1: Compiling Linux kernel images and device tree On Linux host, clone the repository with Linux kernel image and device tree: $ git clone  https://source.codeaurora.org/external/qoriq/qoriq-components/linux $ cd linux $ git checkout -b <new branch> <start point> For example, $  git checkout -b LSDK-20.04-V5.4 LSDK- 20.04-V5.4 where LSDK-20.04-V5.4 refers to a tag in the format  LSDK-<LSDK version>-V<kernel version> $   make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig lsdk.config If you want to make changes to the device tree, open and edit arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts $   make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- The binary kernel image Image  and compressed kernel image Image.gz  are in arch/arm64/boot/ . The device tree blob fsl-lx2160a-rdb .dtb   is in arch/arm64/boot/dts/freescale/ . STEP2: Copying the compiled kernel images and device tree to the SD card   Plug the SD card into the Linux host machine. sudo fdisk -l to list the disks that are accessible to the computer . Mount the SD card partition that contains Linux kernel images and device tree. sudo mkdir <mount_location> sudo mount /dev/sdX <mount_location> For example: $ sudo mkdir /carddata $ sudo mount /dev/mmcblk0p2 /carddata   NOTE: Use the command cat /proc/partitions to see the list of devices, their partitions along with their sizes to make sure that the correct device and partition name have been chosen. The eMMC storage drive in the Linux PC is detected as /dev/sdX, where X is a letter such as a, b, c. Make sure to choose the correct device name, because data on this device will be replaced. If your Linux host machine supports read/write SD card directly without an extra SD card reader device, the device name of SD card is typically mmcblk0. In general, the Linux kernel images and device tree are stored in the second partition of the SD device (mmcblk0p2). For detail on storage layout on SD/eMMC/USB/SATA for LSDK images deployment, refer to section "LSDK memory layout and Userland" in Layerscape Software Development Kit User Guide. Replace Image , Image.gz , and  fsl-lx2160a-rdb.dtb  on the SD card with the new files compiled in the steps above. $ sudo cp /linux/arch/arm64/boot/Image /linux/arch/arm64/boot/Image.gz /linux/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dtb <mount_location> For example:  $sudo cp /linux/arch/arm64/boot/Image /linux/arch/arm64/boot/Image.gz /linux/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dtb /carddata Unmount the card. For example: sudo umount /dev/mmcblk0p2 Plug the SD card into LX2160ARDB and boot the board. At U-Boot, run the following command to boot the board to LSDK distro using the SD card. => run bootcmd_mmc0 If U-Boot does not find LSDK on the SD card, it will boot   TinyDistro from  lsdk_linux_arm64_ tiny.itb  stored on the SD card.
View full article
In the U-Boot log, the names of the Ethernet interfaces are printed in the format <name>@<interface type> , for example, DPMAC3@xgmii . DPMAC is a DPAA2 object that identifies the physical interface.    Interface name is not fixed in LX2160ARDB, depending upon which interface is active, name will be assigned  in TinyDistro as well as in Ubuntu distribution. Interface names can be checked using ls-listni command. root@TinyDistro:~# ls-listni dprc.1/dpni.1 (interface: eth0, end point: dpmac.2) dprc.1/dpni.0 (interface: eth1, end point: dpmac.17)   For details regarding creation of a DPAA2 network interface (DPNI) in Linux, see "LSDK Quick Start Guide for LX2160ARDB -> Bringing up DPAA2 network interfaces" in Layerscape Software Development Kit User Guide.   The table below shows the mapping of Ethernet port names appearing on the chassis front panel with the port names in U-Boot and Linux for LX2160ARDB.    Port name on chassis Port name in U-Boot Port name in Linux (tinyDistro) Port name in Linux (Ubuntu userland) Description 40G MAC2 DPMAC2@xlaui4 Interface name will be ethn, for example eth0, eth1. Eth0: If PCIe is connected, else it is any connected DPAA2 interface. PCIe: enp1s0   DPAA: ethx 40G MAC2 QSFP+ port 10G MAC3 DPMAC3@xgmii 10G MAC3 USXGMII port 10G MAC4 DPMAC4@xgmii 10G MAC4 USXGMII port 25G MAC5 DPMAC5@25g-aui 25G MAC5 SFP port 25G MAC6 DPMAC6@25g-aui 25G MAC6 SFP port 1G MAC17 DPMAC17@rgmii-id 1G MAC17 RGMII port 1G MAC18 DPMAC18@rgmii-id 1G MAC18 RGMII port  
View full article
On successful probing of the DSA Felix switch, each available front panel switch port should have a network device interface attached with the swpX name format. The ip link show command uses the swpX@enoY name format to also indicate the associated master Ethernet interface for the DSA switch port, which corresponds to an internal ENETC interface, usually the eno2 (Port2) for the LS1028A SoC. LS1028 Interface naming in Linux Single port mode Bridge mode
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-344564 
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-344236 
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-343865 
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-343717 
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-343572 
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-343516     
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-343225 
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-342787 
View full article
[中文翻译版] 见附件   原文链接: https://community.nxp.com/docs/DOC-342651 
View full article
In the U-Boot log, the names of the Ethernet interfaces are printed in the format <name>@<interface type> , for example, DPMAC2@xgmii . DPMAC is a DPAA2 object that identifies the physical interface.  For Linux, in TinyDistro as well as in Ubuntu distribution, by default, only one MAC is enabled as a standard Kernel Ethernet Interface. This interface is named eth0 by default (or eth1 if PCI Express network interface card is discovered first). For details regarding creation of a DPAA2 network interface (DPNI) in Linux, see "LSDK Quick Start Guide for LS2088ARDB -> Bringing up DPAA2 network interfaces" in Layerscape Software Development Kit User Guide. The table below shows the mapping of Ethernet port names appearing on the chassis front panel with the port names in U-Boot and Linux for LS2088ARDB.  In Linux, the mapping of Ethernet port names is not strict. The port names are mapped based on the order in which the Ethernet interfaces are created. As an example, consider a DPL file which defines only one DPMAC object, DPMAC3. When Linux starts, if a net device is created using DPMAC3, it will be labeled eth1 (assuming PCIe interface is eth0). Port name on chassis Port name in U-Boot Port name in Linux (tinyDistro and Ubuntu userland) Description ETH0  DPMAC5@xgmii eth0 by default (or eth1 if PCI Express network interface card is discovered first) XFI copper interface ETH1 DPMAC6@xgmii not enabled by default XFI copper interface ETH2 DPMAC7@xgmii not enabled by default XFI copper interface ETH3 DPMAC8@xgmii not enabled by default XFI copper interface ETH4 DPMAC1@xgmii not enabled by default XFI copper interface ETH5 DPMAC2@xgmii not enabled by default XFI copper interface ETH6 DPMAC3@xgmii not enabled by default XFI copper interface ETH7 DPMAC4@xgmii not enabled by default XFI copper interface
View full article