Hello Aditya Prajapat,
You can build customized images for the i.MX6UL EVK Board using the Linux BSP Release (link below, please note that you may need to login to download this file).
https://www.nxp.com/webapp/Download?colCode=L4.1.15_1.1.0_LINUX_DOCS
Please follow the Yocto User’s Guide document contained in this bundle. Since Yocto is used as a means of distribution the source code is fetched on demand. You may, however, fetch the required sources for a given image by using the following command:
bitbake <image_or_recipe> -c fetchall
You may also build the image and the source code will be available on the work directory.
<BUILD_DIR>/tmp/work/<MACHINE>-poky-linux-gnueabi/linux-imx/<KERNEL_REV>/git
I hope this information helps!
Regards,