febrirakheri92 / yaffs2utils

Automatically exported from code.google.com/p/yaffs2utils
GNU General Public License v2.0
0 stars 0 forks source link

NAND Yaffs2 not mounting and booting succesfully on target MIPS #36

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. "mkyaffs2 " with -e [Rootfs Dir name] [Image Name]

  Note : 2k pages and spare size is 64 , this is the default for the 
  mkyaffs2  tool.

2. Flash them in NAND partion [/dev/mtdblockN] using nand erase 
   and nand write through uboot

3.try to boot the kernel by seeting the  U-Boot environment varibale 

bootargs = .. rootfstype=yaffs2 .. root=/dev/mtdblockN ...

What is the expected output? What do you see instead?

Succesful booting and getting "login" prompt is expected after mounting. But 
even mounting is also not done successfully.

What version of the product are you using? On what operating system?

Latest tool.

OS : Ubuntu SMP x86_64 Linux

Please provide any additional information below.
I am using 128 MB NAND, 2k pages and spare size is 64

1. Generelly we used to pass "dev" information file for the device node 
information with -dev kind of option. Is the reason to get the error

2. I tried to modify the nand_ecclayout also "nand_oob_64" according to my NAND 
ecc layout 
.oobfree        = {{.offset = 4, .length = 60}},

but  the image  is broken.

Attcahed the Mount error and addtional erros logs

Original issue reported on code.google.com by subratag...@gmail.com on 22 Sep 2012 at 11:40

Attachments:

GoogleCodeExporter commented 9 years ago
Dear:

Would you please double check & provide me:

1. Erase the full partition before writing YAFFS2 image?
2. Log with the default/modified NAND ecc layout?
3. Kernel option of YAFFS2?
4. With/Without MTD supports? 
5. ECC layout?
6. Try enabling the YAFFS debug for more information?

Original comment by penguin.lin on 24 Sep 2012 at 2:36

GoogleCodeExporter commented 9 years ago
Sorry to mention the answers of  your Questions in the last
mail embedded below.

On Tue, Sep 25, 2012 at 6:29 PM, Subrata Ghosh
<subrataghosh.2005@gmail.com>wrote:

Original comment by subratag...@gmail.com on 25 Sep 2012 at 1:01

GoogleCodeExporter commented 9 years ago
Dear:

The mail was not attached.
Would you please send it to me directly?

Thanks a lot.

Original comment by penguin.lin on 26 Sep 2012 at 6:32

GoogleCodeExporter commented 9 years ago

Would you please double check & provide me:

1. Erase the full partition before writing YAFFS2 image?

         Done.

2. Log with the default/modified NAND ecc layout?
3. Kernel option of YAFFS2?

       CONFIG_YAFFS_FS=y, CONFIG_YAFFS_YAFFS2=y

4. With/Without MTD supports?

 Yes with MTD.

5. ECC layout?

static nand_ecclayout_t nand_oob_64 = {
        .eccbytes       = 24,
        .eccpos         = {40, 41, 42, 43, 44, 45, 46, 47,
                           48, 49, 50, 51, 52, 53, 54, 55,
                           56, 57, 58, 59, 60, 61, 62, 63},
        .oobfree        = {{.offset = 2, .length = 38}},
}; 
6. Try enabling the YAFFS debug for more information?
   Enabled all the traces  

yaffs_traceMask = ~0;

-- 
Thanks for the help. I tried with two mkyaffs2 tool ( the latet in 
yaffs2utils@googlecode.com) and also mkyaffs2image . But I am not sure how 
yffs2 recived the device nodes file we do not have any option to pass this in 
the command line of "mkyaffs2" tool !!!!

Please find the logs from the ttachment. It contains the log of my run (uboot 
image  flash etc...) and the booting. 

If you  please let me know why the image is getting chunk errors , I cheked the 
image flashed properly ( as i check through nand dump in uboot and hexdump -C 
from host  and comparing that)

Your help would be greatly appriciate. Unable found "Init", yaffs_lookup 
failure.

Regards,
Subrata

Original comment by subratag...@gmail.com on 26 Sep 2012 at 6:55

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,
What is the mail id to sent directly. again I posed entire content in
the yaffs2utils website.

Original comment by subratag...@gmail.com on 26 Sep 2012 at 6:57

GoogleCodeExporter commented 9 years ago
Dear:

I still have some question.

1. For the log "subrata_kernel_yaffs2_part_9_NewImage.log", is the image 
created by official mkyaffs2image, or the mkyaffs2 in yaffs2utils?

2. What is the condition of the log "Yaffs2_report_issue.txt ", under default 
ecc layout, or the modified ecc layout?

Since your NAND flash layout is the default setting, there is no necessary to 
modify the ecc layout! 

The kernel panic "No init found" is the failure during the Linux booting, and 
it is not the issues of the YAFFS2/mkyaffs2image/mkyaffs2. It means kernel 
cannot find the "init" when preparing switching into the user-space. You have 
to find out whether the "init" is existed in your rootfs, or the init parameter 
in your bootarg of bootloader.

For the device node creation. The mkyaffs2image/mkyaffs2 is the tool to pack up 
all the files into the YAFFS2 image only. During creating the booting YAFFS2 
image, you have to create all the device node in your rootfs directory first, 
and use mkyaffs2image/mkyaffs2 to create the rootfs image (by root, or fakeroot 
environment).

Original comment by penguin.lin on 26 Sep 2012 at 7:30

GoogleCodeExporter commented 9 years ago
Please find the attached log for mkyaffs2 utilty.

1. Actually my ecc_layout is 

static nand_ecclayout_t nand_oob_64 = {
        .eccbytes       = 24,
        .eccpos         = {20, 21, ...... ..... 62, 63},
        .oobfree        = {{.offset = 4, .length = 16}},
};

When I use this layout image is  getting broken. probably because of the 
expected size is much more  than 16 bytes oobfree area. Any idea how to 
customize my  lay out for image creation.

2. I am using the mkyaffs2  also tried with the official mkyaffs2image. I got 
the same result - No inti found

My rootfs folder has init (/sbin/init is there)

folders are :bin  dev  etc  lib  linuxrc  lost+found  proc  root  sbin  tmp  
usr  var

But inside the /sbin a init is a symbolic link init -> ../bin/busybox*

also pass init=/sbin/init in the uboot bootargs.

I think ecc layout is properly customized- Why Yaffs2 not able to find init 
inside the image ? yaffs_lookup failure in the log - Chunk errors are there 
also ?

Any idea or comments will help me.

Original comment by subratag...@gmail.com on 26 Sep 2012 at 12:04

Attachments:

GoogleCodeExporter commented 9 years ago
Dear,

Your ecc layout must be as same as the one in the MTD subsystem.
I think your ecc_layout may be incorrect, since the eccbytes and eccpos were 
mismatch.

In my opinion, I do not think the problem "No init found" is the issue of 
mkyaffs2image/mkyaffs2/YAFFS2.
The YAFFS2 partition was already be mounted before "No init found". It is the 
failure during the Linux booting.

I suggest you to extract your rootfs image to find the root cause:
1. Double check whether the init is existed in your rootfs image, and
2. Double check all the device nodes were created successfully.

Original comment by penguin.lin on 27 Sep 2012 at 5:52