Modify

Opened 6 years ago

Closed 5 years ago

Last modified 4 years ago

#10272 closed defect (fixed)

rb493g nand problem

Reported by: honza@… Owned by: jogo
Priority: normal Milestone: Barrier Breaker 14.07
Component: base system Version: Trunk
Keywords: nand, 493g Cc:

Description

Hello,
I compiled revision r28546, I installed openwrt to nand succesfully.

But, when I rebooted the device, everything what was saved do nand dissapear and system gone to state after installation on nand. Please help to solve this problem.

Attachments (1)

493g-nand.JPG (405.2 KB) - added by honza@… 6 years ago.
493g NAND chipset

Download all attachments as: .zip

Change History (19)

comment:1 Changed 6 years ago by jogo

  • Owner changed from developers to jogo
  • Status changed from new to accepted

How did you install OpenWrt on the RB493G? Also please post the bootlog (dmesg) as well as the output of mount.

comment:2 Changed 6 years ago by honza@…

I installed OpenWrt via wget2nand.

There is my dmesg:

 , boardp=dddfdfdf, parts=fef7fffc
bootconsole [early0] enabled
CPU revision is: 00019374 (MIPS 24Kc)
SoC: Atheros AR7161 rev 2
Clocks: CPU:680.000MHz, DDR:340.000MHz, AHB:170.000MHz, Ref:40.000MHz
Determined physical RAM map:                                   TY) (c) 2001-2006                                                                              memory: 10000000 @ 00000000 (usable)
User-defined physical RAM map:                                                                                                                                memory: 10000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x00000000 -> 0x00010000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00010000
On node 0 totalpages: 65536
free_area_init_node: node 0, pgdat 802dc380, node_mem_map 81000000
  Normal zone: 512 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 65024 pages, LIFO batch:15
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
Kernel command line:  console=ttyS0,115200 gpio=4031 HZ=340000000 mem=256M kmac=00:0C:42:A8:F6:16 board=493G boot=1 mlc=2 rootfstype=squashfs,yaffs,jffs2 noi
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)                                                                                                Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes                                                                                       Writing ErrCtl register=00000400
Readback ErrCtl register=00000400
Memory: 256636k/262144k available (2120k kernel code, 5508k reserved, 425k data, 180k init, 0k highmem)
SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:80
Calibrating delay loop... 452.19 BogoMIPS (lpj=2260992)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
NET: Registered protocol family 16
MIPS: machine is MikroTik RouterBOARD 493G
registering PCI controller with io_map_base unset
bio: create slab <bio-0> at 0
pci 0000:00:00.0: [0700:1107] type 0 class 0x000000
pci 0000:00:00.0: reg 10: [mem 0x00000000-0x0fffffff pref]
pci 0000:00:00.0: reg 14: [io  0x0000-0x00ff]
pci 0000:00:00.0: supports D1 D2
pci 0000:00:00.0: supports D1 D2
pci 0000:00:00.0: PME# supported from D0 D1 D2 D3hot
pci 0000:00:00.0: PME# disabled
Switching to clocksource MIPS
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes) TY) (c) 2001-2006                                                                             TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)                                                                                                    TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
PCI: CLS 0 bytes, default 32
squashfs: version 4.0 (2009/01/31) Phillip Lougher
JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
yaffs built Oct 24 2011 07:47:58 Installing.




YAFFS-WARNING CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED selected.



