Modify

Opened 10 years ago

Closed 10 years ago

Last modified 4 years ago

#2647 closed defect (fixed)

Can't write to NAND 128MiB 3,3V 8-bit chip on Routerboard153.

Reported by: anonymous Owned by: juhosg
Priority: normal Milestone: Barrier Breaker 14.07
Component: kernel Version:
Keywords: adm5120 Cc:

Description

Can't write to NAND 128MiB 3,3V 8-bit chip on Routerboard153. When I mount the /dev/mtdblock2, mounts with yaffs2, I write data, check data, unmount then try to mount again, it fails. Also fails on mtdblock3. Revision 9494. On boot trxsplit is unable to read from 'rootfs' over and over.

Attachments (2)

capture2.TXT (9.1 KB) - added by anonymous 10 years ago.
Capture of Dmesg
rb153_128mib_nand_test.patch (1.8 KB) - added by juhosg 10 years ago.

Download all attachments as: .zip

Change History (28)

comment:1 Changed 10 years ago by juhosg

  • Keywords adm5120 added
  • Milestone set to Kamikaze
  • Owner changed from developers to juhosg
  • Status changed from new to assigned

The trxsplit issue should be fixed with [9497]. Can you provide a log of the yaffs mounting errors?

comment:2 Changed 10 years ago by anonymous

Revision 9500

Boot errors
adm5120-flash.0: Found 1 x8 devices at 0x0 in 8-bit bank
adm5120-flash.0: Found an alias at 0x20000 for the chip at 0x0
adm5120-flash.0: Found an alias at 0x40000 for the chip at 0x0
adm5120-flash.0: Found an alias at 0x60000 for the chip at 0x0
adm5120-flash.0: Found an alias at 0x80000 for the chip at 0x0
adm5120-flash.0: Found an alias at 0xa0000 for the chip at 0x0
adm5120-flash.0: Found an alias at 0xc0000 for the chip at 0x0
adm5120-flash.0: Found an alias at 0xe0000 for the chip at 0x0
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x100000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x120000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x140000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x160000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x180000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x1a0000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x1c0000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x1e0000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x200000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x220000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x240000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x260000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x280000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x2a0000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x2c0000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x2e0000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x300000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x320000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x340000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x360000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x380000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x3a0000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x3c0000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x3e0000
number of JEDEC chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
adm5120-flash.0: reducing map size to 128KiB
adm5120-flash.0: found at 0x1FC00000, size:128KiB, width:8 bits
adm5120-flash.0: adding static partitions
Creating 2 MTD partitions on "adm5120-flash.0":

Dmesg after boot, mounting etc.

dmesg
Linux version 2.6.23.1 (sean@…) (gcc version 4.1.2) #1 Sun Nov 4 12:06:58 MST 2007
console [early0] enabled
CPU revision is: 0001800b
SoC : ADM5120 revision 8, running at 175MHz
Bootdev : NAND flash
Prom : RouterBOOT
Determined physical RAM map:

memory: 02000000 @ 00000000 (usable)

Initrd not found or empty - disabling initrd
On node 0 totalpages: 8192

Normal zone: 64 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 8128 pages, LIFO batch:0
Movable zone: 0 pages used for memmap

