Layerscape知识库

取消
显示结果 
搜索替代 
您的意思是: 

Layerscape Knowledge Base

讨论

排序依据:
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 NO R 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    
查看全文
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      
查看全文
LS1012A integrates a hardware packet forwarding engine to provide high performance Ethernet interfaces. This document introduces PFE hardware and software decomposition and data flow, setting up two PFE Ethernet ports to implement Ethernet packets forwarding through PFE, how to modify PFE driver and dts file to set up single PFE Ethernet port on LS1012A custom boards. PFE hardware Structure PFE Software Decomposition and Data Flow Setting up Two PFE Ethernet Ports to Implement Ethernet Packets Forwarding Set up Single PFE Ethernet Port on LS1012A Custom Boards
查看全文
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
查看全文
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
查看全文
In Linux, only one MAC is created by default as a standard kernel Ethernet interface. This interface is named  eth0  by default (or  eth1  if PCI Express network interface card  is  discovered first). The following figure shows the   Etherne t port  (ETH8) that  eth0  (or  eth1 )  corresponds to, on LS1088ARDB.  The following figure shows the   Etherne t port  (DPMAC5) that  eth0  (or  eth1 )  corresponds to, on LS1088ARDB-PB. Only one interface is created by default because in DPAA2, Ethernet ports need not be associated with Linux kernel Ethernet driver instances. For example, Ethernet ports can be assigned as ports on switches or can be allocated to user space. Furthermore, these associations can be made dynamically.  From Linux, you can list the available interfaces using the ifconfig -a command or the  ip link command . For example: $ ip link 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue qlen 1000     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000     link/ether 68:05:ca:36:96:6a brd ff:ff:ff:ff:ff:ff 3: sit0@NONE: <NOARP> mtu 1480 qdisc noop qlen 1000     link/sit 0.0.0.0 brd 0.0.0.0 4: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000     link/ether 6e:01:3f:a2:04:b6 brd ff:ff:ff:ff:ff:ff In this example, Linux eth1 corresponds to Ethernet port DPMAC5 (ETH8) on LS1088ARDB . Create network interfaces Check the network interfaces that are currently available using Layerscape script ls-listni . For example: $ ls-listni dprc.1/dpni.0 (interface: eth1, end point: dpmac.5) The default interface DPNI.0 is configured with a minimal set of resources. For example, it can only receive traffic on GPP0 and its intended uses are network boot and low-bandwidth traffic. For fully-featured DPNI objects, dynamic configuration (explained in upcoming steps) is recommended. Optional - Unbind and destroy existing interface.   $ echo dpni.0 > /sys/bus/fsl-mc/drivers/fsl_dpaa2_eth/unbind $ restool dpni destroy dpni.0 dpni.0 is destroyed The restool utility is a Linux user space command that allows DPAA2 objects to be managed (created, destroyed, and queried for status). Add new network interfaces using Layerscape script ls-addni . For example: $ ls-addni dpmac.3 Created interface: eth1 (object:dpni.0, endpoint: dpmac.3) $ ls-addni dpmac.4 Created interface: eth2 (object:dpni.1, endpoint: dpmac.4)   Check that new interfaces are created using the  ifconfig -a  or   ip link   command . Enable the newly created interfaces using the  ifconfig command For example: ifconfig eth1 192.168.1.23 up ifconfig eth2 192.168.1.24 up Optional - Save current configuration to a Data Path Layout (DPL) file DPL file is used to create DPAA2 entities prior to Linux boot. To save the current configuration to a DPL file, follow the steps below. After creating the custom DPL, you can program it to the boot source (for example, QSPI NOR flash or SD card) so that the configuration is present automatically next time Linux boots. In this case, the existing DPL is replaced with the updated DPL file. Save this custom configuration to a DPL file (.dts format) on the board. $ restool dprc generate-dpl dprc.1 > <my_dpl>.dts Copy the DPL file to the Linux host machine. You can SCP the file from the board to the Linux host machine. Run following command to convert it to the .dtb format. $ dtc -I dts -O dtb <my_dpl>.dts -o <my_dpl>.dtb For steps to program the new DPL file in the QSPI NOR flash or on the SD card, see LS1088ARDB - How to update MC firmware, DPC, and DPL images in QSPI NOR flash or LS1088ARDB/LS1088ARDB-PB - How to update MC firmware, DPC, and DPL images on SD card.
查看全文
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
查看全文
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.
查看全文
Please note that the LSDK memory layout for TF-A boot flow explained in this topic is only applicable for  LSDK 18.12 and newer releases.  The following table shows the memory layout of various firmware stored in NOR/NAND/QSPI flash device or SD card on all QorIQ Reference Design Boards. When the board boots from NOR flash, the NOR bank from which the board boots is considered as the "current bank" and the other bank is considered as the "alternate bank". For example, if LS1043ARDB boots from NOR bank 4, to update an image on NOR bank 0, you need to use the "alternate bank" address range,0x64000000 - 0x64F00000. Firmware Definition MaxSize Flash Offset (QSPI/NAND flash) Absolute address  (NOR bank 0 on LS1043ARDB, LS1021ATWR) Absolute address  ( NOR bank 4 LS1043ARDB, LS1021ATWR) Absolute address (NOR bank 0   on   LS2088ARDB ) Absolute address ( NOR bank 4  on  LS2088ARDB) SD Start Block No. RCW + PBI + BL2 (bl2.pbl) 1 MiB 0x00000000 0x60000000 0x64000000 0x580000000 0x584000000 0x00008 ATF FIP Image (fip.bin) BL31 + BL32 + BL33 4 MiB 0x00100000 0x60100000 0x64100000 0x580100000 0x584100000 0x00800 Boot firmware environment 1 MiB 0x00500000 0x60500000 0x64500000 0x580500000 0x584500000 0x02800 Secure boot headers 2 MiB 0x00600000 0x60600000 0x64600000 0x580600000 0x584600000 0x03000 Secure header or DDR PHY FW 512 KiB 0x00800000 0x60800000 0x64800000 0x580800000 0x584800000 0x04000 Fuse provisioning header 512 KiB 0x00880000 0x60880000 0x64880000 0x580880000 0x584880000 0x04400 DPAA1 FMAN ucode 256 KiB 0x00900000 0x60900000 0x64900000 0x580900000 0x584900000 0x04800 QE/uQE firmware 256 KiB 0x00940000 0x60940000 0x64940000 0x580940000 0x584940000 0x04A00 Ethernet PHY firmware 256 KiB 0x00980000 0x60980000 0x64980000 0x580980000 0x584980000 0x04C00 Script for flashing image 256 KiB 0x009C0000 0x609C0000 0x649C0000 0x5809C0000 0x5849C0000 0x04E00 DPAA2-MC or PFE firmware 3 MiB 0x00A00000 0x60A00000 0x64A00000 0x580A00000 0x584A00000 0x05000 DPAA2 DPL 1 MiB 0x00D00000 0x60D00000 0x64D00000 0x580D00000 0x584D00000 0x06800 DPAA2 DPC 1 MiB 0x00E00000 0x60E00000 0x64E00000 0x580E00000 0x584E00000 0x07000 Device tree(needed by uefi) 1 MiB 0x00F00000 0x60F00000 0x64F00000 0x580F00000 0x584F00000 0x07800 Kernel lsdk_linux.itb 16 MiB 0x01000000 NA NA NA NA 0x08000 Ramdisk rfs 32 MiB 0x02000000 NA NA NA NA 0x10000 The following figures highlight the changes in the flash layout for previous boot flow (with PPA) and flash layout for TF-A boot flow. Flash layout for previous boot flow (with PPA)   Changed flash layout for TF-A boot flow
查看全文
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
查看全文
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.
查看全文
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.
查看全文
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
查看全文
Trusted Firmware for Cortex-A (TF-A) is an implementation of EL3 secure firmware. TF-A replaces PPA in secure firmware role. Please note the steps listed in this topic can only be performed with  LSDK 18.12 and newer releases.                       To migrate to the TF-A boot flow from the previous boot flow (with PPA), you need to compile the TF-A binaries,  bl2_<boot_mode>. pbl and fip.bin , and flash these binaries on the specific boot medium on the board. For NOR boot, you need to compile the following TF-A binaries. TF-A binary name Components bl2_nor BL2 binary: Platform initialization binary RCW binary for NOR boot  fip.bin BL31: Secure runtime firmware BL32: Trusted OS, for example, OPTEE (optional) BL33: U-Boot/UEFI image Follow these steps to compile and deploy TF-A  binaries ( bl2_nor. pbl   and   fip.bin)  on the NOR flash. Compile PBL binary from RCW source file Compile U-Boot binary [Optional] Compile OPTEE binary  Compile TF-A binaries ( bl2_nor. pbl   and   fip.bin)  for NOR boot Program TF-A binaries to the NOR flash Step 1: Compile PBL binary  from RCW source file You need to compile the rcw_1600.bin  binary to build the bl2_nor.pbl binary. 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-19.03  LSDK-19.03   $ cd ls1043ardb If required, make changes to the rcw files. $ make   The compiled PBL binary for NOR boot on  LS1043ARDB,  rcw_1600.bin , is available at rcw/ls1043ardb/RR_FQPP_1455/ .    See the  rcw/ls1043ardb/README  file for an explanation of the naming convention for the directories that contain the RCW source and binary files. Step 2: Compile U-Boot binary You need to compile the u-boot.bin binary to build the  fip.bin binary. Clone the  u-boot   repository and compile the U-Boot binary for TF-A. $  git clone  https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot.git $  cd  u-boot $  git checkout  -b <new branch name>  LSDK-<LSDK version> .   For example,  $  git checkout  -b LSDK-19.03  LSDK-19.03   $   export  ARCH=arm64 $   export CROSS_COMPILE= aarch64-linux-gnu- $   make  distclean $  make ls1043ardb_tfa_defconfig $   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 the LSDK 18.12 U-Boot binary.                                  The compiled U-Boot binary,  u-boot .bin , is available at   u-boot / . Step 3: [Optional] Compile OPTEE binary  You need to compile the tee.bin binary to build fip.bin  with OPTEE. However, OPTEE is optional, you can skip the procedure to compile OPTEE i f you want to build the FIP binary without OPTEE. Clone the optee_os repository and build the OPTEE binary.  $   git clone https://source.codeaurora.org/external/qoriq/qoriq-components/optee_os $   cd optee_os $ git checkout  -b <new branch name>  LSDK-<LSDK version> .   For example,  $  git checkout  -b LSDK-19.03  LSDK-19.03 $ export  ARCH=arm $   export CROSS_COMPILE=aarch64-linux-gnu- $ make CFG_ARM64_core=y PLATFORM=ls-ls1043ardb $ aarch64-linux-gnu-objcopy -v -O binary out/arm-plat-ls/core/tee.elf out/arm-plat-ls/core/tee.bin The compiled OPTEE image, tee.bin , is available at  optee_os/out/arm-plat-ls/core/. Step 4: Compile TF-A binaries for NOR boot Clone the atf repository and compile the TF-A binaries,  bl2_nor. pbl   and   fip.bin . $ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/atf $ cd atf $  git checkout  -b <new branch name>  LSDK-<LSDK version> .   For example,  $  git checkout  -b LSDK-19.03  LSDK-19.03 $ export ARCH=arm64 $ export CROSS_COMPILE=aarch64-linux-gnu- Build BL2 binary with OPTEE. $ make PLAT=ls1043ardb bl2 SPD=opteed BOOT_MODE=nor BL32= <path_to_optee_binary>/ tee.bin pbl RCW= <path_to_rcw_binary> /rcw_1600.bin The compiled BL2 images,  bl2.bin and bl2_nor.pbl are available at atf/build/ls1043ardb/release/ . For any update in the BL2 source code or RCW binary, the  bl2_nor.pbl  binary needs to be recompiled. To compile the BL2 binary without OPTEE: $  make PLAT=ls1043ardb bl2  BOOT_MODE=nor pbl RCW= <path_to_rcw_binary>/ rcw_1600.bin                  Build FIP binary with OPTEE and without trusted board boot. $ make PLAT=ls1043ardb fip BL33= <path_to_u-boot_binary> /u-boot.bin SPD=opteed BL32= <path_to_optee_binary> /tee.bin The compiled BL31 and FIP binaries,  bl31.bin ,  fip .bin , are available at  atf/build/ls1043ardb/release/ . For any update in the BL31, BL32, or BL33 binaries, the  fip.bin  binary needs to be recompiled. To compile the FIP binary without OPTEE and without trusted board boot: $ make PLAT=ls1043ardb fip BOOT_MODE=nor BL33= <path_to_u-boot_binary>/ u-boot.bin To compile the FIP binary with trusted board boot, refer the read me at <atf repository>/plat/nxp/README.TRUSTED_BOOT                               Step 5: Program TF-A binaries to NOR flash 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 TF-A binaries from the TFTP server For details about the flash image layout for TF-A binaries, refer LSDK memory layout for TF-A boot flow.                               Flash bl2_nor.pbl  in NOR bank 4. => tftp 82000000 bl2_nor.pbl => erase 64000000 +$filesize;cp.b 82000000 64000000 $filesize Flash fip.bin  in NOR bank 4. => tftp 82000000 fip.bin =>  erase 64100000 +$filesize;cp.b 82000000 64100000 $filesize Boot from NOR  bank 4 :   => cpld  reset altbank LS1043ARDB will boot with TF-A. In the boot log, you will see: NOTICE: 2 GB DDR4, 32-bit, CL=11, ECC off NOTICE: BL2: v1.5(release):LSDK-19.03 NOTICE: BL2: Built : 14:43:06, Jun 12 2019 NOTICE: BL31: v1.5(release):LSDK-19.03 NOTICE: BL31: Built : 14:44:16, Jun 12 2019 NOTICE: Welcome to LS1043 BL31 Phase U-Boot 2018.09 (May 23 2019 - 14:35:16 +0530) SoC: LS1043AE Rev1.1 (0x87920011) Clock Configuration: CPU0(A53):1600 MHz CPU1(A53):1600 MHz CPU2(A53):1600 MHz CPU3(A53):1600 MHz Bus: 400 MHz DDR: 1600 MT/s FMAN: 500 MHz Reset Configuration Word (RCW): 00000000: 08100010 0a000000 00000000 00000000 00000010: 14550002 80004012 e0025000 c1002000 00000020: 00000000 00000000 00000000 00038800 00000030: 00000000 00001101 00000096 00000001 Model: LS1043A RDB Board Board: LS1043ARDB, boot from vBank 4 .......
查看全文
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 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 $ make ls1046ardb_sdcard_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-pbl.bin , is available at   u-boot / . You need to use  u-boot-with-spl-pbl.bin because f or SD boot, ls104x devices use different way for bootloader from ls1088/ls2088/lx2160 devices. SD card start block number for U-Boot binary Image  SD card start block number U-Boot PBL 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 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-pbl.bin 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.
查看全文
This topic explains steps to configure the “MT25QU02GCBB8E12” flash device for LX2160ARDB. The steps are common for most of the flash devices. If the procedure does not work for a particular flash device, please contact NXP Support.   Prerequisite: CW version 2019.01   In a custom design with LX2160, if you want to use the MT25QU02GCBB8E12 flash device which is not supported by the flash programmer,  you can add support for the new flash device by following these steps: Browse to the directory <CW4NET-Installation-Directory>/CW4NET_v2019.01/CW_ARMv8/Config/flash/ Duplicate file devices/MT25QU01GBBB.xml and rename the duplicated file as devices/MT25QU02GBBB.xml Update devices/MT25QU02GBBB.xml as follows: <device-file>       <device>             <content>                   <device_parameters>                         <device_type>spi</device_type>                         <manufacturerid>0x20</manufacturerid>                   </device_parameters>                  <name>MT25QU02GBBB</name>                   <sectors>                        <sector count="4096" size="0x10000"/>                   </sectors>                   <organizations>                         <organization depth="128M" width="8">                              <id>0xBB22</id>                               <algorithm>                                    <fpinclude href="algorithms/MT25QU02GBBB.xml"/>                               </algorithm>                         </organization>                   </organizations>             </content>       </device> </device-file> Duplicate file algorithms/MT25QU01GBBB.xml and rename the duplicated files as algorithms/MT25QU02GBBB.xml Update algorithms/MT25QU02GBBB.xml as follows : <algorithm-file>       <architectures>             <architecture type="arm" address_size="64">                   <controller type="QSPI">                         <format>bin</format>                         <entry_point>0x100</entry_point>                         <file>QSPI_64b</file>                        <fpinclude href="algorithms/params/MT25QU02GBBB_QSPI_64.xml"/>                         <supported_operations>                               <operation>id</operation>                               <operation>erase_sectors</operation>                               <operation>program</operation>                               <operation>dump</operation>                               <operation>protect_sectors</operation>                               <operation>unprotect_sectors</operation>                         </supported_operations>                   </controller>                  <controller type="FSPI">                        <format>bin</format>                        <entry_point>0x100</entry_point>                        <file>FSPI_64b</file>                        <fpinclude href="algorithms/params/MT25QU02GBBB_QSPI_64.xml"/>                        <supported_operations>                              <operation>id</operation>                              <operation>erase_sectors</operation>                              <operation>program</operation>                             <operation>dump</operation>                              <operation>protect_sectors</operation>                              <operation>unprotect_sectors</operation>                        </supported_operations>                  </controller>               </architecture>       </architectures> </algorithm-file> Duplicate algorithms/params/MT25QU01GBBB_QSPI_64.xml and rename the duplicated file as algorithms/params/MT25QU02GBBB_QSPI_64.xml Update algorithms/params/MT25QU02GBBB_QSPI_64.xml as follows: <params_file>     <parameters_block>         <param name="function" size="0x4"/>         <param name="padding1" size="0x4"/>         <param name="base_addr" size="0x8"/>         <param name="num_items" size="0x4" type="data_size"/>         <param name="result_status" size="0x4" type="result"/>         <param name="items" size="0x8" type="data_inout"/>         <param name="qspi_base_addr" size="0x8"/>         <param name="qspi_controller_offset" size="0x4"/>         <param name="bytes_per_sector" size="0x4" value="0x10000"/>         <param name="bytes_per_page" size="0x4" value="0x100"/>          <param name="number_of_sectors" size="0x4" value="0x1000"/>         <param name="swap_enable" size="0x1"/>         <param name="workaround" size="0x1" value="0"/>         <param name="is_nand" size="0x1" value ="0"/>         <param name="block_protect_mask" size="0x1" value="0x5C"/>         <param name="top_bottom_reg_address" size="0x4" value="0"/>         <param name="top_bottom_mask" size="0x1" value="0x20"/> Update the target initialization file as follows: def Config_Flash_Devices():     fl = flash.create(TA)       # Add FlexSPI device     #fl.add_device({"alias": "xspi", "name": "MT35XU512ABA", "address": 0x0, "ws_address": 0x18000000, "ws_size": 0x1FFFF, "geometry": "8x1", "controller": "FSPI"})     # Add MT25QU02GCBB8E12 flash device       fl.add_device({ "alias" : "xspi" , "name" : "MT25QU02GBBB" , "address" : 0x0, "ws_address" : 0x18000000, "ws_size" : 0x1FFFF, "geometry" : "4x1" , "controller" : "FSPI" }) Restart CodeWarrior for ARMv8 and start the Flash programmer. Select   MT25QU02GBBB device from flash device list and configure the desired operations.
查看全文
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.
查看全文
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    
查看全文
Follow these steps to update the  composite firmware image in QSPI NOR flash. 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. Obtaining composite firmware image   LSDK includes pre-built firmware images for QSPI NOR flash. The LSDK composite firmware includes RCW+PBI, U-Boot/UEFI, PPA, boot loader environment variables, DPAA1 FMan ucode, QE/uQE firmware, Ethernet PHY firmware, device tree, and lsdk_linux_<arch>.itb images. Refer Flash layout for new boot flow with TF-A  for  t he complete flash memory layout of the images.   On a Linux host machine, download composite firmware image for QSPI boot from nxp.com.     $ wget  http://www.nxp.com/lgfiles/sdk/lsdk <LSDK version> /firmware_ <RDB_name>_uboot_qspiboot.img     For example:   $ wget http://www.nxp.com/lgfiles/sdk/lsdk1812/firmware_ls1046ardb_uboot_qspiboot.img   Flashing composite firmware   images   to   QSPI NOR flash Composite   firmware   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 LS1046RDB from QSPI NOR flash. Ensure that the switches are set to boot the board from QSPI NOR flash.  For booting from   QSPI flash ,  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 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. Refer 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 composite firmware image from the TFTP server Program QSPI NOR flash1:  => sf probe 0:1 Flash composite firmware image: => tftp a0000000 firmware_ls1046ardb_uboot_qspiboot.img =>  print  filesize filesize=2351db0 Program composite firmware image to QSPI NOR flash:   =>  sf erase 0x0 +$filesize && sf write 0xa0000000 0x0 $filesize   Address 0x0  is the location of the  composite firmware  image in QSPI NOR flash.   Refer Flash layout for new boot flow with TF-A  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 LS1046RDB from QSPI NOR flash. Ensure that the switches are set to boot the board from QSPI NOR flash.  For booting from   QSPI flash ,  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:2 Or => ls usb <device:partition> For example: => ls usb 0:1 Or => ls scsi <device:partition> For example: => ls scsi 0:2 Program QSPI NOR flash1:  => sf probe 0:1 Load composite firmware image from the storage device => load mmc 0:2 a0000000 <image name> => print filesize For example: => load mmc 0:2 a0000000 firmware_ls1046ardb_uboot_qspiboot.img => print filesize filesize=2351db0 Or => load usb 0:2 a0000000 <image name> => print filesize Or => load scsi 0:2 a0000000 <image name> => print filesize 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. Program image to QSPI NOR flash:  =>   sf erase 0x0 +$filesize && sf write 0xa0000000 0x0 $filesize Address    0x0  is the location of the composite firmware image in QSPI NOR flash.   Refer Flash layout for new boot flow with TF-A  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.
查看全文
Getting RCW image: Getting UEFI image:                              Getting PPA image: Getting Linux kernel and DTB, and Root FS images: - Download Image ,  fsl-ls1043a-uefi-rdb.dtb and fsl-image-core-ls1043ardb.ext2.gz . -  Copy Image and fsl-image-core-ls1043ardb.ext2.gz to the TFTP server directory. Getting GRUB2 image for AARCH64 and sample GRUB configuration: - Download grub image from this location . - Download sample grub configuration from here . Placing GRUB image on FAT formatted SD card: Install FAT32 file system on SD card - Use the DISKPART utililty on windows command prompt to format a SD card with FAT32 file system. Use the following snapshot for reference - Copy grubaa64.efi and ls1043a-grub.cfg to the SD card. Booting to UEFI prompt on LS1043a RDB Board: Boot to u-boot prompt from NOR flash bank 0 on LS1043a RDB.  Setup serial port connection on host machine, to capture logs from the target LS1043a RDB board.. Reset the board to boot u-boot on bank 0, assuming that there is a valid u-boot image flashed on the primary bank 0. Copy Images to NOR flash alternate bank using u-boot commands sete uefi 'tftp 80000000 LS1043ARDB_EFI.fd; erase 0x64400000 0x644FFFFF ; cp.b 80000000 0x64400000 $filesize' sete rcw 'tftp 80000000 rcw_uefi_1500.bin; erase 0x64000000 0x640FFFFF ; cp.b 80000000 0x64000000 $filesize' sete ppa 'tftp 80000000 ppa.itb; erase 0x64500000 0x645FFFFF ; cp.b 80000000 0x64500000 $filesize' sete dtb 'tftp 80000000 fsl-ls1043a-uefi-rdb.dtb; erase 0x65B00000 0x65BFFFFF; cp.b 80000000 65B00000 $filesize' run uefi run ppa run rcw run dtb Note: The host machine is assumed to be having tftp server running, with the relevant files in place. The rcw, uefi, dtb and ppa images can also be found at compass link shared above. Note: Make sure SD card is inserted into the SD card slot on the board. Reset RDB to boot from NOR flash bank 4 => cpld reset altbank You should get UEFI boot prompt, as shown in the image below. Enter 2 to load Shell. On the Shell prompt run the following commands Shell> FS0:   Shell> ls You should see a list of the grub executable and configurations files present on SD card. Booting Linux via PXE on LS1043a RDB: Note: atftpd or tftpd-hpa, is required as tftp server for PXE boot to work. tftpd is not supported.  Load grub by entering the name of the grub executable. Shell> grubaa64.efi On the grub prompt, setup the server and client IPs for TFTP transfer. grub> set net_default_server=<server_ip> grub> net_add_addr eno0 efinet0 <client_ip> Load the grub configuration. grub> configfile (hd3,msdos1)/ls1043a-grub.cfg Grub menu is listed. Choose the entry for liinux boot. See the snapshot below for reference. Linux boot should start in around 7-8 minutes. Data transfer speed is around 100 KB/s.
查看全文