To make NAND image by Yocto.

cancel
Showing results for 
Search instead for 
Did you mean: 

To make NAND image by Yocto.

Jump to solution
8,304 Views
Senior Contributor I

Hi community,

I have some questions about i.MX6 Yocto BSP.

Actually, I want to make a NAND image file to program it by NAND programmer, not MFG-Tool.

You know, in this case, the NAND image should be cared bad block informatin swapping and ECC.

Then, please see my questions below.

[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?

Then, how about by Yocto BSP?

Can it also build ubifs file?

[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.

Best Regards,

Satoshi Shimoda

Labels (5)
Tags (1)
1 Solution
403 Views
NXP Employee
NXP Employee

[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...

View solution in original post

6 Replies
404 Views
NXP Employee
NXP Employee

[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...

View solution in original post

403 Views
Senior Contributor I

Hi Daiane Angolini,

Thank you for your reply.

> 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?

Actually, I have not tested making the NAND image by Yocto BSP because I did not understand how to make it, so no error has appeared yet.

And our project will use Yocto L3.10.17 GA, so the branch is meta-fsl-bsp-release.

0 Kudos
403 Views
NXP Employee
NXP Employee

Ok :smileywink:

Yocto L3.10.17 GA is only the "release version" of the packages Freescale releases.

meta-fsl-bsp-release is the metalayer used by Freescale to release it, not a branch.

It´s very important that you understand your environment, because when you need to report a bug/issue, it´s very important to be precise on what you´ve been using.

I recommend everyone to subscribe to meta-freescale. You don´t need to *participate*, you can only read some emails and learn from other developers and you can see the development status. FSL Community BSP

I´m going to teste NAND built by my own next days and I could double check every step (and probably DOC it), if I find anything interesting, I update this thread.

403 Views
Senior Contributor I

Can somebody reply to me?

0 Kudos
403 Views
NXP TechSupport
NXP TechSupport

Hello Sastoshi San,

We are working internally in your request with our experts team, as soon as we get a response, we are getting back to you.

0 Kudos
403 Views
Senior Contributor I

Hi jamesbone,

OK, I will wait a reply from your experts team.

Best Regards,

Satoshi Shimoda

0 Kudos