LX2160ARDB - How to update Linux kernel and device tree on SD card

Showing results for 
Search instead for 
Did you mean: 

LX2160ARDB - How to update Linux kernel and device tree on SD card

No ratings

LX2160ARDB - How to update Linux kernel and device tree on SD card

Follow these steps to update the Linux kernel image and device tree for LX2160ARDB on an SD card. 

NOTE: Below steps are valid for both LX2160ARDB Rev 1.0 and Rev 2.0 revisions.

STEP 1: Compiling Linux kernel images and device tree

  1. On Linux host, clone the repository with Linux kernel image and device tree:

    $ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/linux

  2. $ cd linux
  3. $ git checkout -b <new branch> <start point>
    • For example, git checkout -b LSDK-20.04-V5.4 LSDK-20.04-V5.4

      where LSDK-20.04-V5.4 refers to a tag in the format LSDK-<LSDK version>-V<kernel version>
  4. $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig lsdk.config

    If you want to make changes to the device tree, open and edit arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts

  5. $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-

The binary kernel image Image and compressed kernel image Image.gz are in arch/arm64/boot/.
The device tree blob fsl-lx2160a-rdb.dtb is in arch/arm64/boot/dts/freescale/.

STEP2: Copying the compiled kernel images and device tree to the SD card


  1. Plug the SD card into the Linux host machine.
  2. sudo fdisk -l to list the disks that are accessible to the computer.
  3. Mount the SD card partition that contains Linux kernel images and device tree.
    1. sudo mkdir <mount_location>
    2. sudo mount /dev/sdX <mount_location>

    For example:

    $ sudo mkdir /carddata

    $ sudo mount /dev/mmcblk0p2 /carddata



    • Use the command cat /proc/partitions to see the list of devices, their partitions along with their sizes to make sure that the correct device and partition name have been chosen.
    • The eMMC storage drive in the Linux PC is detected as /dev/sdX, where X is a letter such as a, b, c. Make sure to choose the correct device name, because data on this device will be replaced.
    • If your Linux host machine supports read/write SD card directly without an extra SD card reader device, the device name of SD card is typically mmcblk0.
    • In general, the Linux kernel images and device tree are stored in the second partition of the SD device (mmcblk0p2). For detail on storage layout on SD/eMMC/USB/SATA for LSDK images deployment, refer to section "LSDK memory layout and Userland" in

      Layerscape Software Development Kit User Guide.

  4. Replace Image, Image.gz, and fsl-lx2160a-rdb.dtb on the SD card with the new files compiled in the steps above.

    $ sudo cp /linux/arch/arm64/boot/Image /linux/arch/arm64/boot/Image.gz /linux/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dtb <mount_location>

    For example: $sudo cp /linux/arch/arm64/boot/Image /linux/arch/arm64/boot/Image.gz /linux/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dtb /carddata
  5. Unmount the card. For example: sudo umount /dev/mmcblk0p2
  6. Plug the SD card into LX2160ARDB and boot the board.
    • At U-Boot, run the following command to boot the board to LSDK distro using the SD card.

=> run bootcmd_mmc0

If U-Boot does not find LSDK on the SD card, it will boot TinyDistro from lsdk_linux_arm64_ tiny.itb stored on the SD card.

Version history
Revision #:
6 of 6
Last update:
‎10-21-2020 11:28 PM
Updated by: