[Q1]
To make a NAND image for NAND programmer, LTIB can make ubifs file and it can care bad block information swapping, can't it?
As I remember, UBI can control/handle ecc, but I would recomend you to double check in ubifs definition documentation:
http://www.linux-mtd.infradead.org/faq/nand.html
Then, how about by Yocto BSP?
Can it also build ubifs file?
Yes, Please, take a look here:
http://git.yoctoproject.org/cgit/cgit.cgi/meta-fsl-arm/tree/conf/machine/include/imx-base.inc#n97
By default meta-fsl-arm set up
IMAGE_FSTYPES ?= "tar.bz2 ext3 sdcard"
It means, the fs type generated before a bitbake will be "tar.bz2", "ext3" and "sdcard"
sdcard is a class defined only under meta-fsl-arm (meta-fsl-arm - Layer containing Freescale ARM hardware support metadata) this is the one that creates the binary *.sdcard.
You should set IMAGE_FSTYPES for exactly what *you* need. I means you should remove sdcard if you´re looking for NAND. For example.
See here the list of supported fstypes you can use from YP:
Yocto Project Reference Manual
It shows you how to swap from the default image type to another one, like NAND.
[Q2]
If the answer is yes, could you let me know how should I set the build config?
Especially, I want to confirm how should I set about a number of ECC bit and NAND block size.
In order to configure u-boot to be able to boot from NAND, see here:
meta-fsl-arm - Layer containing Freescale ARM hardware support metadata
use UBOOT_CONFIG = "nand" instead
In order to configure your UBI properly, take a look here:
meta-fsl-arm - Layer containing Freescale ARM hardware support metadata
change MKUBIFS_ARGS and UBINIZE_ARGS to what you need, use the comments on that file as example and keep in mind those numbers are for imx28evk with K9LBG08U0D-PCB0 (that means it´s all wrong for your case)
1) Please, let me know when you face an error. I don´t have an NAND over here so I cannot reproduce it on my side. However we can figure out the problem.
2) Please, make sure you understand how to configure those variables in a right place, and you understand override. If not, please, let me know.
3) Are you using meta-fsl-bsp-release or FSL Community BSP? What is the branch you´re using?
Please, let me know the progress...