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
- On Linux host, clone the repository with Linux kernel image and device tree:
$ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/linux
- $ cd linux
- $ git checkout -b <new branch> <start point>
- $ 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
- $ 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
- Plug the SD card into the Linux host machine.
- sudo fdisk -l to list the disks that are accessible to the computer.
- Mount the SD card partition that contains Linux kernel images and device tree.
- sudo mkdir <mount_location>
- sudo mount /dev/sdX <mount_location>
For example:
$ sudo mkdir /carddata
$ sudo mount /dev/mmcblk0p2 /carddata
- 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
- Unmount the card. For example: sudo umount /dev/mmcblk0p2
- 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.