Built 1 zonelists in Zone order. Total pages: 8128
Kernel command line: console=ttyS0,115200 rootfstype=squashfs,yaffs2,jffs2 init=/etc/preinit
Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes.
Primary data cache 8kB, 2-way, linesize 16 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
PID hash table entries: 128 (order: 7, 512 bytes)
Using 87.500 MHz high precision timer.
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 29056k/32768k available (1913k kernel code, 3712k reserved, 330k data, 1068k init, 0k highmem)
Calibrating delay loop... 172.03 BogoMIPS (lpj=344064)
Mount-cache hash table entries: 512
adm5120: registered board 'Generic ADM5120 board'
adm5120: registered board 'Cellvision CAS-630/630W'
adm5120: registered board 'Cellvision CAS-670/670W'
adm5120: registered board 'Cellvision CAS-700/700W'
adm5120: registered board 'Cellvision CAS-771/771W'
adm5120: registered board 'Cellvision CAS-790'
adm5120: registered board 'Cellvision CAS-861/861W'
adm5120: registered board 'Compex WPP54G'
adm5120: registered board 'Compex WPP54AG'
adm5120: registered board 'Compex WP54G-WRT'
adm5120: registered board 'Compex WP54G'
adm5120: registered board 'Compex WP54AG'
adm5120: registered board 'Compex NetPassage 28G'
adm5120: registered board 'Compex NetPassage 27G'
adm5120: registered board 'Edimax BR-6104WG/6114WG'
adm5120: registered board 'Edimax BR-6104K/6104KP'
adm5120: registered board 'Infineon EASY 83000 Reference Board'
adm5120: registered board 'Infineon EASY 5120-WVoIP Reference Board'
adm5120: registered board 'Infineon EASY 5120-RT Reference Board'
adm5120: registered board 'Infineon EASY 5120P-ATA Reference Board'
adm5120: registered board 'Mikrotik RouterBOARD 192'
adm5120: registered board 'Mikrotik RouterBOARD 153'
adm5120: registered board 'Mikrotik RouterBOARD 150'
adm5120: registered board 'Mikrotik RouterBOARD 133C'
adm5120: registered board 'Mikrotik RouterBOARD 133'
adm5120: registered board 'Mikrotik RouterBOARD 112'
adm5120: registered board 'Mikrotik RouterBOARD 111'
adm5120: registered board 'ZyXEL Prestige 335/335WT'
adm5120: registered board 'ZyXEL Prestige 334WT'
NET: Registered protocol family 16
adm5120: setting up board 'Mikrotik RouterBOARD 153'
adm5120: system has PCI BIOS
registering PCI controller with io_map_base unset
PCI: mapping irq for 0000:00:03.0 pin:1, irq:16
Time: MIPS clocksource has been installed.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
yaffs Nov 4 2007 12:03:48 Installing.
io scheduler noop registered
io scheduler deadline registered (default)
Serial: AMBA driver $Revision: 1.41 $
APB:UART0: ttyS0 at MMIO 0x12600000 (irq = 9) is a AMBA
console handover: boot [early0] -> real [ttyS0]
APB:UART1: ttyS1 at MMIO 0x12800000 (irq = 10) is a AMBA
ADM5120 built-in ethernet switch driver version 0.1.0
adm5120-flash.0: probing at 0x1FC00000, size:1024KiB, width:8 bits
CFI: Found no adm5120-flash.0 device at location zero
Found: PMC Pm39LV010
adm5120-flash.0: Found 1 x8 devices at 0x0 in 8-bit bank
adm5120-flash.0: Found an alias at 0x20000 for the chip at 0x0
adm5120-flash.0: Found an alias at 0x40000 for the chip at 0x0
adm5120-flash.0: Found an alias at 0x60000 for the chip at 0x0
adm5120-flash.0: Found an alias at 0x80000 for the chip at 0x0
adm5120-flash.0: Found an alias at 0xa0000 for the chip at 0x0
adm5120-flash.0: Found an alias at 0xc0000 for the chip at 0x0
adm5120-flash.0: Found an alias at 0xe0000 for the chip at 0x0
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x100000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x120000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x140000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x160000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x180000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x1a0000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x1c0000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x1e0000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x200000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x220000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x240000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x260000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x280000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x2a0000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x2c0000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x2e0000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x300000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x320000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x340000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x360000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x380000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x3a0000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x3c0000
adm5120-flash.0: Found different chip or no chip at all (mfr 0xff, id 0xff) at 0x3e0000
number of JEDEC chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
adm5120-flash.0: reducing map size to 128KiB
adm5120-flash.0: found at 0x1FC00000, size:128KiB, width:8 bits
adm5120-flash.0: adding static partitions
Creating 2 MTD partitions on "adm5120-flash.0":
0x00000000-0x00010000 : "booter"
0x00010000-0x00020000 : "firmware"
NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 738 at 0x05c40000
Creating 2 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x00000000-0x00400000 : "kernel"
0x00400000-0x08000000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
split_squashfs: no squashfs found in "NAND 128MiB 3,3V 8-bit"
nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP vegas registered
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
802.1Q VLAN Support v1.8 Ben Greear <greearb@…>
All bugs added by David S. Miller <davem@…>
trxsplit: searching TRX header in 'booter'
trxsplit: searching TRX header in 'firmware'
trxsplit: 'kernel' is not a NOR flash, skipped
trxsplit: 'rootfs' is not a NOR flash, skipped
Freeing unused kernel memory: 1068k freed
br-lan: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.
Algorithmics/MIPS FPU Emulator v1.5
device eth0 entered promiscuous mode
br-lan: port 1(eth0) entering learning state
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state
br-lan: port 1(eth0) entering disabled state
device eth0 left promiscuous mode
br-lan: port 1(eth0) entering disabled state
device eth0 entered promiscuous mode
br-lan: port 1(eth0) entering learning state
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state
PPP generic driver version 2.4.2
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs: auto selecting yaffs2
save exit: isCheckpointed 1
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs: auto selecting yaffs2
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
root@OpenWrt:/$

