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

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

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

844 Views
majh
Contributor I

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.

1 Reply

471 Views
oskiercz
Contributor I

Hi majh,

I've been struggling with similar problem as yours, maybe even exactly the same. If I have initramfs combined with kernel image system is no starting properly. Kernel is trying to start but it gets slower and slower and before init process starts, OOM killer kills some processes (threads) and of course system hangs (output attached).

Using initramfs as a separate image doesn't change anything, seems that if initramfs is bigger than X MB (16MB?) something wrong is happening (some memory region that shouldn't be touched is overwritten?).

Changing size in linux_prep/core/setup.c and in linux_ivt/bd, updater_ivt.bd alos doesn't help because I don't use SB files, I need to have kernel and initramfs in one file.

My question is: did you manage to solve this problem? Does anybody have a solution? What has to be changed to increse available amount of memory for initramfs?

Best regards

0 Kudos