Hi All,

We've had a successful port of OpenWRT to the rb751 for some time but a recent 
batch of new boards refuse to take our pxeboot image after erasing the kernel 
and rootfs mtd partitions.  Upon examination of the boards, it appears that 
MikroTik has moved from an 8Mb flash to a 16Mb flash. (Hooray!)  These boards 
can be identified by a longer MMCX connector out the back of the case, (making 
an L MMCX connector usable ) and a mac address starting with D4:CA.....

What we see happening is that when our PXEboot image loads, we see a kernel 
mtd1 partition as 3.8M in size, (as before) but when we unlock it, and format 
it, we see 768K "used" after mount.   However, nothing is in the mounted 
directory.

The main difference we see in dmesg between the old rb751s and the newer rb751s 
is this:

Old Boards:
[    1.130000] NAND flash driver for the RouterBOARD 750 version 0.1.0
[    1.200000] NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 
64MiB 3,3V 8-bit)
[    1.300000] Scanning device for bad blocks
[    1.650000] Creating 3 MTD partitions on "NAND 64MiB 3,3V 8-bit":
[    1.720000] 0x000000000000-0x000000040000 : "booter"
[    1.790000] 0x000000040000-0x000000400000 : "kernel"
[    1.850000] 0x000000400000-0x000004000000 : "rootfs"
[    1.910000] mtd: partition "rootfs" set to be root filesystem
[    1.980000] mtd: partition "rootfs_data" created automatically, ofs=98C000, 
len=3674000 
[    2.080000] 0x00000098c000-0x000004000000 : "rootfs_data"

New Boards:
[    1.010000] NAND flash driver for the RouterBOARD 750 version 0.1.0
[    1.020000] NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 
128MiB 3,3V 8-bit)
[    1.030000] Scanning device for bad blocks
[    1.090000] Bad eraseblock 687 at 0x0000055e0000
[    1.130000] Creating 3 MTD partitions on "NAND 128MiB 3,3V 8-bit":
[    1.130000] 0x000000000000-0x000000040000 : "booter"
[    1.140000] 0x000000040000-0x000000400000 : "kernel"
[    1.150000] 0x000000400000-0x000008000000 : "rootfs"
[    1.150000] mtd: partition "rootfs" set to be root filesystem


root@OpenWrt:/etc/init.d# mount -t yaffs2 /dev/mtdblock1 /mnt/kernel
root@OpenWrt:/etc/init.d# df -h
Filesystem                Size      Used Available Use% Mounted on
tmpfs                    14.4M     60.0K     14.3M   0% /tmp
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mtdblock1            3.8M    768.0K      3.0M  20% /mnt/kernel

A du shows that there is no data other than the bare directories

root@OpenWrt:/mnt# du -h *
2.0K    kernel/lost+found
4.0K    kernel

Running some diagnostics reveals that the partition is the size we expect.

root@OpenWrt:/etc/init.d# mtdinfo /dev/mtd1
mtd1
Name:                           kernel
Type:                           nand
Eraseblock size:                131072 bytes, 128.0 KiB
Amount of eraseblocks:          30 (3932160 bytes, 3.8 MiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  512 bytes
OOB size:                       64 bytes
Character device major/minor:   90:2
Bad blocks are allowed:         true
Device is writable:             true

Erasing seems to be fine.

root@OpenWrt:/usr/sbin# ./flash_erase /dev/mtd1 0 0
Erasing 128 Kibyte @ 3a0000 -- 100 % complete 

But formatting fails:

root@OpenWrt:/usr/sbin# ftl_format /dev/mtd1
Partition size = 3840 kb, erase unit size = 128 kb, 1 transfer units
Reserved 5%, formatted size = 3572224 bytes
Erasing all blocks...
-------+-------+-------+------
Writing erase unit headers...
write failed: Invalid argument
format failed.

So where should we make changes to support the new NAND flash, to get the 3.8M 
back like the old version of flash, on our pxeboot image, and ultimately, our 
kernel and rootfs that we replace RouterOS with?

Any ideas would be greatly appreciated.

Thanks!


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to