Creating root file system YAFFS2

Beer
Hey!

I am trying to build my first root file system for my mini2440-64MB board.
It is giving me a headache for past few days.

Here is what I've done so far
1. Compiled kernel 2.6.32.2 using arm-linux-gcc 4.3.2 (and also 4.4.1) 
   It seems all goes well.

2. after compiling rootFS I get this structure
   bin
   linuxrc -> bin/busybox
   sbin
   usr

   execute chmod command on bin/busybox
   run mkyaffs2image --> gives me myrootfs.img

   in DNW select option [y] and transfer myrootfs.img
   then select [b] to boot the system.

linux_cmd_line parameter is set to:
"noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0"

Here is what I get (no changes made):
--------------------------------------------------------------
s3c2410-rtc s3c2410-rtc: setting system clock to 2006-04-03 19:46:09 UTC
(1144093569)
yaffs: dev is 32505859 name is "mtdblock3"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.3, "mtdblock3"
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:3.
Freeing init memory: 156K
Warning: unable to open an initial console.
request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c
--------------------------------------------------------------

If I execute 
  make CROSS_COMPILE=arm-linux- ARCH=arm 
I get the following error:

--------------------------------------------
s3c2410-rtc s3c2410-rtc: setting system clock to 2006-04-03 19:27:42 UTC
(1144092462)
yaffs: dev is 32505859 name is "mtdblock3"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.3, "mtdblock3"
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:3.
Freeing init memory: 156K
Warning: unable to open an initial console.
Failed to execute /linuxrc.  Attempting defaults...
Kernel panic - not syncing: No init found.  Try passing init= option to
kernel.
Backtrace: 
[<c00341cc>] (dump_backtrace+0x0/0x10c) from [<c03297d0>]
(dump_stack+0x18/0x1c)
 r7:00000000 r6:00000000 r5:c001f180 r4:c0481b10
[<c03297b8>] (dump_stack+0x0/0x1c) from [<c0329820>] (panic+0x4c/0x114)
[<c03297d4>] (panic+0x0/0x114) from [<c002f598>] (init_post+0xa8/0x10c)
 r3:00000000 r2:c394d000 r1:c394d100 r0:c03dae0c
[<c002f4f0>] (init_post+0x0/0x10c) from [<c00084b4>]
(kernel_init+0xe4/0x114)
 r5:c001f180 r4:c04812a0
[<c00083d0>] (kernel_init+0x0/0x114) from [<c004bbbc>] (do_exit+0x0/0x620)
 r5:00000000 r4:00000000
--------------------------------------------



I tried to extract root_qtopia from DVD and run mkyaffs2image on the
extracted folder --> again I got myrootfs.img

BUT THIS ONE WORKS FINE !!!

So I asume my kernel is OK.


There are a lot of tutorials online showing how to build rootfs.
I am pretty sure I've followed all of them (not all, but you know what I
mean). I even put some answers from china forums throug google translation
system. 

However. No matter what I do, I could not make my rootfs to boot.

Any suggestions, links, tricks,... are very appreciated.

Beer

Beer
To be more exact.
All those printouts above I get during BOOT not when I execute make.

Juergen Beisert
> Warning: unable to open an initial console.

Your "dev/" in your root filesystem seems empty (maybe).

Same with the:

> No init found

message. Did you mount the correct partition as the root filesystem?

Topper Harley
Try "noinitrd root=/dev/mtdblock3 init=/bin/sh console=ttySAC0"

miniarm
@Topper

tried changing parameter with /bin/sh, /sbin/init, but no luck, getting
Failed to execute /bin/sh.  Attempting defaults...

I am trying to load kernel 2.6.39 with yaffs as file system, below is
kernel log.
....
...
NET: Registered protocol family 17
s3c-rtc s3c2410-rtc: setting system clock to 2000-01-06 21:03:48 UTC
(947192628)
yaffs: dev is 32505859 name is "mtdblock3" rw
yaffs: passed flags ""
yaffs: yaffs: Attempting MTD mount of 31.3,"mtdblock3"
yaffs: auto selecting yaffs2
yaffs: block 8146 is bad
yaffs: block 8147 is bad
yaffs: block 8148 is bad
yaffs: block 8149 is bad
yaffs: yaffs_read_super: is_checkpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:3.
devtmpfs: mounted
Freeing init memory: 100K
Failed to execute /bin/sh.  Attempting defaults...
Kernel panic - not syncing: No init found.  Try passing init= option to
kernel. See Linux Documentation/init.txt for guidance.
Function entered at [<c0025ff8>] from [<c020a90c>]
Function entered at [<c020a90c>] from [<c020a1a0>]
Function entered at [<c020a1a0>] from [<c00089cc>]
Function entered at [<c00089cc>] from [<c0022724>]


plz help .

miniarm
If any solution, please let me know. what could be the wrong?

I've tried copying working .config file of original linux (that comes with
board), but no luck.

Please Help !!

eduardo
Why don't you just change the rootfs (zImage) available on download pages?
http://www.friendlyarm.net/downloads

You can use the "unyaffs" utility.
ex:
mkdir mycustomrootfs
unyaffs ./zImages-2011-04-21.img ./mycustomrootfs

obs: do this on a linux partition (formatted ext2, ext3,...)

Now you can now cd to ./mycustomrootfs and change anything you want.

run mkyaffs2image again and good luck. :D

Hope this helps.

V.Balaji
Hi,

Iam using smdk6410 arm11 board.Iam not able to load the yaffs2 image on to
the samsung 2k page,1Gb nand flash from uboot prompt by nand write.yaffs.
Iam having uboot-1.1.6 version and kernel 2.6 version.Can i get latest
package of uboot and kernel for smdk6410 board.Please suggest me.

Regards

v.Balaji