LX2160ARDB SD Card Booting, LSDK FitImage Hi, I have installed the LSDK 21.08 and the atf, rcw, u-boot, ddr-phy folders are already available but why the source isn't available in it and have to git clone for each source? For complete SD card booting, i have deployed the following files at blocks mentioned below 1. bl2_sd.pbl - 0x8 2. fip.bin - 0x800 3. fip_ddr_all.bin - 0x4000 4. mc_lx2160a_10.40.0.itb - 0x5000 5. dpc-usxgmii.dtb - 0x7000 6. fitImage--5.15.71+git0+95448dd0dc-r0-lx2160ardb-rev2-20260310070404.bin - 0x8000 And I have made partitions in SD card(64GB) as below 1. /dev/mmcblk0p1 - sector 409600 to sector 42352640 2. /dev/mmcblk0p2 - sector 42352640 to sector 121534463 and mounting the rootfs "fsl-image-networking-full-lx2160ardb-rev2-20260310091147.rootfs.tar.gz" on /dev/mmcblk0p1 partition using the bootargs command at u-boot as => setenv bootcmd 'setenv bootargs root=/dev/mmcblk0p1 rw rootwait console=ttyAMA0,115200; mmc dev 0; mmc read 0x90000000 0x8000 0x14000; bootm 0x90000000' is this the right approach do it?? Please suggest any better approach that can be done. And in LSDK how to generate the fitImage binary file for kernel and dtb, like the fitImages present in the LSDK under distro/build_lx2160ardb-rev2/tmp/deploy/images/lx2160ardb-rev2/ directory like fitImage--5.15.71+git0+95448dd0dc-r0-lx2160ardb-rev2-20260310070404.bin. Re: LX2160ARDB SD Card Booting, LSDK FitImage Hi, Thanks for the detailed explanation. We have build the LSDK setup using yocto project as given in UG10374 1. For SD card booting, in the procedure we followed we have created the partition and extracted the rootfs as mentioned by you and contains a valid /sbin/init. This was also verfied by making partition(/dev/mmcblk1p1) in emmc flash, extracting the rootfs and able to mount the system in its partition but not getting when its in SD. Is the booting possible by loading the boot images through block write into SD card and mounting rootfs on the partition(/dev/mmcblk0p1)?? Because after the mounting on SD card partition gets failed, the partitions are not listed when checked by the command lsblk after booting from qspi. 2. The actual file size fitImage binary is around 16MB and block size of 0x8000...but the log is as follows when booted => setenv bootcmd 'setenv bootargs root=/dev/mmcblk1p1 rw rootwait console=ttyAMA0,115200; mmc dev 0; mmc read 90000000 8000 8800; bootm 90000000' => => => boot switch to partitions #0, OK mmc0 is current device MMC read: dev # 0, block # 32768, count 35000 ... 35000 blocks read: OK ## Loading kernel from FIT Image at 90000000 ... Using 'conf-freescale_fsl-lx2160a-rdb.dtb' configuration Trying 'kernel-1' kernel subimage Description: Linux kernel Created: 2023-02-08 3:38:28 UTC Type: Kernel Image Compression: gzip compressed Data Start: 0x90000114 Data Size: 16608244 Bytes = 15.8 MiB Architecture: AArch64 OS: Linux Load Address: 0x80080000 Entry Point: 0x80080000 Hash algo: sha256 Hash value: 59af2bda187c7e19bd0a37818f1c22c24d30562979041f7bee01288661ae5bee Verifying Hash Integrity ... sha256+ OK ## Loading fdt from FIT Image at 90000000 ... Using 'conf-freescale_fsl-lx2160a-rdb.dtb' configuration Trying 'fdt-freescale_fsl-lx2160a-rdb.dtb' fdt subimage Description: Flattened Device Tree blob Created: 2023-02-08 3:38:28 UTC Type: Flat Device Tree Compression: uncompressed Data Start: 0x90fd6e28 Data Size: 33857 Bytes = 33.1 KiB Architecture: AArch64 Hash algo: sha256 Hash value: 32858f2c5f385a1a4410b8d4bff2414b1c4d36a13493cc8242eab6464e8d1d82 Verifying Hash Integrity ... sha256+ OK Booting using the fdt blob at 0x90fd6e28 Uncompressing Kernel Image Loading Device Tree to 000000009fff4000, end 000000009ffff440 ... OK fsl-mc: DPL not deployed, DPAA2 ethernet not work Starting kernel ... "Synchronous Abort" handler, esr 0x02000000 elr: 000000000636a000 lr : 0000000082005fd0 (reloc) elr: 0000000080080000 lr : 00000000fbd1bfd0 x0 : 000000009fff4000 x1 : 0000000000000000 x2 : 0000000000000000 x3 : 0000000000000000 x4 : 0000000080080000 x5 : 0000000000000001 x6 : 0000000000000008 x7 : 0000000000000000 x8 : 00000000fbb0e7c8 x9 : 0000010000000000 x10: 000000000a200023 x11: 0000000000000002 x12: 0000000000000002 x13: 00000000fbdfffff x14: 000000009fff4000 x15: 00000000fbd18be8 x16: 00000000fbd52f58 x17: 00000000fbb31560 x18: 00000000fbb11d90 x19: 00000000fbde6c98 x20: 0000000000000000 x21: 0000000000000400 x22: 0000000000000001 x23: 00000000fbb16538 x24: 00000000fbb16538 x25: 00000000fbdd1978 x26: 0000000000000000 x27: 00000000fbd1bff8 x28: 0000000090000114 x29: 00000000fbd1bf98 Code: 00000000 00000000 00000000 00000000 (00000000) Resetting CPU ... ### ERROR ### Please RESET the board ### 3. Once will check the sd_bootcmd sequence and try to boot through the generated firmware image 4. fip.bin and fip_ddr_all.bin are loaded according to the locations mentioned in the Flash layout table in TRM. Thanks for providing the procedure for generating a FIT image. Re: LX2160ARDB SD Card Booting, LSDK FitImage Hello,
Your approach is not the recommended LSDK method. The individual raw images can work, but you must also reproduce the complete U-Boot environment and boot sequence for LX2160A. The safer method is to generate and flash the composite firmware image:
flex-builder -i mkfw -m lx2160ardb_rev2 -b sd
This generates:
build/images/firmware_lx2160ardb_rev2_sdboot.img
Then write it to the SD card:
sudo flex-installer -f firmware_lx2160ardb_rev2_sdboot.img -d /dev/mmcblk0
Alternatively:
sudo dd if=firmware_lx2160ardb_rev2_sdboot.img \
of=/dev/mmcblk0 bs=1k seek=4 conv=fsync
Problems in the proposed procedure
root=/dev/mmcblk0p1 is valid only if partition 1 contains an extracted Linux root filesystem. A .tar.gz file itself is not a mounted root filesystem; it must be extracted into the partition:
sudo mkfs.ext4 /dev/mmcblk0p1
sudo mount /dev/mmcblk0p1 /mnt
sudo tar -xpf fsl-image-networking-full-lx2160ardb-rev2-*.rootfs.tar.gz \
-C /mnt
sudo umount /mnt
bash
This command assumes that the FIT image occupies exactly 0x14000 blocks:
mmc read 0x90000000 0x8000 0x14000
That size must match the actual FIT file size, rounded up to 512-byte sectors. Otherwise, U-Boot may read too little or overwrite adjacent memory.
You are bypassing the normal sd_bootcmd sequence. The standard sequence also loads the Management Complex firmware, DPC, and other required components. The LSDK guide defines a composite SD layout and recommends booting through the generated firmware image rather than manually placing each component.
Your fip.bin and fip_ddr_all.bin entries should not be treated as interchangeable. Their correct locations and loading commands depend on the generated U-Boot environment and firmware layout.
A better manual boot test, after the composite image is installed, is:
=> run sd_bootcmd
or simply reset the board with the boot switches configured for SD boot.
Why source directories are empty
The LSDK package separates the build framework from component source trees. The directories under components/firmware may contain manifests, configuration, recipes, or references, while the actual ATF, U-Boot, RCW, DDR PHY, and Linux sources are fetched according to the LSDK manifest/configuration. Therefore, cloning the component repositories is expected when building from source. Use the exact revisions specified by the LSDK release rather than arbitrary upstream branches.
For example, build through Flexbuild instead of independently cloning and building each component:
flex-builder -c atf -m lx2160ardb_rev2 -b sd
flex-builder -c linux -m lx2160ardb_rev2
flex-builder -i mkfw -m lx2160ardb_rev2 -b sd
For a production build, use the official flexbuild_lsdk2108.tgz archive because it contains the release-matched configuration and component revisions.
Generating a FIT image
A FIT image is generated from an ITS description using U-Boot’s mkimage utility:
mkimage -f lx2160.its lx2160.fit
The ITS file describes the kernel, device tree, optional initramfs, load addresses, compression, hashes, and configuration. The LSDK guide explicitly documents this process and gives the command format above.
A minimal kernel-plus-DTB example is:
/dts-v1/;
/ {
description = "LX2160A kernel and device tree FIT";
#address-cells = <1>;
images {
kernel {
description = "Linux kernel";
data = /incbin/("Image");
type = "kernel";
arch = "arm64";
os = "linux";
compression = "none";
load = <0x81080000>;
entry = <0x81080000>;
hash-1 {
algo = "sha256";
};
};
fdt {
description = "LX2160ARDB Rev2 device tree";
data = /incbin/("fsl-lx2160a-rdb.dtb");
type = "flat_dt";
arch = "arm64";
compression = "none";
load = <0x90000000>;
hash-1 {
algo = "sha256";
};
};
};
configurations {
default = "conf";
conf {
kernel = "kernel";
fdt = "fdt";
};
};
};
Build it with the mkimage supplied by the LSDK U-Boot tools:
mkimage -f lx2160.its fitImage
For a compressed kernel, use Image.gz and set:
compression = "gzip";
Ensure that the kernel, FDT, initramfs, and U-Boot load regions do not overlap. The generated file in tmp/deploy/images/.../fitImage-*.bin is normally a Yocto-generated FIT artifact; its timestamp and Git hash are packaging metadata, not a special binary format. The FIT format itself is produced by mkimage .
Finally, note that the documented LSDK 21.08 FIT example includes an initramfs/rootfs as well as kernel and DTB. If you boot with root=/dev/mmcblk0p1 , you can omit the initramfs, but the root filesystem must be properly extracted and contain a valid /sbin/init .
Regards
View full article