Changed 10 years ago by anonymous

Capture of Dmesg

comment:3 Changed 10 years ago by anonymous

Last line that doesn't show on dmesg when trying to mount mtdblock2 is
mount: mouning /dev/mtdblock2 on /mnt failed: Invalid argument.

command I am running: mount /dev/mtdblock2 /mnt

comment:4 Changed 10 years ago by anonymous

please, can anyone offer any advice on this issue - i have a box of 20 rb153 boards with 128 MiB nand chips on them that i cannot load.

this is what happens: (build 7406)

root@OpenWrt:~# dmesg |grep NAND
JFFS2 version 2.2. (NAND) (SUMMARY) (C) 2001-2006 Red Hat, Inc.
NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit)
Creating 2 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x00000000-0x00400000 : "RouterBoard NAND Boot"
0x00400000-0x08000000 : "RouterBoard NAND Main"
root@OpenWrt:~#
root@OpenWrt:~# mkdir /tmp/1
root@OpenWrt:~# mkdir /tmp/2
root@OpenWrt:~#
root@OpenWrt:~# ls /dev/mtdb*
/dev/mtdblock0 /dev/mtdblock1
root@OpenWrt:~#
root@OpenWrt:~# mount /dev/mtdblock0 /tmp/1
yaffs: dev is 32505856 name is "mtdblock0"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.0, "mtdblock0"
yaffs: auto selecting yaffs2
block 1 is bad
block 2 is bad
block 3 is bad
block 4 is bad
block 5 is bad
block 6 is bad
block 7 is bad
block 8 is bad
block 9 is bad
block 10 is bad
block 11 is bad
block 12 is bad
block 13 is bad
block 14 is bad
block 15 is bad
block 16 is bad
block 17 is bad
block 18 is bad
block 19 is bad
block 20 is bad
block 21 is bad
block 22 is bad
block 23 is bad
block 24 is bad
block 25 is bad
root@OpenWrt:~# mount /dev/mtdblock1 /tmp/2
end_request: I/O error, dev mtdblock1, sector 0
SQUASHFS error: sb_bread failed reading block 0x0
yaffs: dev is 32505857 name is "mtdblock1"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.1, "mtdblock1"
yaffs: auto selecting yaffs2
block 1 is bad
block 2 is bad
block 3 is bad
block 4 is bad
block 5 is bad
block 6 is bad
block 7 is bad
block 21 is bad
block 22 is bad
block 57 is bad
block 94 is bad
block 99 is bad
block 175 is bad
block 271 is bad
block 297 is bad
block 318 is bad
block 372 is bad
block 419 is bad
block 440 is bad
block 441 is bad
block 442 is bad
block 443 is bad
block 444 is bad
block 529 is bad
block 537 is bad
block 538 is bad
block 797 is bad
root@OpenWrt:~#
root@OpenWrt:~#
root@OpenWrt:~#
root@OpenWrt:~#
root@OpenWrt:~# df
Filesystem 1k-blocks Used Available Use% Mounted on
tmpfs 512 0 512 0% /dev
/dev/mtdblock0 4096 4096 0 100% /tmp/1
/dev/mtdblock1 126976 5504 121472 4% /tmp/2
root@OpenWrt:~#
root@OpenWrt:~#

