majh

i.MX28 problems with initramfs larger than around 16MB in updater environment.

Discussion created by majh on Aug 11, 2013
Latest reply on May 12, 2014 by oskiercz

Hi All,

 

I'm having some strange problems when trying to run some i.MX28 based hardware with an initramfs which ends up being bigger than around 16MB. Below this size, it works fine.

I'm running in the same type of environment as the 'updater' runs with with the EVK, basically I have added some extra binaries etc to the updater initramfs, and running it via the manufacture tool.

I either load the initramfs into the kernel via "CONFIG_INITRAMFS_SOURCE", or I load it seperatly via the the '.bd' file with

 

--- updater.bd

..

load initramfs > 0x40800000;

..

---

 

What seems to happen is that when the initramfs grows over around 16MB, the kernel goes through initialisation, but at some point it begins to crawl along very very slowly.

It eventually mounts root, but it looks like most of the system is corrupted.

 

over 16MB

------

    2.740000] Freeing initrd memory: 16384K

[    2.760000] Bus freq driver module loaded

[    3.500000] mxs_cpu_init: cpufreq init finished

[    3.800000] audit: initializing netlink socket (disabled)

[    3.800000] type=2000 audit(3.790:1): initialized

///NOTE BIG JUMP IN TIME HERE

[   10.870000] squashfs: version 4.0 (2009/01/31) Phillip Lougher

[   11.220000] JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.

[   11.770000] msgmni has been set to 243

[   13.430000] alg: No test for stdrng (krng)

[   13.790000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)

------

 

 

under 16MB

----

   2.530000] Freeing initrd memory: 16384K

[    2.540000] Bus freq driver module loaded

[    2.710000] mxs_cpu_init: cpufreq init finished

[    2.760000] audit: initializing netlink socket (disabled)

[    2.760000] type=2000 audit(2.750:1): initialized

[    3.200000] squashfs: version 4.0 (2009/01/31) Phillip Lougher

[    3.240000] JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.

[    3.260000] msgmni has been set to 243

[    3.290000] alg: No test for stdrng (krng)

[    3.300000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)

[    3.310000] io scheduler noop registered (default)

---

 

Nothing seems to crash, but in the larger filesystem somehting is going wrong somewhere which is making it incredibly slow.

In the bootlet code I modify the  'setup_initrd_tag' function where

 

static void setup_initrd_tag(void)

{

        params->hdr.tag = ATAG_INITRD2 ;

        params->hdr.size = tag_size(tag_initrd);

        params->u.initrd.start = 0x40800000; // change this as well

        params->u.initrd.size =  0x00200000 // change this to various differnet sizes

        params = tag_next(params);

}

 

 

I expected that I needed to increase the 'size' value, however it doesn't seem to help things.

 

I'm running off a linux-2.6.35 base kernel.

 

I think i'm missing somehting here, but not sure what it is.

Does anyone have any suggestions for what I need to do to cater for a large initramfs ?

 

Thanks.

Outcomes