Layerscape Knowledge Base

cancel
Showing results for 
Search instead for 
Did you mean: 

Layerscape Knowledge Base

Discussions

Sort by:
How to bring up a card when the flash is blank, or the image is corrupted. How to boot cards from various boot mode when changed the RCW as requirements. This documentation will use LS1046ARDB as new board to realize the functions (all target board in the document is LS1046ARDB). Content Bring up LS1046A with CodeWarrior TAP Boot up from the SD card Compile PBL binary from RCW source file Compile the PBL binary into firmware Program the firmware into the target board (LS1046ARDB) Boot up from the QSPI Compile firmware from RCW source file Program the firmware into the target board (LS1046ARDB) Boot up from the eMMC Enable the on board eMMC Compile firmware from RCW source file Program the firmware into the target board (LS1046ARDB)
View full article
The BareMetal framework targets to support the scenarios that need low latency, real-time response, and high-performance. There is no OS running on the cores and customer-specific application runs on that directly. This document describes how to develop customer-specific application based on BareMetal framework. The directory “app” stored in u-boot repository includes the use cases for testing GPIO, I2C, IRQ init, QSPI, Ethernet, USB, PCIe, CAN, ENETC and SAI features. 1. GPIO use case 2. I2C use case 3. IRQ use case 4. QSPI Use case 5. Ethernet use case 6. USB Use case 7. PCIe use case 8. CAN Use Case 9. ENETC Use Case 10. SAI Use Case 11. Build and Run the Baremetal Application
View full article
1. FMan VSP Hardware Overview 2. The usage of Virtual Storage Profiles 3. FMan VSP Driver 4. Traffic bifurcation using VSP on LS1046ARDB
View full article
1. Fuse Provisioning Utility Introduction 2. Input File for Fuse Provisioning Tool 3. Build Fuse Provisioning Firmware Image with flex-builder and Deploy the Firmware Image 4. Build and Deploy Fuse Provisioning Image Manually 5. Validate Fuse Provisioning
View full article
This document introduces basic concept of Power Management, LS1028 RCW configuration to enable GPIO, Linux Kernel source and device tree modification to support GPIO wakeup, Kernel configuration to enable sleep feature and GPIO wakeup driver, export GPIO pin and enable interrupt, Order system to sleep and trigger GPIO interrupt to wake up the system.
View full article
PCI-Express introduction PCIe Device Type And Topology PCIe system architecture          2.1 Transaction Layer          2.2 Data link layer          2.3 Physical Layer Interrupts Mechanism PCIe enumeration and resource assignment
View full article
DPDK provides a simple, complete framework for fast packet processing in data plane applications. Using the APIs provided as part of the framework, applications can leverage the capabilities of underlying network infrastructure. This document describes DPDK basic introduction, DPDK core components, DPDK Linux networking, DPDK Crypto Subsystem, DPDK memory manager and DPDK implementation on Layerscape platforms. 1. DPDK Basic Introduction 2. DPDK core components 3. DPDK Linux Networking 4. DPDK Crypto Subsystem     4.1 DPDK Crypto Subsystem APIs     4.2 DPDK Security Offload – rte_security 5. DPDK memory manager     5.1 Multi-layered memory architecture     5.2 Buffer Manager     5.3 Packet Buffer mbuf 6. DPDK implementation on Layerscape platforms
View full article
boot loader requirements to boot Kernel ARM64 Virtual Memory Layout ARM64 IRQ Vectors Setup FDT Mapping ARM64 Kernel booting process        5.1 Prior to start_kernel              5.1.1__create_page_tables              5.1.2 __cpu_setup              5.1.3 __primary_switch       5.2 Start_kernel             5.2.1 Start_kernel -> setup_arch                     5.2.1.1 Start_kernel -> setup_arch -> setup_machine_fdt                     5.2.1.2 Start_kernel -> setup_arch -> paging_init / bootmem_init                     5.2.1.3 Start_kernel -> setup_arch -> psci_init             5.2.2 Start_kernel -> Rest_init                      5.2.2.1 Start_kernel -> Rest_init -> kernel_init
View full article
FlexSPI controller is new IP from Microcontroller group and it will replace QSPI in all future SoCs. FlexSPI is superset and superior to QSPI. Most of the feature set of FlexSPI and QSPI are same, but there are few difference related to IO signal width, command set, default LUT programming and Hyperflash support. FlexSPI has AHB and IP bus interface. AHB 64-bit interface and is mainly use for READ and WRITE flash operation whereas IP is 32-bit interface and it supports all flash operation – READ, WRITE, STATUS CHECK, GET PARAMS etc. FlexSPI programs various commands in LUT and these commands sequence are trigger when we do AHB/IP bus READ/WRITE operation. This documents introduces FlexSPI controller, FlexSPI serial NOR driver implementation and FlexSPI serial NAND driver implementation.  1. FlexSPI Controller Introdunction 1.1 FlexSPI Connections 1.2 FlexSPI Command Interfaces 1.3 FlexSPI Look Up Table(LUT) 1.4 FlexSPI Command Set (Programmable Sequence Engine)   2. FlexSPI serial NOR driver implementation 3. FlexSPI serial NAND driver implementation    
View full article
NXP created eIQ machine learning software for QorIQ Layerscape applications processors, a set of ML tools which allows developing and deploying ML applications on the QorIQ Layerscape family of devices. OpenCV is an open-source computer vision library. It offers a unitary solution for both the neural network inference (DNN module) and the standard machine learning algorithms (ML module). It includes many computer vision functions, making it easier to build complex machine learning applications in a short amount of time and without being dependent on other libraries. This document describe applications YOLO object detection, Image segmentation, Image colorization, Image classification, Human pose estimation and Text detection developed based on OpenCV DNN framework.
View full article
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   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 NA new How to measure temperature of CPU and stress individual cores of CPU NA new How to measure power using sensors and stress individual cores NA  new How to extract kernel, rootfs, and dtb images from Linux ITB image NA new How to customize LITB image from LSDK NA new How to dynamically adjust MC log level using restool NA new How to boot Layerscape board using an empty DPL file NA new How to display MC log buffer in U-Boot, when MC console is not available NA new How to compile and execute custom applications on a Layerscape board  NA How to modify content of the existing rootfs?  LS2088ARDB NA LS2088ARDB Ethernet port mapping QSPI flash   How to update MC firmware, DPC, and DPL images in QSPI NOR flash How to deploy TF-A binaries in QSPI NOR flash NOR flash How to deploy TF-A binaries in NOR flash 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   How to update MC firmware, DPC, and DPL images in FlexSPI NOR flash How to deploy TF-A binaries in FlexSPI NOR flash FlexSPI NOR flash SD/eMMC How to update composite firmware in FlexSPI NOR Flash and SD/eMMC card using an SD card SD/eMMC How to update Linux kernel and device tree on SD card How to update Linux kernel and device tree on eMMC card How to deploy TF-A binaries on SD/eMMC card 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
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
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 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. For example, if you have loaded firmware at SD card block 150500, start_block_number in hex is 24be4 <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 24be4 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. For example, if you have loaded firmware at SD card block 300500, start_block_number in hex is 495D4 <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 495D4 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
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
To boot a Layerscape board with an empty DPL file: Create an empty DPL file, content.dts. For example: /dts-v1/; / { dpl-version = <0x0000000a>; containers { dprc@1 { compatible = "fsl,dprc"; parent = "none"; options = "DPRC_CFG_OPT_SPAWN_ALLOWED", "DPRC_CFG_OPT_ALLOC_ALLOWED", "DPRC_CFG_OPT_IRQ_CFG_ALLOWED"; objects { obj_set@dpmcp { type = "dpmcp"; ids = <0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd>; }; }; }; }; objects { dpmcp@1 { compatible = "fsl,dpmcp"; }; dpmcp@2 { compatible = "fsl,dpmcp"; }; dpmcp@3 { compatible = "fsl,dpmcp"; }; dpmcp@4 { compatible = "fsl,dpmcp"; }; dpmcp@5 { compatible = "fsl,dpmcp"; }; dpmcp@6 { compatible = "fsl,dpmcp"; }; dpmcp@7 { compatible = "fsl,dpmcp"; }; dpmcp@8 { compatible = "fsl,dpmcp"; }; dpmcp@9 { compatible = "fsl,dpmcp"; }; dpmcp@10 { compatible = "fsl,dpmcp"; }; dpmcp@11 { compatible = "fsl,dpmcp"; }; dpmcp@12 { compatible = "fsl,dpmcp"; }; dpmcp@13 { compatible = "fsl,dpmcp"; }; dpmcp@14 { compatible = "fsl,dpmcp"; }; dpmcp@15 { compatible = "fsl,dpmcp"; }; dpmcp@16 { compatible = "fsl,dpmcp"; }; dpmcp@17 { compatible = "fsl,dpmcp"; }; dpmcp@18 { compatible = "fsl,dpmcp"; }; dpmcp@19 { compatible = "fsl,dpmcp"; }; }; }; ​ Note: There is no network object capable of receiving Ethernet frames in the DPL file. You can create more dpmcps if the number of objects that will be created dynamically is high. Generate the DPL file using content.dts. dtc -I dts -O dtb -o dpl.dtb content.dts​ Flash the DPL file, dpl.dtb to the alternate bank.  tftp 0x80000000 dpl.dtb; i2c mw 66 50 20;sf probe; sf erase 0x00D00000 +$filesize && sf write 0x80000000 0x00D00000 $filesize​ Boot the board. After the board boots, create a dpmac. (Make sure you create a DPMAC that is valid based on the selected SERDES protocol configured by the RCW). restool dpmac create --mac-id=3​ Probe the dpmac driver. restool dprc assign dprc.1 --object=dpmac.3 --plugged=1​ Create a network interface. ls-addni dpmac.3​ Save contents as content_new.dts. restool dprc generate-dpl dprc.1 > content_new.dts​    
View full article
  Note: MCFBA{L/H} that is used to dump the MC log buffer is valid only after the following command is executed: fsl_mc start mc  ${mc_addr} ${dpc_addr} Run the above command first, then MCFBA contents will be valid. To display the MC log buffer in U-Boot for debug purpose, when MC console is not available: Determine the MC firmware base. At the U-Boot prompt, perform md at 0x8340020 (this is MCFBA{L/H}) => md 0x8340020 10 08340020: e0000006 00000027 00060000 00000000 ....'........... 08340030: 00000000 00000000 00000000 00000000 ................ 08340040: 00000000 00000000 00000000 00000000 ................ 08340050: 00000000 00000000 00000000 00000000 ................ The value at 08340024 is the MCFBAH address. In this case, it is 00000027. The value at 08340020 is the MCFBAL address. In this case, it is e0000000. So you can build the MCFBA base address as:  0x27e0000000. Run the following command to start the MC if it is not booted already. run mcinitcmd Dump the log buffer structure at offset 0x01000000 into the MC firmware base 0x27e1000000 (as per the example). md 27e1000000 27e1000000: 4d430100 00000000 01400000 00300000 ..CM......@...0. 27e1000010: 000000b1 00000000 00000000 00000000 ................ 27e1000020: 00000000 00000000 00000000 00000000 ................ 27e1000030: 00000000 00000000 00000000 00000000 ................ 4d430100 = magic number, 400000 = log buffer offset, 00300000 = log buffer length Dump the content of the log buffer. md 27e1400000   The output size can be increased by specifying the number of objects.  md 27e1400000 <num> For example: md 27e1400000 20 In case that the log buffer has more information, you can extend the output of md by replacing 20 with a greater value.          
