Follow these steps to update the Linux kernel image and device tree on the eMMC card.
NOTE: Below steps are valid for both LX2160ARDB Rev 1.0 and Rev 2.0 revisions.
$git clone https://source.codeaurora.org/external/qoriq/qoriq-components/linux
where LSDK-20.04-V5.4 refers to a tag in the format LSDK-<LSDK version>- V<kernel version>
If you want to make changes to the device tree, open and edit arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts
You can make changes in the Linux kernel source code also if required.
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/.
Step1: Copy the kernel images and device tree from Linux host machine
Dynamic IP address assignment: # udhcpc -i <port name in Tiny/LSDKDistro>
Static IP address assignment:
# ifconfig <port name in Tiny/LSDKDistro> <IP address> netmask <netmask address> up
For example: # ifconfig enp1s0 192.168.2.120 netmask 255.255.255.0 up
# mkdir <destination folder>
# scp <user>@<ipaddress>:<file path>/<filename> <destination folder>
For example:
# mkdir /kernelfiles
# scp user1@192.168.2.1:/tftpboot/Image.gz /kernelfiles
Step2: Copy the kernel image and device tree to the eMMC card
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 eMMC card directly without an extra eMMC card reader device, the device name of eMMC card is typically mmcblk1.
# sudo mkdir <mount_folder>
# sudo mount /dev/sdX <mount_folder>
For example:
# sudo mkdir /carddata
# sudo mount /dev/mmcblk1p2 /carddata
# sudo cp <destination folder>/Image <destination folder>/Image.gz <destination folder>/fsl-lx2160a-rdb.dtb <mount_location>
For example: # sudo cp /kernelfiles/Image /kernelfiles/Image.gz /kernelfiles/fsl-lx2160a-rdb.dtb /carddata=> run bootcmd_mmc1
If U-Boot does not find LSDK on the eMMC card, it will boot TinyDistro from lsdk_linux_arm64_ tiny.itb stored on the eMMC card.