comment:5 Changed 10 years ago by anonymous

here is with better formatting:

<pre>
root@OpenWrt:~# dmesg |grep NAND
JFFS2 version 2.2. (NAND) (SUMMARY) (C) 2001-2006 Red Hat, Inc.
NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit)
Creating 2 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x00000000-0x00400000 : "RouterBoard NAND Boot"
0x00400000-0x08000000 : "RouterBoard NAND Main"
root@OpenWrt:~#
root@OpenWrt:~# mkdir /tmp/1
root@OpenWrt:~# mkdir /tmp/2
root@OpenWrt:~#
root@OpenWrt:~# ls /dev/mtdb*
/dev/mtdblock0 /dev/mtdblock1
root@OpenWrt:~#
root@OpenWrt:~# mount /dev/mtdblock0 /tmp/1
yaffs: dev is 32505856 name is "mtdblock0"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.0, "mtdblock0"
yaffs: auto selecting yaffs2
block 1 is bad
block 2 is bad
block 3 is bad
block 4 is bad
block 5 is bad
block 6 is bad
block 7 is bad
block 8 is bad
block 9 is bad
block 10 is bad
block 11 is bad
block 12 is bad
block 13 is bad
block 14 is bad
block 15 is bad
block 16 is bad
block 17 is bad
block 18 is bad
block 19 is bad
block 20 is bad
block 21 is bad
block 22 is bad
block 23 is bad
block 24 is bad
block 25 is bad
root@OpenWrt:~# mount /dev/mtdblock1 /tmp/2
end_request: I/O error, dev mtdblock1, sector 0
SQUASHFS error: sb_bread failed reading block 0x0
yaffs: dev is 32505857 name is "mtdblock1"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.1, "mtdblock1"
yaffs: auto selecting yaffs2
block 1 is bad
block 2 is bad
block 3 is bad
block 4 is bad
block 5 is bad
block 6 is bad
block 7 is bad
block 21 is bad
block 22 is bad
block 57 is bad
block 94 is bad
block 99 is bad
block 175 is bad
block 271 is bad
block 297 is bad
block 318 is bad
block 372 is bad
block 419 is bad
block 440 is bad
block 441 is bad
block 442 is bad
block 443 is bad
block 444 is bad
block 529 is bad
block 537 is bad
block 538 is bad
block 797 is bad
root@OpenWrt:~#
root@OpenWrt:~#
root@OpenWrt:~#
root@OpenWrt:~#
root@OpenWrt:~# df
Filesystem 1k-blocks Used Available Use% Mounted on
tmpfs 512 0 512 0% /dev
/dev/mtdblock0 4096 4096 0 100% /tmp/1
/dev/mtdblock1 126976 5504 121472 4% /tmp/2
root@OpenWrt:~#
root@OpenWrt:~#
</pre>

comment:6 follow-up: Changed 10 years ago by juhosg

With the patch you can create the same 'yaffs' module that we use for the RB532 boards. Can you try it? We have no RB153 devices, so i don't know it will fix your problem or not, but it is worth a rehearsal.

The 'trxsplit' issue was fixed in [9497].

comment:7 in reply to: ↑ 6 Changed 10 years ago by anonymous

thank you juhosg for your kind and helpful response.
i really want to find a way to make this work.

i will see if i can figure out how to make that module and test it.

i will advise ASAP thank you for your help.

Replying to juhosg:

With the patch you can create the same 'yaffs' module that we use for the RB532 boards. Can you try it? We have no RB153 devices, so i don't know it will fix your problem or not, but it is worth a rehearsal.

The 'trxsplit' issue was fixed in [9497].

comment:8 Changed 10 years ago by anonymous