View full article
Prerequisites: The board should be running Linux and connected to terminal console. Note: For log level debug support, the restool version should be LSDK-2003-RC1 or above and MC version should be 10.20.0 or above. To check restool version: $ root@localhost:~# restool -v restool LSDK-20.04 To check MC version: root@localhost:~# restool -m MC firmware version: 10.24.0 For debugging, use the ls-debug script available in the LSDK rootfs. There is no need to create the debug object. ls-debug -h ls-debug options -h, --help ls-debug help information -ts, --timestamp=X Enable/Disable timestamp printing, X is ON or OFF -c, --console=X Enable/Disable printing in UART console, X is ON or OFF -l, --log=X Enable/Disable printing in DDR log, X is ON or OF -u, --uart=X Set UART ID of the console, X = [0 - 4], 0 = OFF -ll, --level=X Set logging level, X = [0 - 5] 0: Global 1: Debug 2: Info 3: Warning 4: Error 5: Critical -m, mem, --memory Dump information about memory modules available dpxy.z Dump information about MC respective object   For example, to enable logging in console with log level INFO: $ ls-debug --log=on --console=on --level=2 dpdbg.0 created DDR log printing ON UART console printing ON Log level set to 2 $ root@localhost:~# ls-debug --memory Memory dumped information available in MC log/console $ root@localhost:~# cat `find /dev/ -name "*mc_console"` [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_get_obj for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dpdbg_open on DPDBG [I, RESMAN] Handling command: dpdbg_dump on DPDBG [I, DPNI] Memory info: [I, DPNI] MC DDR #1 cacheable memory [I, DPNI] Total: 134217728 bytes [I, DPNI] Used: 14802708 bytes [I, DPNI] Free: 119415020 bytes [I, DPNI] MC DDR #1 non-cacheable memory [I, DPNI] Total: 50331648 bytes [I, DPNI] Used: 27680 bytes [I, DPNI] Free: 50303968 bytes [I, DPNI] DMEM1 memory [I, DPNI] Total: 81920 bytes [I, DPNI] Used: 27168 bytes [I, DPNI] Free: 54752 bytes [I, DPNI] DMEM2 memory [I, DPNI] Total: 81920 bytes [I, DPNI] Used: 27168 bytes [I, DPNI] Free: 54752 bytes [I, DPNI] DDR #1 memory [I, DPNI] Total: 1610612736 bytes [I, DPNI] Used: 143163392 bytes [I, DPNI] Free: 1467449344 bytes [I, DPNI] PEB memory [I, DPNI] Total: 2097152 bytes [I, DPNI] Used: 524288 bytes [I, DPNI] Free: 1572864 bytes [I, DPNI] DP-DDR memory [I, DPNI] Total: 4294967296 bytes [I, DPNI] Used: 0 bytes [I, DPNI] Free: 4294967296 bytes [I, RESMAN] Handling command: dpdbg_close on DPDBG [I, RESMAN] Handling command: dprc_close for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_set_irq_mask for DPRC 1 on portal id 0 [I, RESMAN] Handling command: dprc_set_irq_enable for DPRC 1 on portal id 0 root@localhost:~#
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