msgmni has been set to 501
io scheduler noop registered                                                                                                                                 io scheduler deadline registered (default)
Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled                                                                                                     serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
console [ttyS0] enabled, bootconsole disabled
Atheros AR71xx SPI Controller driver version 0.2.4
m25p80 spi0.0: pm25lv512 (64 Kbytes)
spi0.0: searching for MyLoader partition table at offset 0x10000
Searching for RedBoot partition table in spi0.0 at offset 0xe000
Searching for RedBoot partition table in spi0.0 at offset 0xf000
No RedBoot partition table detected in spi0.0
Creating 4 MTD partitions on "spi0.0":
0x000000000000-0x00000000b000 : "routerboot"
0x00000000b000-0x00000000c000 : "hard_config"
0x00000000d000-0x00000000f000 : "bios"
0x00000000f000-0x000000010000 : "soft_config"
NAND flash driver for RouterBoard 4xx series version 0.2.0
ONFI flash detected
ONFI param page 0 valid
NAND device: Manufacturer ID: 0x20, Chip ID: 0xf1 (ST Micro NAND01GW3B2CN6)
Scanning device for bad blocks
Bad eraseblock 2 at 0x000000040000
Bad eraseblock 3 at 0x000000060000
Bad eraseblock 4 at 0x000000080000
Bad eraseblock 5 at 0x0000000a0000                                         -2006                                                                             Bad eraseblock 6 at 0x0000000c0000
Bad eraseblock 7 at 0x0000000e0000                                                                                                                           Bad eraseblock 8 at 0x000000100000
Bad eraseblock 9 at 0x000000120000
Bad eraseblock 10 at 0x000000140000
Bad eraseblock 11 at 0x000000160000
Bad eraseblock 12 at 0x000000180000
Bad eraseblock 13 at 0x0000001a0000
Bad eraseblock 14 at 0x0000001c0000
Bad eraseblock 15 at 0x0000001e0000
Bad eraseblock 16 at 0x000000200000
Bad eraseblock 17 at 0x000000220000
Bad eraseblock 18 at 0x000000240000
Bad eraseblock 19 at 0x000000260000
Bad eraseblock 20 at 0x000000280000
Bad eraseblock 21 at 0x0000002a0000
Bad eraseblock 22 at 0x0000002c0000
Bad eraseblock 23 at 0x0000002e0000
Bad eraseblock 32 at 0x000000400000
Bad eraseblock 48 at 0x000000600000
Bad eraseblock 49 at 0x000000620000                                                                                                                          Bad eraseblock 50 at 0x000000640000
Bad eraseblock 51 at 0x000000660000                                                                                                                          Bad eraseblock 52 at 0x000000680000
Bad eraseblock 53 at 0x0000006a0000
Bad eraseblock 54 at 0x0000006c0000
Bad eraseblock 55 at 0x0000006e0000
Bad eraseblock 56 at 0x000000700000
Bad eraseblock 57 at 0x000000720000
Bad eraseblock 58 at 0x000000740000
Bad eraseblock 59 at 0x000000760000
Bad eraseblock 60 at 0x000000780000
Bad eraseblock 61 at 0x0000007a0000
Bad eraseblock 62 at 0x0000007c0000
Bad eraseblock 63 at 0x0000007e0000
Bad eraseblock 64 at 0x000000800000
Bad eraseblock 65 at 0x000000820000
Bad eraseblock 66 at 0x000000840000
Bad eraseblock 67 at 0x000000860000
Bad eraseblock 67 at 0x000000860000
Bad eraseblock 68 at 0x000000880000
Bad eraseblock 69 at 0x0000008a0000
Bad eraseblock 70 at 0x0000008c0000
Bad eraseblock 71 at 0x0000008e0000
Bad eraseblock 72 at 0x000000900000                                        -2006                                                                             Bad eraseblock 73 at 0x000000920000
Bad eraseblock 74 at 0x000000940000                                                                                                                          Bad eraseblock 75 at 0x000000960000
Bad eraseblock 76 at 0x000000980000
Bad eraseblock 77 at 0x0000009a0000
Bad eraseblock 78 at 0x0000009c0000
Bad eraseblock 79 at 0x0000009e0000
Bad eraseblock 80 at 0x000000a00000
Bad eraseblock 81 at 0x000000a20000
Bad eraseblock 82 at 0x000000a40000
Bad eraseblock 83 at 0x000000a60000
Bad eraseblock 84 at 0x000000a80000
Bad eraseblock 85 at 0x000000aa0000
Bad eraseblock 86 at 0x000000ac0000
Bad eraseblock 87 at 0x000000ae0000
Bad eraseblock 88 at 0x000000b00000
Bad eraseblock 89 at 0x000000b20000
Bad eraseblock 90 at 0x000000b40000
Bad eraseblock 91 at 0x000000b60000
Bad eraseblock 92 at 0x000000b80000
Bad eraseblock 93 at 0x000000ba0000                                                                                                                          Bad eraseblock 94 at 0x000000bc0000
Bad eraseblock 95 at 0x000000be0000                                                                                                                          Bad eraseblock 96 at 0x000000c00000
Bad eraseblock 97 at 0x000000c20000
Bad eraseblock 98 at 0x000000c40000
Bad eraseblock 99 at 0x000000c60000
Bad eraseblock 100 at 0x000000c80000
Bad eraseblock 101 at 0x000000ca0000
Bad eraseblock 102 at 0x000000cc0000
Bad eraseblock 103 at 0x000000ce0000
Bad eraseblock 104 at 0x000000d00000
Bad eraseblock 105 at 0x000000d20000
Bad eraseblock 106 at 0x000000d40000
Bad eraseblock 107 at 0x000000d60000
Bad eraseblock 108 at 0x000000d80000
Bad eraseblock 109 at 0x000000da0000
Bad eraseblock 110 at 0x000000dc0000
Bad eraseblock 111 at 0x000000de0000
Bad eraseblock 112 at 0x000000e00000
Bad eraseblock 113 at 0x000000e20000
Bad eraseblock 114 at 0x000000e40000
Bad eraseblock 115 at 0x000000e60000
Bad eraseblock 116 at 0x000000e80000                                       -2006                                                                             Bad eraseblock 117 at 0x000000ea0000
Bad eraseblock 118 at 0x000000ec0000                                                                                                                         Bad eraseblock 119 at 0x000000ee0000
Bad eraseblock 120 at 0x000000f00000
Bad eraseblock 121 at 0x000000f20000
Bad eraseblock 122 at 0x000000f40000
Bad eraseblock 123 at 0x000000f60000
Bad eraseblock 124 at 0x000000f80000
Bad eraseblock 125 at 0x000000fa0000
Bad eraseblock 126 at 0x000000fc0000
Bad eraseblock 127 at 0x000000fe0000
Bad eraseblock 128 at 0x000001000000
Bad eraseblock 129 at 0x000001020000
Bad eraseblock 130 at 0x000001040000
Bad eraseblock 131 at 0x000001060000
Bad eraseblock 132 at 0x000001080000
Bad eraseblock 133 at 0x0000010a0000
Bad eraseblock 134 at 0x0000010c0000
Bad eraseblock 135 at 0x0000010e0000
Bad eraseblock 136 at 0x000001100000
Bad eraseblock 137 at 0x000001120000                                                                                                                         Bad eraseblock 138 at 0x000001140000
Bad eraseblock 139 at 0x000001160000                                                                                                                         Bad eraseblock 140 at 0x000001180000
Bad eraseblock 141 at 0x0000011a0000
Bad eraseblock 142 at 0x0000011c0000
Bad eraseblock 143 at 0x0000011e0000
Bad eraseblock 144 at 0x000001200000
Bad eraseblock 145 at 0x000001220000
Bad eraseblock 146 at 0x000001240000
Bad eraseblock 147 at 0x000001260000
Bad eraseblock 148 at 0x000001280000
Bad eraseblock 149 at 0x0000012a0000
Bad eraseblock 150 at 0x0000012c0000
Bad eraseblock 151 at 0x0000012e0000
Bad eraseblock 152 at 0x000001300000
Bad eraseblock 153 at 0x000001320000
Bad eraseblock 154 at 0x000001340000
Bad eraseblock 155 at 0x000001360000
Bad eraseblock 156 at 0x000001380000
Bad eraseblock 157 at 0x0000013a0000
Bad eraseblock 158 at 0x0000013c0000
Bad eraseblock 159 at 0x0000013e0000
Bad eraseblock 160 at 0x000001400000                                       -2006                                                                             Bad eraseblock 161 at 0x000001420000
Bad eraseblock 162 at 0x000001440000                                                                                                                         Bad eraseblock 163 at 0x000001460000
Bad eraseblock 164 at 0x000001480000
Bad eraseblock 165 at 0x0000014a0000
Bad eraseblock 166 at 0x0000014c0000
Bad eraseblock 167 at 0x0000014e0000
Bad eraseblock 168 at 0x000001500000
Bad eraseblock 169 at 0x000001520000
Bad eraseblock 170 at 0x000001540000
Bad eraseblock 171 at 0x000001560000
Bad eraseblock 172 at 0x000001580000
Bad eraseblock 173 at 0x0000015a0000
Bad eraseblock 174 at 0x0000015c0000
Bad eraseblock 175 at 0x0000015e0000
Bad eraseblock 176 at 0x000001600000
Bad eraseblock 177 at 0x000001620000
Bad eraseblock 178 at 0x000001640000
Bad eraseblock 179 at 0x000001660000
Bad eraseblock 180 at 0x000001680000
Bad eraseblock 181 at 0x0000016a0000                                                                                                                         Bad eraseblock 182 at 0x0000016c0000
Bad eraseblock 183 at 0x0000016e0000                                                                                                                         Bad eraseblock 184 at 0x000001700000
Bad eraseblock 185 at 0x000001720000
Bad eraseblock 186 at 0x000001740000
Bad eraseblock 257 at 0x000002020000
Bad eraseblock 311 at 0x0000026e0000
Creating 3 MTD partitions on "NAND01GW3B2CN6":
0x000000000000-0x000000040000 : "booter"
0x000000040000-0x000000600000 : "kernel"
0x000000600000-0x000008000000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
split_squashfs: no squashfs found in "NAND01GW3B2CN6"
GPIO Bitbanged MDIO: probed
ag71xx_mdio: probed
eth0: Atheros AG71xx at 0xba000000, irq 5
eth0: AR8316 switch driver attached.
ar8316: Using port 4 as switch port
eth0: connected to PHY at ffffffff:00 [uid=004dd041, driver=Atheros AR8216/AR8316]
eth1: Atheros AG71xx at 0xb9000000, irq 4
eth1: AR8316 switch driver attached.
ar8316: Using port 4 as switch port
eth1: connected to PHY at ag71xx-mdio:00 [uid=004dd041, driver=Atheros AR8216/AR8316]                                                                        Atheros AR71xx hardware watchdog driver version 0.1.0
ar71xx-wdt: timeout=15 secs (max=25)                                                                                                                         TCP westwood registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
yaffs: dev is 32505862 name is "mtdblock6" ro
yaffs: passed flags ""
yaffs: Attempting MTD mount of 31.6,"mtdblock6"
yaffs: auto selecting yaffs2
yaffs: restored from checkpoint
yaffs_read_super: is_checkpointed 1
VFS: Mounted root (yaffs filesystem) readonly on device 31:6.
Freeing unused kernel memory: 180k freed
Button Hotplug driver version 0.4.1
Registered led device: rb4xx:yellow:user
Registered led device: rb4xx:green:led1
Registered led device: rb4xx:green:led2
Registered led device: rb4xx:green:led3
Registered led device: rb4xx:green:led4
Registered led device: rb4xx:green:led5                                                                                                                      ar71xx: pll_reg 0xb8050014: 0x110000
eth0: link up (1000Mbps/Full duplex)                                                                                                                         eth0: link down
nand_erase_nand: attempt to erase a bad block at page 0x00001e80
save exit: is_checkpointed 0
save exit: is_checkpointed 0
**>> yaffs chunk 4928 was not erased
**>> yaffs chunk 4992 was not erased
**>> yaffs chunk 5056 was not erased
**>> yaffs chunk 5120 was not erased
**>> yaffs chunk 5184 was not erased
**>> yaffs chunk 5248 was not erased
**>> yaffs chunk 5312 was not erased
**>> yaffs chunk 5376 was not erased
**>> yaffs chunk 5440 was not erased
**>> yaffs chunk 5504 was not erased
**>> yaffs chunk 5568 was not erased
**>> yaffs chunk 5632 was not erased
**>> yaffs chunk 5696 was not erased
**>> yaffs chunk 5760 was not erased
**>> yaffs chunk 5824 was not erased
**>> yaffs chunk 5888 was not erased
**>> yaffs chunk 5952 was not erased                                                                                                                         **>> yaffs chunk 6016 was not erased
**>> yaffs chunk 6080 was not erased                                                                                                                         **>> yaffs chunk 6144 was not erased
**>> yaffs chunk 6208 was not erased
**>> yaffs chunk 6272 was not erased
**>> yaffs chunk 6336 was not erased
**>> yaffs chunk 6400 was not erased
**>> yaffs chunk 6464 was not erased
**>> yaffs chunk 6528 was not erased
**>> yaffs chunk 6592 was not erased
**>> yaffs chunk 6656 was not erased
**>> yaffs chunk 6720 was not erased
**>> yaffs chunk 6784 was not erased
**>> yaffs chunk 6848 was not erased
**>> yaffs chunk 6912 was not erased
**>> yaffs chunk 6976 was not erased
**>> yaffs chunk 7040 was not erased
**>> yaffs chunk 7104 was not erased
**>> yaffs chunk 7168 was not erased
**>> yaffs chunk 7232 was not erased
**>> yaffs chunk 7296 was not erased                                                                                                                         **>> yaffs chunk 7360 was not erased
**>> yaffs chunk 7424 was not erased                                                                                                                         **>> yaffs chunk 7488 was not erased
**>> yaffs chunk 7552 was not erased
**>> yaffs chunk 7616 was not erased
**>> yaffs chunk 7680 was not erased
**>> yaffs chunk 7744 was not erased
**>> yaffs chunk 7808 was not erased
**>> yaffs chunk 7872 was not erased
**>> yaffs chunk 7936 was not erased
**>> yaffs chunk 8000 was not erased
**>> yaffs chunk 8064 was not erased
**>> yaffs chunk 8128 was not erased
**>> yaffs chunk 8192 was not erased
**>> yaffs chunk 8256 was not erased
**>> yaffs chunk 8320 was not erased
**>> yaffs chunk 8384 was not erased
**>> yaffs chunk 8448 was not erased
**>> yaffs chunk 8512 was not erased
**>> yaffs chunk 8576 was not erased
**>> yaffs chunk 8640 was not erased
**>> yaffs chunk 8768 was not erased
**>> yaffs chunk 8832 was not erased                                                                                                                         **>> yaffs chunk 8896 was not erased
**>> yaffs write required 63 attempts                                                                                                                        device eth0 entered promiscuous mode
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 24
ar71xx: pll_reg 0xb8050014: 0x110000
eth0: link up (1000Mbps/Full duplex)
br-lan: port 1(eth0) entering forwarding state
br-lan: port 1(eth0) entering forwarding state
nf_conntrack version 0.5.0 (4012 buckets, 16048 max)
ar71xx: pll_reg 0xb8050010: 0x110000
eth1: link up (1000Mbps/Full duplex)
device eth1.1 entered promiscuous mode
device eth1 entered promiscuous mode
br-lan: port 2(eth1.1) entering forwarding state
br-lan: port 2(eth1.1) entering forwarding state
ath_hal: module license 'Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
ath_hal: 2009-05-08 (AR5210, AR5211, AR5212, AR5416, RF5111, RF5112, RF2413, RF5413, RF2133, RF2425, REGOPS_FUNC, XR)
ath_pci: trunk                                                                                                                                               wlan: trunk
wlan: mac acl policy registered                                                                                                                              ath_rate_minstrel: Minstrel automatic rate control algorithm 1.2 (trunk)
ath_rate_minstrel: look around rate set to 10%
ath_rate_minstrel: EWMA rolloff level set to 75%
ath_rate_minstrel: max segment size in the mrr set to 6000 us
ar71xx-wdt: enabling watchdog timer