is it outside the scope of this ticket to ask which directory i place the patch?

comment:9 follow-up: Changed 10 years ago by anonymous

i assume here:

i will try it

./target/linux/adm5120/patches-2.6.23

comment:10 in reply to: ↑ 9 Changed 10 years ago by juhosg

Replying to anonymous:

i assume here:

i will try it

./target/linux/adm5120/patches-2.6.23

You need to apply it on your OpenWrt sources.

cd /into/your/openwrt/sources/
patch -p0 < rb153_128mib_nand_test.patch
make target/linux-clean
make

comment:11 follow-up: Changed 10 years ago by anonymous

thank you
i have patched build 9632 and am compiling now..

comment:12 in reply to: ↑ 11 ; follow-up: Changed 10 years ago by anonymous

ok

thank you for the patch.. we are MUCH closer now.

when i format nand, and boot from the patched elf image and mount mtdblock2 and mtdblock3 i get:

root@OpenWrt:/# df
Filesystem 1k-blocks Used Available Use% Mounted on
none 15056 20 15036 0% /tmp
tmpfs 512 0 512 0% /dev
/dev/mtdblock2 4096 2048 2048 50% /tmp/kernel
/dev/mtdblock3 126976 2176 124800 2% /tmp/rootfs

so, the only issue now is that the first partition only has 2048 bytes free which is not large enough for the kernel..

however on the good side, i copied a 2mb file there, rebooted from netboot and mounted and the file survived the reboot..very good!

what do i have to change in the patch file to make this partition to have 4096 bytes free?

we are almost there! thank you again for your help. i will await your reply.

comment:13 in reply to: ↑ 12 Changed 10 years ago by juhosg

Replying to anonymous:

what do i have to change in the patch file to make this partition to have 4096 bytes free?

I guess you need to restore this line (CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=0) in target/linux/adm5120/router_le/config-2.6.23

comment:14 Changed 10 years ago by anonymous

thank you - i have made that modification and are recompiling now, i will let you know if that worked. i am testing latest build 9663.

comment:15 Changed 10 years ago by anonymous

ok
that seemed to help with the space.
now i have enough room for the kernel.

the next issue i have now is once i copy the kernel and boot from nand i get the message that the kernel is not an elf image.

i tried the vmlinux file from both

./build_dir/linux-adm5120_router_le/linux-2.6.23.9/vmlinux

and
./build_dir/linux-adm5120_router_le/vmlinux

both give me the not an elf image error...

the partitions seem to work now though! thanks, now i just need to determine why it doesnt recognize the file as an elf image.

any ideas there?

comment:16 Changed 10 years ago by anonymous

PS i am renaming the vmlinux file to the name kernel and placing it in the first 4mb partition

comment:17 follow-up: Changed 10 years ago by anonymous

ok
i compiled build 9500 with your patch, and now it works!
thank you very much, i really appreciate your help.
so just for the knowledgebase if anyone else comes across this ticket, in order to get the 128mb nand rb153 to work you need to use the
rb153_128mib_nand_test.patch patch, and then add back in the CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=0 into the config.

then everything works like a charm!

you may close the ticket.

Changed 10 years ago by juhosg

comment:18 in reply to: ↑ 17 ; follow-up: Changed 10 years ago by juhosg

  • Priority changed from highest to normal

Replying to anonymous:

ok
i compiled build 9500 with your patch, and now it works!

weird, it should work with trunk as well

thank you very much, i really appreciate your help.
so just for the knowledgebase if anyone else comes across this ticket, in order to get the 128mb nand rb153 to work you need to use the
rb153_128mib_nand_test.patch patch, and then add back in the CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=0 into the config.

i have updated the patch, it don't remove the CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS key from now

then everything works like a charm!

you may close the ticket.

ok, i will close it when it will works with the 64MiB and with the 128MiB chips

comment:19 in reply to: ↑ 18 Changed 10 years ago by anonymous

Replying to juhosg:

ok, i will close it when it will works with the 64MiB and with the 128MiB chips

i think i have a 64mb board here too i will test with that board and your patch and let you know. thank you.

