Layerscape Knowledge Base

cancel
Showing results for 
Search instead for 
Did you mean: 

Layerscape Knowledge Base

Discussions

Sort by:
The table below shows the mapping of the Ethernet port names appearing on the front panel of the LS1043ARDB chassis with the port names in U-Boot, tinyDistro, and NXP LSDK userland.  Ethernet port mapping Port name on chassis Port name in U-Boot Port name in Linux (tinyDistro) Port name in Linux (LSDK userland) QSGMII.P0 FM1@DTSEC1 eth0 fm1-mac1 QSGMII.P1 FM1@DTSEC2 eth1 fm1-mac2 QSGMII.P2 FM1@DTSEC3 eth2 fm1-mac5 QSGMII.P3 FM1@DTSEC4 eth3 fm1-mac6 RGMII1 FM1@DTSEC5 eth4 fm1-mac3 RGMII2 FM1@DTSEC6 eth5 fm1-mac4 10G Copper FM1@TGEC1 eth6 fm1-mac9 Below is a table that shows the mapping between port numbers (from configuration file), character devices, hardware ports (Rx) and mEMACs for the standard SDK configuration (using RCW protocol 1455). FMC port mapping Port name on chassis XML port number (configuration file) Serdes protocol Character device Hardware port (device tree node) mEMAC (device tree node) QSGMII.P0 1 qsgmii fm0-port-rx0 port@88000 ethernet@e0000 QSGMII.P1 2 qsgmii fm0-port-rx1 port@89000 ethernet@e2000 QSGMII.P2 5 qsgmii fm0-port-rx4 port@8c000 ethernet@e8000 QSGMII.P3 6 qsgmii fm0-port-rx5 port@8d000 ethernet@ea000 RGMII1 3 rgmii fm0-port-rx2 port@8a000 ethernet@e4000 RGMII2 4 rgmii fm0-port-rx3 port@8b000 ethernet@e6000 10G Copper 9 xgmii fm0-port-rx6 port@90000 ethernet@f0000
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 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
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
  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
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
The below steps describe how to measure CPU temperature and how to stress individual cores of CPU. Steps are explained with an example of LX2160A SoC. However, these steps are applicable to all Layerscape devices. Download Flexbuild and add packages in Yocto tiny Generate Yocto tiny userland Enable thermal monitoring unit and build kernel Generate .itb image Load .itb image from TFTP server to Layerscape board Validate stress package and measure CPU temperature before and after stress Step 1: Download Flexbuild and add packages in Yocto tiny On a Linux machine, download Layerscape Software Development Kit - <version>. Go to Download tabs at http://www.nxp.com/lsdk. Enter login details, accept the agreement to download the Flexbuild source tarball in the name format flexbuild_<version>.tgz. Run the following commands to extract Flexbuild files from tar archived file. $ tar xvzf flexbuild_<version>.tgz $ cd flexbuild_<verison> $ source setup.env $ flex-builder -h Add “stress” package to "IMAGE_INSTALL_append" parameter of local_arm64_tiny.conf file available in flexbuild_<version>/configs/yocto/ folder. Save and exit the file. Step 2 – Generate Yocto tiny userland Change directory to flexbuild_<version>. Clean obsolete cache data. This step is needed in case source/config has changed. $ source setup.env $ flex-builder -i clean-rfs -r yocto Run the following commands to generate Yocto-based tiny userland: $ flex-builder -i mkrfs -r yocto:tiny $flex-builder -i mklinux -r yocto:tiny $ flex-builder -i mkfw -m <machine_name> -b sd This generates the following images: rootfs_lsdk<version>_yocto_tiny_arm64.cpio.gz (~22M), lsdk<version>_yocto_tiny_LS_arm64.itb, and firmware_<machine_name>_uboot_sdboot.img. For example: rootfs_lsdk2004_yocto_tiny_arm64.cpio.gz (~22M), lsdk2004_yocto_tiny_LS_arm64.itb, and firmware_lx2160ardb_rev2_uboot_sdboot.img Step 3 Enable system monitoring unit and build kernel Change directory to flexbuild_<version>/packages/linux/linux. Enable environmental setting for cross-compiling. The following setting is applicable when you configure and build kernel on a different architecture from the target. For example, compiling an Armv8 kernel on an X86 computer. Run the following commands on Ubuntu Linux: $ export CROSS_COMPILE=aarch64-linux-gnu- $ export ARCH=arm64 Run make menuconfig command to configure settings to enable thermal monitoring unit. $ make menuconfig The command opens the kernel configuration [tree-view structure] prompt. Use the Arrow keys to navigate the menu and Enter to select the submenu. Navigate to Device Drivers --> <*> Generic Thermal sysfs driver --> [ ] Generic CPU cooling support option. Press Y key to include the option. [*] symbol indicates the option is included (shown in below figure). Similarly, include the following options to enable thermal management framework. After you include all options as mentioned in the above table, save the configuration with a file name. For example,  save the configuration file as thermal.config. Exit to come out of the Kernel Configuration prompt. Copy the configuration file to arch/arm64/configs folder. $ cp <config filename> arch/arm64/configs/ For example, $ cp thermal.config arch/arm64/configs/ Configure the kernel. Load the changed configuration for Layerscape Armv8 platform in 64-bit mode for LSDK. $ export CROSS_COMPILE=aarch64-linux-gnu- $ export ARCH=arm64 $ make distclean $ make defconfig <config filename> Build kernel image and device tree image. $ make -j8 Step 4 - Generate .itb file Generate .itb file, which includes stress package and thermal monitoring unit installed, for kernel booting. Copy the Image and Image.gz files from the /flexbuild_<version>/packages/linux/linux/arch/arm64/boot folder and to the /flexbuild_<version>/build/linux/kernel/arm64/LS folder. Change directory to flexbuild_<version>. Generate .itb image using flex-builder. $ source setup.env $ flex-builder -i mkitb -r yocto:tiny This generates lsdk2<version>_yocto_tiny_LS_arm64.itb file. For example, lsdk2004_yocto_tiny_LS_arm64.itb file. Copy the .itb image to the TFTP server. Step 5 - Load .itb image from TFTP server to 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 Load the .itb image from TFTP server to DDR memory of the board. => tftp 0xa0000000 <itb_file_name> For example: => tftp 0xa0000000 lsdk2004_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. Step 6 – Validate stress package and measure CPU temperature before and after stress Check stress-ng package using which stress-ng command: # which stress-ng /usr/bin/stress-ng Check scaling_current_frequency of the cores. # cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq  For example: Check frequency of 16 cores of LX2160ARDB as follows: Check the temperature of the CPU before applying stress. # cat /sys/class/thermal/thermal_zone*/temp Apply stress by executing following command: # stress-ng -c 8 -i 1 -m 1 --vm-bytes 128M -t 60s & The command applies stress for 60 seconds. For more information on stress-ng command, run stress-ng -h command for help. Check the temperature of the CPU after applying stress. # cat /sys/class/thermal/thermal_zone*/temp For example:
View full article
The below steps describe how to measure the CPU power using sensors and also describe how to stress individual cores of CPU. Steps are explained with an example of LX2160A SoC. However, these steps are applicable to all Layerscape devices. Download Flexbuild and add packages in Ubuntu:Lite Generate Ubuntu-based Lite userland (Ubuntu:Lite) Enable system monitoring unit and build kernel Generate .itb image Load .itb image from TFTP server to Layerscape board Validate stress package and measure CPU power using sensors Step 1: Download Flexbuild and add packages in Ubuntu:lite On a Linux machine, download Layerscape Software Development Kit - <version>. Go to Download tabs at http://www.nxp.com/lsdk. Enter login details, accept the agreement to download the Flexbuild source tarball in the name format flexbuild_<version>.tgz. Run the following commands to extract Flexbuild files from tar archived file. $ tar xvzf flexbuild_<version>.tgz $ cd flexbuild_<verison> $ source setup.env $ flex-builder -h Add packages for stress and power sensors in the additional_lite_packages_list file available in the flexbuild_<version>/configs/ubuntu/ folder. Add ‘stress’ and ‘lm-sensors’ packages for Ubuntu Lite as shown below: Save and exit the file. Step 2 – Generate Ubuntu:Lite image Change directory to flexbuild_<version>. Clean obsolete cache data. This step is needed in case the source/configuration has changed. $ source setup.env $ flex-builder -i clean-rfs -r ubuntu:lite Generate Ubuntu-based Lite userland using the following command: $ flex-builder -i mkrfs -r ubuntu:lite This generates rootfs_lsdk<version>_ubuntu_lite_arm64 file. For example: rootfs_lsdk2004_ubuntu_lite_arm64 file. Pack userland in tgz format (Optional step). $ flex-builder -i packrfs -r ubuntu:lite For example: rootfs_lsdk2004_ubuntu_lite_arm64.tgz (~180 M)   Step 3 Enable system monitoring unit and build kernel Change directory to flexbuild_<version>/packages/linux/linux. Enable environmental setting for cross-compiling. The following setting is applicable when you configure and build kernel on a different architecture from the target. For example, compiling an Armv8 kernel on an X86 computer. Run the following commands on Ubuntu Linux: $ export CROSS_COMPILE=aarch64-linux-gnu- $ export ARCH=arm64 Run make menuconfig command to configure settings to enable system monitoring unit for sensing power. $ make menuconfig The command opens the kernel configuration [tree-view structure] prompt. Use the Arrow keys to navigate the menu and Enter to select the submenu. Navigate to Device Drivers --> <*> Hardware Monitoring Support --> [M] Texas Instruments INA219 and compatibles option. Device Drivers-->Hardware Monitoring Support Press Y key to include the option. [*] symbol indicates the option is included (shown in below figure). This enables INA220. Texas Instruments INA219 and Compatibles option included Similarly, include the following options to enable I2C block device driver support and I2C bus multiplexing PC9547. Kernel Configure Tree View Option After you include all options as mentioned in the above table, save the configuration with a file name. For example,  save the configuration file as power.config. Exit to come out of the Kernel Configuration prompt. Copy the configuration file to arch/arm64/configs folder. $ cp <config filename> arch/arm64/configs/ For example, $ cp power.config arch/arm64/configs/ Configure the kernel. Load the changed configuration for Layerscape Armv8 platform in 64-bit mode for LSDK. $ export CROSS_COMPILE=aarch64-linux-gnu- $ export ARCH=arm64 $ make distclean $ make defconfig <config filename> Build kernel image and device tree image. $ make -j8 Step 4 - Generate .itb file Generate .itb file, which includes stress package and thermal monitoring unit installed, for kernel booting. Copy the Image and Image.gz files from the /flexbuild_<version>/packages/linux/linux/arch/arm64/boot folder and to the /flexbuild_<version>/build/linux/kernel/arm64/LS folder. Change directory to flexbuild_<version>. Generate .itb image using flex-builder. $ source setup.env $ flex-builder -i mkitb -r ubuntu:lite This generates lsdk<version>_ubuntu_lite_LS_arm64.itb file. For example, lsdk2004_ubuntu_lite_LS_arm64.itb Copy the .itb image to the TFTP server. Step 5 - Load .itb image from TFTP server to 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 Load the .itb image from TFTP server to DDR memory of the board. => tftp 0xa0000000 <itb_file_name> For example: => tftp 0xa0000000 sdk2004_ubuntu_lite_LS_arm64.itb Boot the kernel with .itb image as follows: => bootm 0xa0000000#<board_name> For example: => bootm 0xa0000000#lx2160ardb Board boots to Linux prompt. Step 6 – Validate stress package and measure CPU power using sensors Validate if stress and sensors packages have been installed properly. $ which stress ./usr/bin/stress  $ which sensors ./usr/bin/sensors Measure CPU power before applying stress to the cores. $ sensors CPU power before stress Apply stress to CPU cores using the following command. # stress -c <number of cores> -i <number of IO> -m <number of vm> --vm-bytes 128M -t <time in seconds> & For example: The command applies stress for 60 seconds. For more information on stress command, run stress-h command for help. Measure CPU power after applying stress in given time interval. $ sensors
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-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