Prepare kernel and root FS on imx51

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

Prepare kernel and root FS on imx51

4,635 Views
patrickimmling
Contributor I

I followed the procedure in http://eewiki.net/display/linuxonarm/i.MX51+EVK to run the latest linux kernel (stable version, 3.2.10) on an imx51 Freescale board with a linux  rootFS of our choice. The uImage that I generate from my kernel zImage is 2.3MB and I packed it into my boot partition. However it turns out that the rootfile system(a .tgz file) which I downloaded is 723MB and when I tar it into my rootfs partition it has a size of 1.7GB. Is there some mistake? I am not able to correctly set the u-boot parameters as I am confused. I have the u-boot.imx after compiling u-boot sources.This is what I have:
sudo dd if=u-boot.imx of=${DISK} seek=1 bs=1024
Followed by setting of the partitions as follows:
unallocated: 5MB
fat16:boot: 50MB
ext4:rootfs:3.6GB(rest of the 4GB SD card)
I then copy the uImage, boot.scr to the boot partition and then I tar &copy the rootfs.tgz and kernel sources to the rootfs.

Here is what I set in boot.scr:
setenv bootcmd ‘fatload mmc 0:1 0×90800000 uImage; bootm 0×90800000′
setenv bootargs console=ttymxc0,115200 console=tty0 root=/dev/mmcblk0p2 rootwait ro rootfstype=ext4 mxcdi1fb:1280x720M@60
boot

How do I set the right addresses in the above file? I don’t understand it :(
Perhaps because of this, while I boot up my imx device: I get the following message:

U-Boot 2011.12 (Mar 13 2012 – 14:15:41)

CPU: Freescale i.MX51 family rev3.0 at 800 MHz
Reset cause: POR
Board: MX51EVK
DRAM: 512 MiB
WARNING: Caches not enabled
MMC: FSL_SDHC: 0, FSL_SDHC: 1
MMC: no card present
MMC init failed
Using default environment

In: serial
Out: serial
Err: serial
Net: FEC
Warning: failed to set MAC address

Hit any key to stop autoboot: 0
MMC: no card present
Booting from net …
BOOTP broadcast 1
BOOTP broadcast 2

Tags (1)
0 Kudos
Reply
21 Replies

3,847 Views
KrishnaPavan
Contributor II

Hi,

I only require Linux for my task, So, I have not tried Natty.

LaunchPad_Link_Natty

Check the link, It may be useful.

0 Kudos
Reply

3,847 Views
patrickimmling
Contributor I

In the freescale forum, I had downloaded the linux sources from and I guess it is a karmic from http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX51_SW. It has been quite long so I might be wrong.

Have u tried the Linaro Natty?

Krishna Pavan said:

Hi patrick immling,

Can you please tell me, If it was mentioned that, it was Karmic on Freescale Site?

Linaro, will have Natty Narwhale for i.MX51.

0 Kudos
Reply

3,847 Views
KrishnaPavan
Contributor II

Hi patrick immling,

Can you please tell me, If it was mentioned that, it was Karmic on Freescale Site?

Linaro, will have Natty Narwhale for i.MX51.

0 Kudos
Reply

3,847 Views
patrickimmling
Contributor I

No. I hadn't compiled the RFS for the board. I want to download Ubuntu 11.04 for imx51. Could you tell me the location? Linaro website only has Ubuntu 11.10 and that is meant for imx53 and not imx51. On the freescale site, I found ubuntu karmic only. Please help

0 Kudos
Reply

3,847 Views
KrishnaPavan
Contributor II

So, Can you get into the rootfs now? after passing through Kernel?

0 Kudos
Reply

3,847 Views
patrickimmling
Contributor I

Thanks a ton Krishna Pavan! I had just noticed my DIP switches and the switch 6 was ON all this while when I was trying from the bottom slot!!1 Now my system boots!!!  :) :)

0 Kudos
Reply

3,847 Views
KrishnaPavan
Contributor II

Hi,

I have used bottom slot, because, I have set my environment as that.

0 Kudos
Reply

3,847 Views
patrickimmling
Contributor I

Oh btw a very silly question. I boot my SDcard from the top slot of the imx51board....

Is this correct or should I boot from the slot below? Well, when I tried it, the board dint boot at all..

0 Kudos
Reply

3,847 Views
KrishnaPavan
Contributor II

Hi,

bootcmd=fatload mmc 0:1 0x90800000 uImage; bootm 0x90800000

