imx28evk mainline kernel

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx28evk mainline kernel

2,892 Views
igor-imx
Contributor IV

Hi

im currently evaluating the imx28evk board with the freescale-community-bsp from yocto.

I can see that the kernel that is currently being built by default for the imx28 is 2.6.35.

Im wandering if there is a particular reason for using this version of the 3.7.x kernel works well as well.

I have looked on google for a while and could see that there were a lot of fixes done in the 3.x kernels in regards to the SPI functionality that i will need for this project, expecially the SPI Slave driver in linux.

Are there any drawbacks on using the 3.7.x mainline kernel with imx28? Is all the functionality supported? I can also see that there is a linux_3.7.5.bb file in the community bsp that supports mxs as a platform which is, as far as i understand, compatible with imx28.

If the 3.7.5 kernel is supported, what is the correct way to enable it in yocto build?

Your help is much appreciated, since im very new to both linux on imx as well as yocto project.

Best Regards

Igor

Labels (3)
Tags (3)
0 Kudos
10 Replies

951 Views
fabio_estevam
NXP Employee
NXP Employee

General instructions for mx6 are available at:

https://community.freescale.com/docs/DOC-93844 , and you can adapt it for mx28evk.

By the way, the kernel that we use is 3.8 now.

If you have issues, please post them to the meta-fsl-arm mailing list:

meta-freescale mailing list

meta-freescale@yoctoproject.org

https://lists.yoctoproject.org/listinfo/meta-freescale


0 Kudos

951 Views
igor-imx
Contributor IV

Hi Fabio

Thank you very much for your help.

I have checked out the latest community bsp and it in fact has a recipe for linux 3.8 that i was able to build and run on the board.

Now, if i may, i have another question that i can't seem to figure out.

How can i get same image to build for using with NAND flash?

I have read extensively about the u-boot and it looks like the mx28evk.h board file in u-boot needs to be patched since by default u-boot 2013-01 has it configured for mmc boot only. Am i correct? Can you please let me know where this patch can be obtained and what is the procedure on building the images for usage with nand?

I really appreciate any help

thank you

Igor

0 Kudos

951 Views
fabio_estevam
NXP Employee
NXP Employee

Booting from NAND is supported in mainline U-boot.

Please read

git.denx.de Git - u-boot.git/blob - doc/README.mx28_common

Especially "4) Installation of U-Boot into NAND flash"

After booting from NAND, if you also plan to store the rootfs into NAND, then you will need to activate UBIFS support in the kernel and also in Yocto.

So my suggestions are:

1. Try booting U-boot from NAND first. If you have issues, email the external U-boot list

2. Activate UBIFS in the kernel and try to activate it in Yocto as well. If you have issues, please post to the meta-fsl-arm mailing:

meta-freescale@yoctoproject.org

https://lists.yoctoproject.org/listinfo/meta-freescale

Currently we do not have any board that uses rootfs in NAND in the meta-fsl-arm layer, so it will very good if you can work on such task along with the meta-fsl-arm developers.


951 Views
OtavioSalvador
Senior Contributor II

I will have a look at ubifs image build. I will get the image build and post the patches in mailing list for review.

0 Kudos

951 Views
igor-imx
Contributor IV

Hi Otavio

This would be great if you could provide a patch that would be able to build an image that can be flashed to nand.

I have looked at the bbclass file that is used to build the sdcard image and with my current yocto knowledge it would take me quite a bit of time to figure out the nand build.

I will try to just get the nand version of u-boot built and flash it to band, and see if it boots at all.

I have enabled ubifs support in the kernel and recompiled the kernel, but still need to figure out a lot of things related to yocto/bitbake etc.

Thank you all for the help, hopefully i will be able to contribute something usefull to the community shortly as soon as i get up to speed with yocto :smileyhappy:

0 Kudos

951 Views
OtavioSalvador
Senior Contributor II

Yes; I hope to get onto it tomorrow or so.

0 Kudos

951 Views
igor-imx
Contributor IV

I got the U-BOOT patched with support for NAND commands yesterday and then manually created the imx28 compatible uboot.nand package following the instructions on the denx website that you have kindly provided. I loaded into the NAND flash  booting fine. Now is need to figure out how to correctly patch the mx28evk_config.h in u-boot to put environment on NAND as well as how and which commands to add so i can boot the linux kernel from NAND as well.

Also, how can i figure out which offset in NAND i should be putting the kernel and filesystem at?

I know that the linux kernel has to be patched as well with the NAND flash layout for the device, however i couldn't find where in the kernel the patch should be applied. In the 2.6.x kernels the flash layouts would normally reside in the board.c file for a specific board, for example for TI am335x its located at

arch/arm/mach-omap2/board-am335xevm.c

I guess a lot of things changed in the new 3.8 kernel versions.

If you have any info on this topic, i would really appreciate it. thanks in advance

0 Kudos

951 Views
fabio_estevam
NXP Employee
NXP Employee

Igor,

For using NAND to store the environment variables you need to change include/configs/mx28evk.h and remove

#define CONFIG_ENV_IS_IN_MMC line

and use:

/* Environment is in NAND */

#define    CONFIG_ENV_IS_IN_NAND

#define    CONFIG_ENV_SIZE_REDUND        CONFIG_ENV_SIZE

#define    CONFIG_ENV_SECT_SIZE        (128 * 1024)

#define    CONFIG_ENV_RANGE        (512 * 1024)

#define    CONFIG_ENV_OFFSET        0x300000

#define    CONFIG_ENV_OFFSET_REDUND    \

        (CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE)

The above lines were taken from include/configs/m28evk.h (m28evk is a board developed by Denx).

By the way, if you think that any of my answers were correct or useful in this thread, please mark it as so.

Regards,

Fabio Estevam

951 Views
igor-imx
Contributor IV

Hi Fabio

thank you for the pointers in regards to the u-boot config.

I will try it tonight for sure. How can i mark this thread as usefull by the way? Your comments help me a lot

thanks again :smileyhappy:

0 Kudos

951 Views
fabio_estevam
NXP Employee
NXP Employee

There is a nice how-to for m28evk board from Denx about UBI:

FlashFilesystemsUBIFS < DULG < DENX

0 Kudos