comment:3 Changed 6 years ago by jogo

The difference to mine, which is likely pointing to the problem is this:

NAND flash driver for RouterBoard 4xx series version 0.2.0
ONFI flash detected
ONFI param page 0 valid
NAND device: Manufacturer ID: 0x20, Chip ID: 0xf1 (ST Micro NAND01GW3B2CN6)

On mine I have

NAND flash driver for RouterBoard 4xx series version 0.2.0
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)

I will see what I can come up with.

Changed 6 years ago by honza@…

493g NAND chipset

comment:4 Changed 6 years ago by honza@…

I attached photo of NAND chipset of my board.

Thanks a lot for help.

comment:5 in reply to: ↑ description Changed 6 years ago by anonymous

I am having the same problem. My NAND device is also being identified as ST Micro... I was curious if you have made any headway on finding a solution. Thank You.

comment:6 Changed 6 years ago by pmootrey@…

I can confirm this issue with ST nand also.

comment:7 Changed 6 years ago by Mihaloo

There have true mtd bit range from RB493G

# cat /proc/mtd
dev: size erasesize name
mtd0: 003c0000 00020000 "RouterBoard NAND Boot"
mtd1: 07c00000 00020000 "RouterBoard NAND Main"
mtd2: 00040000 00020000 "RouterBoard NAND Booter"