Check the usage of fatload in the help when you enter u-boot, i mean @ MX51EVK U-Boot.

0 Kudos
Reply

3,847 Views
patrickimmling
Contributor I

Hi,

Now I get the following error. Atleast MMC : no card present error is not there.

Please help.

MX51EVK U-Boot > printenv
baudrate=115200
bootargs=console=ttymxc0,115200 console=tty0 root=/dev/mmcblk0p2 rootwait ro rootfstype=ext4 mxcdi1fb:1280x720M@60
bootcmd=fatload mmc 0:1 0x90800000 uImage; bootm 0x90800000
bootdelay=3
bootscript=echo Running bootscript from mmc ...; source
ethact=FEC
loadaddr=0x90800000
loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}
mmcargs=setenv bootargs console=ttymxc0,${baudrate} root=${mmcroot} rootfstype=${mmcrootfstype}
mmcboot=echo Booting from mmc ...; run mmcargs; bootm
mmcdev=0
mmcpart=1
mmcroot=/dev/mmcblk0p3 rw
mmcrootfstype=ext3 rootwait
netargs=setenv bootargs console=ttymxc0,${baudrate} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
netboot=echo Booting from net ...; run netargs; dhcp ${uimage}; bootm
script=boot.scr
stderr=serial
stdin=serial
stdout=serial
uimage=uImage

Environment size: 948/8188 bytes
MX51EVK U-Boot > boot
MMC: block number 0x1 exceeds max(0x0)
** Can't read from device 0 **

** Unable to use mmc 0:1 for fatload **
Wrong Image Format for bootm command
ERROR: can't get kernel image!

0 Kudos
Reply

3,847 Views
KrishnaPavan
Contributor II

That will not make any difference.

What I would tell is that, RootFS is the only thing, that you should be concerned about.

So, I think you can go with the above steps.

Also 2.6.38 is a recent kernel, which is not upstream.

0 Kudos
Reply

3,847 Views
patrickimmling
Contributor I

Yes, the issue is I have the board and I want to use a newer uboot and kernel for the imx51 board. I systematically followed the website link you mentioned.(which was by the way what I had been following from the beginning). The issue came up when my git connection failed to work. I managed to download and compile the uboot(the exact version that is mentioned here). However I am unable to get the imx-kernel sources. The freescale working binary uses an older kernel and it does not have the imx51_defconfig. I need a version like say 2.6.38 which supports it. Since my git doesn't work any idea where/how else can I get this imx kernel??

Krishna Pavan said:

You need bootloader & kernel Image that are available in the package. Isn't it?

0 Kudos
Reply

3,847 Views
KrishnaPavan
Contributor II
0 Kudos
Reply

3,847 Views
KrishnaPavan
Contributor II

You need bootloader & kernel Image that are available in the package. Isn't it?

0 Kudos
Reply

3,847 Views
patrickimmling
Contributor I

Hi krishna Pavan, thanks for the link. The only problem with those sources is, there is no config for mx5_defconfig defined :( Do you have link to newer sources

0 Kudos
Reply

3,847 Views
patrickimmling
Contributor I

This is what I get:

git clone http://opensource.freescale.com/pub/scm/imx/linux-2.6-imx.git
Cloning into linux-2.6-imx...
error: Failed connect to opensource.freescale.com:8080; Connection timed out while accessing http://opensource.freescale.com/pub/scm/imx/linux-2.6-imx.git/info/refs

fatal: HTTP request failed

0 Kudos
Reply

3,847 Views
KrishnaPavan
Contributor II

Here, you have a working binary LINUX for i.MX51EVK from Freescale.

Requires_Register_to_Access_in_Freescale_Linux_Binary_Demo

Regards :: Krishna Pavan

0 Kudos
Reply

3,847 Views
patrickimmling
Contributor I

Could you be more elaborate. I am actully just following http://eewiki.net/display/linuxonarm/i.MX51+EVK to get our own desired rootFS running. The only issue I have is to connect via git. I do not know where to download the imx51 supported Kernel and BSP from. The link suggests:

git clone git://github.com/RobertCNelson/imx-devel.git
cd imx-devel
git checkout origin/imx-bsp -b imx-bsp
But I have problems getting the Git to work. So Which kernel sources should I download?
0 Kudos
Reply

3,847 Views
KrishnaPavan
Contributor II

Hi,

I think, SW Configuration has to be done, if you are on EVK.

0 Kudos
Reply

3,847 Views
patrickimmling
Contributor I

What does this mean?

0 Kudos
Reply