Compiling Linux Kernel

Marc
Hi All,

I compile a 'Linux Kerenl' for Mini2440 and flash it on the NAND (1GBi)
When i try to boot the Board, i get this error ...

VFS: Cannot open root device "mtdblock3" or unknown block (31,3)
Please append a correct "root=" boot option
...
Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(31,3)

Any idea ?

Regards,
Dorcell

davef
I guess nothing in the 9 pages of hits on mtdblock3 helped.

So, which kernel did you compile? Which bootloader are you trying to use? 
And how are you trying the flash the NAND? (TFTP, NFS, DNW, SDcard) 

I am guessing you are trying to use an SD card. But, ?

Marc
Thanks

The 'Linux Kernel' that i compile is Linux-2.6.32.2 version
The Bootloader i use is u-boot-128M (u-boot_2010-07-01) and 
i use DNW to flash the NAND

Regards

davef
I think there is a chance you have the wrong mix of tools.

What format is your kernel image in?

What type of root filesystem do you have?

What type of files can DNW load into flash?

Maybe, this will help to get the process correct:

http://narnia.cs.ttu.edu/drupal/node/131

davef
. . . although last time I looked the required files were not available.

Marc
Thanks,

I use the u-boot.bin from the folder friendlyarm2440-package
I get this error:
NAND: nand_scan():Cannot allocate oob_buf
0MiB

When i use the u-boot-256.bin from the folder u-boot_20100701.zip,
it boot correctly. But, when i write kernel and root from the folder
friendlyarm2440-package following the link http://narnia.cs.ttu.edu/
Iget this error:
** No boot device ** 
Wrong Image Format for bootm command
ERROR : can't get kernel image!

Regards

davef
> What format is your kernel image in? (the folder
friendlyarm2440-package)

zImage or uImage?

> What type of root filesystem do you have? (the folder
friendlyarm2440-package)

.yaffs2 or .jffs2?

Better just confirm how much RAM and flash your mini2440 has.

Marc
Thanks

I use uImage (kernel) and gpe-image-micro2440.jffs2 (root filesystem)
My board is the Mini2440 with 64MB SDRAM and 1GiB NAND Flash and 2MB NOR
Flash.

I also have done a test with uImage_T35 (kernel) and target_fs.yaffs (root
filesystem), but i can't load the root file system because its size is 59MB
and maybe the RAM can't support this size.

I'm until now trying to do test with existing kernel and root filesystem
and my goal is to compile my own kernel and root filesystem

Regards

davef
N.B. the u-boot.bin included with that GPE system only works on 64M
machines.

There are lots of threads regarding issues with u-boot and 1G machines.

Sorry, can't help as all I have (and need) are 64M machines.

There should be some history at:

http://billforums.station51.net/

Marc
Thanks

I have also a Micro2440 board with 128MiB NAND Flash
I have used u-boot-128M.bin downloaded from Friendly ARM

And i have used uImage and gpe-image-micro2440.jffs2 from
lab.kernelconcepts.de and i have same problems.

Any idea?
Regards

davef
Searching on Google (and on this site) for:

Cannot allocate oob_buf

brings up a lot of past history.

Can you load the kernel and Qtopia root filesystem off the downloads page
and get them to work?

Marc
Thanks

Yes i load Bootloader : Supervivi-128, Kernel : zImage_T35 and Root
filesystem : Root_qtopia-128M.img and i get the board work

But, what i need to know is the procedure for building a Kernel and
building a root filesystem compatible with this kernel and load them to
flash NAND using the adequate u-boot

I have two boards 

Mini2440 64MiB SDRAM, 1GiB NAND Flash and 2MiB NOR Flash
Micro240 64MiB SDRAM, 128MiB NAND Flash and 2MiB NOR Flash
and only one 3"5 LCD

Can you help me?
Regards

davef
But, what i need to know is the procedure for building a Kernel and
building a root filesystem compatible with this kernel and load them to
flash NAND using the adequate u-boot

Think what you mean is:

But, what I need to know is the procedure for building a compatible Kernel
and root filesystem and load them to flash NAND using the appropriate
u-boot.

I have to ask - is this a learning exercise?  In my experience it was quite
a long and painful one.  At least you appear to recognise that the kernel
and root filesystem should be made with the same toolchain, that took along
time to sink into my brain. Your word "compatible".

If you are learning Linux embedded systems I would strongly suggest that
you become familiar with the Pengutronix mini2440 BSP then you can decide
to dig in deeper by doing things yourself.

There is an out-of-date tutorial on the Linux page here that was the result
of my early attempts to understand something about the process.

Main point use one toolchain for everything.  Don't use files of unknown
origin, build everything yourself.

Andre
I made this videos to help in cases like this

http://www.youtube.com/watch?v=OzrxEIAHdxo&feature=plcp


this is a guide to compile the kernel.


for the root filesystem I will do in the future,

Marc
Thanks, Andre

I follow the guide and compile the kernel.
Now, how can i load this kernel? and with witch root filesystem?

Regards

Andre
in my channel there is a video guide for that too :)


http://www.youtube.com/watch?v=WrrtUEo5x8k&feature=plcp

Marc
Thanks, Andre

When i use Supervivi, Kernel and Qtopia from the website FriendlyARM
Downloads, it works correctly. But when i compile the kernel and use the
compiled kernel 'zImage' instead of 'zImage_T35' from the website, it
does'nt work.

I get this error:
load image of linux ...Uncompressing Linux... 
bad gzip magic numbers
--System halted

Regards

Andre
Hi Mark what size is your kernel? it should be around 2.2mb, if is way
bigger than that you forgetting to configure for mini2440 before you
compiler the kernel you should do this 
cp config_mini2440_t35 .config

if you follow all this instructions in the video it should not be any
problems.

Marc
Thanks, Andre

I can compile the Linux 2.6.29 and load it.
But, when i try to compile a newer version it dosen't work and it gives the
error above.

Regards

Andre
aaah,, you never mention that, you would have to do some research then ,
cause if you are using the kernel 3.3.6, it would not work, you would need
to patch that kernel with mini2440 code, if you downloaded from kernel.org,
you missing a lot of drivers, 
I have not done it yet,

Marc
Thanks, Andre

I speak also about version 2.6.32 in the Downloads
I have the same problems with these versions

Regards

harsha
hi guys..
am using u-boot-1.3.3 to boot my mcf5475 controller and my board is booting
but it hangs while mounting rootfs i.e jffs2 file system.
my kernel version is linux-2.6.25.
nor flash size is 64Mib, can any one give solution for this....

davef
Had to Google <mcf5475> Wouldn't you have more success posting on this
forum:

http://freescale.lithium.com/t5/68K-ColdFire-reg-Microprocessors/Help-wi...

as an example.  Or does nobody there know what u-boot is?