File System Mouting:

/dev/mtdblock1 on / type yaffs (rw,noatime)
/proc on /proc type proc (rw)
/dev/mtdblock0 on /boot type yaffs (rw,noatime)
devpts on /dev/pts type devpts (rw,mode=600)
tmpfs on /ram type tmpfs (rw)
sysfs on /sys type sysfs (rw)
none on /proc/bus/usb type usbfs (rw)

comment:8 Changed 6 years ago by Mihaloo

/dev/mtdblock1 on / type yaffs (rw,noatime)
/proc on /proc type proc (rw)
/dev/mtdblock0 on /boot type yaffs (rw,noatime)
devpts on /dev/pts type devpts (rw,mode=600)
tmpfs on /ram type tmpfs (rw)
sysfs on /sys type sysfs (rw)
none on /proc/bus/usb type usbfs (rw)

# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 003c0000 00020000 "RouterBoard NAND Boot"
mtd1: 07c00000 00020000 "RouterBoard NAND Main"
mtd2: 00040000 00020000 "RouterBoard NAND Booter"

comment:9 Changed 6 years ago by pmootrey@…

Has anyone made any progress on this issue?

comment:10 Changed 6 years ago by flyn

I am having trouble with persistent NAND too. I can write to my root filesystem, but following a reboot the changes are lost.