comment:20 Changed 10 years ago by anonymous

sorry havent had time to test the 64mb board yet - hope to within the next 24 hours i will let you know.

FYI your patch works with latest build 9707 perfectly!

comment:21 Changed 10 years ago by anonymous

to update the ticket, your patch does not work with the 64mb nand board, it breaks.
i am able to mount mtdblock2 and mtdblock3 and copy the files, but there are some bad block messages on the console and when i reboot i get a kernel not found.

i upgraded board to RouterBOOT 2.8, formatted nand, mounted block2 and 3, copied the patched kernel and rootfs, and reboot. i get kernel not found.

yaffs: dev is 32505858 name is "mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs: dev is 32505859 name is "mtdblock3"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.3, "mtdblock3"
nand_erase: attempt to erase a bad block at page 0x00004fa0
**>> Erasure failed 382
yaffs: marking block 381 bad<4>**>> Block 382 retired
nand_erase: attempt to erase a bad block at page 0x00018fe0
**>> Erasure failed 2944
yaffs: marking block 2943 bad<4>**>> Block 2944 retired
nand_erase: attempt to erase a bad block at page 0x00019020
**>> Erasure failed 2946
yaffs: marking block 2945 bad<4>**>> Block 2946 retired
nand_erase: attempt to erase a bad block at page 0x00019060
**>> Erasure failed 2948
yaffs: marking block 2947 bad<4>**>> Block 2948 retired

root@OpenWrt:/# mount /dev/mtdblock2 /tmp/1
root@OpenWrt:/# mount /dev/mtdblock3 /tmp/2
root@OpenWrt:/# df
Filesystem           1k-blocks      Used Available Use% Mounted on
none                     15056        24     15032   0% /tmp
tmpfs                      512         0       512   0% /dev
/dev/mtdblock2            4096        96      4000   2% /tmp/1
/dev/mtdblock3           61440       160     61280   0% /tmp/2

RouterBoard 153

CPU frequency: 175 MHz
  Memory size:  32 MB

Press any key within 2 seconds to enter setup..
kernel not found

comment:22 Changed 10 years ago by anonymous

it seems like the 64mb wants the new OOB layout and the 128mb wants the old OOB layout.. im not sure how you would put some autodetect in there or what.

let me know if you need me to test anything else. thanks.

comment:23 Changed 10 years ago by florian

Same happens with some rb532a with 64Mbit chip, here is the patch to be used :

Index: target/linux/rb532/files/arch/mips/rb500/devices.c
===================================================================
--- target/linux/rb532/files/arch/mips/rb500/devices.c  (revision 10934)
+++ target/linux/rb532/files/arch/mips/rb500/devices.c  (working copy)
@@ -154,6 +154,19 @@
                 writeb(cmd, chip->IO_ADDR_W);
 }

+/*
+ * We need to use the OLD Yaffs-1 OOB layout, otherwise the RB bootloader
+ * will not be able to find the kernel that we load.  So set the oobinfo
+ * when creating the partitions
+ */
+
+static struct nand_ecclayout rb1xx_nand_ecclayout = {
+        .eccbytes       = 6,
+        .eccpos         = { 8, 9, 10, 13, 14, 15 },
+        .oobavail       = 9,
+        .oobfree        = { { 0, 4 }, { 6, 2 }, { 11, 2 }, { 4, 1 } }
+};
+
 static struct resource nand_slot0_res[] = {
        [0] = {
                .name = "nand_membase",
@@ -277,6 +290,7 @@
        rb500_nand_data.chip.partitions = rb500_partition_info;
        rb500_nand_data.chip.chip_delay = NAND_CHIP_DELAY;
        rb500_nand_data.chip.options = NAND_NO_AUTOINCR;
+       rb500_nand_data.chip.ecclayout = &rb1xx_nand_ecclayout;
 }

comment:24 Changed 10 years ago by juhosg

Should be fixed with [11375] and [11376]. Please test it.

comment:25 Changed 10 years ago by juhosg

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

I assume it is working now.

comment:26 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.