I am very much new to Embedded Linux. We use poky build system. We just use bitbake linux-imx command to build the kernel. It generates some files zImage, rootfs, uboot and also a sdcard image. We just copy the sdcard image and run the linux on our custom board. My questions what does rootfs and zImage actually contain??
What is zImage, rootfs
linux;boot;linux kernel;root filesystem
To understand what every file is responsible for you should understand how MPU starts up.As I understood from your qestion you use NXP (Freescale) i.MX microprocessor family. It includes small ROM loader, which will make basic system setup (interfaces to memory, clock tree etc.), search for media to boot from (based on burned OTP bits or GPIO), find bootloader (u-boot in your case) in exact address which is specified in datasheet, load and start it. U-boot will init more interfaces (e.g. Ethernet), find arguments that should be passed to Kernel (screen settings, console, network settings if you use NFS), copy Kernel to DDR and pass all arguments. Kernel will load all drivers, and search for rootfs with all libraries, applications etc. After this Kernel will start init scripts, which will init all system and start your application.u-boot is the first thing that will start after ROM bootloader.You can replace it with your own code if you would like MPU to runbare-metal code without OS (like microcontroller).zImage is compressed version of the Linux kernel image that isself-extracting.  rootfs is root file system, which contains allapplications, libs and in most cases everything, including homefolder. sdcard image is just all stuff mentioned above which canbe copied (with dd) to the card, after copy you will see FATpartition with Kernel and device tree and EXT partition with rootfs,u-boot is in unpartitioned area before FAT (in case you use i.MX6it's 0x80000). It's there just to make your life easier.