dmesg | grep NAND says:

JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
NAND flash driver for RouterBoard 4xx series version 0.2.0
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
Creating 3 MTD partitions on "NAND 128MiB 3,3V 8-bit":

also:

mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=E40000, len=71C0000
0x000000e40000-0x000008000000 : "rootfs_data"

mount:

rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,noatime,mode=600)
/dev/mtdblock7 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
none on /proc/bus/usb type usbfs (rw,relatime)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
/dev/sda2 on /mnt/sda2 type ext2 (rw,relatime,user_xattr,barrier=1,data=ordered)

I installed OpenWrt using:

mtd erase kernel
mtd erase rootfs
mount /dev/mtdblock5 /mnt
cp openwrt-ar71xx-nand-vmlinux.elf /mnt/kernel
umount /mnt
mtd write openwrt-ar71xx-nand-root.squashfs rootfs
sync

comment:11 Changed 6 years ago by vx

rb450g, same issue...

NAND device: Manufacturer ID: 0x20, Chip ID: 0xdc (ST Micro NAND04GW3B2DN6)

comment:12 Changed 6 years ago by vx

try this hack:

--- linux-2.6.39.4.orig/drivers/mtd/nand/nand_bbt.c     2011-08-03 21:43:28.000000000 +0200
+++ linux-2.6.39.4-test/drivers/mtd/nand/nand_bbt.c     2012-02-03 11:45:51.000000000 +0100
@@ -167,6 +167,7 @@
                if (p[td->offs + i] != td->pattern[i])
                        return -1;
        }
+#if 0
        /* Need to check location 1 AND 6? */
        if (td->options & NAND_BBT_SCANBYTE1AND6) {
                for (i = 0; i < td->len; i++) {
@@ -174,6 +175,7 @@
                                return -1;
                }
        }
+#endif
        return 0;
 }

comment:13 Changed 6 years ago by imptech

I took a different approach:

--- a/drivers/mtd/nand/rb4xx_nand.c
+++ b/drivers/mtd/nand/rb4xx_nand.c
@@ -232,6 +232,12 @@ static int __devinit rb4xx_nand_probe(st
 	if (info->mtd.writesize == 512)
 		info->chip.ecc.layout = &rb4xx_nand_ecclayout;
 
+        // Workaround strange bad-block table issues with ST chip on RB493G.
+        if (strcmp(info->mtd.name, "NAND01GW3B2CN6") == 0) {
+                printk(KERN_INFO DRV_NAME ": ST NAND detected, using flash BBT.");
+                info->chip.options |= NAND_USE_FLASH_BBT;
+        }
+
 	ret = nand_scan_tail(&info->mtd);
 	if (ret) {
 		return -ENXIO;

For different NAND chips you'd have to change the string.

I seriously doubt this is the "right" solution, but its working, which is better than the alternative. Basically, I observed that every single page gets marked bad after the first write, but seemingly only after the first reboot. Without actually getting to the bottom the issue, this flag moves the bad block table into the regular flash area, where it seems to be more safe. Hopefully this information will give somebody more knowledgable an idea of where to look for the real problem.

I could not get my RB to run correctly using a squashfs based install (kernel panic on boot), but wget2nand over the default yaffs works perfectly.

comment:14 Changed 6 years ago by anonymous

Current trunk, initramfs image, RB493B, nand 01gw3b2cn6
While trying to mount mtdblock device:
[ 2977.380000] yaffs: dev is 32505856 name is "mtdblock0" ro
[ 2977.380000] yaffs: passed flags ""
[ 2977.390000] yaffs: Attempting MTD mount of 31.0,"mtdblock0"
[ 2977.390000] yaffs: MTD device is not NAND it's type 3
[ 2977.390000] yaffs: dev is 32505856 name is "mtdblock0" ro
[ 2977.390000] yaffs: passed flags ""
[ 2977.400000] yaffs: Attempting MTD mount of 31.0,"mtdblock0"
[ 2977.400000] yaffs: MTD device is not NAND it's type 3

Whole dmesg:
[ 0.000000] Linux version 3.3.8 (nop@blackbox) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #2 Sun Jun 10 00:36:35 VOLT 2012
[ 0.000000] MyLoader: sysp=ffffffff, boardp=ffffffff, parts=ffffffff
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[ 0.000000] SoC: Atheros AR7161 rev 2
[ 0.000000] Clocks: CPU:680.000MHz, DDR:340.000MHz, AHB:170.000MHz, Ref:40.000MHz
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 08000000 @ 00000000 (usable)
[ 0.000000] User-defined physical RAM map:
[ 0.000000] memory: 10000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Zone PFN ranges:
[ 0.000000] Normal 0x00000000 -> 0x00010000
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] Early memory PFN ranges
[ 0.000000] 0: 0x00000000 -> 0x00010000
[ 0.000000] On node 0 totalpages: 65536
[ 0.000000] free_area_init_node: node 0, pgdat 803127a0, node_mem_map 81000000
[ 0.000000] Normal zone: 512 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 65024 pages, LIFO batch:15
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024
[ 0.000000] Kernel command line: console=ttyS0,115200 gpio=4023 HZ=340000000 mem=256M kmac=00:0C:42:AA:20:1B board=493G boot=1 mlc=2 rootfstype=yaffs noinitrd
[ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Writing ErrCtl register=00018700
[ 0.000000] Readback ErrCtl register=00018700
[ 0.000000] Memory: 253188k/262144k available (2277k kernel code, 8956k reserved, 489k data, 3284k init, 0k highmem)
[ 0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:48
[ 0.000000] Calibrating delay loop... 452.19 BogoMIPS (lpj=2260992)
[ 0.060000] pid_max: default: 32768 minimum: 301
[ 0.060000] Mount-cache hash table entries: 512
[ 0.070000] NET: Registered protocol family 16
[ 0.070000] gpiochip_add: registered GPIOs 0 to 15 on device: ath79
[ 0.080000] MIPS: machine is MikroTik RouterBOARD 493G
[ 2.680000] registering PCI controller with io_map_base unset
[ 2.690000] bio: create slab <bio-0> at 0
[ 2.690000] PCI host bridge to bus 0000:00
[ 2.700000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x17ffffff]
[ 2.700000] pci_bus 0000:00: root bus resource [io 0x0000]
[ 2.710000] Switching to clocksource MIPS
[ 2.720000] NET: Registered protocol family 2
[ 2.720000] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 2.720000] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[ 2.730000] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[ 2.740000] TCP: Hash tables configured (established 8192 bind 8192)
[ 2.740000] TCP reno registered
[ 2.750000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 2.750000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 2.760000] NET: Registered protocol family 1
[ 2.760000] PCI: CLS 0 bytes, default 32
[ 6.450000] yaffs built Jun 10 2012 00:00:48 Installing.
[ 6.450000]
[ 6.450000]
[ 6.450000]
[ 6.450000]
[ 6.450000] YAFFS-WARNING CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED selected.
[ 6.450000]
[ 6.450000]
[ 6.450000]
[ 6.450000] msgmni has been set to 494
[ 6.450000] io scheduler noop registered
[ 6.450000] io scheduler deadline registered (default)
[ 6.460000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[ 6.490000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[ 6.500000] console [ttyS0] enabled, bootconsole disabled
[ 6.510000] gpiochip_add: registered GPIOs 32 to 40 on device: spi-rb4xx-cpld
[ 6.520000] m25p80 spi0.0: pm25lv512 (64 Kbytes)
[ 6.520000] Creating 4 MTD partitions on "spi0.0":
[ 6.530000] 0x000000000000-0x00000000b000 : "routerboot"
[ 6.530000] 0x00000000b000-0x00000000c000 : "hard_config"
[ 6.540000] 0x00000000d000-0x00000000f000 : "bios"
[ 6.550000] 0x00000000f000-0x000000010000 : "soft_config"
[ 6.550000] NAND flash driver for RouterBoard 4xx series version 0.2.0
[ 6.560000] ONFI flash detected
[ 6.560000] ONFI param page 0 valid
[ 6.570000] NAND device: Manufacturer ID: 0x20, Chip ID: 0xf1 (ST Micro NAND01GW3B2CN6)
[ 6.580000] Scanning device for bad blocks
[ 6.730000] Creating 3 MTD partitions on "NAND01GW3B2CN6":
[ 6.740000] 0x000000000000-0x000000040000 : "booter"
[ 6.740000] 0x000000040000-0x000000600000 : "kernel"
[ 6.750000] 0x000000600000-0x000008000000 : "rootfs"
[ 6.760000] mtd: partition "rootfs" set to be root filesystem
[ 6.760000] split_squashfs: no squashfs found in "NAND01GW3B2CN6"
[ 6.800000] GPIO Bitbanged MDIO: probed
[ 6.820000] ag71xx_mdio: probed
[ 6.830000] eth0: Atheros AG71xx at 0xba000000, irq 5
[ 7.160000] eth0: Atheros AR8316 switch driver attached.
[ 7.160000] ar8316: Using port 4 as switch port
[ 12.310000] ag71xx ag71xx.1: eth0: connected to PHY at gpio-ffffffff:00 [uid=004dd041, driver=Atheros AR8216/AR8236/AR8316]
[ 12.320000] eth1: Atheros AG71xx at 0xb9000000, irq 4
[ 12.650000] eth1: Atheros AR8316 switch driver attached.
[ 12.660000] ar8316: Using port 4 as switch port
[ 17.810000] ag71xx ag71xx.0: eth1: connected to PHY at ag71xx-mdio.0:00 [uid=004dd041, driver=Atheros AR8216/AR8236/AR8316]
[ 17.820000] TCP westwood registered
[ 17.830000] NET: Registered protocol family 17
[ 17.830000] 8021q: 802.1Q VLAN Support v1.8
[ 17.850000] Freeing unused kernel memory: 3284k freed
[ 18.390000] Registered led device: rb4xx:yellow:user
[ 18.390000] Registered led device: rb4xx:green:led1
[ 18.390000] Registered led device: rb4xx:green:led2
[ 18.390000] Registered led device: rb4xx:green:led3
[ 18.390000] Registered led device: rb4xx:green:led4
[ 18.390000] Registered led device: rb4xx:green:led5
[ 20.310000] ar71xx: pll_reg 0xb8050014: 0x110000
[ 20.310000] eth0: link up (1000Mbps/Full duplex)
[ 21.520000] eth0: link down
[ 21.740000] Compat-wireless backport release: compat-wireless-2012-05-16-3-gde86a47
[ 21.740000] Backport based on wireless-testing.git master-2012-05-29
[ 21.750000] compat.git: wireless-testing.git
[ 21.770000] cfg80211: Calling CRDA to update world regulatory domain
[ 21.780000] cfg80211: World regulatory domain updated:
[ 21.780000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 21.790000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 21.800000] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 21.810000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 21.820000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 21.820000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 21.880000] NET: Registered protocol family 10
[ 21.970000] SCSI subsystem initialized
[ 22.000000] usbcore: registered new interface driver usbfs
[ 22.000000] usbcore: registered new interface driver hub
[ 22.010000] usbcore: registered new device driver usb
[ 22.140000] device-mapper: ioctl: 4.22.0-ioctl (2011-10-19) initialised: dm-devel@…
[ 22.190000] dm_crypt: Unknown symbol crypto_shash_update (err 0)
[ 22.200000] dm_crypt: Unknown symbol crypto_alloc_ablkcipher (err 0)
[ 22.200000] dm_crypt: Unknown symbol crypto_alloc_shash (err 0)
[ 22.240000] loop: module loaded
[ 22.270000] PPP generic driver version 2.4.2
[ 22.410000] tun: Universal TUN/TAP device driver, 1.6
[ 22.410000] tun: (C) 1999-2004 Max Krasnyansky <maxk@…>
[ 22.460000] IPv4 over IPv4 tunneling driver
[ 22.500000] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 22.600000] NET: Registered protocol family 24
[ 22.640000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 22.640000] ehci-platform ehci-platform: Generic Platform EHCI Controller
[ 22.650000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[ 22.690000] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[ 22.710000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[ 22.710000] hub 1-0:1.0: USB hub found
[ 22.720000] hub 1-0:1.0: 2 ports detected
[ 22.740000] nf_conntrack version 0.5.0 (4007 buckets, 16028 max)
[ 23.110000] nf_conntrack_snmp: Unknown symbol nf_conntrack_broadcast_help (err 0)
[ 23.130000] nf_nat_snmp_basic: Unknown symbol nf_nat_snmp_hook (err 0)
[ 23.190000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 23.200000] ohci-platform ohci-platform: Generic Platform OHCI Controller
[ 23.210000] ohci-platform ohci-platform: new USB bus registered, assigned bus number 2
[ 23.220000] ohci-platform ohci-platform: irq 14, io mem 0x1c000000
[ 23.280000] hub 2-0:1.0: USB hub found
[ 23.280000] hub 2-0:1.0: 2 ports detected
[ 23.300000] uhci_hcd: USB Universal Host Controller Interface driver
[ 23.350000] usbcore: registered new interface driver usblp
[ 23.370000] Initializing USB Mass Storage driver...
[ 23.380000] usbcore: registered new interface driver usb-storage
[ 23.380000] USB Mass Storage support registered.
[ 23.400000] usbcore: registered new interface driver ums-alauda
[ 23.410000] usbcore: registered new interface driver ums-cypress
[ 23.430000] usbcore: registered new interface driver ums-datafab
[ 23.450000] usbcore: registered new interface driver ums-freecom
[ 23.460000] usbcore: registered new interface driver ums-isd200
[ 23.480000] usbcore: registered new interface driver ums-jumpshot
[ 23.500000] usbcore: registered new interface driver ums-karma
[ 23.510000] usbcore: registered new interface driver ums-sddr09
[ 23.530000] usbcore: registered new interface driver ums-sddr55
[ 23.550000] usbcore: registered new interface driver ums-usbat
[ 23.580000] usbcore: registered new interface driver usbhid
[ 23.590000] usbhid: USB HID core driver
[ 25.610000] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 25.610000] device eth0 entered promiscuous mode
[ 25.630000] ADDRCONF(NETDEV_UP): br-lan: link is not ready
[ 25.640000] ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 25.640000] ADDRCONF(NETDEV_UP): eth1.1: link is not ready
[ 25.660000] device eth1.1 entered promiscuous mode
[ 25.660000] device eth1 entered promiscuous mode
[ 25.670000] ADDRCONF(NETDEV_UP): eth1.2: link is not ready
[ 26.830000] ar71xx: pll_reg 0xb8050010: 0x110000
[ 26.830000] eth1: link up (1000Mbps/Full duplex)
[ 26.850000] ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[ 26.850000] br-lan: port 2(eth1.1) entered forwarding state
[ 26.860000] br-lan: port 2(eth1.1) entered forwarding state
[ 26.860000] ADDRCONF(NETDEV_CHANGE): eth1.1: link becomes ready
[ 26.890000] ADDRCONF(NETDEV_CHANGE): eth1.2: link becomes ready
[ 26.890000] ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[ 27.320000] ar71xx: pll_reg 0xb8050014: 0x110000
[ 27.320000] eth0: link up (1000Mbps/Full duplex)
[ 27.340000] br-lan: port 1(eth0) entered forwarding state
[ 27.340000] br-lan: port 1(eth0) entered forwarding state
[ 27.350000] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 28.860000] br-lan: port 2(eth1.1) entered forwarding state
[ 29.340000] br-lan: port 1(eth0) entered forwarding state
[ 76.390000] yaffs: dev is 32505857 name is "mtdblock1" ro
[ 76.400000] yaffs: passed flags ""
[ 76.400000] yaffs: Attempting MTD mount of 31.1,"mtdblock1"
[ 76.400000] yaffs: MTD device is not NAND it's type 3
[ 76.400000] yaffs: dev is 32505857 name is "mtdblock1" ro
[ 76.410000] yaffs: passed flags ""

comment:15 Changed 6 years ago by imptech

Just popped back on to say that I updated to trunk rev 31923, and now it "just works" for me. No patches necessary.

comment:16 Changed 5 years ago by jogo

  • Resolution set to fixed
  • Status changed from accepted to closed

Okay, I'll assume it got fixed by the kernel updates.

comment:17 Changed 4 years ago by peterwillcn@…

rb951g,same issue.

comment:18 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.