Layerscape Knowledge Base

cancel
Showing results for 
Search instead for 
Did you mean: 

Layerscape Knowledge Base

Discussions

Sort by:
This document introduces porting TDM Linux driver working in internal loopback mode to do verification during custom boards bringing up and verification stage. 1. TDM Interface Configuration to Support Internal Loopback Mode 2. Modify Linux Kernel Driver to Make TDM Working in Internal Loopback Mode 3. Build TDM Driver into Linux Kernel and do verification on the target board
View full article
This how-to topic is applicable for only LSDK 18.09 and older releases. Follow these steps to update the U-Boot binary in QSPI NOR flash.  Prerequisites  Ubuntu 18.04 64-bit should be installed on the Linux host machine for building LSDK 18.0 6 or LSDK 18.09 U- Boot binary . cpld reset boots the board from QSPI NOR flash0 and cpld reset altbank   boots the board from QSPI NOR flash1. sf probe 0:1 means that the alternate bank will be written to. So, if the board boots from QSPI NOR flash0 and sf probe 0:1 is entered at the U-Boot prompt, the commands that follow will program QSPI NOR flash1.   Compiling U-Boot binary Clone the  u-boot   repository. $ 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-18.09  LSDK-18.09   $ export  ARCH=arm64 $ export CROSS_COMPILE= aarch64-linux-gnu- $ make  distclean $ make ls10 46ardb_qspi _defconfig If required, make changes to the   U -Boot   files. $ make 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 1 8.06 or LSDK 18.09 U-B oot binary.  The compiled U-Boot image, u- boot .bin , is available in the directory  u-boot / . Flashing U-Boot   binary   to   QSPI NOR flash U-Boot image can be loaded to LS1046ARDB from a TFTP server or from a mass storage device (SD, USB, or SATA). Option 1: Load image from the TFTP server Boot LS1046ARDB from QSPI. Ensure that the switches are set to boot the board from QSPI.  For booting from QSPI ,   SW5[1:8] = 00100010 Boot from QSPI NOR flash0:  => cpld reset In boot log, you’ll see: Board: LS1046ARDB, boot from QSPI vBank 0 Set up Ethernet connection When the board boots up, U-Boot prints a list of enabled Ethernet interfaces. FM1@DTSEC3 [PRIME], FM1@DTSEC4, FM1@DTSEC5, FM1@DTSEC6, FM1@TGEC1, FM1@TGEC2 Set server IP to the IP 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  LS1046ARDB 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 FM1@DTSEC4 => setenv ethact <name of interface connected to TFTP server> For example: => setenv ethact FM1@DTSEC4 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  FM1@DTSEC4 device host 192.168.1.1 is alive Load U-Boot image from the TFTP server Program QSPI NOR flash1 :  =>  sf probe 0:1 Flash U-Boot image: => tftp 0xa0000000 u-boot.bin => print   filesize filesize=ae84a Program U-Boot image to QSPI NOR flash:  =>  sf erase 0x1 00000 +$ fil esize  && sf write 0xa0000000 0x1 00000 $ filesize Address 0x100000  is the location of U-Boot in QSPI NOR flash.   Refer Flash layout for boot flow with PPA – LSDK 18.09 and older releases  for  t he complete flash memory layout. Boot from QSPI NOR flash1 : => cpld reset altbank In boot log, you’ll see: Board: LS1046ARDB, boot from QSPI vBank 4 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 QSPI NOR flash. Option 2: Load image from partition on mass storage device (SD, USB, or SATA) Boot LS1046ARDB from QSPI NOR flash. Ensure that the switches are set to boot the board from QSPI.  For booting from   QSPI ,   SW5[1:8] =  00100010 Boot from QSPI NOR flash0:  => cpld reset In boot log, you’ll see: Board: LS1046ARDB, boot from QSPI vBank 0 Select mass storage device to use. => mmc rescan => mmc info Or => usb start => usb info Or => scsi scan => scsi info Optional – List files on storage device => ls mmc <device:partition> For example: => ls mmc 0:3 System Volume Information/ 714826 u-boot.bin 1 file(s), 1 dir(s) Or => ls usb <device:partition> For example: => ls usb 0:1 Or => ls scsi <device:partition> For example: => ls scsi 0:2 If the ls command fails to run, check that U-Boot in QSPI NOR flash0 supports the command by typing ls at the U-Boot prompt: => ls ls - Lists files in a directory (default) Usage: ls <interface> [<dev[:part]> [directory]] - Lists files in directory [directory] of partition [part] on device type [interface] and instance [dev] . If U-Boot does not support this command, then update the composite firmware image in QSPI NOR flash0. For steps to update composite firmware image in QSPI NOR flash, see LS1046ARDB - How to update composite firmware image in QSPI NOR flash. Program QSPI NOR flash1 :  => sf probe 0:1 Load U-Boot image from the storage device. => load mmc <device:partition> a0000000 <image name> => print filesize For example: => load mmc 0:3 a0000000 u-boot.bin 714826 bytes read in 52 ms (13.1 MiB/s) => print filesize filesize=ae84a Or => load usb <device:partition> a0000000 <image name> => print filesize Or => load scsi <device:partition> a0000000 <image name> => print filesize Program U-Boot image to QSPI NOR flash:  =>   sf erase 0x1 00000 +$ fil esize  && sf write 0xa0000000 0x1 00000 $ filesize Address 0x100000  is the location of U-Boot in QSPI NOR flash.  Refer Flash layout for boot flow with PPA – LSDK 18.09 and older releases for the complete flash memory layout. Boot from QSPI NOR flash1 : =>   cpld reset altbank In boot log, you’ll see: Board: LS1046ARDB, boot from QSPI vBank 4 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 QSPI NOR flash.
View full article
OpenWrt is a highly extensible GNU/Linux distribution for embedded devices (typically wireless routers), OpenWrt is built from the ground up to be a full-featured, easily modifiable operating system for your router. LEDE is based on OpenWrt, targeting a wide range of wireless SOHO routers and non-network device. This document introduces how to porting and running OpenWrt/LEDE on QorIQ LS1012/LS1043 platform. 1. Porting OpenWrt/LEDE Source on QorIQ Layerscape Platforms 2. Deploy OpenWrt/LEDE Images to Boot up the System 3. Verify VLAN Interface and PFE in LEDE System
View full article
The integrated flash controller (IFC) is used to interface with external asynchronous/synchronous NAND flash, asynchronous NOR flash, SRAM, generic ASIC memory and EPROM. This document introduces how to configure IFC controller on QorIQ LS, T and P series custom boards, uses LS1043 custom board integrating NAND Flash MT29F64G08CBCBBH1 as an example to demonstrate IFC flash timing parameters calculation and control registers configuration, CodeWarrior initialization file customization and u-boot source code porting. 1. IFC Memory Mapped Registers Introduction 2. Calculate IFC Flash Timing Values and Configure Control Registers 3. Customize CodeWarrior Initialization File with the Calculated IFC Timing 4. Porting U-BOOT Source with the Calculated IFC Timing
View full article
The attached patch is to support DDR3L in LS1043A. The SDK version is Linux-LS1043A-SDK-V0.5-SOURCE-20151223-yocto.iso. Not SDK2.0. The DDR3L part number is two Winbond W632GU6KB(16M x 8 banks x 16 bits DDR3L SDRAM).
View full article
The attached patch is to support Aquantia AQR107 in LS1043A.
View full article
QorIQ LSDK is NXP new generation of SDK for Layerscape productions, consists of a set of disaggregated components based on Linux distributions, meets market demand to more Linux distributions of more types, and satisfy the requirement from a wide variety of customers. In LSDK we use Flexbuild to build all packages from LSDK, make root filesystem and generate the installer. This document introduces the basic concept of LSDK, comparison between LSDK and Yocto SDK, how to use LSDK, plan and roadmap of LSDK. 1. Basic Concept of LSDK 1.1 LSDK Specific features 1.2 LSDK Components 1.3 LSDK Images Memory Map 2. Comparison Between Layerscape SDK and QorIQ Yocto SDK 3. How to Usage LSDK 3.1 LSDK Flexbuild Utility 3.2 Build LSDK using Flexbuild 3.3 Deploy LSDK Images on the Target Board 3.4 Add a Package using Flexbuild 4. Layerscape SDK Roadmap
View full article
This how-to topic is applicable only to LSDK 18.09 and older releases. For LSDK 18.12 and newer releases, refer   Deploying TF-A binaries  in  Layerscape Software Development Kit <version> Documentation . Follow these steps to update the PBL/RCW binary on the SD card.  Compiling PBL binary  from RCW source file (optional) If the user already has a PBL binary, this step can be skipped.    Clone the   rcw   repository and compile the PBL 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-18.09  LSDK-18.09   $ cd ls1046ardb If required, make changes to the rcw files. $ make   The default PBL binary for LS1046ARDB is  RR_FFSSPPPH_1133_5559/rcw_1800_qspiboot.bin.swapped. By default, the QSPI controller on LS1046A reads/writes in 64-bit big endian (BE) mode. This makes it necessary to use a byte swapped PBL binary image, for example, rcw_1800_qspiboot.bin.swapped. The last PBI command in rcw_1800_qspiboot.bin.swapped is a write to the QPSI_MCR register that changes the endianness of QSPI controller to 64-bit little endian (LE). With this change, subsequent accesses are made in little endian format. See the  rcw/ls1046ardb/README  file for an explanation of the naming convention for the directories that contain the RCW source and binary files. SD card start block number for PBL/RCW binary Image  SD card start block number PBL/RCW binary 0x00008 = 8 Refer the  Flash layout for boot flow with PPA – LSDK 18.09 and older releases  for a complete listing of the SD card start block numbers for all LSDK firmware images.    Programming PBL/RCW binary to SD card Plug the SD card into the Linux host . Run the following command on the Linux host: $ sudo dd if= rcw_1800_qspiboot.bin.swapped of=/dev/sdX bs=512 seek=8 conv=fsync Use the command cat /proc/partitions to see a list of devices and their sizes to make sure that the correct device names have been chosen. The SDHC 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 SDHC card directly without an extra SDHC card reader device, the device name of SDHC card is typically mmcblk0.                     Remove the SD card from the Linux host machine. Plug the SD card into LS1046ARDB and boot the board to Ubuntu using the SD card. You can boot the board using the SD card either by: setting the switches:  SW3[1:8] = 01001110 and SW5 [1:8] = 00100000 , or boot switching to SD card  => cpld reset sd In boot log, you’ll see: Board: LS1046ARDB, boot from SD 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
Follow these steps to update the Linux kernel image and device tree on the SD card.  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-19.06-V4.14 LSDK-19.06-V4.14 where LSDK-19.06-V4.14 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-ls1043a-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-ls1043a-rdb.dtb  is in arch/arm64/boot/dts/freescale/ . Copying the compiled kernel images and device tree to the SD card Plug the SD card into the Linux host machine. Mount the SD card partition that contains Linux kernel images and device tree. sudo mkdir <mount_location> sudo mount /dev/sdX <mount_location> Use the command cat /proc/partitions to see a list of devices and their sizes to make sure that the correct device names have been chosen. The SDHC 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 SDHC card directly without an extra SDHC card reader device, the device name of SDHC card is typically mmcblk0. Replace Image , Image.gz , and  fsl-ls1043a-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-ls1043a-rdb.dtb <mount_location> sudo umount /dev/sdX Plug the SD card into LS1043ARDB  and boot the board to Ubuntu using the SD card.  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. You can confirm that Linux kernel and device tree is updated on the SD card by running this command and checking the timestamp. root@localhost:~# uname -a Linux localhost 4.14.104 #2 SMP PREEMPT Wed Aug 21 17:14:01 IST 2019 aarch64 aarch64 aarch64 GNU/Linux
View full article
IEEE Std 1588 standard is for a precision clock synchronization protocol for networked measurement and control, define a Precision Time Protocol (PTP) designed to synchronize real-time clocks in a distributed system. This document introduces IEEE 1588 related basic concept and Precision Time Protocol, hardware assist for 1588 compliant time stamping on QorIQ  LS1021 platform, Linux Kernel PTP framework device driver implementation working with ptpd stack, IEEE 1588 test setup on LS1021ATSN platform and results. IEEE 1588 Introduction and Precision Time Protocol Hardware Assist for 1588 Compliant Time Stamping on QorIQ LS1021 Platform      2.1 Accessing Timer Registers      2.2. Time-Stamping on Ethernet Frame Reception for eTSEC      2.3. Time-Stamping on Ethernet Frame Transmission for eTSEC IEEE 1588 PTP Linux Device Driver and PTPd Application     3.1 IEEE 1588 Linux Software Structure     3.2 IEEE 1588 Linux Device Driver 3.3 PTPd Application Setup IEEE 1588 test on LS1021ATSN Platform    4.1 Build Images with OpenIL    4.2 Setup IEEE 1588 test environment on LS1021ATSN    4.3 Test result
View full article
Follow these steps to update the Linux kernel image and device tree on the SD card.  Compiling Linux kernel images and device tree On the 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-18.09-V4.14 LSDK-18.09-V4.14 where  LSDK-18.09-V4.14  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 device tree, open and edit arch/arm64/boot/dts/freescale/fsl-ls1046a-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-ls1046a-rdb.dtb  is in arch/arm64/boot/dts/freescale/ . Copying the compiled kernel images and device tree to SD card Plug the SD card into the Linux host machine. List the disks that are accessible to the computer:  $ cat /proc/partitions Use the command cat /proc/partitions to see a list of devices and their sizes to make sure that the correct device names have been chosen.  The SDHC 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 SDHC card directly without an extra SDHC card reader device, the device name of SDHC card is typically mmcblk0. Mount the SD card partition that contains Linux kernel images and device tree: $ sudo mount /dev/sdX   <mount_location> Replace   Image ,   Im age.gz , and  fsl-ls1046a-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-ls1046a-rdb.dtb <mount_location> sudo umount /dev/sdX Plug the SD card into   LS1046ARDB   and boot the board to Ubuntu using the SD card:  => cpld reset sd In boot log, you’ll see: Board: LS1046ARDB, boot from SD 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
This how-to topic is applicable only to LSDK 18.09 and older releases. For LSDK 18.12 and newer releases, refer LS1088ARDB-PB - How to deploy TF-A binaries on SD card. Follow these steps to update U-Boot binary on the SD card.  Prerequisites  Ubuntu 18.04 64-bit should be installed on the Linux host machine for building LSDK 18.06 or LSDK 18.09 U-Boot binary .   Compiling U-Boot binary Clone the  u-boot   repository. $  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-18.09  LSDK-18.09   $ export  ARCH=arm64 $ export CROSS_COMPILE= aarch64-linux-gnu- $ make  distclean Execute appropriate defconfig file: For LS1088ARDB: $ make ls1088ardb_sdcard_qspi_defconfig For LS1088ARDB-PB: $ make ls1088ardb_pb_sdcard_qspi_defconfig If required, make changes to the U-Boot files. $ make 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.06 or LSDK 18.09 U-Boot binary.  The compiled U-Boot image,  u-boot-with-spl .bin , is available at   u-boot / . SD card start block number for U-Boot binary Image  SD card start block number U-Boot binary 0x00800 = 2048 Refer th e Flash layout for boot flow with PPA – LSDK 18.09 and older releases for a  complete listing of the SD card start block numbers for all LSDK firmware images.      Programming U-Boot binary to SD card Plug the SD card into the Linux host . Run the following command on the Linux host: $ sudo dd if=u-boot-with-spl.bin of=/dev/sdX bs=512 seek=2048 conv=fsync Use the command cat /proc/partitions to see a list of devices and their sizes to make sure that the correct device names have been chosen. The SDHC 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 SDHC card directly without an extra SDHC card reader device, the device name of SDHC card is typically mmcblk0.    Remove the SD card from the Linux host machine. On the LS1088ARDB/LS1088ARDB-PB, ensure that the switches are set to boot the board from SD card.  For booting from SD card, SW1[1:8] + SW2[1] = 0010_0000_0   Plug the SD card into the board and boot the board to Ubuntu. 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
Follow these steps to update the DPAA1 FMan ucode image on the SD card.  Obtaining DPAA1 FMan ucode image Clone the  qoriq-fm-ucode   repository. $  git clone https://github.com/NXP/qoriq-fm-ucode.git $   cd qoriq-fm-ucode $   git checkout  LSDK-<LSDK version> .  For example,  $  git checkout LSDK-19.06 The prebuilt FMan ucode images, fsl_fman_ucode_ls1043_r1.1 _<microcode version>.bin , are at  qoriq-fm-ucode/. In the binary file, ls1043_r1.1  refers to the LS1043A silicon revision 1.1. See qoriq-fm-ucode/readme for a description of the ucode version numbers. SD card start block number for DPAA1 FMan ucode image Image  SD card start block number DPAA1 FMan ucode image 0x04800 = 18432 Refer Flash layout for new boot flow with TF-A for  complete listing of the SD card start block numbers for all LSDK firmware images. Programming DPAA1 FMan ucode image to SD card Option 1: Load image on SD card plugged into Linux host via dd command Plug the SD card into the Linux host . Run the following command on the Linux host: $ sudo dd if= fsl_fman_ucode_ls1043_r1.1_<ucode version>.bin  of=/dev/sdX bs=512 seek=18432 conv=fsync Use the command cat /proc/partitions to see a list of devices and their sizes to make sure that the correct device names have been chosen. The SDHC 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 SDHC card directly without an extra SDHC card reader device, the device name of SDHC card is typically mmcblk0.                                                   Remove the SD card from the Linux host machine. Plug the SD card into LS1043ARDB and boot the board to Ubuntu using the SD card. You can boot the board using the SD card either by: setting the switches:  SW3[1:8] = 10110011 , SW4 [1:8] =00100000 ,  SW5 [1:8] = 00100010 , or boot switching to SD card  => cpld reset sd In boot log, you’ll see: Board: LS1043ARDB, boot from SD You can check the following code line in the boot log to confirm that the  DPAA1 FMan ucode image on the SD card is updated. Fman1: Uploading microcode version 106.4.18 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. Option 2: Load image on SD card plugged into board from the TFTP server Boot   LS1043ARDB  from NOR flash. Ensure that the switches are set to boot the board from NOR bank 0.  For booting from  NOR bank 0 , switch settings are as follows: SW3[1:8] = 10110011 SW4[1:8] = 00010010 SW5[1:8] = 10100010 Boot from  NOR bank  0:  => cpld reset For LS1043ARDB, in boot log, you'll see: Board: LS1043ARDB, boot from vBank 0 Set up Ethernet connection When board boots up, U-Boot prints a list of enabled Ethernet interfaces. FM1@DTSEC1, FM1@DTSEC2, FM1@DTSEC3 [PRIME], FM1@DTSEC4, FM1@DTSEC5 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   LS1043ARDB Ethernet and FMC 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 FM1@DTSEC4 =>   setenv ethact <name of interface connected to TFTP server> For example: =>   setenv ethact FM1@DTSEC4 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 FM1@DTSEC4 device host 192.168.1.1 is alive Load FMan ucode image from the TFTP server Flash the  FMan ucode image :  => tftp 0xa0000000 fsl_fman_ucode_ls1043_r1.1_<ucode version>.bin Program the  FMan ucode   image to SD card:  =>  mmc write 0xa0000000 0x04800 <blk_cnt> Address  0x04800   is the SD card block number for the  FMan ucode   image.    ReferFlash layout for new boot flow with TF-A  for  t he complete flash memory layout. 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   FMan ucode  from the TFTP server, if the bytes transferred is 37560 (92b8 hex), then  blk_cnt   is calculated as "37560 /512 = 73 (49 hex)" + "few sectors for rounding up so that last block is not missed" .   So, if you round up by 5 (5 hex) sectors, for this example, mmc write command will be:  =>  mmc write 0xa0000000 0x04800 4E You can boot the board using the SD card either by: setting the switches:  SW3[1:8] = 10110011 ,   SW4 [1:8] =00100000   ,  SW5 [1:8] = 00100010 , or boot switching to SD card  => cpld reset sd In boot log, you’ll see: Board: LS1043ARDB, boot from SD You can check the following code line in the boot log to confirm that the  DPAA1 FMan ucode image on the SD card is updated. Fman1: Uploading microcode version 106.4.18 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
This document introduces how to configure RCW to support GPIO on LS1043 platform, how to configure Linux Kernel to load Linux GPIO driver to access GPIO from SYSFS and using loopback method to do verification on the target board. RCW configuration to support GPIO Configure GPIO driver in Linux Kernel Verify GPIO on the target board
View full article
1. Debugging Packet Loss Issue 1.1 Frame Manager(FMan) Introduction 1.2 Frame Manager Buffer Manager Interface (BMI) Rx Port Statistics Counters 1.3 Linux Sysfs Support for Fman Rx Port Statistics 2. Queue Manager(Qman) Enqueue Rejections 2.1 Reasons for an Enqueue Rejection 2.2 Frame Queue Descriptor 2.3 Qman Debugfs 2.4 Buffer Manager (BMan) Debugfs
View full article
The below steps describe how to modify the content of the existing rootfs. Steps are explained using LX2160ARDB board, however, the steps are applicable to all Layerscape devices and boards. Extract and modify contents of cpio.gz archive Generate .itb image Set up Ethernet connection between TFTP server and Layerscape board Boot the Linux kernel using new .itb image Step1: Extract and modify contents of cpio.gz archive Create a temporary directory for extracting the contents of the cpio.gz archive image. For example: mkdir temp_folder.   Extract the contents of the cpio.gz archive in the temporary folder. For example: gunzip -c rootfs_lsdk2012_yocto_tiny_arm64.cpio.gz | sh -c 'cd temp_folder/&& cpio -i' The temporary folder lists the filesystem as follows:  bin boot dev etc home init lib media mnt proc run sbin sys tmp usr var Make changes to the filesystem in the temporary folder. For example: copy a 'HelloWorld' file in the filesystem using the following command: cp <path>/HelloWorld . Repack the filesystem into a new cpio.gz archive. For example: use the following command: sh -c 'cd temp_folder/ && find . | cpio -H newc -o' | gzip -9 > new_rootfs_lsdk2012_yocto_tiny_arm64.cpio.gz   Step2: Generate .itb image Change the path for new rootfs (new_rootfs_lsdk2012_yocto_tiny_arm64.cpio.gz) in linux_arm64_LS.its using gedit editor. For example: Change directory to flexbuild_lsdk<version>/configs/linux. gedit linux_arm64_LS.its Update path as follows:  data = /incbin/("../../packages/rfs/initrd/new_rootfs_lsdk2012_yocto_tiny_arm64.cpio.gz"); Generate .itb image using the following command: For example: flex-builder -i mkitb -r yocto:tiny This generates lsdk2012_yocto_tiny_LS_arm64.itb image. Copy the .itb image to the TFTP server. Step 3 - Set up Ethernet connection between TFTP server and Layerscape board Set up Ethernet connection between the board (for example, LX2160ARDB) and host machine on which you have configured the TFTP server. Boot the board to U-Boot prompt. U-Boot prints a list of enabled Ethernet interfaces. For example, LX2160ARDB U-Boot prints following 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 Step4: Boot the Linux kernel using new .itb image Load the .itb image from TFTP server to DDR memory of the board. => tftp 0xa0000000 <itb_file_name> For example:   => tftp 0xa0000000 lsdk2012_yocto_tiny_LS_arm64.itb Boot the kernel with .itb image as follows: => bootm 0xa0000000#<board_name> For example:   => bootm 0xa0000000#lx2160ardb Let the board boots to Tiny Linux. List the filesystem. NXP LSDK tiny 2012 (based on Yocto) TinyLinux login: root root@TinyLinux:~# ls root@TinyLinux:~# cd / root@TinyLinux:/# ls HelloWorld boot etc init media new_rootfs_lsdk2012_yocto_tiny_arm64.cpio.gz root sbin tmp var bin dev home lib mnt proc run sys usr root@TinyLinux:/# You will observe the HelloWorld file available in the filesystem.
View full article
The VPP platform is an extensible framework that provides out-of-the-box production quality switch/router functionality. This document introduces Vector Packet Processing(VPP), creating VPP IPsec configuration scripts, building VPP v20.05 in LSDK 20.12, executing VPP IPsec on LS1046ARDB and LS2088ARDB platforms
View full article
This topic explains steps to compile and execute Hello World program (in C) on a Layerscape board. Similarly, you can execute other custom applications on your board. Create a Hello World program in C.  Copy this file (.c) on a Ubuntu machine (using WinSCP). Run the following command to convert the .c file into a binary file. $ aarch64-linux-gnu-gcc <.c file> -o <binary file> For example: $ aarch64-linux-gnu-gcc Hello_World.c -o Hello_World Note: You can use this command in the same directory in which .c file is present or provide path of this file. Connect to the board console on which you want to execute the custom application via terminal and boot the board with LITB. Note: It is suggested to boot the board with Tiny Linux for executing custom application.  => tftp 0xa0000000 lsdk2004_yocto_tiny_LS_arm64.itb Using e1000#0 device TFTP from server 192.168.3.1; our IP address is 192.168.3.142 Filename 'lsdk2004_yocto_tiny_LS_arm64.itb'. Load address: 0xa0000000 Loading: ################################################################# ################################################################# ##################################################### 4.3 MiB/s done Bytes transferred = 37030212 (2350944 hex) => bootm 0xa0000000#lx2160ardb ## Loading kernel from FIT Image at a0000000 ... Using 'lx2160ardb' configuration Trying 'kernel' kernel subimage Description: ARM64 Kernel Created: 2021-02-03 6:01:29 UTC Type: Kernel Image Compression: gzip compressed Data Start: 0xa00000d0 Data Size: 14086432 Bytes = 13.4 MiB When Tiny Linux boots, enable Ethernet to download the HelloWorld program on the board. To see the available networks. root@TinyLinux:~# ifconfig -a eth0 Link encap:Ethernet HWaddr 68:05:ca:2b:2c:ca BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:114 Memory:90460c0000-90460e0000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) sit0 Link encap:UNSPEC HWaddr 00-00-00-00-31-00-6C-6F-00-00-00-00-00-00-00-00 NOARP MTU:1480 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Enable the Ethernet connection. # ifconfig <eth interface> <IP address> netmask <netmask> up For example: root@TinyLinux:~# ifconfig eth0 192.168.3.121 netmask 255.255.255.0 up Set the gateway IP and ping the server to test the connection. # route add default gw <gateway IP> # ping <server IP> For example: root@TinyLinux:~# route add default gw 192.168.3.1 root@TinyLinux:~# ping 192.168.3.1 PING 192.168.3.1 (192.168.3.1): 56 data bytes 64 bytes from 192.168.3.1: seq=0 ttl=64 time=0.479 ms 64 bytes from 192.168.3.1: seq=1 ttl=64 time=0.204 ms Download the HelloWorld binary file on your board. For example: root@TinyLinux:~# scp user@192.168.3.1:/tftpboot/LX2160ARDB/HelloWorld . Execute the HelloWorld application. root@TinyLinux:~# ./HelloWorld Hello, World!    
View full article
This topic shows steps to customize LITB by using a different kernel image instead of the existing kernel image. Browse to the FlexBuild installation directory. Modify the kernel image in linux_arm64_LS.its. $ vi configs/linux/linux_arm64_LS.its Save the changes done in the file. Generate LITB using flex-builder. $ source setup.env $ flex-builder -i mkitb -r <distro_type>:<distro_scale> -a <arch> For example: $ source setup.env $ flex-builder -i mkitb -r ubuntu:main -a arm64 INSTRUCTION: mkitb DISTRO TYPE: ubuntu DISTRO SCALE: main .... .... /home/flexbuild_lsdk2004/build/images/lsdk2004_ubuntu_main_LS_arm64.itb [Done]   Note: To create .itb file directly from .its file, run this command: mkimage -f <xyz.its> <xyz.itb> Connect to the board console via terminal and run following commands at U-boot to boot the board with customized LITB. => ping $serverip Using e1000#0 device host 192.168.3.1 is alive => Using e1000#0 device host 192.168.3.1 is alive => tftp 0xa0000000 lsdk2004_ubuntu_main_LS_arm64.itb Using e1000#0 device TFTP from server 192.168.3.1; our IP address is 192.168.3.49 Filename 'lsdk2004_ubuntu_main_LS_arm64.itb'. Load address: 0xa0000000 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# #################################### 9.8 MiB/s done Bytes transferred = 683506200 (28bd7a18 hex) => bootm 0xa0000000#lx2160ardb ## Loading kernel from FIT Image at a0000000 ... Using 'lx2160ardb' configuration Trying 'kernel' kernel subimage Description: ARM64 Kernel Created: 2021-02-03 6:01:29 UTC Type: Kernel Image Compression: gzip compressed Data Start: 0xa00000d0 Data Size: 14086432 Bytes = 13.4 MiB   Check timestamp in boot log to ensure that the board is booted with the updated kernel image in the customized LITB.   Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083] [ 0.000000] Linux version 5.4.3 (test@Ubuntu-18) (gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)) #1 SMP PREEMPT Wed Feb 3 00:04:09 IST 2021 [ 0.000000] Machine model: NXP Layerscape LX2160ARDB [ 0.000000] earlycon: pl11 at MMIO32 0x00000000021c0000 (options '') [ 0.000000] printk: bootconsole [pl11] enabled [ 0.000000] efi: Getting EFI parameters from FDT:  
View full article
To extract kernel, rootfs, and dtb images from the Linux ITB (LITB) image: Browse to the folder containing LITB. For example: $ cd flexbuild_lsdk2004/build/images/ To list the header information of LITB, use the following command: $ dumpimage -l <name of the image> $ dumpimage -l lsdk2004_ubuntu_main_LS_arm64.itb FIT description: arm64 kernel, ramdisk and FDT blob Created: Tue Feb 2 18:54:19 2021 Image 0 (kernel) Description: ARM64 Kernel Created: Tue Feb 2 18:54:19 2021 Type: Kernel Image Compression: gzip compressed Data Size: 14086432 Bytes = 13756.28 kB = 13.43 MB Architecture: AArch64 OS: Linux Load Address: 0x84080000 Entry Point: 0x84080000 Hash algo: crc32 Hash value: 1980d6fd Image 1 (initrd) Description: initrd for arm64 Created: Tue Feb 2 18:54:19 2021 Type: RAMDisk Image Compression: uncompressed Data Size: 668988861 Bytes = 653309.43 kB = 638.00 MB Architecture: AArch64 OS: Linux Load Address: 0x00000000 Entry Point: 0x00000000 Hash algo: crc32 Hash value: 24aa3c08 Image 2 (ls1012ardb-dtb) Description: ls1012ardb-dtb Created: Tue Feb 2 18:54:19 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 14335 Bytes = 14.00 kB = 0.01 MB Architecture: AArch64 Hash algo: crc32 Hash value: 383a8118 Image 3 (ls1012aqds-dtb) Description: ls1012aqds-dtb Created: Tue Feb 2 18:54:19 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 15972 Bytes = 15.60 kB = 0.02 MB Architecture: AArch64 Hash algo: crc32 Hash value: 7d133305 Image 4 (ls1012afrwy-dtb) Description: ls1012afrwy-dtb Created: Tue Feb 2 18:54:19 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 15316 Bytes = 14.96 kB = 0.01 MB Architecture: AArch64 Hash algo: crc32 Hash value: 7c456ca3 Image 5 (ls1028ardb-dtb) Description: ls1028ardb-dtb Created: Tue Feb 2 18:54:19 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 19767 Bytes = 19.30 kB = 0.02 MB Architecture: AArch64 Hash algo: crc32 Hash value: db86fa4f Image 6 (ls1028aqds-dtb) Description: ls1028aqds-dtb Created: Tue Feb 2 18:54:19 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 24733 Bytes = 24.15 kB = 0.02 MB Architecture: AArch64 Hash algo: crc32 Hash value: e0b7a722 Image 7 (ls1043ardb-dtb) Description: ls1043ardb-dtb Created: Tue Feb 2 18:54:19 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 41085 Bytes = 40.12 kB = 0.04 MB Architecture: AArch64 Hash algo: crc32 Hash value: fcc6502c Image 8 (ls1043aqds-dtb) Description: ls1043aqds-dtb Created: Tue Feb 2 18:54:19 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 34544 Bytes = 33.73 kB = 0.03 MB Architecture: AArch64 Hash algo: crc32 Hash value: 45f82fba Image 9 (ls1046ardb-dtb) Description: ls1046ardb-dtb Created: Tue Feb 2 18:54:19 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 40270 Bytes = 39.33 kB = 0.04 MB Architecture: AArch64 Hash algo: crc32 Hash value: 013f5024 Image 10 (ls1046aqds-dtb) Description: ls1046aqds-dtb Created: Tue Feb 2 18:54:19 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 34317 Bytes = 33.51 kB = 0.03 MB Architecture: AArch64 Hash algo: crc32 Hash value: be066013 Image 11 (ls1046afrwy-dtb) Description: ls1046afrwy-dtb Created: Tue Feb 2 18:54:19 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 31528 Bytes = 30.79 kB = 0.03 MB Architecture: AArch64 Hash algo: crc32 Hash value: d872df6c Image 12 (ls1088ardb-dtb) Description: ls1088ardb-dtb Created: Tue Feb 2 18:54:19 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 19523 Bytes = 19.07 kB = 0.02 MB Architecture: AArch64 Hash algo: crc32 Hash value: 403066bc Image 13 (ls1088aqds-dtb) Description: ls1088aqds-dtb Created: Tue Feb 2 18:54:19 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 19415 Bytes = 18.96 kB = 0.02 MB Architecture: AArch64 Hash algo: crc32 Hash value: a2bf2786 Image 14 (ls2088ardb-dtb) Description: ls2088ardb-dtb Created: Tue Feb 2 18:54:19 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 29838 Bytes = 29.14 kB = 0.03 MB Architecture: AArch64 Hash algo: crc32 Hash value: 0069fe03 Image 15 (ls2088aqds-dtb) Description: ls2088aqds-dtb Created: Tue Feb 2 18:54:19 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 23557 Bytes = 23.00 kB = 0.02 MB Architecture: AArch64 Hash algo: crc32 Hash value: e8e9dfa7 Image 16 (lx2160ardb-dtb) Description: lx2160ardb-dtb Created: Tue Feb 2 18:54:19 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 32643 Bytes = 31.88 kB = 0.03 MB Architecture: AArch64 Hash algo: crc32 Hash value: e5859b31 Image 17 (lx2160aqds-dtb) Description: lx2160aqds-dtb Created: Tue Feb 2 18:54:19 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 27740 Bytes = 27.09 kB = 0.03 MB Architecture: AArch64 Hash algo: crc32 Hash value: f644de1e To extract a particular image from LITB, use the following command:  $ dumpimage -i <name of the image> -T <type> [-p position] [-o outfile] data_file For example: To extract the kernel image: $ dumpimage -T flat_dt -i lsdk2004_ubuntu_main_LS_arm64.itb -p 0 kernel Extracted: Image 0 (kernel) Description: ARM64 Kernel Created: Tue Feb 2 18:54:19 2021 Type: Kernel Image Compression: gzip compressed Data Size: 14086432 Bytes = 13756.28 kB = 13.43 MB Architecture: AArch64 OS: Linux Load Address: 0x84080000 Entry Point: 0x84080000 Hash algo: crc32 Hash value: 1980d6fd To extract the rootfs image: $ dumpimage -T flat_dt -i lsdk2004_ubuntu_main_LS_arm64.itb -p 1 rootfs Extracted: Image 1 (initrd) Description: initrd for arm64 Created: Tue Feb 2 18:54:19 2021 Type: RAMDisk Image Compression: uncompressed Data Size: 668988861 Bytes = 653309.43 kB = 638.00 MB Architecture: AArch64 OS: Linux Load Address: 0x00000000 Entry Point: 0x00000000 Hash algo: crc32 Hash value: 24aa3c08 To extract ls1012ardb-dtb (at position 2) and ls1012aqds-dtb (at position 3): $ dumpimage -T flat_dt -i lsdk2004_ubuntu_main_LS_arm64.itb -p 2 dtb1 Extracted: Image 2 (ls1012ardb-dtb) Description: ls1012ardb-dtb Created: Tue Feb 2 18:54:19 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 14335 Bytes = 14.00 kB = 0.01 MB Architecture: AArch64 Hash algo: crc32 Hash value: 383a8118 $ dumpimage -T flat_dt -i lsdk2004_ubuntu_main_LS_arm64.itb -p 3 dtb2 Extracted: Image 3 (ls1012aqds-dtb) Description: ls1012aqds-dtb Created: Tue Feb 2 18:54:19 2021 Type: Flat Device Tree Compression: uncompressed Data Size: 15972 Bytes = 15.60 kB = 0.02 MB Architecture: AArch64 Hash algo: crc32 Hash value: 7d133305      
View full article