[NUC970/N9H30] YAFFS2 rootfs

Post Reply
pseudonym
Posts: 7
Joined: 25 Mar 2020, 08:31

25 Mar 2020, 14:27

Q: I am trying to boot board from NAND flash. So i modified u-boot environment variable file i.e. env.txt. I compiled the kernel with "yaffs2" support and disabled "Initial Ram file system" configuration. The kernel crashes with error. Attached env.txt and log file.
env.txt:

Code: Select all

baudrate=115200 
bootargs=root=/dev/mtdblock2 console=ttyS0,115200n8 rdinit=/sbin/init mem=64M mtdparts=nand0:0x200000@0x0(u-boot),0x1400000@0x200000(kernel),-(user) 
bootcmd=nboot 0x7fc0 0 0x200000;bootm 0x7fc0 
bootdelay=3 
ethact=emac 
ethaddr=00:00:00:11:66:88 
iaddress=172.16.1.81 
stderr=serial 
stdin=serial 
stdout=serial 
console output:
Console output:

Code: Select all

<snip...>
nuc970 mtd nand driver version: 20160331
NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit), 128MiB, page size: 2048, OOB size: 64
SYSTEM: USE     BCH_T4 HWECC algorithm(SMRA     size: 64, Parity number:32 bytes)
EXECUTE: USE BCH_T4     HWECC algorithm(SMRA size: 64, Parity number:32 bytes)
USE     BCH_T4 HWECC algorithm(Parity number:32 bytes)
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
Creating 3 MTD partitions on "nand0":
0x000000000000-0x000000200000 : "u-boot"
0x000000200000-0x000001600000 : "Kernel"
0x000001600000-0x000008000000 : "user"
fmi-sm: registered successfully! mtdid=nand0
<snip...>
yaffs: dev is 32505858 name is "mtdblock2" rw
yaffs: passed flags ""
VFS: Mounted root (yaffs filesystem) on device 31:2.
devtmpfs: error mounting -2
Freeing unused kernel memory: 112K (c036c000 - c0388000)
Kernel panic - not syncing: No init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
CPU: 0 PID: 1 Comm: swapper Not tainted 3.10.107 #7
<snip...>
A: Please make sure yaffs2 rootgs partition is correctly generate with inband-tags option and program to NAND flash with NuWriter. And refer to the Linux BSP user manual for the bootargs to mount yaffs partition as rootfs.

Code: Select all

noinitrd root=/dev/mtdblock2 rootfstype=yaffs2 rootflags=inband-tags console=ttyS0, 115200n8 rdinit=/sbin/init mem=64M

pseudonym
Posts: 7
Joined: 25 Mar 2020, 08:31

26 Mar 2020, 16:22

Q: As you told i had made yaffs2 root file system with inband-tags as below
<snip...>
but still i am facing same problem. as below ...

Code: Select all

yaffs: dev is 32505858 name is "mtdblock2" rw
yaffs: passed flags ""
VFS: Mounted root (yaffs filesystem) on device 31:2.
devtmpfs: error mounting -2
Freeing unused kernel memory: 112K (c0363000 - c037f000)
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.
CPU: 0 PID: 1 Comm: swapper Not tainted 3.10.107 #6
Backtrace: 
[<c0011f40>] (dump_backtrace+0x0/0x10c) from [<c0012154>] (show_stack+0x18/0x1c)
 r6:00000000 r5:c03897a8 r4:c031ce6c r3:00000000
[<c001213c>] (show_stack+0x0/0x1c) from [<c02aeb40>] (dump_stack+0x20/0x28)
[<c02aeb20>] (dump_stack+0x0/0x28) from [<c02ac7d8>] (panic+0xa4/0x1fc)
[<c02ac734>] (panic+0x0/0x1fc) from [<c02ac254>] (kernel_init+0x130/0x158)
 r3:00000000 r2:00000001 r1:000002e2 r0:c031ce6c
 r7:00000000
[<c02ac124>] (kernel_init+0x0/0x158) from [<c000ecf8>] (ret_from_fork+0x14/0x3c)
 r5:c02ac124 r4:00000000
A: Please make sure you pass the rootflags=inband-tags mount option as described in previous port. yaffs will report the mount option flag if the option is correctly set.

Code: Select all

yaffs: dev is 32505858 name is "mtdblock2" rw
yaffs: passed flags "inband-tags"

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest