Hi @vivek338 !
Let me provide the steps I have followed and tested on my side that should work.
Format SD card connected to my Linux PC, listed as sdb
$ sudo fdisk /dev/sdb
Type the following parameters (each followed by
p [lists the current partitions]
d [to delete existing partitions. Repeat this until no unnecessary partitions are reported by the 'p' command to start fresh.]
n [create a new partition]
p [create a primary partition - use for both partitions]
1 [the first partition]
20480 [starting at offset sector]
1024000 [ending position of the first partition to be used for the boot images]
p [to check the partitions]
n
p
2
1228800 [starting at offset sector, which leaves enough space for the kernel, the bootloader and its configuration data]
<enter> [using the default value will create a partition that extends to the last sector of the media]
p [to check the partitions]
w [this writes the partition table to the media and fdisk exits]
Change directory to where I have all my files, ubot, rootfs, dtb, etc.
$ cd LF_v5.15.32-2.0.0_images_imx8mnevk/
Copy bootloader to SD card
$ sudo dd if=imx-boot-imx8mnevk-sd.bin-flash_evk of=/dev/sdb bs=1k seek=32 conv=fsync
Create a VFAT partition where kernel and dtb will be stored
$ sudo mkfs.vfat /dev/sdb1
Create a directory where SD partition will be mounted; next mount the partition
$ mkdir mountpoint
$ sudo mount /dev/sdb1 mountpoint
Copy and rename kernel image and dtb (here the documentation is not clear, so this may be the cause of your issue) uboot expects that kernel image is named Image and dtb imx8mq-evk.dtb
$ sudo cp Image-imx8mnevk.bin ./mountpoint/Image
$ sudo cp imx8mq-evk.dtb ./mountpoint/imx8mq-evk.dtb
Unmount the partition
$ sudo umount mountpoint
Format partition that will store the root file system
$ sudo mkfs.ext4 /dev/sdb2
Mount the partiotion
$ sudo mount /dev/sdb2 mountpoint/
Create a directory and extract root file system
$ mkdir rootfs
$ cd rootfs/
$ tar -jxvf ../imx-image-full-imx8mnevk.tar.bz2
Copy root file system to the mounted partition
$ sudo cp -a * ../mountpoint
Unmount partition and sync
$ sudo umount ../mountpoint
$ sync
You may unplug your SD card now and try it on your board, if you find any issue please do let me know.
https://www.nxp.com/docs/en/user-guide/IMX_LINUX_USERS_GUIDE.pdf